diff --git a/.gitignore b/.gitignore index 9c95e51d..6f22fd68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules .vscode docs -.idea/ \ No newline at end of file +.idea/ +/node_modules/ +/.github/ diff --git a/README.md b/README.md index 62e1e53a..93bb82ef 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,11 @@ const res = await client.bank.send({ } }) ``` +### auth `src/modules/auth.ts` +- newStdTx +- queryAccount +- queryAccounts +- queryParams ### bank `src/modules/bank.ts` - send - multiSend @@ -152,11 +157,15 @@ const res = await client.bank.send({ - queryAllBalances - queryTotalSupply - querySupplyOf +- queryDenomMetadata +- queryDenomsMetadata - queryParams -### auth `src/modules/auth.ts` -- newStdTx -- queryAccount -- queryParams +### bank `src/modules/coinswap.ts` +- addLiquidity +- removeLiquidity +- swapOrder +- queryLiquidity + ### distribution `src/modules/distribution.ts` - setWithdrawAddr - withdrawRewards @@ -171,6 +180,14 @@ const res = await client.bank.send({ - queryDelegatorValidators - queryDelegatorWithdrawAddress - queryCommunityPool +### keys `src/modules/farm.ts` +- stakeLp +- unStakeLp +- harvestReward +- queryFarmPools +- queryFarmPool +- queryFarmer +- queryParams ### gov `src/modules/gov.ts` - queryProposal - queryProposals @@ -184,6 +201,20 @@ const res = await client.bank.send({ - submitCommunityTaxUsageProposal - deposit - vote + +### bank `src/modules/htlc.ts` +- createHTLC +- claimHTLC +- queryHTLC +- queryAssetSupply +- queryAssetSupplies +- queryParams +### bank `src/modules/ibc.ts` +- transfer +- queryDenomTrace +- queryDenomTraces +- queryParams +- queryChannels ### keys `src/modules/keys.ts` - add - recover @@ -204,6 +235,46 @@ const res = await client.bank.send({ - queryDenom - queryDenoms - queryNFT +### slashing `src/modules/oracle.ts` +- queryFeed +- queryFeeds +- queryFeedValue +### protobuf `src/modules/protobuf.ts` +- deserializeTx +- unpackMsg +- deserializeSignDoc +- deserializeTxRaw +- deserializeSigningInfo +- deserializePubkey +### slashing `src/modules/random.ts` +- queryRandom +- queryRequest +- request +### slashing `src/modules/service.ts` +- queryDefinition +- queryBinding +- queryBindings +- queryRequest +- queryRequests +- queryRequestsByReqCtx +- queryRequestContext +- queryResponse +- queryResponses +- queryFees +- defineService +- bindService +- updateServiceBinding +- disableServiceBinding +- enableServiceBinding +- invokeService +- setWithdrawAddress +- refundServiceDeposit +- startRequestContext +- pauseRequestContext +- killRequestContext +- updateRequestContext +- withdrawEarnedFees +- withdrawTax ### slashing `src/modules/slashing.ts` - queryParams - querySigningInfo @@ -235,6 +306,7 @@ const res = await client.bank.send({ - queryValidators - searchTxs - queryNetInfo +- queryGlobalAccountNumber ### token `src/modules/token.ts` - issueToken - editToken @@ -257,11 +329,4 @@ const res = await client.bank.send({ - broadcastTx - newTxResult - createMsg -### protobuf `src/modules/protobuf.ts` -- deserializeTx -- unpackMsg -- deserializeSignDoc -- deserializeTxRaw -- deserializeSigningInfo -- deserializePubkey diff --git a/dist/package.json b/dist/package.json index 011803cc..85c7829f 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@irisnet/irishub-sdk", - "version": "2.0.0", + "version": "3.0.0", "description": "IRISHub JavaScript SDK", "main": "index.js", "typings": "index.ts", @@ -26,6 +26,7 @@ "check": "gts check", "clean": "gts clean", "build": "rm -rf dist/* && tsc --emitDeclarationOnly && babel --extensions '.ts' src -d dist/src && cp LICENSE dist/ && cp README.md dist/ && cp package.json dist/ && cp -rf src/types/proto-types dist/src/types/proto-types", + "buildForWindows": "rm -rf dist/* && tsc --emitDeclarationOnly && babel --extensions .ts src -d dist/src && cp LICENSE dist/ && cp README.md dist/ && cp package.json dist/ && cp -rf src/types/proto-types dist/src/types/proto-types", "fix": "gts fix", "docs": "npx typedoc && docker build -t irisnet/docs-irishub-sdk-js .", "proto-gen": "sh ./scripts/protocgen.sh" diff --git a/dist/src/client.d.ts b/dist/src/client.d.ts index c525b16f..df94b8ba 100644 --- a/dist/src/client.d.ts +++ b/dist/src/client.d.ts @@ -53,6 +53,9 @@ export declare class Client { /** Coinswap module */ private _coinswap?; get coinswap(): modules.Coinswap; + /** Farm module */ + private _farm?; + get farm(): modules.Farm; /** NFT module */ private _nft?; get nft(): modules.Nft; diff --git a/dist/src/client.js b/dist/src/client.js index 47c027d3..f17c842f 100644 --- a/dist/src/client.js +++ b/dist/src/client.js @@ -53,6 +53,7 @@ var Client = /*#__PURE__*/function () { (0, _defineProperty2["default"])(this, "_utils", void 0); (0, _defineProperty2["default"])(this, "_tendermint", void 0); (0, _defineProperty2["default"])(this, "_coinswap", void 0); + (0, _defineProperty2["default"])(this, "_farm", void 0); (0, _defineProperty2["default"])(this, "_nft", void 0); (0, _defineProperty2["default"])(this, "_htlc", void 0); (0, _defineProperty2["default"])(this, "_ibc", void 0); @@ -286,6 +287,21 @@ var Client = /*#__PURE__*/function () { return this._coinswap; } + /** Farm module */ + + }, { + key: "farm", + get: function get() { + if (this.config.chainNetwork != consts.ChainNetwork.Iris) { + throw new _errors.SdkError('This module is not supported on the current chain network.', _errors.CODES.Panic); + } + + if (!this._farm) { + this._farm = new modules.Farm(this); + } + + return this._farm; + } /** NFT module */ }, { diff --git a/dist/src/helper/modelCreator.d.ts b/dist/src/helper/modelCreator.d.ts index 2923fd88..49e4a47f 100644 --- a/dist/src/helper/modelCreator.d.ts +++ b/dist/src/helper/modelCreator.d.ts @@ -1,3 +1,4 @@ +import * as types from '../types'; export declare class ModelCreator { - static createPaginationModel(page_number?: number, page_size?: number, count_total?: boolean, key?: string): any; + static createPaginationModel(pageInfo?: types.Pagination): any; } diff --git a/dist/src/helper/modelCreator.js b/dist/src/helper/modelCreator.js index d1b9a510..b75445b0 100644 --- a/dist/src/helper/modelCreator.js +++ b/dist/src/helper/modelCreator.js @@ -28,22 +28,23 @@ var ModelCreator = /*#__PURE__*/function () { (0, _createClass2["default"])(ModelCreator, null, [{ key: "createPaginationModel", - value: function createPaginationModel() { - var page_number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; - var page_size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30; - var count_total = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var key = arguments.length > 3 ? arguments[3] : undefined; + value: function createPaginationModel(pageInfo) { + var _pageInfo$count_total, _pageInfo$reverse; + var pagination = new types.base_query_pagination_pb.PageRequest(); - if (is.not.undefined(key)) { + if (is.not.undefined(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.key)) { //only one of offset or key should be set. - pagination.setKey(key); + pagination.setKey(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.key); } else { + var page_number = (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.page_number) || 1; + var page_size = (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.page_size) || 10; pagination.setOffset((page_number - 1) * page_size > 0 ? (page_number - 1) * page_size : 0); - pagination.setLimit(page_size > 0 ? page_size : 10); + pagination.setLimit(page_size); } - pagination.setCountTotal(count_total); + pagination.setCountTotal((_pageInfo$count_total = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.count_total) !== null && _pageInfo$count_total !== void 0 ? _pageInfo$count_total : true); + pagination.setReverse((_pageInfo$reverse = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.reverse) !== null && _pageInfo$reverse !== void 0 ? _pageInfo$reverse : false); return pagination; } }]); diff --git a/dist/src/modules/auth.d.ts b/dist/src/modules/auth.d.ts index 5bd239ed..d8e735ec 100644 --- a/dist/src/modules/auth.d.ts +++ b/dist/src/modules/auth.d.ts @@ -31,7 +31,11 @@ export declare class Auth { * Account returns account details based on address. * @param address defines the address to query for. */ - queryAccount(address: string): Promise; + queryAccount(address: string): Promise; + /** + * Accounts returns all the existing accounts + */ + queryAccounts(pagination?: types.Pagination): Promise; /** * Params queries all parameters. */ diff --git a/dist/src/modules/auth.js b/dist/src/modules/auth.js index ce5fc78b..30e49c28 100644 --- a/dist/src/modules/auth.js +++ b/dist/src/modules/auth.js @@ -21,6 +21,8 @@ var is = _interopRequireWildcard(require("is_js")); var _errors = require("../errors"); +var _helper = require("../helper"); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } @@ -97,24 +99,41 @@ var Auth = /*#__PURE__*/function () { }, { key: "queryAccount", value: function queryAccount(address) { + var _this = this; + if (!address) { throw new _errors.SdkError("address can ont be empty"); } var request = new types.auth_query_pb.QueryAccountRequest(); request.setAddress(address); - return this.client.rpcClient.protoQuery('/cosmos.auth.v1beta1.Query/Account', request, types.auth_query_pb.QueryAccountResponse).then(function (data) { - var result = {}; + return this.client.rpcClient.protoQuery('/cosmos.auth.v1beta1.Query/Account', request, types.auth_query_pb.QueryAccountResponse).then(function (res) { + if (res && res.account) { + res.account = _this.client.protobuf.deserializeAccount(res.account); + } - if (data && data.account && data.account.value) { - result = types.auth_auth_pb.BaseAccount.deserializeBinary(data.account.value).toObject(); + return res; + }); + } + /** + * Accounts returns all the existing accounts + */ - if (result.pubKey && result.pubKey.value) { - result.pubKey = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(result.pubKey.value).toObject(); - } + }, { + key: "queryAccounts", + value: function queryAccounts(pagination) { + var _this2 = this; + + var request = new types.auth_query_pb.QueryAccountsRequest(); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); + return this.client.rpcClient.protoQuery('/cosmos.auth.v1beta1.Query/Accounts', request, types.auth_query_pb.QueryAccountsResponse).then(function (res) { + if (res && res.accountsList) { + res.accountsList = res.accountsList.map(function (item) { + return _this2.client.protobuf.deserializeAccount(item); + }); } - return result; + return res; }); } /** diff --git a/dist/src/modules/bank.d.ts b/dist/src/modules/bank.d.ts index 579811d8..0c7cf0dd 100644 --- a/dist/src/modules/bank.d.ts +++ b/dist/src/modules/bank.d.ts @@ -47,7 +47,7 @@ export declare class Bank { /** * TotalSupply queries the total supply of all coins. */ - queryTotalSupply(): Promise; + queryTotalSupply(pagination?: types.Pagination): Promise; /** * SupplyOf queries the supply of a single coin. * @param denom is the coin denom to query balances for. @@ -57,4 +57,12 @@ export declare class Bank { * Params queries the parameters of x/bank module. */ queryParams(): Promise; + /** + * DenomsMetadata queries the client metadata of a given coin denomination. + */ + queryDenomMetadata(denom: string): Promise; + /** + * DenomsMetadata queries the client metadata for all registered coin denominations. + */ + queryDenomsMetadata(pagination?: types.Pagination): Promise; } diff --git a/dist/src/modules/bank.js b/dist/src/modules/bank.js index a58b5a4f..be12ca3d 100644 --- a/dist/src/modules/bank.js +++ b/dist/src/modules/bank.js @@ -25,6 +25,8 @@ var types = _interopRequireWildcard(require("../types")); var _errors = require("../errors"); +var _helper = require("../helper"); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } @@ -201,8 +203,9 @@ var Bank = /*#__PURE__*/function () { }, { key: "queryTotalSupply", - value: function queryTotalSupply() { + value: function queryTotalSupply(pagination) { var request = new types.bank_query_pb.QueryTotalSupplyRequest(); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/TotalSupply', request, types.bank_query_pb.QueryTotalSupplyResponse); } /** @@ -231,6 +234,32 @@ var Bank = /*#__PURE__*/function () { var request = new types.bank_query_pb.QueryParamsRequest(); return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/Params', request, types.bank_query_pb.QueryParamsResponse); } + /** + * DenomsMetadata queries the client metadata of a given coin denomination. + */ + + }, { + key: "queryDenomMetadata", + value: function queryDenomMetadata(denom) { + if (!denom) { + throw new _errors.SdkError("denom can ont be empty"); + } + + var request = new types.bank_query_pb.QueryDenomMetadataRequest(); + request.setDenom(denom); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/DenomMetadata', request, types.bank_query_pb.QueryDenomMetadataResponse); + } + /** + * DenomsMetadata queries the client metadata for all registered coin denominations. + */ + + }, { + key: "queryDenomsMetadata", + value: function queryDenomsMetadata(pagination) { + var request = new types.bank_query_pb.QueryDenomsMetadataRequest(); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/DenomsMetadata', request, types.bank_query_pb.QueryDenomsMetadataResponse); + } }]); return Bank; }(); diff --git a/dist/src/modules/coinswap.js b/dist/src/modules/coinswap.js index e6a3c117..dbe92ac3 100644 --- a/dist/src/modules/coinswap.js +++ b/dist/src/modules/coinswap.js @@ -201,9 +201,9 @@ var Coinswap = /*#__PURE__*/function () { throw new _errors.SdkError("id can ont be empty"); } - var request = new types.coinswap_query_pb.QueryLiquidityRequest(); - request.setId(id); - return this.client.rpcClient.protoQuery('/irismod.coinswap.Query/Liquidity', request, types.coinswap_query_pb.QueryLiquidityResponse); + var request = new types.coinswap_query_pb.QueryLiquidityPoolRequest(); + request.setLptDenom(id); + return this.client.rpcClient.protoQuery('/irismod.coinswap.Query/LiquidityPool', request, types.coinswap_query_pb.QueryLiquidityPoolResponse); } }]); return Coinswap; diff --git a/dist/src/modules/distribution.d.ts b/dist/src/modules/distribution.d.ts index 4d86b3be..7896a423 100644 --- a/dist/src/modules/distribution.d.ts +++ b/dist/src/modules/distribution.d.ts @@ -69,7 +69,7 @@ export declare class Distribution { * @param page_number * @param page_size */ - queryValidatorSlashes(validator_address: string, starting_height?: number, ending_height?: number, page_number?: number, page_size?: number): Promise; + queryValidatorSlashes(validator_address: string, starting_height?: number, ending_height?: number, pagination?: types.Pagination): Promise; /** * DelegationRewards queries the total rewards accrued by a delegation. * @param validator_address defines the validator address to query for diff --git a/dist/src/modules/distribution.js b/dist/src/modules/distribution.js index 8bb9ec3d..ecbf3556 100644 --- a/dist/src/modules/distribution.js +++ b/dist/src/modules/distribution.js @@ -277,18 +277,15 @@ var Distribution = /*#__PURE__*/function () { value: function queryValidatorSlashes(validator_address) { var starting_height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var ending_height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var page_number = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; - var page_size = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 10; + var pagination = arguments.length > 3 ? arguments[3] : undefined; if (!validator_address) { throw new _errors.SdkError("validator_address can ont be empty"); } - var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); - var request = new types.distribution_query_pb.QueryValidatorSlashesRequest(); request.setValidatorAddress(validator_address); - request.setPagination(pagination); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); if (starting_height) { request.setStartingHeight(starting_height); diff --git a/dist/src/modules/farm.d.ts b/dist/src/modules/farm.d.ts new file mode 100644 index 00000000..c9ecc729 --- /dev/null +++ b/dist/src/modules/farm.d.ts @@ -0,0 +1,48 @@ +import { Client } from "../client"; +import * as types from '../types'; +import { BaseTx } from "../types"; +export declare class Farm { + /** @hidden */ + private client; + /** @hidden */ + constructor(client: Client); + /** + * stake lpt + * @param farmPoolID farm pool ID + * @param lpt receive Lp + * @param baseTx { types.BaseTx } + * @returns + */ + stakeLp(pool_id: string, amount: types.Coin, baseTx: BaseTx): Promise; + /** + * unstake lpt + * @param farmPoolName farm pool name + * @param lpt receive Lp + * @param baseTx { types.BaseTx } + * @returns + */ + unStakeLp(pool_id: string, amount: types.Coin, baseTx: BaseTx): Promise; + /** + * harvest lpt + * @param farmPoolName farm pool name + * @param baseTx { types.BaseTx } + * @returns + */ + harvestReward(pool_id: string, baseTx: BaseTx): Promise; + /** + * query Farm Pools + */ + queryFarmPools(pagination?: types.Pagination): Promise; + /** + * query Farm Pool + */ + queryFarmPool(id: string): Promise; + /** + * query Farmer + */ + queryFarmer(farmer: string, pool_id: string): Promise; + /** + * query Params + */ + queryParams(): Promise; +} diff --git a/dist/src/modules/farm.js b/dist/src/modules/farm.js new file mode 100644 index 00000000..3d5e8a59 --- /dev/null +++ b/dist/src/modules/farm.js @@ -0,0 +1,226 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +var _typeof = require("@babel/runtime/helpers/typeof"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Farm = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _errors = require("../errors"); + +var _helper = require("../helper"); + +var types = _interopRequireWildcard(require("../types")); + +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +var Farm = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Farm(client) { + (0, _classCallCheck2["default"])(this, Farm); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * stake lpt + * @param farmPoolID farm pool ID + * @param lpt receive Lp + * @param baseTx { types.BaseTx } + * @returns + */ + + + (0, _createClass2["default"])(Farm, [{ + key: "stakeLp", + value: function () { + var _stakeLp = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(pool_id, amount, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgStake, + value: { + pool_id: pool_id, + amount: amount, + sender: sender + } + }]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function stakeLp(_x, _x2, _x3) { + return _stakeLp.apply(this, arguments); + } + + return stakeLp; + }() + }, { + key: "unStakeLp", + value: + /** + * unstake lpt + * @param farmPoolName farm pool name + * @param lpt receive Lp + * @param baseTx { types.BaseTx } + * @returns + */ + function () { + var _unStakeLp = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(pool_id, amount, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgUnstake, + value: { + pool_id: pool_id, + amount: amount, + sender: sender + } + }]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function unStakeLp(_x4, _x5, _x6) { + return _unStakeLp.apply(this, arguments); + } + + return unStakeLp; + }() + /** + * harvest lpt + * @param farmPoolName farm pool name + * @param baseTx { types.BaseTx } + * @returns + */ + + }, { + key: "harvestReward", + value: function () { + var _harvestReward = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(pool_id, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgHarvest, + value: { + pool_id: pool_id, + sender: sender + } + }]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function harvestReward(_x7, _x8) { + return _harvestReward.apply(this, arguments); + } + + return harvestReward; + }() + /** + * query Farm Pools + */ + + }, { + key: "queryFarmPools", + value: function queryFarmPools(pagination) { + var request = new types.farm_query_pb.QueryFarmPoolsRequest(); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); + return this.client.rpcClient.protoQuery('/irismod.farm.Query/FarmPools', request, types.farm_query_pb.QueryFarmPoolsResponse); + } + /** + * query Farm Pool + */ + + }, { + key: "queryFarmPool", + value: function queryFarmPool(id) { + if (!id) { + throw new _errors.SdkError("id can ont be empty"); + } + + var request = new types.farm_query_pb.QueryFarmPoolRequest(); + request.setId(id); + return this.client.rpcClient.protoQuery('/irismod.farm.Query/FarmPool', request, types.farm_query_pb.QueryFarmPoolResponse); + } + /** + * query Farmer + */ + + }, { + key: "queryFarmer", + value: function queryFarmer(farmer, pool_id) { + if (!farmer) { + throw new _errors.SdkError("farmer can ont be empty"); + } + + if (!pool_id) { + throw new _errors.SdkError("pool_id can ont be empty"); + } + + var request = new types.farm_query_pb.QueryFarmerRequest(); + request.setFarmer(farmer); + request.setPoolId(pool_id); + return this.client.rpcClient.protoQuery('/irismod.farm.Query/Farmer', request, types.farm_query_pb.QueryFarmerResponse); + } + /** + * query Params + */ + + }, { + key: "queryParams", + value: function queryParams() { + var request = new types.farm_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery('/irismod.farm.Query/Params', request, types.farm_query_pb.QueryParamsResponse); + } + }]); + return Farm; +}(); + +exports.Farm = Farm; \ No newline at end of file diff --git a/dist/src/modules/gov.d.ts b/dist/src/modules/gov.d.ts index 74e9dbcb..9d60b2e6 100644 --- a/dist/src/modules/gov.d.ts +++ b/dist/src/modules/gov.d.ts @@ -60,7 +60,7 @@ export declare class Gov { proposal_status?: types.ProposalStatus; voter?: string; depositor?: string; - }, page_number?: number, page_size?: number): Promise; + }, pagination?: types.Pagination): Promise; /** * Vote queries voted information based on proposalID, voterAddr. * @param proposal_id defines the unique id of the proposal. @@ -71,7 +71,7 @@ export declare class Gov { * Votes queries votes of a given proposal. * @param proposal_id defines the unique id of the proposal. */ - queryVotes(proposal_id: number, page_number?: number, page_size?: number): Promise; + queryVotes(proposal_id: number, pagination?: types.Pagination): Promise; /** * Params queries all parameters of the gov module. * @param params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". @@ -87,7 +87,7 @@ export declare class Gov { * Deposits queries all deposits of a single proposal. * @param proposal_id defines the unique id of the proposal. */ - queryDeposits(proposal_id: number, page_number?: number, page_size?: number): Promise; + queryDeposits(proposal_id: number, pagination?: types.Pagination): Promise; /** * TallyResult queries the tally of a proposal vote. * @param proposal_id defines the unique id of the proposal. diff --git a/dist/src/modules/gov.js b/dist/src/modules/gov.js index 3108af3e..cc73e344 100644 --- a/dist/src/modules/gov.js +++ b/dist/src/modules/gov.js @@ -211,15 +211,11 @@ var Gov = /*#__PURE__*/function () { }, { key: "queryProposals", - value: function queryProposals(option) { + value: function queryProposals(option, pagination) { var _this2 = this; - var page_number = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - var page_size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10; - - var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); - var request = new types.gov_query_pb.QueryProposalsRequest(); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); if (typeof option.proposal_status != 'undefined') { request.setProposalStatus(option.proposal_status); @@ -233,7 +229,6 @@ var Gov = /*#__PURE__*/function () { request.setDepositor(option.depositor); } - request.setPagination(pagination); return this.client.rpcClient.protoQuery('/cosmos.gov.v1beta1.Query/Proposals', request, types.gov_query_pb.QueryProposalsResponse).then(function (res) { if (res && res.proposalsList) { res.proposalsList = res.proposalsList.map(function (item) { @@ -277,19 +272,14 @@ var Gov = /*#__PURE__*/function () { }, { key: "queryVotes", - value: function queryVotes(proposal_id) { - var page_number = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - var page_size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10; - + value: function queryVotes(proposal_id, pagination) { if (!proposal_id) { throw new _errors.SdkError("proposal_id can ont be empty"); } - var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); - var request = new types.gov_query_pb.QueryVotesRequest(); request.setProposalId(proposal_id); - request.setPagination(pagination); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.gov.v1beta1.Query/Votes', request, types.gov_query_pb.QueryVotesResponse); } /** @@ -337,19 +327,14 @@ var Gov = /*#__PURE__*/function () { }, { key: "queryDeposits", - value: function queryDeposits(proposal_id) { - var page_number = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - var page_size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10; - + value: function queryDeposits(proposal_id, pagination) { if (!proposal_id) { throw new _errors.SdkError("proposal_id can ont be empty"); } - var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); - var request = new types.gov_query_pb.QueryDepositsRequest(); request.setProposalId(proposal_id); - request.setPagination(pagination); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.gov.v1beta1.Query/Deposits', request, types.gov_query_pb.QueryDepositsResponse); } /** diff --git a/dist/src/modules/ibc.d.ts b/dist/src/modules/ibc.d.ts index 6db0dae1..b1ade78b 100644 --- a/dist/src/modules/ibc.d.ts +++ b/dist/src/modules/ibc.d.ts @@ -45,7 +45,7 @@ export declare class Ibc { /** * DenomTraces queries all denomination traces. */ - queryDenomTraces(page_number?: number, page_size?: number): Promise; + queryDenomTraces(pagination?: types.Pagination): Promise; /** * Params queries all parameters of the ibc-transfer module. */ @@ -53,5 +53,5 @@ export declare class Ibc { /** * Channels queries all the IBC channels of a chain. */ - queryChannels(page_number?: number, page_size?: number): Promise; + queryChannels(pagination?: types.Pagination): Promise; } diff --git a/dist/src/modules/ibc.js b/dist/src/modules/ibc.js index 24ade26f..5f2bbfcf 100644 --- a/dist/src/modules/ibc.js +++ b/dist/src/modules/ibc.js @@ -129,14 +129,9 @@ var Ibc = /*#__PURE__*/function () { }, { key: "queryDenomTraces", - value: function queryDenomTraces() { - var page_number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; - var page_size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; - - var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); - + value: function queryDenomTraces(pagination) { var request = new types.ibc_transfer_query_pb.QueryDenomTracesRequest(); - request.setPagination(pagination); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/ibc.applications.transfer.v1.Query/DenomTraces', request, types.ibc_transfer_query_pb.QueryDenomTracesResponse); } /** @@ -155,14 +150,9 @@ var Ibc = /*#__PURE__*/function () { }, { key: "queryChannels", - value: function queryChannels() { - var page_number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; - var page_size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; - - var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); - + value: function queryChannels(pagination) { var request = new types.ibc_channel_query_pb.QueryChannelsRequest(); - request.setPagination(pagination); + request.setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/ibc.core.channel.v1.Query/Channels', request, types.ibc_channel_query_pb.QueryChannelsResponse); } }]); diff --git a/dist/src/modules/index.d.ts b/dist/src/modules/index.d.ts index 734a7e94..cf16174f 100644 --- a/dist/src/modules/index.d.ts +++ b/dist/src/modules/index.d.ts @@ -18,3 +18,4 @@ export * from './protobuf'; export * from './nft'; export * from './htlc'; export * from './ibc'; +export * from './farm'; diff --git a/dist/src/modules/index.js b/dist/src/modules/index.js index 47b4428e..f52d741a 100644 --- a/dist/src/modules/index.js +++ b/dist/src/modules/index.js @@ -262,4 +262,17 @@ Object.keys(_ibc).forEach(function (key) { return _ibc[key]; } }); +}); + +var _farm = require("./farm"); + +Object.keys(_farm).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _farm[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _farm[key]; + } + }); }); \ No newline at end of file diff --git a/dist/src/modules/nft.d.ts b/dist/src/modules/nft.d.ts index 372aa888..6d18fb38 100644 --- a/dist/src/modules/nft.d.ts +++ b/dist/src/modules/nft.d.ts @@ -20,7 +20,15 @@ export declare class Nft { * @returns * @since v0.17 */ - issueDenom(id: string, name: string, schema: string, baseTx: types.BaseTx): Promise; + issueDenom(id: string, name: string, schema: string, option: { + symbol?: string; + mint_restricted?: boolean; + update_restricted?: boolean; + description?: string; + uri?: string; + uri_hash?: string; + data?: string; + }, baseTx: types.BaseTx): Promise; /** * mint NFT * @param id string @@ -33,7 +41,7 @@ export declare class Nft { * @returns * @since v0.17 */ - mintNft(id: string, denom_id: string, name: string, uri: string, data: string, recipient: string, baseTx: types.BaseTx): Promise; + mintNft(id: string, denom_id: string, name: string, uri: string, uri_hash: string, data: string, recipient: string, baseTx: types.BaseTx): Promise; /** * edit NFT * @param id string @@ -47,6 +55,7 @@ export declare class Nft { name?: string; uri?: string; data?: string; + uri_hash?: string; }, baseTx: types.BaseTx): Promise; /** * transfer NFT @@ -62,6 +71,7 @@ export declare class Nft { name?: string; uri?: string; data?: string; + uri_hash?: string; }, baseTx: types.BaseTx): Promise; /** * burn NFT diff --git a/dist/src/modules/nft.js b/dist/src/modules/nft.js index 97069398..2ac8aef9 100644 --- a/dist/src/modules/nft.js +++ b/dist/src/modules/nft.js @@ -62,7 +62,7 @@ var Nft = /*#__PURE__*/function () { (0, _createClass2["default"])(Nft, [{ key: "issueDenom", value: function () { - var _issueDenom = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(id, name, schema, baseTx) { + var _issueDenom = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(id, name, schema, option, baseTx) { var sender, msgs; return _regenerator["default"].wrap(function _callee$(_context) { while (1) { @@ -71,12 +71,12 @@ var Nft = /*#__PURE__*/function () { sender = this.client.keys.show(baseTx.from); msgs = [{ type: types.TxType.MsgIssueDenom, - value: { + value: _objectSpread({ id: id, name: name, schema: schema, sender: sender - } + }, option) }]; return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); @@ -88,7 +88,7 @@ var Nft = /*#__PURE__*/function () { }, _callee, this); })); - function issueDenom(_x, _x2, _x3, _x4) { + function issueDenom(_x, _x2, _x3, _x4, _x5) { return _issueDenom.apply(this, arguments); } @@ -110,7 +110,7 @@ var Nft = /*#__PURE__*/function () { }, { key: "mintNft", value: function () { - var _mintNft = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(id, denom_id, name, uri, data, recipient, baseTx) { + var _mintNft = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(id, denom_id, name, uri, uri_hash, data, recipient, baseTx) { var sender, msgs; return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { @@ -137,6 +137,7 @@ var Nft = /*#__PURE__*/function () { denom_id: denom_id, name: name, uri: uri, + uri_hash: uri_hash, data: data, sender: sender, recipient: recipient @@ -152,7 +153,7 @@ var Nft = /*#__PURE__*/function () { }, _callee2, this); })); - function mintNft(_x5, _x6, _x7, _x8, _x9, _x10, _x11) { + function mintNft(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13) { return _mintNft.apply(this, arguments); } @@ -196,7 +197,7 @@ var Nft = /*#__PURE__*/function () { }, _callee3, this); })); - function editNft(_x12, _x13, _x14, _x15) { + function editNft(_x14, _x15, _x16, _x17) { return _editNft.apply(this, arguments); } @@ -250,7 +251,7 @@ var Nft = /*#__PURE__*/function () { }, _callee4, this); })); - function transferNft(_x16, _x17, _x18, _x19, _x20) { + function transferNft(_x18, _x19, _x20, _x21, _x22) { return _transferNft.apply(this, arguments); } @@ -293,7 +294,7 @@ var Nft = /*#__PURE__*/function () { }, _callee5, this); })); - function burnNft(_x21, _x22, _x23) { + function burnNft(_x23, _x24, _x25) { return _burnNft.apply(this, arguments); } diff --git a/dist/src/modules/protobuf.d.ts b/dist/src/modules/protobuf.d.ts index 2d645abe..e5d260e5 100644 --- a/dist/src/modules/protobuf.d.ts +++ b/dist/src/modules/protobuf.d.ts @@ -38,6 +38,20 @@ export declare class Protobuf { typeUrl: string; value: string; }, returnProtobufModel?: boolean): object | null; + /** + * deserialize TxBody + * @param {[type]} TxBody:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} txBody object + */ + deserializeTxBody(txBody: string, returnProtobufModel?: boolean): object; + /** + * deserialize AuthInfo + * @param {[type]} AuthInfo:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} authInfo object + */ + deserializeAuthInfo(authInfo: string, returnProtobufModel?: boolean): object; /** * deserialize SignDoc * @param {[type]} signDoc:string base64 string @@ -59,6 +73,16 @@ export declare class Protobuf { * @return {[type]} Signing Info object */ deserializeSigningInfo(signingInfo: string, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object; + /** + * deserialize Pubkey + * @param {[type]} pubKey:{typeUrl:string, value:string} + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} pubKey object + */ + deserializeAccount(account: { + typeUrl: string; + value: string; + }, returnProtobufModel?: boolean): object; /** * deserialize Pubkey * @param {[type]} pubKey:{typeUrl:string, value:string} @@ -69,4 +93,11 @@ export declare class Protobuf { typeUrl: string; value: string; }, returnProtobufModel?: boolean): object; + /** + * deserialize Global Account Number + * @param {[type]} GlobalAccountNumber:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Global Account Number object + */ + deserializeGlobalAccountNumber(GlobalAccountNumber: string, returnProtobufModel?: boolean): object; } diff --git a/dist/src/modules/protobuf.js b/dist/src/modules/protobuf.js index 6e0bbfa9..94b85f6e 100644 --- a/dist/src/modules/protobuf.js +++ b/dist/src/modules/protobuf.js @@ -191,6 +191,25 @@ var Protobuf = /*#__PURE__*/function () { messageModelClass = types.MsgSwapOrder.getModelClass(); break; } + //farm + + case types.TxType.MsgStake: + { + messageModelClass = types.MsgStake.getModelClass(); + break; + } + + case types.TxType.MsgUnstake: + { + messageModelClass = types.MsgUnstake.getModelClass(); + break; + } + + case types.TxType.MsgHarvest: + { + messageModelClass = types.MsgHarvest.getModelClass(); + break; + } //nft case types.TxType.MsgIssueDenom: @@ -347,6 +366,46 @@ var Protobuf = /*#__PURE__*/function () { return null; } } + /** + * deserialize TxBody + * @param {[type]} TxBody:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} txBody object + */ + + }, { + key: "deserializeTxBody", + value: function deserializeTxBody(txBody, returnProtobufModel) { + if (!txBody) { + throw new _errors.SdkError('txBody can not be empty'); + } + + if (returnProtobufModel) { + return types.tx_tx_pb.TxBody.deserializeBinary(txBody); + } else { + return types.tx_tx_pb.TxBody.deserializeBinary(txBody).toObject(); + } + } + /** + * deserialize AuthInfo + * @param {[type]} AuthInfo:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} authInfo object + */ + + }, { + key: "deserializeAuthInfo", + value: function deserializeAuthInfo(authInfo, returnProtobufModel) { + if (!authInfo) { + throw new _errors.SdkError('authInfo can not be empty'); + } + + if (returnProtobufModel) { + return types.tx_tx_pb.AuthInfo.deserializeBinary(authInfo); + } else { + return types.tx_tx_pb.AuthInfo.deserializeBinary(authInfo).toObject(); + } + } /** * deserialize SignDoc * @param {[type]} signDoc:string base64 string @@ -414,6 +473,50 @@ var Protobuf = /*#__PURE__*/function () { * @return {[type]} pubKey object */ + }, { + key: "deserializeAccount", + value: function deserializeAccount(account, returnProtobufModel) { + if (!account) { + throw new _errors.SdkError('account can not be empty'); + } + + var result = _objectSpread({}, account); + + switch (account.typeUrl) { + case '/cosmos.auth.v1beta1.BaseAccount': + result.value = types.auth_auth_pb.BaseAccount.deserializeBinary(account.value); + break; + + case '/cosmos.auth.v1beta1.ModuleAccount': + result.value = types.auth_auth_pb.ModuleAccount.deserializeBinary(account.value); + break; + } + + if (!returnProtobufModel && result.value && result.value.toObject) { + var _result$value, _result$value2, _result$value2$baseAc, _result$value4; + + result.value = result.value.toObject(); + + if ((_result$value = result.value) !== null && _result$value !== void 0 && _result$value.baseAccount && (_result$value2 = result.value) !== null && _result$value2 !== void 0 && (_result$value2$baseAc = _result$value2.baseAccount) !== null && _result$value2$baseAc !== void 0 && _result$value2$baseAc.pubKey) { + var _result$value3, _result$value3$baseAc; + + result.value.baseAccount.pubKey = this.deserializePubkey((_result$value3 = result.value) === null || _result$value3 === void 0 ? void 0 : (_result$value3$baseAc = _result$value3.baseAccount) === null || _result$value3$baseAc === void 0 ? void 0 : _result$value3$baseAc.pubKey); + } else if ((_result$value4 = result.value) !== null && _result$value4 !== void 0 && _result$value4.pubKey) { + var _result$value5; + + result.value.pubKey = this.deserializePubkey((_result$value5 = result.value) === null || _result$value5 === void 0 ? void 0 : _result$value5.pubKey); + } + } + + return result; + } + /** + * deserialize Pubkey + * @param {[type]} pubKey:{typeUrl:string, value:string} + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} pubKey object + */ + }, { key: "deserializePubkey", value: function deserializePubkey(pubKey, returnProtobufModel) { @@ -428,9 +531,21 @@ var Protobuf = /*#__PURE__*/function () { result.value = types.crypto_ed25519_keys_pb.PubKey.deserializeBinary(pubKey.value); break; + case '/cosmos.crypto.multisig.LegacyAminoPubKey': + result.value = types.crypto_multisig_keys_pb.LegacyAminoPubKey.deserializeBinary(pubKey.value); + break; + case '/cosmos.crypto.secp256k1.PubKey': result.value = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(pubKey.value); break; + + case '/cosmos.crypto.secp256r1.PubKey': + result.value = types.crypto_secp256r1_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; + + case '/cosmos.crypto.sm2.PubKey': + result.value = types.crypto_sm2_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; } if (!returnProtobufModel && result.value && result.value.toObject) { @@ -439,6 +554,26 @@ var Protobuf = /*#__PURE__*/function () { return result; } + /** + * deserialize Global Account Number + * @param {[type]} GlobalAccountNumber:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Global Account Number object + */ + + }, { + key: "deserializeGlobalAccountNumber", + value: function deserializeGlobalAccountNumber(GlobalAccountNumber, returnProtobufModel) { + if (!GlobalAccountNumber) { + throw new _errors.SdkError('Global Account Number can not be empty'); + } + + if (returnProtobufModel) { + return types.custom_base_pb.MsgGlobalAccountNumber.deserializeBinary(GlobalAccountNumber); + } else { + return types.custom_base_pb.MsgGlobalAccountNumber.deserializeBinary(GlobalAccountNumber).toObject(); + } + } }]); return Protobuf; }(); diff --git a/dist/src/modules/staking.d.ts b/dist/src/modules/staking.d.ts index 5ef1da29..2fd9c70b 100644 --- a/dist/src/modules/staking.d.ts +++ b/dist/src/modules/staking.d.ts @@ -59,10 +59,7 @@ export declare class Staking { * @since */ queryDelegations(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; delegator_addr: string; }): Promise; /** @@ -83,10 +80,7 @@ export declare class Staking { * @since */ queryDelegatorUnbondingDelegations(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; delegator_addr: string; }): Promise; /** @@ -99,10 +93,7 @@ export declare class Staking { * @since */ queryRedelegation(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; delegator_addr: string; src_validator_addr?: string; dst_validator_addr?: string; @@ -116,10 +107,7 @@ export declare class Staking { * @since */ queryDelegatorValidators(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; delegator_addr: string; }): Promise; /** @@ -153,10 +141,7 @@ export declare class Staking { * @since */ queryValidatorDelegations(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; validator_addr: string; }): Promise; /** @@ -168,10 +153,7 @@ export declare class Staking { * @since */ queryValidatorUnbondingDelegations(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; validator_addr: string; }): Promise; /** @@ -190,10 +172,7 @@ export declare class Staking { * @since */ queryValidators(query: { - key?: string; - page?: number; - size?: number; - count_total?: boolean; + pagination?: types.Pagination; status?: string; }): Promise; /** diff --git a/dist/src/modules/staking.js b/dist/src/modules/staking.js index 6eea2974..545d8f18 100644 --- a/dist/src/modules/staking.js +++ b/dist/src/modules/staking.js @@ -199,17 +199,14 @@ var Staking = /*#__PURE__*/function () { }, { key: "queryDelegations", value: function queryDelegations(query) { - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, delegator_addr = query.delegator_addr; if (is.undefined(delegator_addr)) { throw new _errors.SdkError('delegator address can not be empty'); } - var request = new types.staking_query_pb.QueryDelegatorDelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryDelegatorDelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorDelegations', request, types.staking_query_pb.QueryDelegatorDelegationsResponse); } /** @@ -247,17 +244,14 @@ var Staking = /*#__PURE__*/function () { }, { key: "queryDelegatorUnbondingDelegations", value: function queryDelegatorUnbondingDelegations(query) { - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, delegator_addr = query.delegator_addr; if (is.undefined(delegator_addr)) { throw new _errors.SdkError('delegator address can not be empty'); } - var request = new types.staking_query_pb.QueryDelegatorUnbondingDelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryDelegatorUnbondingDelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', request, types.staking_query_pb.QueryDelegatorUnbondingDelegationsResponse); } /** @@ -273,10 +267,7 @@ var Staking = /*#__PURE__*/function () { }, { key: "queryRedelegation", value: function queryRedelegation(query) { - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, delegator_addr = query.delegator_addr, src_validator_addr = query.src_validator_addr, dst_validator_addr = query.dst_validator_addr; @@ -285,7 +276,7 @@ var Staking = /*#__PURE__*/function () { throw new _errors.SdkError('delegator address can not be empty'); } - var request = new types.staking_query_pb.QueryRedelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryRedelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(pagination)); if (is.not.undefined(src_validator_addr)) { request.setSrcValidatorAddr(src_validator_addr); @@ -309,17 +300,14 @@ var Staking = /*#__PURE__*/function () { }, { key: "queryDelegatorValidators", value: function queryDelegatorValidators(query) { - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, delegator_addr = query.delegator_addr; if (is.undefined(delegator_addr)) { throw new _errors.SdkError('delegator address can not be empty'); } - var request = new types.staking_query_pb.QueryDelegatorValidatorsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryDelegatorValidatorsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorValidators', request, types.staking_query_pb.QueryDelegatorValidatorsResponse); } /** @@ -380,17 +368,14 @@ var Staking = /*#__PURE__*/function () { }, { key: "queryValidatorDelegations", value: function queryValidatorDelegations(query) { - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, validator_addr = query.validator_addr; if (is.undefined(validator_addr)) { throw new _errors.SdkError('validator address can not be empty'); } - var request = new types.staking_query_pb.QueryValidatorDelegationsRequest().setValidatorAddr(validator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryValidatorDelegationsRequest().setValidatorAddr(validator_addr).setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/ValidatorDelegations', request, types.staking_query_pb.QueryValidatorDelegationsResponse); } /** @@ -405,17 +390,14 @@ var Staking = /*#__PURE__*/function () { }, { key: "queryValidatorUnbondingDelegations", value: function queryValidatorUnbondingDelegations(query) { - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, validator_addr = query.validator_addr; if (is.undefined(validator_addr)) { throw new _errors.SdkError('validator address can not be empty'); } - var request = new types.staking_query_pb.QueryValidatorUnbondingDelegationsRequest().setValidatorAddr(validator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryValidatorUnbondingDelegationsRequest().setValidatorAddr(validator_addr).setPagination(_helper.ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', request, types.staking_query_pb.QueryValidatorUnbondingDelegationsResponse); } /** @@ -459,12 +441,9 @@ var Staking = /*#__PURE__*/function () { value: function queryValidators(query) { var _this2 = this; - var key = query.key, - page = query.page, - size = query.size, - count_total = query.count_total, + var pagination = query.pagination, status = query.status; - var request = new types.staking_query_pb.QueryValidatorsRequest().setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + var request = new types.staking_query_pb.QueryValidatorsRequest().setPagination(_helper.ModelCreator.createPaginationModel(pagination)); if (is.not.undefined(status)) { request.setStatus(status); diff --git a/dist/src/modules/tendermint.d.ts b/dist/src/modules/tendermint.d.ts index 1f13250c..2062cca3 100644 --- a/dist/src/modules/tendermint.d.ts +++ b/dist/src/modules/tendermint.d.ts @@ -60,4 +60,10 @@ export declare class Tendermint { n_peers: string; peers: any[]; }>; + /** + * Query global account number + * @param height Block height to query + * @returns + */ + queryGlobalAccountNumber(height?: number): Promise; } diff --git a/dist/src/modules/tendermint.js b/dist/src/modules/tendermint.js index 71ba6436..cd65e30d 100644 --- a/dist/src/modules/tendermint.js +++ b/dist/src/modules/tendermint.js @@ -23,6 +23,8 @@ var hexEncoding = _interopRequireWildcard(require("crypto-js/enc-hex")); var base64Encoding = _interopRequireWildcard(require("crypto-js/enc-base64")); +var _errors = require("../errors"); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } @@ -231,6 +233,26 @@ var Tendermint = /*#__PURE__*/function () { value: function queryNetInfo() { return this.client.rpcClient.request(_types.RpcMethods.NetInfo, {}); } + /** + * Query global account number + * @param height Block height to query + * @returns + */ + + }, { + key: "queryGlobalAccountNumber", + value: function queryGlobalAccountNumber() { + var _this5 = this; + + var height = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + return this.client.rpcClient.queryStore(Uint8Array.from(_utils.StoreKeys.globalAccountNumberKey), 'acc', height).then(function (res) { + if (!res || !res.response || !res.response.value) { + throw new _errors.SdkError('query Global Account Number failed:', res); + } + + return _this5.client.protobuf.deserializeGlobalAccountNumber(res.response.value); + }); + } }]); return Tendermint; }(); diff --git a/dist/src/modules/tx.js b/dist/src/modules/tx.js index ff7a2039..ccc0faa0 100644 --- a/dist/src/modules/tx.js +++ b/dist/src/modules/tx.js @@ -184,9 +184,15 @@ var Tx = /*#__PURE__*/function () { privKey, accountNumber, sequence, + _accountData$account, + accountData, + account, + _account$baseAccount$, + _account$baseAccount, + _account$baseAccount$2, + _account$baseAccount2, _account$accountNumbe, _account$sequence, - account, _sequence, pubKey, signature, @@ -246,7 +252,7 @@ var Tx = /*#__PURE__*/function () { sequence = baseTx.sequence; // Query account info from block chain if (!((typeof baseTx.account_number == 'undefined' || typeof baseTx.sequence == 'undefined') && !offline)) { - _context2.next = 21; + _context2.next = 20; break; } @@ -254,11 +260,22 @@ var Tx = /*#__PURE__*/function () { return this.client.auth.queryAccount(keyObj.address); case 18: - account = _context2.sent; - accountNumber = (_account$accountNumbe = account.accountNumber) !== null && _account$accountNumbe !== void 0 ? _account$accountNumbe : 0; - sequence = (_account$sequence = account.sequence) !== null && _account$sequence !== void 0 ? _account$sequence : 0; + accountData = _context2.sent; + + if (accountData !== null && accountData !== void 0 && (_accountData$account = accountData.account) !== null && _accountData$account !== void 0 && _accountData$account.value) { + account = accountData.account.value; + + if (account !== null && account !== void 0 && account.baseAccount) { + // ModuleAccount + accountNumber = (_account$baseAccount$ = account === null || account === void 0 ? void 0 : (_account$baseAccount = account.baseAccount) === null || _account$baseAccount === void 0 ? void 0 : _account$baseAccount.accountNumber) !== null && _account$baseAccount$ !== void 0 ? _account$baseAccount$ : 0; + sequence = (_account$baseAccount$2 = account === null || account === void 0 ? void 0 : (_account$baseAccount2 = account.baseAccount) === null || _account$baseAccount2 === void 0 ? void 0 : _account$baseAccount2.sequence) !== null && _account$baseAccount$2 !== void 0 ? _account$baseAccount$2 : 0; + } else { + accountNumber = (_account$accountNumbe = account.accountNumber) !== null && _account$accountNumbe !== void 0 ? _account$accountNumbe : 0; + sequence = (_account$sequence = account.sequence) !== null && _account$sequence !== void 0 ? _account$sequence : 0; + } + } - case 21: + case 20: if (!stdTx.hasPubKey()) { pubKey = _utils.Crypto.getPublicKeyFromPrivateKey(privKey, baseTx.pubkeyType); stdTx.setPubKey(pubKey, (_sequence = sequence) !== null && _sequence !== void 0 ? _sequence : undefined); @@ -268,7 +285,7 @@ var Tx = /*#__PURE__*/function () { stdTx.addSignature(signature); return _context2.abrupt("return", stdTx); - case 25: + case 24: case "end": return _context2.stop(); } @@ -553,6 +570,25 @@ var Tx = /*#__PURE__*/function () { msg = new types.MsgSwapOrder(txMsg.value); break; } + // farm + + case types.TxType.MsgStake: + { + msg = new types.MsgStake(txMsg.value); + break; + } + + case types.TxType.MsgUnstake: + { + msg = new types.MsgUnstake(txMsg.value); + break; + } + + case types.TxType.MsgHarvest: + { + msg = new types.MsgHarvest(txMsg.value); + break; + } //nft case types.TxType.MsgIssueDenom: diff --git a/dist/src/types/auth.d.ts b/dist/src/types/auth.d.ts index 86e44a7d..6940d280 100644 --- a/dist/src/types/auth.d.ts +++ b/dist/src/types/auth.d.ts @@ -54,11 +54,3 @@ export interface StdSignMsg { memo: string; msgs: object[]; } -export interface BaseAccount { - address: string; - pubKey: { - key: string; - }; - accountNumber: number; - sequence: number; -} diff --git a/dist/src/types/bank.js b/dist/src/types/bank.js index 6efa7720..f2dfe689 100644 --- a/dist/src/types/bank.js +++ b/dist/src/types/bank.js @@ -74,15 +74,15 @@ var MsgSend = /*#__PURE__*/function (_Msg) { key: "validate", value: function validate() { if (!this.value.from_address) { - throw new _errors.SdkError("from_address is empty"); + throw new _errors.SdkError("from_address is empty"); } if (!this.value.to_address) { - throw new _errors.SdkError("to_address is empty"); + throw new _errors.SdkError("to_address is empty"); } if (!(this.value.amount && this.value.amount.length)) { - throw new _errors.SdkError("amount is empty"); + throw new _errors.SdkError("amount is empty"); } } }], [{ @@ -147,7 +147,7 @@ var MsgMultiSend = /*#__PURE__*/function (_Msg2) { } if (!this.value.outputs) { - throw new _errors.SdkError("outputs is empty"); + throw new _errors.SdkError("outputs is empty"); } } }], [{ diff --git a/dist/src/types/coinswap.js b/dist/src/types/coinswap.js index d5e3bfce..96b9e4b8 100644 --- a/dist/src/types/coinswap.js +++ b/dist/src/types/coinswap.js @@ -74,23 +74,23 @@ var MsgAddLiquidity = /*#__PURE__*/function (_Msg) { key: "validate", value: function validate() { if (!this.value.max_token) { - throw new _errors.SdkError("max_token is empty"); + throw new _errors.SdkError("max_token is empty"); } if (!this.value.exact_standard_amt) { - throw new _errors.SdkError("exact_standard_amt is empty"); + throw new _errors.SdkError("exact_standard_amt is empty"); } if (!this.value.min_liquidity) { - throw new _errors.SdkError("min_liquidity is empty"); + throw new _errors.SdkError("min_liquidity is empty"); } if (!this.value.deadline) { - throw new _errors.SdkError("deadline is empty"); + throw new _errors.SdkError("deadline is empty"); } if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } } }], [{ @@ -143,23 +143,23 @@ var MsgRemoveLiquidity = /*#__PURE__*/function (_Msg2) { key: "validate", value: function validate() { if (!this.value.withdraw_liquidity) { - throw new _errors.SdkError("withdraw_liquidity is empty"); + throw new _errors.SdkError("withdraw_liquidity is empty"); } if (!this.value.min_token) { - throw new _errors.SdkError("min_token is empty"); + throw new _errors.SdkError("min_token is empty"); } if (!this.value.min_standard_amt) { - throw new _errors.SdkError("min_standard_amt is empty"); + throw new _errors.SdkError("min_standard_amt is empty"); } if (!this.value.deadline) { - throw new _errors.SdkError("deadline is empty"); + throw new _errors.SdkError("deadline is empty"); } if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } } }], [{ @@ -217,19 +217,19 @@ var MsgSwapOrder = /*#__PURE__*/function (_Msg3) { key: "validate", value: function validate() { if (!this.value.input) { - throw new _errors.SdkError("input is empty"); + throw new _errors.SdkError("input is empty"); } if (!this.value.output) { - throw new _errors.SdkError("output is empty"); + throw new _errors.SdkError("output is empty"); } if (!this.value.deadline) { - throw new _errors.SdkError("deadline is empty"); + throw new _errors.SdkError("deadline is empty"); } if (!this.value.is_buy_order) { - throw new _errors.SdkError("is_buy_order is empty"); + throw new _errors.SdkError("is_buy_order is empty"); } } }], [{ diff --git a/dist/src/types/farm.d.ts b/dist/src/types/farm.d.ts new file mode 100644 index 00000000..77e3ba1a --- /dev/null +++ b/dist/src/types/farm.d.ts @@ -0,0 +1,46 @@ +import { Coin, Msg } from "./types"; +export interface FarmParams { + pool_id: string; + amount: Coin; + sender: string; +} +/** + * Msg for stake lp + * + * @hidden + */ +export declare class MsgStake extends Msg { + value: FarmParams; + constructor(msg: FarmParams); + static getModelClass(): any; + getModel(): any; + validate(): void; +} +/** + * Msg for Unstake lp + * + * @hidden + */ +export declare class MsgUnstake extends Msg { + value: FarmParams; + constructor(msg: FarmParams); + static getModelClass(): any; + getModel(): any; + validate(): void; +} +export interface HarvestParams { + pool_id: string; + sender: string; +} +/** + * Msg for harvest reward + * + * @hidden + */ +export declare class MsgHarvest extends Msg { + value: HarvestParams; + constructor(msg: HarvestParams); + static getModelClass(): any; + getModel(): any; + validate(): void; +} diff --git a/dist/src/types/farm.js b/dist/src/types/farm.js new file mode 100644 index 00000000..99f2e3e1 --- /dev/null +++ b/dist/src/types/farm.js @@ -0,0 +1,201 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +var _typeof = require("@babel/runtime/helpers/typeof"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgHarvest = exports.MsgUnstake = exports.MsgStake = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +var pbs = _interopRequireWildcard(require("./proto")); + +var _errors = require("../errors"); + +var _helper = require("../helper"); + +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +/** + * Msg for stake lp + * + * @hidden + */ +var MsgStake = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgStake, _Msg); + + var _super = _createSuper(MsgStake); + + function MsgStake(msg) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgStake); + _this = _super.call(this, _types.TxType.MsgStake); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = msg; + return _this; + } + + (0, _createClass2["default"])(MsgStake, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setPoolId(this.value.pool_id); + msg.setAmount(_helper.TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + msg.setSender(this.value.sender); + return msg; + } + }, { + key: "validate", + value: function validate() { + if (!this.value.pool_id) { + throw new _errors.SdkError("pool_id is empty"); + } + + if (!this.value.amount) { + throw new _errors.SdkError("amount is empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender is empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.farm_tx_pb.MsgStake; + } + }]); + return MsgStake; +}(_types.Msg); +/** + * Msg for Unstake lp + * + * @hidden + */ + + +exports.MsgStake = MsgStake; + +var MsgUnstake = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgUnstake, _Msg2); + + var _super2 = _createSuper(MsgUnstake); + + function MsgUnstake(msg) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgUnstake); + _this2 = _super2.call(this, _types.TxType.MsgUnstake); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = msg; + return _this2; + } + + (0, _createClass2["default"])(MsgUnstake, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setPoolId(this.value.pool_id); + msg.setAmount(_helper.TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + msg.setSender(this.value.sender); + return msg; + } + }, { + key: "validate", + value: function validate() { + if (!this.value.pool_id) { + throw new _errors.SdkError("pool_id is empty"); + } + + if (!this.value.amount) { + throw new _errors.SdkError("amount is empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender is empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.farm_tx_pb.MsgUnstake; + } + }]); + return MsgUnstake; +}(_types.Msg); + +exports.MsgUnstake = MsgUnstake; + +/** + * Msg for harvest reward + * + * @hidden + */ +var MsgHarvest = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgHarvest, _Msg3); + + var _super3 = _createSuper(MsgHarvest); + + function MsgHarvest(msg) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgHarvest); + _this3 = _super3.call(this, _types.TxType.MsgHarvest); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + _this3.value = msg; + return _this3; + } + + (0, _createClass2["default"])(MsgHarvest, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setPoolId(this.value.pool_id); + msg.setSender(this.value.sender); + return msg; + } + }, { + key: "validate", + value: function validate() { + if (!this.value.pool_id) { + throw new _errors.SdkError("pool_id is empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender is empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.farm_tx_pb.MsgHarvest; + } + }]); + return MsgHarvest; +}(_types.Msg); + +exports.MsgHarvest = MsgHarvest; \ No newline at end of file diff --git a/dist/src/types/htlc.js b/dist/src/types/htlc.js index 38f7706b..4d8f17d6 100644 --- a/dist/src/types/htlc.js +++ b/dist/src/types/htlc.js @@ -80,39 +80,39 @@ var MsgCreateHTLC = /*#__PURE__*/function (_Msg) { key: "validate", value: function validate() { if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } if (!this.value.to) { - throw new _errors.SdkError("to is empty"); + throw new _errors.SdkError("to is empty"); } if (!this.value.receiver_on_other_chain) { - throw new _errors.SdkError("receiver_on_other_chain is empty"); + throw new _errors.SdkError("receiver_on_other_chain is empty"); } if (!this.value.sender_on_other_chain) { - throw new _errors.SdkError("sender_on_other_chain is empty"); + throw new _errors.SdkError("sender_on_other_chain is empty"); } if (!this.value.hash_lock) { - throw new _errors.SdkError("hash_lock is empty"); + throw new _errors.SdkError("hash_lock is empty"); } if (!this.value.timestamp) { - throw new _errors.SdkError("timestamp is empty"); + throw new _errors.SdkError("timestamp is empty"); } if (!this.value.time_lock) { - throw new _errors.SdkError("time_lock is empty"); + throw new _errors.SdkError("time_lock is empty"); } if (typeof this.value.transfer == 'undefined') { - throw new _errors.SdkError("transfer is empty"); + throw new _errors.SdkError("transfer is empty"); } if (!(this.value.amount && this.value.amount.length)) { - throw new _errors.SdkError("amount is empty"); + throw new _errors.SdkError("amount is empty"); } } }], [{ @@ -163,15 +163,15 @@ var MsgClaimHTLC = /*#__PURE__*/function (_Msg2) { key: "validate", value: function validate() { if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } if (!this.value.id) { - throw new _errors.SdkError("id is empty"); + throw new _errors.SdkError("id is empty"); } if (!this.value.secret) { - throw new _errors.SdkError("secret is empty"); + throw new _errors.SdkError("secret is empty"); } } }], [{ diff --git a/dist/src/types/ibc.js b/dist/src/types/ibc.js index ef015dcc..75e25fbf 100644 --- a/dist/src/types/ibc.js +++ b/dist/src/types/ibc.js @@ -86,19 +86,19 @@ var MsgTransfer = /*#__PURE__*/function (_Msg) { key: "validate", value: function validate() { if (!this.value.source_port) { - throw new _errors.SdkError("source_port is empty"); + throw new _errors.SdkError("source_port is empty"); } if (!this.value.source_channel) { - throw new _errors.SdkError("source_channel is empty"); + throw new _errors.SdkError("source_channel is empty"); } if (!this.value.token) { - throw new _errors.SdkError("token is empty"); + throw new _errors.SdkError("token is empty"); } if (!this.value.receiver) { - throw new _errors.SdkError("receiver is empty"); + throw new _errors.SdkError("receiver is empty"); } if (!this.value.timeout_height && !this.value.timeout_timestamp) { diff --git a/dist/src/types/index.d.ts b/dist/src/types/index.d.ts index e8524092..53edabb1 100644 --- a/dist/src/types/index.d.ts +++ b/dist/src/types/index.d.ts @@ -20,6 +20,7 @@ export * from './block-result'; export * from './validator'; export * from './query-builder'; export * from './coinswap'; +export * from "./farm"; export * from './protoTx'; export * from './nft'; export * from './proto'; diff --git a/dist/src/types/index.js b/dist/src/types/index.js index 89deb1be..6e693275 100644 --- a/dist/src/types/index.js +++ b/dist/src/types/index.js @@ -290,6 +290,19 @@ Object.keys(_coinswap).forEach(function (key) { }); }); +var _farm = require("./farm"); + +Object.keys(_farm).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _farm[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _farm[key]; + } + }); +}); + var _protoTx = require("./protoTx"); Object.keys(_protoTx).forEach(function (key) { diff --git a/dist/src/types/nft.d.ts b/dist/src/types/nft.d.ts index 686846b3..cff6ef62 100644 --- a/dist/src/types/nft.d.ts +++ b/dist/src/types/nft.d.ts @@ -7,6 +7,13 @@ export interface IssueDenomParam { name: string; schema: string; sender: string; + symbol?: string; + mint_restricted?: boolean; + update_restricted?: boolean; + description?: string; + uri?: string; + uri_hash?: string; + data?: string; } /** * Msg for issue denom @@ -31,6 +38,7 @@ export interface MintNFTParam { data: string; sender: string; recipient: string; + uri_hash: string; } /** * Msg for Mint NFT @@ -53,6 +61,7 @@ export interface EditNFTParam { name?: string; uri?: string; data?: string; + uri_hash?: string; sender: string; } /** @@ -76,6 +85,7 @@ export interface TransferNFTParam { name?: string; uri?: string; data?: string; + uri_hash?: string; sender: string; recipient: string; } diff --git a/dist/src/types/nft.js b/dist/src/types/nft.js index 1e3c145e..31c05f09 100644 --- a/dist/src/types/nft.js +++ b/dist/src/types/nft.js @@ -60,11 +60,20 @@ var MsgIssueDenom = /*#__PURE__*/function (_Msg) { (0, _createClass2["default"])(MsgIssueDenom, [{ key: "getModel", value: function getModel() { + var _this$value, _this$value2, _this$value3, _this$value4, _this$value5, _this$value6, _this$value7; + var msg = new (this.constructor.getModelClass())(); msg.setId(this.value.id); msg.setName(this.value.name); msg.setSchema(this.value.schema); msg.setSender(this.value.sender); + ((_this$value = this.value) === null || _this$value === void 0 ? void 0 : _this$value.symbol) && msg.setSymbol(this.value.symbol); + ((_this$value2 = this.value) === null || _this$value2 === void 0 ? void 0 : _this$value2.mint_restricted) && msg.setMintRestricted(this.value.mint_restricted); + ((_this$value3 = this.value) === null || _this$value3 === void 0 ? void 0 : _this$value3.update_restricted) && msg.setUpdateRestricted(this.value.update_restricted); + ((_this$value4 = this.value) === null || _this$value4 === void 0 ? void 0 : _this$value4.description) && msg.setDescription(this.value.description); + ((_this$value5 = this.value) === null || _this$value5 === void 0 ? void 0 : _this$value5.uri) && msg.setUri(this.value.uri); + ((_this$value6 = this.value) === null || _this$value6 === void 0 ? void 0 : _this$value6.uri_hash) && msg.setUriHash(this.value.uri_hash); + ((_this$value7 = this.value) === null || _this$value7 === void 0 ? void 0 : _this$value7.data) && msg.setData(this.value.data); return msg; } }, { @@ -132,6 +141,7 @@ var MsgMintNFT = /*#__PURE__*/function (_Msg2) { msg.setData(this.value.data); msg.setSender(this.value.sender); msg.setRecipient(this.value.recipient); + msg.setUriHash(this.value.uri_hash); return msg; } }, { @@ -164,6 +174,10 @@ var MsgMintNFT = /*#__PURE__*/function (_Msg2) { if (!this.value.recipient) { throw new _errors.SdkError("recipient can not be empty"); } + + if (!this.value.uri_hash) { + throw new _errors.SdkError("uri_hash can not be empty"); + } } }], [{ key: "getModelClass", @@ -226,6 +240,12 @@ var MsgEditNFT = /*#__PURE__*/function (_Msg3) { msg.setData(this.value.data); } + if (typeof this.value.uri_hash === 'undefined') { + msg.setUriHash(_index.doNotModify); + } else { + msg.setUriHash(this.value.uri_hash); + } + return msg; } }, { @@ -305,6 +325,12 @@ var MsgTransferNFT = /*#__PURE__*/function (_Msg4) { msg.setData(this.value.data); } + if (typeof this.value.uri_hash === 'undefined') { + msg.setUriHash(_index.doNotModify); + } else { + msg.setUriHash(this.value.uri_hash); + } + return msg; } }, { diff --git a/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js index 8806d0cb..24740416 100644 --- a/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js @@ -16,6 +16,8 @@ const grpc = {}; grpc.web = require('grpc-web'); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') @@ -82,6 +84,86 @@ proto.cosmos.auth.v1beta1.QueryPromiseClient = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.auth.v1beta1.QueryAccountsRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountsResponse>} + */ +const methodDescriptor_Query_Accounts = new grpc.web.MethodDescriptor( + '/cosmos.auth.v1beta1.Query/Accounts', + grpc.web.MethodType.UNARY, + proto.cosmos.auth.v1beta1.QueryAccountsRequest, + proto.cosmos.auth.v1beta1.QueryAccountsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.auth.v1beta1.QueryAccountsRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountsResponse>} + */ +const methodInfo_Query_Accounts = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.auth.v1beta1.QueryAccountsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.auth.v1beta1.QueryAccountsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.auth.v1beta1.QueryClient.prototype.accounts = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Accounts', + request, + metadata || {}, + methodDescriptor_Query_Accounts, + callback); +}; + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient.prototype.accounts = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Accounts', + request, + metadata || {}, + methodDescriptor_Query_Accounts); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js index 160afd51..429ed276 100644 --- a/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js +++ b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js @@ -12,6 +12,8 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); +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 gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); @@ -24,8 +26,52 @@ var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountRequest', null, global); goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountResponse', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountsRequest', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountsResponse', null, global); goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryParamsRequest', null, global); goog.exportSymbol('proto.cosmos.auth.v1beta1.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.cosmos.auth.v1beta1.QueryAccountsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountsRequest.displayName = 'proto.cosmos.auth.v1beta1.QueryAccountsRequest'; +} +/** + * 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.auth.v1beta1.QueryAccountsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.auth.v1beta1.QueryAccountsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountsResponse.displayName = 'proto.cosmos.auth.v1beta1.QueryAccountsResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -113,6 +159,368 @@ if (goog.DEBUG && !COMPILED) { +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_, 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.auth.v1beta1.QueryAccountsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.QueryAccountsRequest.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.auth.v1beta1.QueryAccountsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.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.cosmos.auth.v1beta1.QueryAccountsRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountsRequest; + return proto.cosmos.auth.v1beta1.QueryAccountsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.QueryAccountsRequest.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.auth.v1beta1.QueryAccountsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.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_, 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.auth.v1beta1.QueryAccountsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.QueryAccountsResponse.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.auth.v1beta1.QueryAccountsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accountsList: jspb.Message.toObjectList(msg.getAccountsList(), + google_protobuf_any_pb.Any.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.auth.v1beta1.QueryAccountsResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountsResponse; + return proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addAccounts(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.auth.v1beta1.QueryAccountsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.QueryAccountsResponse.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.auth.v1beta1.QueryAccountsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any accounts = 1; + * @return {!Array} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.getAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.setAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.addAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.clearAccountsList = function() { + return this.setAccountsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.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.auth.v1beta1.QueryAccountsResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/authz_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/authz_pb.js new file mode 100644 index 00000000..8da8381c --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/authz_pb.js @@ -0,0 +1,399 @@ +// source: cosmos/authz/v1beta1/authz.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.cosmos.authz.v1beta1.GenericAuthorization', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.Grant', 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.GenericAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.GenericAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.GenericAuthorization.displayName = 'proto.cosmos.authz.v1beta1.GenericAuthorization'; +} +/** + * 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.Grant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.Grant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.Grant.displayName = 'proto.cosmos.authz.v1beta1.Grant'; +} + + + +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_, 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.GenericAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.GenericAuthorization.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.GenericAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + msg: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.GenericAuthorization; + return proto.cosmos.authz.v1beta1.GenericAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.GenericAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.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.setMsg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.GenericAuthorization.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.GenericAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsg(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string msg = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.getMsg = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.setMsg = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.Grant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.Grant.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.Grant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.Grant.toObject = function(includeInstance, msg) { + var f, obj = { + authorization: (f = msg.getAuthorization()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && google_protobuf_timestamp_pb.Timestamp.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.Grant} + */ +proto.cosmos.authz.v1beta1.Grant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.Grant; + return proto.cosmos.authz.v1beta1.Grant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.Grant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.Grant} + */ +proto.cosmos.authz.v1beta1.Grant.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setAuthorization(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.Grant.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.Grant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.Grant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthorization(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any authorization = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.getAuthorization = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this +*/ +proto.cosmos.authz.v1beta1.Grant.prototype.setAuthorization = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this + */ +proto.cosmos.authz.v1beta1.Grant.prototype.clearAuthorization = function() { + return this.setAuthorization(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.hasAuthorization = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp expiration = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.getExpiration = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this +*/ +proto.cosmos.authz.v1beta1.Grant.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this + */ +proto.cosmos.authz.v1beta1.Grant.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/event_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/event_pb.js new file mode 100644 index 00000000..da86d072 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/event_pb.js @@ -0,0 +1,439 @@ +// source: cosmos/authz/v1beta1/event.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cosmos.authz.v1beta1.EventGrant', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.EventRevoke', 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.EventGrant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.EventGrant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.EventGrant.displayName = 'proto.cosmos.authz.v1beta1.EventGrant'; +} +/** + * 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.EventRevoke = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.EventRevoke, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.EventRevoke.displayName = 'proto.cosmos.authz.v1beta1.EventRevoke'; +} + + + +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_, 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.EventGrant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.EventGrant.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.EventGrant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventGrant.toObject = function(includeInstance, msg) { + var f, obj = { + msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), + granter: jspb.Message.getFieldWithDefault(msg, 3, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.EventGrant} + */ +proto.cosmos.authz.v1beta1.EventGrant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.EventGrant; + return proto.cosmos.authz.v1beta1.EventGrant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.EventGrant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.EventGrant} + */ +proto.cosmos.authz.v1beta1.EventGrant.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMsgTypeUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + case 4: + 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.authz.v1beta1.EventGrant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.EventGrant.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.EventGrant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventGrant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgTypeUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string msg_type_url = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventGrant} returns this + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string granter = 3; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventGrant} returns this + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string grantee = 4; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventGrant} returns this + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.EventRevoke.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.EventRevoke.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.EventRevoke} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventRevoke.toObject = function(includeInstance, msg) { + var f, obj = { + msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), + granter: jspb.Message.getFieldWithDefault(msg, 3, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.EventRevoke} + */ +proto.cosmos.authz.v1beta1.EventRevoke.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.EventRevoke; + return proto.cosmos.authz.v1beta1.EventRevoke.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.EventRevoke} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} + */ +proto.cosmos.authz.v1beta1.EventRevoke.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMsgTypeUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + case 4: + 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.authz.v1beta1.EventRevoke.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.EventRevoke.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.EventRevoke} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventRevoke.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgTypeUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string msg_type_url = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} returns this + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string granter = 3; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} returns this + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string grantee = 4; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} returns this + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/genesis_pb.js new file mode 100644 index 00000000..f12dd180 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/genesis_pb.js @@ -0,0 +1,489 @@ +// source: cosmos/authz/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_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.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.GrantAuthorization', 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.GenesisState.displayName = 'proto.cosmos.authz.v1beta1.GenesisState'; +} +/** + * 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.GrantAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.GrantAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.GrantAuthorization.displayName = 'proto.cosmos.authz.v1beta1.GrantAuthorization'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.GenesisState.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_, 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.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.GenesisState.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.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + authorizationList: jspb.Message.toObjectList(msg.getAuthorizationList(), + proto.cosmos.authz.v1beta1.GrantAuthorization.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.authz.v1beta1.GenesisState} + */ +proto.cosmos.authz.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.GenesisState; + return proto.cosmos.authz.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.GenesisState} + */ +proto.cosmos.authz.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.authz.v1beta1.GrantAuthorization; + reader.readMessage(value,proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinaryFromReader); + msg.addAuthorization(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.GenesisState.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.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthorizationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.authz.v1beta1.GrantAuthorization.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GrantAuthorization authorization = 1; + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.GenesisState.prototype.getAuthorizationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.authz.v1beta1.GrantAuthorization, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.authz.v1beta1.GenesisState} returns this +*/ +proto.cosmos.authz.v1beta1.GenesisState.prototype.setAuthorizationList = 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.GenesisState.prototype.addAuthorization = 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.GenesisState} returns this + */ +proto.cosmos.authz.v1beta1.GenesisState.prototype.clearAuthorizationList = function() { + return this.setAuthorizationList([]); +}; + + + + + +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_, 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.GrantAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.GrantAuthorization.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.GrantAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + granter: jspb.Message.getFieldWithDefault(msg, 1, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 2, ""), + authorization: (f = msg.getAuthorization()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && google_protobuf_timestamp_pb.Timestamp.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.GrantAuthorization} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.GrantAuthorization; + return proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.GrantAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.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.setAuthorization(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.GrantAuthorization.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.GrantAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.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.getAuthorization(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any authorization = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getAuthorization = 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.authz.v1beta1.GrantAuthorization} returns this +*/ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setAuthorization = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.clearAuthorization = function() { + return this.setAuthorization(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.hasAuthorization = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Timestamp expiration = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getExpiration = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this +*/ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..27e543a7 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,162 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.authz.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.authz = {}; +proto.cosmos.authz.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.QueryGrantsRequest, + * !proto.cosmos.authz.v1beta1.QueryGrantsResponse>} + */ +const methodDescriptor_Query_Grants = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Query/Grants', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.QueryGrantsRequest, + proto.cosmos.authz.v1beta1.QueryGrantsResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.QueryGrantsRequest, + * !proto.cosmos.authz.v1beta1.QueryGrantsResponse>} + */ +const methodInfo_Query_Grants = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.QueryGrantsResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.QueryGrantsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.QueryClient.prototype.grants = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Query/Grants', + request, + metadata || {}, + methodDescriptor_Query_Grants, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.QueryPromiseClient.prototype.grants = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Query/Grants', + request, + metadata || {}, + methodDescriptor_Query_Grants); +}; + + +module.exports = proto.cosmos.authz.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/query_pb.js new file mode 100644 index 00000000..38060346 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/query_pb.js @@ -0,0 +1,517 @@ +// source: cosmos/authz/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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'; +} + + + +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_, 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} + * @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_, 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.QueryGrantsResponse.prototype.getGrantsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_authz_v1beta1_authz_pb.Grant, 1)); +}; + + +/** + * @param {!Array} 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; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..7a46989f --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,328 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.authz.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js') + +var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.authz = {}; +proto.cosmos.authz.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.MsgGrant, + * !proto.cosmos.authz.v1beta1.MsgGrantResponse>} + */ +const methodDescriptor_Msg_Grant = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Msg/Grant', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.MsgGrant, + proto.cosmos.authz.v1beta1.MsgGrantResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.MsgGrant, + * !proto.cosmos.authz.v1beta1.MsgGrantResponse>} + */ +const methodInfo_Msg_Grant = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.MsgGrantResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.MsgGrantResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.MsgClient.prototype.grant = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Grant', + request, + metadata || {}, + methodDescriptor_Msg_Grant, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient.prototype.grant = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Grant', + request, + metadata || {}, + methodDescriptor_Msg_Grant); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.MsgExec, + * !proto.cosmos.authz.v1beta1.MsgExecResponse>} + */ +const methodDescriptor_Msg_Exec = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Msg/Exec', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.MsgExec, + proto.cosmos.authz.v1beta1.MsgExecResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.MsgExec, + * !proto.cosmos.authz.v1beta1.MsgExecResponse>} + */ +const methodInfo_Msg_Exec = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.MsgExecResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.MsgExecResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.MsgClient.prototype.exec = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Exec', + request, + metadata || {}, + methodDescriptor_Msg_Exec, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient.prototype.exec = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Exec', + request, + metadata || {}, + methodDescriptor_Msg_Exec); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.MsgRevoke, + * !proto.cosmos.authz.v1beta1.MsgRevokeResponse>} + */ +const methodDescriptor_Msg_Revoke = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Msg/Revoke', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.MsgRevoke, + proto.cosmos.authz.v1beta1.MsgRevokeResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.MsgRevoke, + * !proto.cosmos.authz.v1beta1.MsgRevokeResponse>} + */ +const methodInfo_Msg_Revoke = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.MsgRevokeResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.MsgRevokeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.MsgClient.prototype.revoke = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Revoke', + request, + metadata || {}, + methodDescriptor_Msg_Revoke, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient.prototype.revoke = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Revoke', + request, + metadata || {}, + methodDescriptor_Msg_Revoke); +}; + + +module.exports = proto.cosmos.authz.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/authz/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/authz/v1beta1/tx_pb.js new file mode 100644 index 00000000..3ef0f4ec --- /dev/null +++ b/dist/src/types/proto-types/cosmos/authz/v1beta1/tx_pb.js @@ -0,0 +1,1132 @@ +// source: cosmos/authz/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js'); +goog.object.extend(proto, cosmos_base_abci_v1beta1_abci_pb); +var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js'); +goog.object.extend(proto, cosmos_authz_v1beta1_authz_pb); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgExec', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgExecResponse', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgGrant', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgGrantResponse', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgRevoke', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgRevokeResponse', 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.MsgGrant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgGrant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgGrant.displayName = 'proto.cosmos.authz.v1beta1.MsgGrant'; +} +/** + * 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.MsgExecResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.MsgExecResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgExecResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgExecResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgExecResponse'; +} +/** + * 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.MsgExec = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.MsgExec.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgExec, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgExec.displayName = 'proto.cosmos.authz.v1beta1.MsgExec'; +} +/** + * 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.MsgGrantResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgGrantResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgGrantResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgGrantResponse'; +} +/** + * 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.MsgRevoke = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgRevoke, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgRevoke.displayName = 'proto.cosmos.authz.v1beta1.MsgRevoke'; +} +/** + * 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.MsgRevokeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgRevokeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgRevokeResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgRevokeResponse'; +} + + + +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_, 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.MsgGrant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgGrant.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.MsgGrant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrant.toObject = function(includeInstance, msg) { + var f, obj = { + granter: jspb.Message.getFieldWithDefault(msg, 1, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 2, ""), + grant: (f = msg.getGrant()) && cosmos_authz_v1beta1_authz_pb.Grant.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.MsgGrant} + */ +proto.cosmos.authz.v1beta1.MsgGrant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgGrant; + return proto.cosmos.authz.v1beta1.MsgGrant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} + */ +proto.cosmos.authz.v1beta1.MsgGrant.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 cosmos_authz_v1beta1_authz_pb.Grant; + reader.readMessage(value,cosmos_authz_v1beta1_authz_pb.Grant.deserializeBinaryFromReader); + msg.setGrant(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgGrant.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.MsgGrant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrant.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.getGrant(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_authz_v1beta1_authz_pb.Grant.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Grant grant = 3; + * @return {?proto.cosmos.authz.v1beta1.Grant} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.getGrant = function() { + return /** @type{?proto.cosmos.authz.v1beta1.Grant} */ ( + jspb.Message.getWrapperField(this, cosmos_authz_v1beta1_authz_pb.Grant, 3)); +}; + + +/** + * @param {?proto.cosmos.authz.v1beta1.Grant|undefined} value + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this +*/ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.setGrant = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.clearGrant = function() { + return this.setGrant(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.hasGrant = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.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_, 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.MsgExecResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgExecResponse.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.MsgExecResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resultsList: msg.getResultsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgExecResponse; + return proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.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.addResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgExecResponse.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.MsgExecResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResultsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes results = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes results = 1; + * This is a type-conversion wrapper around `getResultsList()` + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getResultsList())); +}; + + +/** + * repeated bytes results = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResultsList()` + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getResultsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.setResultsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.addResults = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.clearResultsList = function() { + return this.setResultsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.MsgExec.repeatedFields_ = [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_, 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.MsgExec.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgExec.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.MsgExec} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExec.toObject = function(includeInstance, msg) { + var f, obj = { + grantee: jspb.Message.getFieldWithDefault(msg, 1, ""), + msgsList: jspb.Message.toObjectList(msg.getMsgsList(), + google_protobuf_any_pb.Any.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.authz.v1beta1.MsgExec} + */ +proto.cosmos.authz.v1beta1.MsgExec.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgExec; + return proto.cosmos.authz.v1beta1.MsgExec.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgExec} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgExec} + */ +proto.cosmos.authz.v1beta1.MsgExec.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 google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addMsgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgExec.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.MsgExec} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExec.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMsgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string grantee = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgExec} returns this + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated google.protobuf.Any msgs = 2; + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.getMsgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.authz.v1beta1.MsgExec} returns this +*/ +proto.cosmos.authz.v1beta1.MsgExec.prototype.setMsgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.addMsgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.authz.v1beta1.MsgExec} returns this + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.clearMsgsList = function() { + return this.setMsgsList([]); +}; + + + + + +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_, 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.MsgGrantResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgGrantResponse.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.MsgGrantResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.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.authz.v1beta1.MsgGrantResponse} + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgGrantResponse; + return proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgGrantResponse} + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.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.authz.v1beta1.MsgGrantResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgGrantResponse.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.MsgGrantResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.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_, 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.MsgRevoke.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgRevoke.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.MsgRevoke} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevoke.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, "") + }; + + 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.MsgRevoke} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgRevoke; + return proto.cosmos.authz.v1beta1.MsgRevoke.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgRevoke.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.MsgRevoke} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevoke.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 + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} returns this + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} returns this + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string msg_type_url = 3; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} returns this + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.MsgRevokeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.MsgRevokeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.authz.v1beta1.MsgRevokeResponse} + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgRevokeResponse; + return proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgRevokeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgRevokeResponse} + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.authz.v1beta1.MsgRevokeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.MsgRevokeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/authz_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/authz_pb.js new file mode 100644 index 00000000..4a776216 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/authz_pb.js @@ -0,0 +1,203 @@ +// source: cosmos/bank/v1beta1/authz.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.SendAuthorization', 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.bank.v1beta1.SendAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.SendAuthorization.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.SendAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.SendAuthorization.displayName = 'proto.cosmos.bank.v1beta1.SendAuthorization'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.SendAuthorization.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_, 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.bank.v1beta1.SendAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.SendAuthorization.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.bank.v1beta1.SendAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + spendLimitList: jspb.Message.toObjectList(msg.getSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.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.bank.v1beta1.SendAuthorization} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.SendAuthorization; + return proto.cosmos.bank.v1beta1.SendAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.SendAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.SendAuthorization} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.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.addSpendLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.SendAuthorization.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.bank.v1beta1.SendAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin spend_limit = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.getSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.SendAuthorization} returns this +*/ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.setSpendLimitList = 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.cosmos.bank.v1beta1.SendAuthorization.prototype.addSpendLimit = 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.cosmos.bank.v1beta1.SendAuthorization} returns this + */ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.clearSpendLimitList = function() { + return this.setSpendLimitList([]); +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js index 82261386..4d0473f9 100644 --- a/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js @@ -1321,7 +1321,9 @@ proto.cosmos.bank.v1beta1.Metadata.toObject = function(includeInstance, msg) { denomUnitsList: jspb.Message.toObjectList(msg.getDenomUnitsList(), proto.cosmos.bank.v1beta1.DenomUnit.toObject, includeInstance), base: jspb.Message.getFieldWithDefault(msg, 3, ""), - display: jspb.Message.getFieldWithDefault(msg, 4, "") + display: jspb.Message.getFieldWithDefault(msg, 4, ""), + name: jspb.Message.getFieldWithDefault(msg, 5, ""), + symbol: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -1375,6 +1377,14 @@ proto.cosmos.bank.v1beta1.Metadata.deserializeBinaryFromReader = function(msg, r var value = /** @type {string} */ (reader.readString()); msg.setDisplay(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; default: reader.skipField(); break; @@ -1433,6 +1443,20 @@ proto.cosmos.bank.v1beta1.Metadata.serializeBinaryToWriter = function(message, w f ); } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } }; @@ -1528,4 +1552,40 @@ proto.cosmos.bank.v1beta1.Metadata.prototype.setDisplay = function(value) { }; +/** + * optional string name = 5; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string symbol = 6; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js index b44f4ccf..8cf3bf98 100644 --- a/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js @@ -1065,7 +1065,7 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.toObject = function( */ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.toObject = function(includeInstance, msg) { var f, obj = { - + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -1102,6 +1102,11 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.deserializeBinaryFromReader = } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -1131,6 +1136,51 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.serializeBinary = fu */ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} returns this +*/ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -1174,7 +1224,8 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.toObject = function proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.toObject = function(includeInstance, msg) { var f, obj = { supplyList: jspb.Message.toObjectList(msg.getSupplyList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1216,6 +1267,11 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinaryFromReader = reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addSupply(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; @@ -1253,6 +1309,14 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.serializeBinaryToWriter = fun cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1294,6 +1358,43 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.clearSupplyList = f }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.bank.v1beta1.QueryTotalSupplyResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js b/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js index 42631712..4093aa0c 100644 --- a/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js +++ b/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js @@ -91,7 +91,8 @@ proto.cosmos.base.query.v1beta1.PageRequest.toObject = function(includeInstance, key: msg.getKey_asB64(), offset: jspb.Message.getFieldWithDefault(msg, 2, 0), limit: jspb.Message.getFieldWithDefault(msg, 3, 0), - countTotal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + countTotal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + reverse: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -144,6 +145,10 @@ proto.cosmos.base.query.v1beta1.PageRequest.deserializeBinaryFromReader = functi var value = /** @type {boolean} */ (reader.readBool()); msg.setCountTotal(value); break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReverse(value); + break; default: reader.skipField(); break; @@ -201,6 +206,13 @@ proto.cosmos.base.query.v1beta1.PageRequest.serializeBinaryToWriter = function(m f ); } + f = message.getReverse(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; @@ -300,6 +312,24 @@ proto.cosmos.base.query.v1beta1.PageRequest.prototype.setCountTotal = function(v }; +/** + * optional bool reverse = 5; + * @return {boolean} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getReverse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setReverse = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + diff --git a/dist/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_grpc_web_pb.js new file mode 100644 index 00000000..8bd2fe7a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_grpc_web_pb.js @@ -0,0 +1,559 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.base.reflection.v2alpha1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.base = {}; +proto.cosmos.base.reflection = {}; +proto.cosmos.base.reflection.v2alpha1 = require('./reflection_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetAuthnDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetAuthnDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getAuthnDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetAuthnDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getAuthnDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetAuthnDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetChainDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetChainDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getChainDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetChainDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getChainDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetChainDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetCodecDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetCodecDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getCodecDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetCodecDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getCodecDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetCodecDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetConfigurationDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetConfigurationDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getConfigurationDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetConfigurationDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getConfigurationDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetConfigurationDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetQueryServicesDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetQueryServicesDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getQueryServicesDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetQueryServicesDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getQueryServicesDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetQueryServicesDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetTxDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetTxDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getTxDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetTxDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getTxDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetTxDescriptor); +}; + + +module.exports = proto.cosmos.base.reflection.v2alpha1; + diff --git a/dist/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_pb.js b/dist/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_pb.js new file mode 100644 index 00000000..173f3437 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_pb.js @@ -0,0 +1,4726 @@ +// source: cosmos/base/reflection/v2alpha1/reflection.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.AppDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.ChainDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.CodecDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.MsgDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.TxDescriptor', 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.base.reflection.v2alpha1.AppDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.AppDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.AppDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.AppDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.TxDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.TxDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.TxDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.TxDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.AuthnDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.SigningModeDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.ChainDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.ChainDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.ChainDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.CodecDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.CodecDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.CodecDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.InterfaceDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.InterfaceImplementerDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.ConfigurationDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.MsgDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.MsgDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.MsgDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.GetAuthnDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetAuthnDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetChainDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetChainDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetCodecDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetCodecDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetTxDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetTxDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.QueryServicesDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.QueryServiceDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.QueryMethodDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor'; +} + + + +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_, 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.base.reflection.v2alpha1.AppDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.AppDescriptor.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.base.reflection.v2alpha1.AppDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + authn: (f = msg.getAuthn()) && proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.toObject(includeInstance, f), + chain: (f = msg.getChain()) && proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.toObject(includeInstance, f), + codec: (f = msg.getCodec()) && proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.toObject(includeInstance, f), + configuration: (f = msg.getConfiguration()) && proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.toObject(includeInstance, f), + queryServices: (f = msg.getQueryServices()) && proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.toObject(includeInstance, f), + tx: (f = msg.getTx()) && proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.AppDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.AppDescriptor; + return proto.cosmos.base.reflection.v2alpha1.AppDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader); + msg.setAuthn(value); + break; + case 2: + var value = new proto.cosmos.base.reflection.v2alpha1.ChainDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinaryFromReader); + msg.setChain(value); + break; + case 3: + var value = new proto.cosmos.base.reflection.v2alpha1.CodecDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader); + msg.setCodec(value); + break; + case 4: + var value = new proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 5: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader); + msg.setQueryServices(value); + break; + case 6: + var value = new proto.cosmos.base.reflection.v2alpha1.TxDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinaryFromReader); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.AppDescriptor.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.base.reflection.v2alpha1.AppDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthn(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.serializeBinaryToWriter + ); + } + f = message.getChain(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.serializeBinaryToWriter + ); + } + f = message.getCodec(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.serializeBinaryToWriter + ); + } + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.serializeBinaryToWriter + ); + } + f = message.getQueryServices(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.serializeBinaryToWriter + ); + } + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AuthnDescriptor authn = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getAuthn = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setAuthn = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearAuthn = function() { + return this.setAuthn(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasAuthn = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChainDescriptor chain = 2; + * @return {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getChain = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ChainDescriptor, 2)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setChain = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearChain = function() { + return this.setChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasChain = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional CodecDescriptor codec = 3; + * @return {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getCodec = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.CodecDescriptor, 3)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setCodec = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearCodec = function() { + return this.setCodec(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasCodec = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ConfigurationDescriptor configuration = 4; + * @return {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getConfiguration = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor, 4)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearConfiguration = function() { + return this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional QueryServicesDescriptor query_services = 5; + * @return {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getQueryServices = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor, 5)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setQueryServices = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearQueryServices = function() { + return this.setQueryServices(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasQueryServices = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional TxDescriptor tx = 6; + * @return {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getTx = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.TxDescriptor, 6)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasTx = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.repeatedFields_ = [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_, 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.base.reflection.v2alpha1.TxDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.TxDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + msgsList: jspb.Message.toObjectList(msg.getMsgsList(), + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.TxDescriptor; + return proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.setFullname(value); + break; + case 2: + var value = new proto.cosmos.base.reflection.v2alpha1.MsgDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.deserializeBinaryFromReader); + msg.addMsgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.TxDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMsgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated MsgDescriptor msgs = 2; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.getMsgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.MsgDescriptor, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.setMsgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.addMsgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.reflection.v2alpha1.MsgDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.clearMsgsList = function() { + return this.setMsgsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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_, 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.base.reflection.v2alpha1.AuthnDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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.base.reflection.v2alpha1.AuthnDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + signModesList: jspb.Message.toObjectList(msg.getSignModesList(), + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor; + return proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.deserializeBinaryFromReader); + msg.addSignModes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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.base.reflection.v2alpha1.AuthnDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignModesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SigningModeDescriptor sign_modes = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.getSignModesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.setSignModesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.addSignModes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.clearSignModesList = function() { + return this.setSignModesList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.SigningModeDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.base.reflection.v2alpha1.SigningModeDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + number: jspb.Message.getFieldWithDefault(msg, 2, 0), + authnInfoProviderMethodFullname: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + 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.base.reflection.v2alpha1.SigningModeDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor; + return proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthnInfoProviderMethodFullname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.base.reflection.v2alpha1.SigningModeDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNumber(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getAuthnInfoProviderMethodFullname(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 number = 2; + * @return {number} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string authn_info_provider_method_fullname = 3; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.getAuthnInfoProviderMethodFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.setAuthnInfoProviderMethodFullname = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.base.reflection.v2alpha1.ChainDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.base.reflection.v2alpha1.ChainDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.ChainDescriptor; + return proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.base.reflection.v2alpha1.ChainDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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_, 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.base.reflection.v2alpha1.CodecDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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.base.reflection.v2alpha1.CodecDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + interfacesList: jspb.Message.toObjectList(msg.getInterfacesList(), + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.CodecDescriptor; + return proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.deserializeBinaryFromReader); + msg.addInterfaces(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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.base.reflection.v2alpha1.CodecDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterfacesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated InterfaceDescriptor interfaces = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.getInterfacesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.setInterfacesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.addInterfaces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.clearInterfacesList = function() { + return this.setInterfacesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.repeatedFields_ = [2,3]; + + + +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_, 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.base.reflection.v2alpha1.InterfaceDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.base.reflection.v2alpha1.InterfaceDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + interfaceAcceptingMessagesList: jspb.Message.toObjectList(msg.getInterfaceAcceptingMessagesList(), + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.toObject, includeInstance), + interfaceImplementersList: jspb.Message.toObjectList(msg.getInterfaceImplementersList(), + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.base.reflection.v2alpha1.InterfaceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor; + return proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.setFullname(value); + break; + case 2: + var value = new proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.deserializeBinaryFromReader); + msg.addInterfaceAcceptingMessages(value); + break; + case 3: + var value = new proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.deserializeBinaryFromReader); + msg.addInterfaceImplementers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.base.reflection.v2alpha1.InterfaceDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInterfaceAcceptingMessagesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.serializeBinaryToWriter + ); + } + f = message.getInterfaceImplementersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.getInterfaceAcceptingMessagesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.setInterfaceAcceptingMessagesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.addInterfaceAcceptingMessages = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.clearInterfaceAcceptingMessagesList = function() { + return this.setInterfaceAcceptingMessagesList([]); +}; + + +/** + * repeated InterfaceImplementerDescriptor interface_implementers = 3; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.getInterfaceImplementersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.setInterfaceImplementersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.addInterfaceImplementers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.clearInterfaceImplementersList = function() { + return this.setInterfaceImplementersList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.base.reflection.v2alpha1.InterfaceImplementerDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + typeUrl: 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.base.reflection.v2alpha1.InterfaceImplementerDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor; + return proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.setFullname(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.base.reflection.v2alpha1.InterfaceImplementerDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTypeUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string type_url = 2; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.getTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.setTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.repeatedFields_ = [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_, 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + fieldDescriptorNamesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor; + return proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.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.setFullname(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addFieldDescriptorNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFieldDescriptorNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string field_descriptor_names = 2; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.getFieldDescriptorNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.setFieldDescriptorNamesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.addFieldDescriptorNames = 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.clearFieldDescriptorNamesList = function() { + return this.setFieldDescriptorNamesList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.base.reflection.v2alpha1.ConfigurationDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + bech32AccountAddressPrefix: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor; + return proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.setBech32AccountAddressPrefix(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.base.reflection.v2alpha1.ConfigurationDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBech32AccountAddressPrefix(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string bech32_account_address_prefix = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.getBech32AccountAddressPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.setBech32AccountAddressPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.base.reflection.v2alpha1.MsgDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.base.reflection.v2alpha1.MsgDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.MsgDescriptor; + return proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.setMsgTypeUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.base.reflection.v2alpha1.MsgDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgTypeUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string msg_type_url = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.base.reflection.v2alpha1.GetAuthnDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.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.base.reflection.v2alpha1.GetAuthnDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + authn: (f = msg.getAuthn()) && proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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.base.reflection.v2alpha1.GetAuthnDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader); + msg.setAuthn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.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.base.reflection.v2alpha1.GetAuthnDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthn(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AuthnDescriptor authn = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.getAuthn = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.setAuthn = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.clearAuthn = function() { + return this.setAuthn(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.hasAuthn = 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_, 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.base.reflection.v2alpha1.GetChainDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.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.base.reflection.v2alpha1.GetChainDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + chain: (f = msg.getChain()) && proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.base.reflection.v2alpha1.GetChainDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.ChainDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinaryFromReader); + msg.setChain(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.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.base.reflection.v2alpha1.GetChainDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChain(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ChainDescriptor chain = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.getChain = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ChainDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.setChain = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.clearChain = function() { + return this.setChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.hasChain = 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_, 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.base.reflection.v2alpha1.GetCodecDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.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.base.reflection.v2alpha1.GetCodecDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + codec: (f = msg.getCodec()) && proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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.base.reflection.v2alpha1.GetCodecDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.CodecDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader); + msg.setCodec(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.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.base.reflection.v2alpha1.GetCodecDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCodec(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CodecDescriptor codec = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.getCodec = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.CodecDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.setCodec = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.clearCodec = function() { + return this.setCodec(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.hasCodec = 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_, 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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + config: (f = msg.getConfig()) && proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinaryFromReader); + msg.setConfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConfig(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConfigurationDescriptor config = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.getConfig = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.setConfig = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.clearConfig = function() { + return this.setConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.hasConfig = 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_, 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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + queries: (f = msg.getQueries()) && proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader); + msg.setQueries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQueries(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional QueryServicesDescriptor queries = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.getQueries = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.setQueries = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.clearQueries = function() { + return this.setQueries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.hasQueries = 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_, 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.base.reflection.v2alpha1.GetTxDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.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.base.reflection.v2alpha1.GetTxDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: (f = msg.getTx()) && proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.GetTxDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.TxDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinaryFromReader); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.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.base.reflection.v2alpha1.GetTxDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxDescriptor tx = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.getTx = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.TxDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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_, 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.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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.base.reflection.v2alpha1.QueryServicesDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + queryServicesList: jspb.Message.toObjectList(msg.getQueryServicesList(), + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor; + return proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.deserializeBinaryFromReader); + msg.addQueryServices(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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.base.reflection.v2alpha1.QueryServicesDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQueryServicesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated QueryServiceDescriptor query_services = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.getQueryServicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.setQueryServicesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.addQueryServices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.clearQueryServicesList = function() { + return this.setQueryServicesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.repeatedFields_ = [3]; + + + +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_, 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.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.base.reflection.v2alpha1.QueryServiceDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + isModule: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + methodsList: jspb.Message.toObjectList(msg.getMethodsList(), + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.base.reflection.v2alpha1.QueryServiceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor; + return proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.setFullname(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsModule(value); + break; + case 3: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.deserializeBinaryFromReader); + msg.addMethods(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.base.reflection.v2alpha1.QueryServiceDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIsModule(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getMethodsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool is_module = 2; + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.getIsModule = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.setIsModule = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated QueryMethodDescriptor methods = 3; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.getMethodsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.setMethodsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.addMethods = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.clearMethodsList = function() { + return this.setMethodsList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.base.reflection.v2alpha1.QueryMethodDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + fullQueryPath: 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.base.reflection.v2alpha1.QueryMethodDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor; + return proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFullQueryPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.base.reflection.v2alpha1.QueryMethodDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFullQueryPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string full_query_path = 2; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.getFullQueryPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.setFullQueryPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.reflection.v2alpha1); diff --git a/dist/src/types/proto-types/cosmos/base/store/v1beta1/listening_pb.js b/dist/src/types/proto-types/cosmos/base/store/v1beta1/listening_pb.js new file mode 100644 index 00000000..adf28579 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/store/v1beta1/listening_pb.js @@ -0,0 +1,305 @@ +// source: cosmos/base/store/v1beta1/listening.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cosmos.base.store.v1beta1.StoreKVPair', 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.base.store.v1beta1.StoreKVPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.StoreKVPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.StoreKVPair.displayName = 'proto.cosmos.base.store.v1beta1.StoreKVPair'; +} + + + +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_, 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.base.store.v1beta1.StoreKVPair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.StoreKVPair.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.base.store.v1beta1.StoreKVPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.toObject = function(includeInstance, msg) { + var f, obj = { + storeKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + pb_delete: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + key: msg.getKey_asB64(), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.StoreKVPair; + return proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.store.v1beta1.StoreKVPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.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.setStoreKey(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDelete(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.StoreKVPair.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.base.store.v1beta1.StoreKVPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDelete(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string store_key = 1; + * @return {string} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getStoreKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setStoreKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool delete = 2; + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getDelete = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setDelete = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes key = 3; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes key = 3; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes value = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes value = 4; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js index 8e21cb19..f3b5e83b 100644 --- a/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js +++ b/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js @@ -2626,7 +2626,8 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.toObject = function(includeInst buildTags: jspb.Message.getFieldWithDefault(msg, 5, ""), goVersion: jspb.Message.getFieldWithDefault(msg, 6, ""), buildDepsList: jspb.Message.toObjectList(msg.getBuildDepsList(), - proto.cosmos.base.tendermint.v1beta1.Module.toObject, includeInstance) + proto.cosmos.base.tendermint.v1beta1.Module.toObject, includeInstance), + cosmosSdkVersion: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -2692,6 +2693,10 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.deserializeBinaryFromReader = f reader.readMessage(value,proto.cosmos.base.tendermint.v1beta1.Module.deserializeBinaryFromReader); msg.addBuildDeps(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCosmosSdkVersion(value); + break; default: reader.skipField(); break; @@ -2771,6 +2776,13 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.serializeBinaryToWriter = funct proto.cosmos.base.tendermint.v1beta1.Module.serializeBinaryToWriter ); } + f = message.getCosmosSdkVersion(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -2920,6 +2932,24 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.prototype.clearBuildDepsList = }; +/** + * optional string cosmos_sdk_version = 8; + * @return {string} + */ +proto.cosmos.base.tendermint.v1beta1.VersionInfo.prototype.getCosmosSdkVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint.v1beta1.VersionInfo.prototype.setCosmosSdkVersion = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + diff --git a/dist/src/types/proto-types/cosmos/crypto/secp256r1/keys_pb.js b/dist/src/types/proto-types/cosmos/crypto/secp256r1/keys_pb.js new file mode 100644 index 00000000..c510af73 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crypto/secp256r1/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/secp256r1/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.cosmos.crypto.secp256r1.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.secp256r1.PubKey', 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.crypto.secp256r1.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256r1.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256r1.PubKey.displayName = 'proto.cosmos.crypto.secp256r1.PubKey'; +} +/** + * 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.crypto.secp256r1.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256r1.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256r1.PrivKey.displayName = 'proto.cosmos.crypto.secp256r1.PrivKey'; +} + + + +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_, 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.crypto.secp256r1.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256r1.PubKey.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.crypto.secp256r1.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.crypto.secp256r1.PubKey} + */ +proto.cosmos.crypto.secp256r1.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256r1.PubKey; + return proto.cosmos.crypto.secp256r1.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256r1.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256r1.PubKey} + */ +proto.cosmos.crypto.secp256r1.PubKey.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.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256r1.PubKey.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.crypto.secp256r1.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256r1.PubKey} returns this + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.crypto.secp256r1.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256r1.PrivKey.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.crypto.secp256r1.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + secret: msg.getSecret_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.crypto.secp256r1.PrivKey} + */ +proto.cosmos.crypto.secp256r1.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256r1.PrivKey; + return proto.cosmos.crypto.secp256r1.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256r1.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256r1.PrivKey} + */ +proto.cosmos.crypto.secp256r1.PrivKey.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.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256r1.PrivKey.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.crypto.secp256r1.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecret_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes secret = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.getSecret = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes secret = 1; + * This is a type-conversion wrapper around `getSecret()` + * @return {string} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.getSecret_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecret())); +}; + + +/** + * optional bytes secret = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecret()` + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.getSecret_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecret())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256r1.PrivKey} returns this + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.setSecret = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.secp256r1); diff --git a/dist/src/types/proto-types/cosmos/feegrant/v1beta1/feegrant_pb.js b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/feegrant_pb.js new file mode 100644 index 00000000..8cffe290 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/feegrant_pb.js @@ -0,0 +1,1110 @@ +// source: cosmos/feegrant/v1beta1/feegrant.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +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_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.BasicAllowance', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.Grant', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.PeriodicAllowance', 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.BasicAllowance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.BasicAllowance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.BasicAllowance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.BasicAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.BasicAllowance'; +} +/** + * 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.PeriodicAllowance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.PeriodicAllowance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.PeriodicAllowance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.PeriodicAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.PeriodicAllowance'; +} +/** + * 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.AllowedMsgAllowance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance'; +} +/** + * 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.Grant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.Grant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.Grant.displayName = 'proto.cosmos.feegrant.v1beta1.Grant'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.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_, 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.BasicAllowance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.BasicAllowance.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.BasicAllowance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.toObject = function(includeInstance, msg) { + var f, obj = { + spendLimitList: jspb.Message.toObjectList(msg.getSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + expiration: (f = msg.getExpiration()) && google_protobuf_timestamp_pb.Timestamp.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.BasicAllowance} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.BasicAllowance; + return proto.cosmos.feegrant.v1beta1.BasicAllowance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.BasicAllowance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.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.addSpendLimit(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.BasicAllowance.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.BasicAllowance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin spend_limit = 1; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.getSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.setSpendLimitList = 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.cosmos.feegrant.v1beta1.BasicAllowance.prototype.addSpendLimit = 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.cosmos.feegrant.v1beta1.BasicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.clearSpendLimitList = function() { + return this.setSpendLimitList([]); +}; + + +/** + * optional google.protobuf.Timestamp expiration = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.getExpiration = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.repeatedFields_ = [3,4]; + + + +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_, 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.PeriodicAllowance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.PeriodicAllowance.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.PeriodicAllowance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.toObject = function(includeInstance, msg) { + var f, obj = { + basic: (f = msg.getBasic()) && proto.cosmos.feegrant.v1beta1.BasicAllowance.toObject(includeInstance, f), + period: (f = msg.getPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + periodSpendLimitList: jspb.Message.toObjectList(msg.getPeriodSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + periodCanSpendList: jspb.Message.toObjectList(msg.getPeriodCanSpendList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + periodReset: (f = msg.getPeriodReset()) && google_protobuf_timestamp_pb.Timestamp.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.PeriodicAllowance} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.PeriodicAllowance; + return proto.cosmos.feegrant.v1beta1.PeriodicAllowance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.feegrant.v1beta1.BasicAllowance; + reader.readMessage(value,proto.cosmos.feegrant.v1beta1.BasicAllowance.deserializeBinaryFromReader); + msg.setBasic(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setPeriod(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPeriodSpendLimit(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPeriodCanSpend(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setPeriodReset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.PeriodicAllowance.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.PeriodicAllowance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBasic(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.feegrant.v1beta1.BasicAllowance.serializeBinaryToWriter + ); + } + f = message.getPeriod(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getPeriodSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPeriodCanSpendList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPeriodReset(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BasicAllowance basic = 1; + * @return {?proto.cosmos.feegrant.v1beta1.BasicAllowance} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getBasic = function() { + return /** @type{?proto.cosmos.feegrant.v1beta1.BasicAllowance} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.feegrant.v1beta1.BasicAllowance, 1)); +}; + + +/** + * @param {?proto.cosmos.feegrant.v1beta1.BasicAllowance|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setBasic = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearBasic = function() { + return this.setBasic(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.hasBasic = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Duration period = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriod = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriod = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriod = function() { + return this.setPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.hasPeriod = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin period_spend_limit = 3; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriodSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriodSpendLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.addPeriodSpendLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriodSpendLimitList = function() { + return this.setPeriodSpendLimitList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin period_can_spend = 4; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriodCanSpendList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriodCanSpendList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.addPeriodCanSpend = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriodCanSpendList = function() { + return this.setPeriodCanSpendList([]); +}; + + +/** + * optional google.protobuf.Timestamp period_reset = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriodReset = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriodReset = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriodReset = function() { + return this.setPeriodReset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.hasPeriodReset = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.repeatedFields_ = [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_, 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.AllowedMsgAllowance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.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.AllowedMsgAllowance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.toObject = function(includeInstance, msg) { + var f, obj = { + allowance: (f = msg.getAllowance()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + allowedMessagesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.AllowedMsgAllowance} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance; + return proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setAllowance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowedMessages(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.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.AllowedMsgAllowance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowance(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getAllowedMessagesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional google.protobuf.Any allowance = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.getAllowance = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.setAllowance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.clearAllowance = function() { + return this.setAllowance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.hasAllowance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string allowed_messages = 2; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.getAllowedMessagesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.setAllowedMessagesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.addAllowedMessages = 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.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.clearAllowedMessagesList = function() { + return this.setAllowedMessagesList([]); +}; + + + + + +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_, 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.Grant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.Grant.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.Grant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant} + */ +proto.cosmos.feegrant.v1beta1.Grant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.Grant; + return proto.cosmos.feegrant.v1beta1.Grant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.Grant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.Grant.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.Grant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.Grant} returns this + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.Grant} returns this + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant.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.Grant} returns this +*/ +proto.cosmos.feegrant.v1beta1.Grant.prototype.setAllowance = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.Grant} returns this + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.clearAllowance = function() { + return this.setAllowance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.hasAllowance = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/feegrant/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/genesis_pb.js new file mode 100644 index 00000000..2aac50a1 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/genesis_pb.js @@ -0,0 +1,201 @@ +// source: cosmos/feegrant/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_feegrant_v1beta1_feegrant_pb = require('../../../cosmos/feegrant/v1beta1/feegrant_pb.js'); +goog.object.extend(proto, cosmos_feegrant_v1beta1_feegrant_pb); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.GenesisState', 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.GenesisState.displayName = 'proto.cosmos.feegrant.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.GenesisState.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_, 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.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.GenesisState.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.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + allowancesList: jspb.Message.toObjectList(msg.getAllowancesList(), + cosmos_feegrant_v1beta1_feegrant_pb.Grant.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.feegrant.v1beta1.GenesisState} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.GenesisState; + return proto.cosmos.feegrant.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.GenesisState} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_feegrant_v1beta1_feegrant_pb.Grant; + reader.readMessage(value,cosmos_feegrant_v1beta1_feegrant_pb.Grant.deserializeBinaryFromReader); + msg.addAllowances(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.GenesisState.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.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_feegrant_v1beta1_feegrant_pb.Grant.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Grant allowances = 1; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.getAllowancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_feegrant_v1beta1_feegrant_pb.Grant, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.GenesisState} returns this +*/ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.setAllowancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.Grant=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.addAllowances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.feegrant.v1beta1.Grant, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.GenesisState} returns this + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.clearAllowancesList = function() { + return this.setAllowancesList([]); +}; + + +goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/feegrant/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..6f23bdff --- /dev/null +++ b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,242 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.feegrant.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_feegrant_v1beta1_feegrant_pb = require('../../../cosmos/feegrant/v1beta1/feegrant_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.feegrant = {}; +proto.cosmos.feegrant.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse>} + */ +const methodDescriptor_Query_Allowance = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Query/Allowance', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse>} + */ +const methodInfo_Query_Allowance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.QueryClient.prototype.allowance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowance', + request, + metadata || {}, + methodDescriptor_Query_Allowance, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.QueryPromiseClient.prototype.allowance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowance', + request, + metadata || {}, + methodDescriptor_Query_Allowance); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse>} + */ +const methodDescriptor_Query_Allowances = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Query/Allowances', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse>} + */ +const methodInfo_Query_Allowances = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.QueryClient.prototype.allowances = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowances', + request, + metadata || {}, + methodDescriptor_Query_Allowances, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.QueryPromiseClient.prototype.allowances = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowances', + request, + metadata || {}, + methodDescriptor_Query_Allowances); +}; + + +module.exports = proto.cosmos.feegrant.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/feegrant/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/query_pb.js new file mode 100644 index 00000000..ccf79505 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/query_pb.js @@ -0,0 +1,812 @@ +// source: cosmos/feegrant/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_feegrant_v1beta1_feegrant_pb = require('../../../cosmos/feegrant/v1beta1/feegrant_pb.js'); +goog.object.extend(proto, cosmos_feegrant_v1beta1_feegrant_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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse', 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.QueryAllowanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest'; +} +/** + * 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.QueryAllowanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse'; +} +/** + * 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.QueryAllowancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest'; +} +/** + * 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.QueryAllowancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse'; +} + + + +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_, 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.QueryAllowanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest; + return proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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_, 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.QueryAllowanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.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.QueryAllowanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + allowance: (f = msg.getAllowance()) && cosmos_feegrant_v1beta1_feegrant_pb.Grant.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.QueryAllowanceResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse; + return proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_feegrant_v1beta1_feegrant_pb.Grant; + reader.readMessage(value,cosmos_feegrant_v1beta1_feegrant_pb.Grant.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.QueryAllowanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.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.QueryAllowanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_feegrant_v1beta1_feegrant_pb.Grant.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Grant allowance = 1; + * @return {?proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.getAllowance = function() { + return /** @type{?proto.cosmos.feegrant.v1beta1.Grant} */ ( + jspb.Message.getWrapperField(this, cosmos_feegrant_v1beta1_feegrant_pb.Grant, 1)); +}; + + +/** + * @param {?proto.cosmos.feegrant.v1beta1.Grant|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.setAllowance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.clearAllowance = function() { + return this.setAllowance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.hasAllowance = 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_, 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.QueryAllowancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.QueryAllowancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest; + return proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.QueryAllowancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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_, 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.QueryAllowancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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.QueryAllowancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + allowancesList: jspb.Message.toObjectList(msg.getAllowancesList(), + cosmos_feegrant_v1beta1_feegrant_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.feegrant.v1beta1.QueryAllowancesResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse; + return proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_feegrant_v1beta1_feegrant_pb.Grant; + reader.readMessage(value,cosmos_feegrant_v1beta1_feegrant_pb.Grant.deserializeBinaryFromReader); + msg.addAllowances(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.feegrant.v1beta1.QueryAllowancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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.QueryAllowancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_feegrant_v1beta1_feegrant_pb.Grant.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Grant allowances = 1; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.getAllowancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_feegrant_v1beta1_feegrant_pb.Grant, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.setAllowancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.Grant=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.addAllowances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.feegrant.v1beta1.Grant, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.clearAllowancesList = function() { + return this.setAllowancesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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.feegrant.v1beta1.QueryAllowancesResponse} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/feegrant/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..b8664b45 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,242 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.feegrant.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.feegrant = {}; +proto.cosmos.feegrant.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse>} + */ +const methodDescriptor_Msg_GrantAllowance = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Msg/GrantAllowance', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse>} + */ +const methodInfo_Msg_GrantAllowance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.MsgClient.prototype.grantAllowance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/GrantAllowance', + request, + metadata || {}, + methodDescriptor_Msg_GrantAllowance, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.MsgPromiseClient.prototype.grantAllowance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/GrantAllowance', + request, + metadata || {}, + methodDescriptor_Msg_GrantAllowance); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse>} + */ +const methodDescriptor_Msg_RevokeAllowance = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Msg/RevokeAllowance', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse>} + */ +const methodInfo_Msg_RevokeAllowance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.MsgClient.prototype.revokeAllowance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/RevokeAllowance', + request, + metadata || {}, + methodDescriptor_Msg_RevokeAllowance, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.MsgPromiseClient.prototype.revokeAllowance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/RevokeAllowance', + request, + metadata || {}, + methodDescriptor_Msg_RevokeAllowance); +}; + + +module.exports = proto.cosmos.feegrant.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/feegrant/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/tx_pb.js new file mode 100644 index 00000000..2e2fa44d --- /dev/null +++ b/dist/src/types/proto-types/cosmos/feegrant/v1beta1/tx_pb.js @@ -0,0 +1,682 @@ +// source: cosmos/feegrant/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +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); +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_, 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_, 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_, 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_, 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); diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js index d2fc0985..56d8bdea 100644 --- a/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js @@ -34,6 +34,28 @@ goog.exportSymbol('proto.cosmos.gov.v1beta1.TextProposal', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.Vote', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.VoteOption', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.VotingParams', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.WeightedVoteOption', 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.gov.v1beta1.WeightedVoteOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.WeightedVoteOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.WeightedVoteOption.displayName = 'proto.cosmos.gov.v1beta1.WeightedVoteOption'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -129,7 +151,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.cosmos.gov.v1beta1.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.Vote.repeatedFields_, null); }; goog.inherits(proto.cosmos.gov.v1beta1.Vote, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -205,6 +227,166 @@ if (goog.DEBUG && !COMPILED) { +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_, 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.gov.v1beta1.WeightedVoteOption.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.WeightedVoteOption.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.gov.v1beta1.WeightedVoteOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.toObject = function(includeInstance, msg) { + var f, obj = { + option: jspb.Message.getFieldWithDefault(msg, 1, 0), + weight: 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.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.WeightedVoteOption; + return proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.WeightedVoteOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); + msg.setOption(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.WeightedVoteOption.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.gov.v1beta1.WeightedVoteOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOption(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getWeight(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional VoteOption option = 1; + * @return {!proto.cosmos.gov.v1beta1.VoteOption} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.getOption = function() { + return /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.VoteOption} value + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} returns this + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.setOption = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string weight = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.getWeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} returns this + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.setWeight = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -1329,6 +1511,13 @@ proto.cosmos.gov.v1beta1.TallyResult.prototype.setNoWithVeto = function(value) { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.Vote.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1362,7 +1551,9 @@ proto.cosmos.gov.v1beta1.Vote.toObject = function(includeInstance, msg) { var f, obj = { proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), voter: jspb.Message.getFieldWithDefault(msg, 2, ""), - option: jspb.Message.getFieldWithDefault(msg, 3, 0) + option: jspb.Message.getFieldWithDefault(msg, 3, 0), + optionsList: jspb.Message.toObjectList(msg.getOptionsList(), + proto.cosmos.gov.v1beta1.WeightedVoteOption.toObject, includeInstance) }; if (includeInstance) { @@ -1411,6 +1602,11 @@ proto.cosmos.gov.v1beta1.Vote.deserializeBinaryFromReader = function(msg, reader var value = /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); msg.setOption(value); break; + case 4: + var value = new proto.cosmos.gov.v1beta1.WeightedVoteOption; + reader.readMessage(value,proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinaryFromReader); + msg.addOptions(value); + break; default: reader.skipField(); break; @@ -1461,6 +1657,14 @@ proto.cosmos.gov.v1beta1.Vote.serializeBinaryToWriter = function(message, writer f ); } + f = message.getOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cosmos.gov.v1beta1.WeightedVoteOption.serializeBinaryToWriter + ); + } }; @@ -1518,6 +1722,44 @@ proto.cosmos.gov.v1beta1.Vote.prototype.setOption = function(value) { }; +/** + * repeated WeightedVoteOption options = 4; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.gov.v1beta1.WeightedVoteOption, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this +*/ +proto.cosmos.gov.v1beta1.Vote.prototype.setOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.WeightedVoteOption=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.addOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.gov.v1beta1.WeightedVoteOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.clearOptionsList = function() { + return this.setOptionsList([]); +}; + + /** * List of repeated fields within this message type. diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js index bfa7e873..c3dcf758 100644 --- a/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js @@ -242,6 +242,86 @@ proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.vote = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgVoteWeighted, + * !proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse>} + */ +const methodDescriptor_Msg_VoteWeighted = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/VoteWeighted', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgVoteWeighted, + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgVoteWeighted, + * !proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse>} + */ +const methodInfo_Msg_VoteWeighted = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.voteWeighted = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/VoteWeighted', + request, + metadata || {}, + methodDescriptor_Msg_VoteWeighted, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.voteWeighted = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/VoteWeighted', + request, + metadata || {}, + methodDescriptor_Msg_VoteWeighted); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js index f76f101c..3a760745 100644 --- a/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js @@ -28,6 +28,8 @@ goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposal', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVote', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteWeighted', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -112,6 +114,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.gov.v1beta1.MsgVoteResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteResponse'; } +/** + * 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.gov.v1beta1.MsgVoteWeighted = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.MsgVoteWeighted.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVoteWeighted, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVoteWeighted.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteWeighted'; +} +/** + * 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.gov.v1beta1.MsgVoteWeightedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -817,6 +861,327 @@ proto.cosmos.gov.v1beta1.MsgVoteResponse.serializeBinaryToWriter = function(mess +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.repeatedFields_ = [3]; + + + +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_, 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.gov.v1beta1.MsgVoteWeighted.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVoteWeighted.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.gov.v1beta1.MsgVoteWeighted} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: jspb.Message.getFieldWithDefault(msg, 2, ""), + optionsList: jspb.Message.toObjectList(msg.getOptionsList(), + cosmos_gov_v1beta1_gov_pb.WeightedVoteOption.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.gov.v1beta1.MsgVoteWeighted} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVoteWeighted; + return proto.cosmos.gov.v1beta1.MsgVoteWeighted.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProposalId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVoter(value); + break; + case 3: + var value = new cosmos_gov_v1beta1_gov_pb.WeightedVoteOption; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.WeightedVoteOption.deserializeBinaryFromReader); + msg.addOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVoteWeighted.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.gov.v1beta1.MsgVoteWeighted} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getVoter(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_gov_v1beta1_gov_pb.WeightedVoteOption.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated WeightedVoteOption options = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.getOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.WeightedVoteOption, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this +*/ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.setOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.WeightedVoteOption=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.addOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.gov.v1beta1.WeightedVoteOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.clearOptionsList = function() { + return this.setOptionsList([]); +}; + + + + + +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_, 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.gov.v1beta1.MsgVoteWeightedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse; + return proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + /** * List of repeated fields within this message type. * @private {!Array} diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/authz_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/authz_pb.js new file mode 100644 index 00000000..4d3d8d9f --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/authz_pb.js @@ -0,0 +1,542 @@ +// source: cosmos/staking/v1beta1/authz.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.AuthorizationType', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.StakeAuthorization', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.StakeAuthorization.Validators', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase', 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.staking.v1beta1.StakeAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_); +}; +goog.inherits(proto.cosmos.staking.v1beta1.StakeAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.StakeAuthorization.displayName = 'proto.cosmos.staking.v1beta1.StakeAuthorization'; +} +/** + * 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.staking.v1beta1.StakeAuthorization.Validators = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.StakeAuthorization.Validators, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.displayName = 'proto.cosmos.staking.v1beta1.StakeAuthorization.Validators'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase = { + VALIDATORS_NOT_SET: 0, + ALLOW_LIST: 2, + DENY_LIST: 3 +}; + +/** + * @return {proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getValidatorsCase = function() { + return /** @type {proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_[0])); +}; + + + +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_, 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.staking.v1beta1.StakeAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.StakeAuthorization.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.staking.v1beta1.StakeAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + maxTokens: (f = msg.getMaxTokens()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + allowList: (f = msg.getAllowList()) && proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.toObject(includeInstance, f), + denyList: (f = msg.getDenyList()) && proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.toObject(includeInstance, f), + authorizationType: jspb.Message.getFieldWithDefault(msg, 4, 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.cosmos.staking.v1beta1.StakeAuthorization} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.StakeAuthorization; + return proto.cosmos.staking.v1beta1.StakeAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.StakeAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.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.setMaxTokens(value); + break; + case 2: + var value = new proto.cosmos.staking.v1beta1.StakeAuthorization.Validators; + reader.readMessage(value,proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinaryFromReader); + msg.setAllowList(value); + break; + case 3: + var value = new proto.cosmos.staking.v1beta1.StakeAuthorization.Validators; + reader.readMessage(value,proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinaryFromReader); + msg.setDenyList(value); + break; + case 4: + var value = /** @type {!proto.cosmos.staking.v1beta1.AuthorizationType} */ (reader.readEnum()); + msg.setAuthorizationType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.StakeAuthorization.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.staking.v1beta1.StakeAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxTokens(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getAllowList(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.serializeBinaryToWriter + ); + } + f = message.getDenyList(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.serializeBinaryToWriter + ); + } + f = message.getAuthorizationType(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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_, 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.staking.v1beta1.StakeAuthorization.Validators.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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.staking.v1beta1.StakeAuthorization.Validators} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.toObject = function(includeInstance, msg) { + var f, obj = { + addressList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.StakeAuthorization.Validators; + return proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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.addAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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.staking.v1beta1.StakeAuthorization.Validators} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string address = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.getAddressList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.setAddressList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.addAddress = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.clearAddressList = function() { + return this.setAddressList([]); +}; + + +/** + * optional cosmos.base.v1beta1.Coin max_tokens = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getMaxTokens = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this +*/ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setMaxTokens = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.clearMaxTokens = function() { + return this.setMaxTokens(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.hasMaxTokens = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Validators allow_list = 2; + * @return {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getAllowList = function() { + return /** @type{?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.StakeAuthorization.Validators, 2)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators|undefined} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this +*/ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setAllowList = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.clearAllowList = function() { + return this.setAllowList(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.hasAllowList = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Validators deny_list = 3; + * @return {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getDenyList = function() { + return /** @type{?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.StakeAuthorization.Validators, 3)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators|undefined} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this +*/ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setDenyList = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.clearDenyList = function() { + return this.setDenyList(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.hasDenyList = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional AuthorizationType authorization_type = 4; + * @return {!proto.cosmos.staking.v1beta1.AuthorizationType} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getAuthorizationType = function() { + return /** @type {!proto.cosmos.staking.v1beta1.AuthorizationType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.AuthorizationType} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setAuthorizationType = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.staking.v1beta1.AuthorizationType = { + AUTHORIZATION_TYPE_UNSPECIFIED: 0, + AUTHORIZATION_TYPE_DELEGATE: 1, + AUTHORIZATION_TYPE_UNDELEGATE: 2, + AUTHORIZATION_TYPE_REDELEGATE: 3 +}; + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js b/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js index f73e1e86..f95f01ee 100644 --- a/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js +++ b/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js @@ -1068,7 +1068,8 @@ proto.cosmos.tx.v1beta1.SimulateRequest.prototype.toObject = function(opt_includ */ proto.cosmos.tx.v1beta1.SimulateRequest.toObject = function(includeInstance, msg) { var f, obj = { - tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.toObject(includeInstance, f) + tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.toObject(includeInstance, f), + txBytes: msg.getTxBytes_asB64() }; if (includeInstance) { @@ -1110,6 +1111,10 @@ proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinaryFromReader = function(m reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); msg.setTx(value); break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxBytes(value); + break; default: reader.skipField(); break; @@ -1147,6 +1152,13 @@ proto.cosmos.tx.v1beta1.SimulateRequest.serializeBinaryToWriter = function(messa cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter ); } + f = message.getTxBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; @@ -1187,6 +1199,48 @@ proto.cosmos.tx.v1beta1.SimulateRequest.prototype.hasTx = function() { }; +/** + * optional bytes tx_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.getTxBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes tx_bytes = 2; + * This is a type-conversion wrapper around `getTxBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.getTxBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxBytes())); +}; + + +/** + * optional bytes tx_bytes = 2; + * 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.cosmos.tx.v1beta1.SimulateRequest.prototype.getTxBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} returns this + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.setTxBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + diff --git a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js index c90f8c53..9f0282c4 100644 --- a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js @@ -318,5 +318,85 @@ proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.upgradedConsensusState }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse>} + */ +const methodDescriptor_Query_ModuleVersions = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/ModuleVersions', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse>} + */ +const methodInfo_Query_ModuleVersions = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.moduleVersions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/ModuleVersions', + request, + metadata || {}, + methodDescriptor_Query_ModuleVersions, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.moduleVersions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/ModuleVersions', + request, + metadata || {}, + methodDescriptor_Query_ModuleVersions); +}; + + module.exports = proto.cosmos.upgrade.v1beta1; diff --git a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js index afaaba2b..05653660 100644 --- a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js +++ b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js @@ -22,6 +22,8 @@ goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest', null, goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse', null, global); /** @@ -150,6 +152,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse'; } +/** + * 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.upgrade.v1beta1.QueryModuleVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest'; +} +/** + * 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.upgrade.v1beta1.QueryModuleVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse'; +} @@ -824,7 +868,7 @@ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.toObj */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { var f, obj = { - upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + upgradedConsensusState: msg.getUpgradedConsensusState_asB64() }; if (includeInstance) { @@ -861,9 +905,8 @@ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBina } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setUpgradedConsensusState(value); break; default: @@ -895,51 +938,345 @@ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.seria */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUpgradedConsensusState(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter + f = message.getUpgradedConsensusState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f ); } }; /** - * optional google.protobuf.Any upgraded_consensus_state = 1; - * @return {?proto.google.protobuf.Any} + * optional bytes upgraded_consensus_state = 2; + * @return {!(string|Uint8Array)} */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes upgraded_consensus_state = 2; + * This is a type-conversion wrapper around `getUpgradedConsensusState()` + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getUpgradedConsensusState())); +}; + + +/** + * optional bytes upgraded_consensus_state = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getUpgradedConsensusState()` + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getUpgradedConsensusState())); }; /** - * @param {?proto.google.protobuf.Any|undefined} value + * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this -*/ + */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.setUpgradedConsensusState = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this + * 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_, 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.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.clearUpgradedConsensusState = function() { - return this.setUpgradedConsensusState(undefined); +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * 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.upgrade.v1beta1.QueryModuleVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.hasUpgradedConsensusState = function() { - return jspb.Message.getField(this, 1) != null; +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + moduleName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest; + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.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.upgrade.v1beta1.QueryModuleVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModuleName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string module_name = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.getModuleName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.setModuleName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.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_, 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.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.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.upgrade.v1beta1.QueryModuleVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + moduleVersionsList: jspb.Message.toObjectList(msg.getModuleVersionsList(), + cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion.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.upgrade.v1beta1.QueryModuleVersionsResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse; + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion; + reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion.deserializeBinaryFromReader); + msg.addModuleVersions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.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.upgrade.v1beta1.QueryModuleVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModuleVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ModuleVersion module_versions = 1; + * @return {!Array} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.getModuleVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} returns this +*/ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.setModuleVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.ModuleVersion=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.addModuleVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.upgrade.v1beta1.ModuleVersion, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.clearModuleVersionsList = function() { + return this.setModuleVersionsList([]); }; diff --git a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js index 316cd7e3..a657fd55 100644 --- a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js +++ b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js @@ -19,6 +19,7 @@ goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.ModuleVersion', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.Plan', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', null, global); /** @@ -84,6 +85,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.displayName = 'proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal'; } +/** + * 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.upgrade.v1beta1.ModuleVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.ModuleVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.ModuleVersion.displayName = 'proto.cosmos.upgrade.v1beta1.ModuleVersion'; +} @@ -747,4 +769,164 @@ proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.setDescript }; + + + +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_, 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.upgrade.v1beta1.ModuleVersion.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.ModuleVersion.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.upgrade.v1beta1.ModuleVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, 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.cosmos.upgrade.v1beta1.ModuleVersion} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.ModuleVersion; + return proto.cosmos.upgrade.v1beta1.ModuleVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.ModuleVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.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.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.ModuleVersion.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.upgrade.v1beta1.ModuleVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} returns this + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 version = 2; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} returns this + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + goog.object.extend(exports, proto.cosmos.upgrade.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js b/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js index a4eb5b46..c7dff1e1 100644 --- a/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js +++ b/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js @@ -23,6 +23,7 @@ goog.exportSymbol('proto.cosmos.vesting.v1beta1.ContinuousVestingAccount', null, goog.exportSymbol('proto.cosmos.vesting.v1beta1.DelayedVestingAccount', null, global); goog.exportSymbol('proto.cosmos.vesting.v1beta1.Period', null, global); goog.exportSymbol('proto.cosmos.vesting.v1beta1.PeriodicVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.PermanentLockedAccount', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -128,6 +129,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.PeriodicVestingAccount'; } +/** + * 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.vesting.v1beta1.PermanentLockedAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.PermanentLockedAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.PermanentLockedAccount.displayName = 'proto.cosmos.vesting.v1beta1.PermanentLockedAccount'; +} /** * List of repeated fields within this message type. @@ -1238,4 +1260,155 @@ proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.clearVestingPeriod }; + + + +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_, 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.vesting.v1beta1.PermanentLockedAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.PermanentLockedAccount.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.vesting.v1beta1.PermanentLockedAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.vesting.v1beta1.PermanentLockedAccount} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.PermanentLockedAccount; + return proto.cosmos.vesting.v1beta1.PermanentLockedAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.PermanentLockedAccount.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.vesting.v1beta1.PermanentLockedAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + goog.object.extend(exports, proto.cosmos.vesting.v1beta1); diff --git a/dist/src/types/proto-types/custom/base_pb.js b/dist/src/types/proto-types/custom/base_pb.js new file mode 100644 index 00000000..295258b8 --- /dev/null +++ b/dist/src/types/proto-types/custom/base_pb.js @@ -0,0 +1,167 @@ +// source: custom/base.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.custom.MsgGlobalAccountNumber', 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.custom.MsgGlobalAccountNumber = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.custom.MsgGlobalAccountNumber, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.custom.MsgGlobalAccountNumber.displayName = 'proto.custom.MsgGlobalAccountNumber'; +} + + + +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_, 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.custom.MsgGlobalAccountNumber.prototype.toObject = function(opt_includeInstance) { + return proto.custom.MsgGlobalAccountNumber.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.custom.MsgGlobalAccountNumber} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.custom.MsgGlobalAccountNumber.toObject = function(includeInstance, msg) { + var f, obj = { + globalAccountNumber: jspb.Message.getFieldWithDefault(msg, 1, 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.custom.MsgGlobalAccountNumber} + */ +proto.custom.MsgGlobalAccountNumber.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.custom.MsgGlobalAccountNumber; + return proto.custom.MsgGlobalAccountNumber.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.custom.MsgGlobalAccountNumber} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.custom.MsgGlobalAccountNumber} + */ +proto.custom.MsgGlobalAccountNumber.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGlobalAccountNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.custom.MsgGlobalAccountNumber.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.custom.MsgGlobalAccountNumber.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.custom.MsgGlobalAccountNumber} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.custom.MsgGlobalAccountNumber.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGlobalAccountNumber(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 global_account_number = 1; + * @return {number} + */ +proto.custom.MsgGlobalAccountNumber.prototype.getGlobalAccountNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.custom.MsgGlobalAccountNumber} returns this + */ +proto.custom.MsgGlobalAccountNumber.prototype.setGlobalAccountNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +goog.object.extend(exports, proto.custom); diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js index aa9bc75d..93d1e659 100644 --- a/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js @@ -12,10 +12,10 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js'); goog.object.extend(proto, ibc_applications_transfer_v1_transfer_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.ibc.applications.transfer.v1.GenesisState', null, global); /** * Generated by JsPbCodeGenerator. diff --git a/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js index cd0a29a6..176eaf45 100644 --- a/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js +++ b/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js @@ -16,12 +16,15 @@ var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); +var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../../cosmos/upgrade/v1beta1/upgrade_pb.js'); +goog.object.extend(proto, cosmos_upgrade_v1beta1_upgrade_pb); goog.exportSymbol('proto.ibc.core.client.v1.ClientConsensusStates', null, global); goog.exportSymbol('proto.ibc.core.client.v1.ClientUpdateProposal', null, global); goog.exportSymbol('proto.ibc.core.client.v1.ConsensusStateWithHeight', null, global); goog.exportSymbol('proto.ibc.core.client.v1.Height', null, global); goog.exportSymbol('proto.ibc.core.client.v1.IdentifiedClientState', null, global); goog.exportSymbol('proto.ibc.core.client.v1.Params', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.UpgradeProposal', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -106,6 +109,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.UpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.UpgradeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.UpgradeProposal.displayName = 'proto.ibc.core.client.v1.UpgradeProposal'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -755,8 +779,8 @@ proto.ibc.core.client.v1.ClientUpdateProposal.toObject = function(includeInstanc var f, obj = { title: jspb.Message.getFieldWithDefault(msg, 1, ""), description: jspb.Message.getFieldWithDefault(msg, 2, ""), - clientId: jspb.Message.getFieldWithDefault(msg, 3, ""), - header: (f = msg.getHeader()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + subjectClientId: jspb.Message.getFieldWithDefault(msg, 3, ""), + substituteClientId: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -803,12 +827,11 @@ proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader = func break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setClientId(value); + msg.setSubjectClientId(value); break; case 4: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setHeader(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSubstituteClientId(value); break; default: reader.skipField(); @@ -853,19 +876,18 @@ proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function f ); } - f = message.getClientId(); + f = message.getSubjectClientId(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getHeader(); - if (f != null) { - writer.writeMessage( + f = message.getSubstituteClientId(); + if (f.length > 0) { + writer.writeString( 4, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter + f ); } }; @@ -908,10 +930,10 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = functio /** - * optional string client_id = 3; + * optional string subject_client_id = 3; * @return {string} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getClientId = function() { +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubjectClientId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -920,16 +942,259 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getClientId = function() * @param {string} value * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setClientId = function(value) { +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubjectClientId = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional google.protobuf.Any header = 4; + * optional string substitute_client_id = 4; + * @return {string} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubstituteClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubstituteClientId = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.UpgradeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.UpgradeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.toObject(includeInstance, f), + upgradedClientState: (f = msg.getUpgradedClientState()) && 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.ibc.core.client.v1.UpgradeProposal} + */ +proto.ibc.core.client.v1.UpgradeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.UpgradeProposal; + return proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.UpgradeProposal} + */ +proto.ibc.core.client.v1.UpgradeProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new cosmos_upgrade_v1beta1_upgrade_pb.Plan; + reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.Plan.deserializeBinaryFromReader); + msg.setPlan(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.UpgradeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPlan(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter + ); + } + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.upgrade.v1beta1.Plan plan = 3; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getPlan = function() { + return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( + jspb.Message.getWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.Plan, 3)); +}; + + +/** + * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this +*/ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.hasPlan = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 4; * @return {?proto.google.protobuf.Any} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getHeader = function() { +proto.ibc.core.client.v1.UpgradeProposal.prototype.getUpgradedClientState = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); }; @@ -937,19 +1202,19 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getHeader = function() { /** * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setHeader = function(value) { +proto.ibc.core.client.v1.UpgradeProposal.prototype.setUpgradedClientState = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.clearHeader = function() { - return this.setHeader(undefined); +proto.ibc.core.client.v1.UpgradeProposal.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); }; @@ -957,7 +1222,7 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.clearHeader = function() * Returns whether this field is set. * @return {boolean} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.hasHeader = function() { +proto.ibc.core.client.v1.UpgradeProposal.prototype.hasUpgradedClientState = function() { return jspb.Message.getField(this, 4) != null; }; diff --git a/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js index ba2b29b5..e2d72aa2 100644 --- a/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js @@ -403,6 +403,86 @@ proto.ibc.core.client.v1.QueryPromiseClient.prototype.consensusStates = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientStatusRequest, + * !proto.ibc.core.client.v1.QueryClientStatusResponse>} + */ +const methodDescriptor_Query_ClientStatus = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientStatus', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientStatusRequest, + proto.ibc.core.client.v1.QueryClientStatusResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientStatusRequest, + * !proto.ibc.core.client.v1.QueryClientStatusResponse>} + */ +const methodInfo_Query_ClientStatus = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientStatusResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStatus', + request, + metadata || {}, + methodDescriptor_Query_ClientStatus, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStatus', + request, + metadata || {}, + methodDescriptor_Query_ClientStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< @@ -483,5 +563,165 @@ proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientParams = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedClientStateResponse>} + */ +const methodDescriptor_Query_UpgradedClientState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/UpgradedClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedClientStateResponse>} + */ +const methodInfo_Query_UpgradedClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryUpgradedClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.upgradedClientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedClientState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.upgradedClientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedClientState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse>} + */ +const methodDescriptor_Query_UpgradedConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/UpgradedConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse>} + */ +const methodInfo_Query_UpgradedConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.upgradedConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.upgradedConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState); +}; + + module.exports = proto.ibc.core.client.v1; diff --git a/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js index 73796fba..cdbc3e1b 100644 --- a/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js +++ b/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js @@ -28,10 +28,16 @@ goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateRequest', null, glob goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatusRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatusResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedClientStateRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedClientStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -200,6 +206,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.QueryConsensusStatesResponse.displayName = 'proto.ibc.core.client.v1.QueryConsensusStatesResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryClientStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatusRequest.displayName = 'proto.ibc.core.client.v1.QueryClientStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryClientStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatusResponse.displayName = 'proto.ibc.core.client.v1.QueryClientStatusResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -242,6 +290,90 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.QueryClientParamsResponse.displayName = 'proto.ibc.core.client.v1.QueryClientParamsResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.displayName = 'proto.ibc.core.client.v1.QueryUpgradedClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.displayName = 'proto.ibc.core.client.v1.QueryUpgradedClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.displayName = 'proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.displayName = 'proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse'; +} @@ -1874,8 +2006,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatusRequest.toObject(opt_includeInstance, this); }; @@ -1884,13 +2016,13 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - + clientId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1904,29 +2036,33 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientParamsRequest; - return proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientStatusRequest; + return proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientStatusRequest.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.setClientId(value); + break; default: reader.skipField(); break; @@ -1940,9 +2076,9 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1950,12 +2086,37 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} message + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1975,8 +2136,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatusResponse.toObject(opt_includeInstance, this); }; @@ -1985,13 +2146,13 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f) + status: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2005,23 +2166,23 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientParamsResponse; - return proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientStatusResponse; + return proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2029,9 +2190,8 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new ibc_core_client_v1_client_pb.Params; - reader.readMessage(value,ibc_core_client_v1_client_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); break; default: reader.skipField(); @@ -2046,9 +2206,9 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2056,56 +2216,792 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} message + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getParams(); - if (f != null) { - writer.writeMessage( + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( 1, - f, - ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + f ); } }; /** - * optional Params params = 1; - * @return {?proto.ibc.core.client.v1.Params} + * optional string status = 1; + * @return {string} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.getParams = function() { - return /** @type{?proto.ibc.core.client.v1.Params} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 1)); +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.ibc.core.client.v1.Params|undefined} value - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this -*/ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { - return this.setParams(undefined); +proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.hasParams = function() { +proto.ibc.core.client.v1.QueryClientParamsRequest.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.ibc.core.client.v1.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientParamsRequest; + return proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && ibc_core_client_v1_client_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.ibc.core.client.v1.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientParamsResponse; + return proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_client_v1_client_pb.Params; + reader.readMessage(value,ibc_core_client_v1_client_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.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.core.client.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Params|undefined} value + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.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.ibc.core.client.v1.QueryUpgradedClientStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateRequest; + return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.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.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedClientState: (f = msg.getUpgradedClientState()) && 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.ibc.core.client.v1.QueryUpgradedClientStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateResponse; + return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.hasUpgradedClientState = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.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.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest; + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.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.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && 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.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse; + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.setUpgradedConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.clearUpgradedConsensusState = function() { + return this.setUpgradedConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.hasUpgradedConsensusState = function() { return jspb.Message.getField(this, 1) != null; }; diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js index ed54cebd..8b05be25 100644 --- a/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js +++ b/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js @@ -21,6 +21,7 @@ goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionEnd', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionPaths', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.Counterparty', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.IdentifiedConnection', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.Params', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.State', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.Version', null, global); /** @@ -149,6 +150,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.connection.v1.Version.displayName = 'proto.ibc.core.connection.v1.Version'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.connection.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.Params.displayName = 'proto.ibc.core.connection.v1.Params'; +} /** * List of repeated fields within this message type. @@ -1520,6 +1542,136 @@ proto.ibc.core.connection.v1.Version.prototype.clearFeaturesList = function() { }; + + + +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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.connection.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.connection.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxExpectedTimePerBlock: jspb.Message.getFieldWithDefault(msg, 1, 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.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.Params; + return proto.ibc.core.connection.v1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.connection.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxExpectedTimePerBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.connection.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxExpectedTimePerBlock(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 max_expected_time_per_block = 1; + * @return {number} + */ +proto.ibc.core.connection.v1.Params.prototype.getMaxExpectedTimePerBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.Params} returns this + */ +proto.ibc.core.connection.v1.Params.prototype.setMaxExpectedTimePerBlock = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + /** * @enum {number} */ diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js index 64ca51f1..c0174d0e 100644 --- a/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js +++ b/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js @@ -81,7 +81,8 @@ proto.ibc.core.connection.v1.GenesisState.toObject = function(includeInstance, m ibc_core_connection_v1_connection_pb.IdentifiedConnection.toObject, includeInstance), clientConnectionPathsList: jspb.Message.toObjectList(msg.getClientConnectionPathsList(), ibc_core_connection_v1_connection_pb.ConnectionPaths.toObject, includeInstance), - nextConnectionSequence: jspb.Message.getFieldWithDefault(msg, 3, 0) + nextConnectionSequence: jspb.Message.getFieldWithDefault(msg, 3, 0), + params: (f = msg.getParams()) && ibc_core_connection_v1_connection_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -132,6 +133,11 @@ proto.ibc.core.connection.v1.GenesisState.deserializeBinaryFromReader = function var value = /** @type {number} */ (reader.readUint64()); msg.setNextConnectionSequence(value); break; + case 4: + var value = new ibc_core_connection_v1_connection_pb.Params; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; default: reader.skipField(); break; @@ -184,6 +190,14 @@ proto.ibc.core.connection.v1.GenesisState.serializeBinaryToWriter = function(mes f ); } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_connection_v1_connection_pb.Params.serializeBinaryToWriter + ); + } }; @@ -281,4 +295,41 @@ proto.ibc.core.connection.v1.GenesisState.prototype.setNextConnectionSequence = }; +/** + * optional Params params = 4; + * @return {?proto.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.core.connection.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Params, 4)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Params|undefined} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this +*/ +proto.ibc.core.connection.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 4) != null; +}; + + goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/dist/src/types/proto-types/ibc/lightclients/solomachine/v2/solomachine_pb.js b/dist/src/types/proto-types/ibc/lightclients/solomachine/v2/solomachine_pb.js new file mode 100644 index 00000000..54262ac6 --- /dev/null +++ b/dist/src/types/proto-types/ibc/lightclients/solomachine/v2/solomachine_pb.js @@ -0,0 +1,3882 @@ +// source: ibc/lightclients/solomachine/v2/solomachine.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_connection_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ChannelStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ClientState', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ClientStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ConnectionStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ConsensusState', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ConsensusStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.DataType', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.Header', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.HeaderData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.Misbehaviour', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.PacketCommitmentData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.SignBytes', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.SignatureAndData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ClientState.displayName = 'proto.ibc.lightclients.solomachine.v2.ClientState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ConsensusState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ConsensusState.displayName = 'proto.ibc.lightclients.solomachine.v2.ConsensusState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.Header.displayName = 'proto.ibc.lightclients.solomachine.v2.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.Misbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.Misbehaviour.displayName = 'proto.ibc.lightclients.solomachine.v2.Misbehaviour'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.SignatureAndData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.SignatureAndData.displayName = 'proto.ibc.lightclients.solomachine.v2.SignatureAndData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.displayName = 'proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.SignBytes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.SignBytes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.SignBytes.displayName = 'proto.ibc.lightclients.solomachine.v2.SignBytes'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.HeaderData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.HeaderData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.HeaderData.displayName = 'proto.ibc.lightclients.solomachine.v2.HeaderData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ClientStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ClientStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ClientStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ConsensusStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ConsensusStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ConsensusStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ConnectionStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ConnectionStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ConnectionStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ChannelStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ChannelStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ChannelStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.PacketCommitmentData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketCommitmentData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.displayName = 'proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData'; +} + + + +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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ClientState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientState.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + isFrozen: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + consensusState: (f = msg.getConsensusState()) && proto.ibc.lightclients.solomachine.v2.ConsensusState.toObject(includeInstance, f), + allowUpdateAfterProposal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ClientState; + return proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsFrozen(value); + break; + case 3: + var value = new proto.ibc.lightclients.solomachine.v2.ConsensusState; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowUpdateAfterProposal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ClientState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getIsFrozen(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.solomachine.v2.ConsensusState.serializeBinaryToWriter + ); + } + f = message.getAllowUpdateAfterProposal(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool is_frozen = 2; + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getIsFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setIsFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional ConsensusState consensus_state = 3; + * @return {?proto.ibc.lightclients.solomachine.v2.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getConsensusState = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v2.ConsensusState} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v2.ConsensusState, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v2.ConsensusState|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool allow_update_after_proposal = 4; + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getAllowUpdateAfterProposal = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setAllowUpdateAfterProposal = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ConsensusState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + diversifier: jspb.Message.getFieldWithDefault(msg, 2, ""), + timestamp: 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.ibc.lightclients.solomachine.v2.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ConsensusState; + return proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiversifier(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ConsensusState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getDiversifier(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getPublicKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string diversifier = 2; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 timestamp = 3; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Header.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: msg.getSignature_asB64(), + newPublicKey: (f = msg.getNewPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + newDiversifier: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.Header} + */ +proto.ibc.lightclients.solomachine.v2.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.Header; + return proto.ibc.lightclients.solomachine.v2.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.Header} + */ +proto.ibc.lightclients.solomachine.v2.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setNewPublicKey(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setNewDiversifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getNewPublicKey(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNewDiversifier(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes signature = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional google.protobuf.Any new_public_key = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getNewPublicKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this +*/ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setNewPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.clearNewPublicKey = function() { + return this.setNewPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.hasNewPublicKey = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string new_diversifier = 5; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getNewDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setNewDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.Misbehaviour.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), + signatureOne: (f = msg.getSignatureOne()) && proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(includeInstance, f), + signatureTwo: (f = msg.getSignatureTwo()) && proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.Misbehaviour; + return proto.ibc.lightclients.solomachine.v2.Misbehaviour.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.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.setClientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 3: + var value = new proto.ibc.lightclients.solomachine.v2.SignatureAndData; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinaryFromReader); + msg.setSignatureOne(value); + break; + case 4: + var value = new proto.ibc.lightclients.solomachine.v2.SignatureAndData; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinaryFromReader); + msg.setSignatureTwo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.Misbehaviour.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSignatureOne(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter + ); + } + f = message.getSignatureTwo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 sequence = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional SignatureAndData signature_one = 3; + * @return {?proto.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSignatureOne = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v2.SignatureAndData, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v2.SignatureAndData|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this +*/ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSignatureOne = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.clearSignatureOne = function() { + return this.setSignatureOne(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.hasSignatureOne = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SignatureAndData signature_two = 4; + * @return {?proto.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSignatureTwo = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v2.SignatureAndData, 4)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v2.SignatureAndData|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this +*/ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSignatureTwo = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.clearSignatureTwo = function() { + return this.setSignatureTwo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.hasSignatureTwo = function() { + return jspb.Message.getField(this, 4) != 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject = function(includeInstance, msg) { + var f, obj = { + signature: msg.getSignature_asB64(), + dataType: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, 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.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.SignatureAndData; + return proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.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.setSignature(value); + break; + case 2: + var value = /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (reader.readEnum()); + msg.setDataType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDataType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional bytes signature = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signature = 1; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional DataType data_type = 2; + * @return {!proto.ibc.lightclients.solomachine.v2.DataType} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getDataType = function() { + return /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.ibc.lightclients.solomachine.v2.DataType} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setDataType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 timestamp = 4; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 4, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.toObject = function(includeInstance, msg) { + var f, obj = { + signatureData: msg.getSignatureData_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 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.ibc.lightclients.solomachine.v2.TimestampedSignatureData} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData; + return proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.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.setSignatureData(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignatureData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes signature_data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getSignatureData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signature_data = 1; + * This is a type-conversion wrapper around `getSignatureData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getSignatureData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignatureData())); +}; + + +/** + * optional bytes signature_data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignatureData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getSignatureData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignatureData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} returns this + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.setSignatureData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} returns this + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.SignBytes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.SignBytes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), + diversifier: jspb.Message.getFieldWithDefault(msg, 3, ""), + dataType: jspb.Message.getFieldWithDefault(msg, 4, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.SignBytes; + return proto.ibc.lightclients.solomachine.v2.SignBytes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.SignBytes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDiversifier(value); + break; + case 4: + var value = /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (reader.readEnum()); + msg.setDataType(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.SignBytes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.SignBytes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDiversifier(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDataType(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string diversifier = 3; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional DataType data_type = 4; + * @return {!proto.ibc.lightclients.solomachine.v2.DataType} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getDataType = function() { + return /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.ibc.lightclients.solomachine.v2.DataType} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setDataType = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional bytes data = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes data = 5; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 5, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.HeaderData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.HeaderData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.toObject = function(includeInstance, msg) { + var f, obj = { + newPubKey: (f = msg.getNewPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + newDiversifier: 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.ibc.lightclients.solomachine.v2.HeaderData} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.HeaderData; + return proto.ibc.lightclients.solomachine.v2.HeaderData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.HeaderData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setNewPubKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNewDiversifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.HeaderData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.HeaderData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNewPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNewDiversifier(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional google.protobuf.Any new_pub_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.getNewPubKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.setNewPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} returns this + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.clearNewPubKey = function() { + return this.setNewPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.hasNewPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string new_diversifier = 2; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.getNewDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} returns this + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.setNewDiversifier = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ClientStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ClientStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + clientState: (f = msg.getClientState()) && 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.ibc.lightclients.solomachine.v2.ClientStateData} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ClientStateData; + return proto.ibc.lightclients.solomachine.v2.ClientStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.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.setPath(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ClientStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.hasClientState = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ConsensusStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + consensusState: (f = msg.getConsensusState()) && 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.ibc.lightclients.solomachine.v2.ConsensusStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ConsensusStateData; + return proto.ibc.lightclients.solomachine.v2.ConsensusStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.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.setPath(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ConsensusStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any consensus_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getConsensusState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.hasConsensusState = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ConnectionStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + connection: (f = msg.getConnection()) && ibc_core_connection_v1_connection_pb.ConnectionEnd.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ConnectionStateData; + return proto.ibc.lightclients.solomachine.v2.ConnectionStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.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.setPath(value); + break; + case 2: + var value = new ibc_core_connection_v1_connection_pb.ConnectionEnd; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionEnd.deserializeBinaryFromReader); + msg.setConnection(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ConnectionStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getConnection(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.ConnectionEnd.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional ibc.core.connection.v1.ConnectionEnd connection = 2; + * @return {?proto.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getConnection = function() { + return /** @type{?proto.ibc.core.connection.v1.ConnectionEnd} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionEnd, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.ConnectionEnd|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.setConnection = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.clearConnection = function() { + return this.setConnection(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.hasConnection = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ChannelStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ChannelStateData; + return proto.ibc.lightclients.solomachine.v2.ChannelStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.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.setPath(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setChannel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ChannelStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChannel(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional ibc.core.channel.v1.Channel channel = 2; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 2)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.clearChannel = function() { + return this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.hasChannel = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + commitment: msg.getCommitment_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.PacketCommitmentData; + return proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.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.setPath(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCommitment(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCommitment_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes commitment = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getCommitment = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes commitment = 2; + * This is a type-conversion wrapper around `getCommitment()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getCommitment_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCommitment())); +}; + + +/** + * optional bytes commitment = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCommitment()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getCommitment_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCommitment())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.setCommitment = function(value) { + return jspb.Message.setProto3BytesField(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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + acknowledgement: msg.getAcknowledgement_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData; + return proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.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.setPath(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAcknowledgement(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAcknowledgement_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes acknowledgement = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getAcknowledgement = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes acknowledgement = 2; + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getAcknowledgement_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAcknowledgement())); +}; + + +/** + * optional bytes acknowledgement = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getAcknowledgement_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAcknowledgement())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.setAcknowledgement = function(value) { + return jspb.Message.setProto3BytesField(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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData; + return proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.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.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + nextSeqRecv: jspb.Message.getFieldWithDefault(msg, 2, 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.ibc.lightclients.solomachine.v2.NextSequenceRecvData} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData; + return proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.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.setPath(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextSeqRecv(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNextSeqRecv(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} returns this + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 next_seq_recv = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getNextSeqRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} returns this + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.setNextSeqRecv = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * @enum {number} + */ +proto.ibc.lightclients.solomachine.v2.DataType = { + DATA_TYPE_UNINITIALIZED_UNSPECIFIED: 0, + DATA_TYPE_CLIENT_STATE: 1, + DATA_TYPE_CONSENSUS_STATE: 2, + DATA_TYPE_CONNECTION_STATE: 3, + DATA_TYPE_CHANNEL_STATE: 4, + DATA_TYPE_PACKET_COMMITMENT: 5, + DATA_TYPE_PACKET_ACKNOWLEDGEMENT: 6, + DATA_TYPE_PACKET_RECEIPT_ABSENCE: 7, + DATA_TYPE_NEXT_SEQUENCE_RECV: 8, + DATA_TYPE_HEADER: 9 +}; + +goog.object.extend(exports, proto.ibc.lightclients.solomachine.v2); diff --git a/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js b/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js index eda19bcf..af4a5b04 100644 --- a/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js +++ b/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js @@ -19,6 +19,7 @@ goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.irismod.coinswap.Input', null, global); goog.exportSymbol('proto.irismod.coinswap.Output', null, global); goog.exportSymbol('proto.irismod.coinswap.Params', null, global); +goog.exportSymbol('proto.irismod.coinswap.Pool', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -61,6 +62,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.coinswap.Output.displayName = 'proto.irismod.coinswap.Output'; } +/** + * 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.irismod.coinswap.Pool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Pool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Pool.displayName = 'proto.irismod.coinswap.Pool'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -447,6 +469,256 @@ proto.irismod.coinswap.Output.prototype.hasCoin = function() { +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_, 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.irismod.coinswap.Pool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.Pool.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.irismod.coinswap.Pool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Pool.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + standardDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyDenom: jspb.Message.getFieldWithDefault(msg, 3, ""), + escrowAddress: jspb.Message.getFieldWithDefault(msg, 4, ""), + lptDenom: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.coinswap.Pool} + */ +proto.irismod.coinswap.Pool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Pool; + return proto.irismod.coinswap.Pool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Pool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Pool} + */ +proto.irismod.coinswap.Pool.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStandardDenom(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyDenom(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEscrowAddress(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLptDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Pool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.Pool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.Pool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Pool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStandardDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyDenom(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEscrowAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLptDenom(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string standard_denom = 2; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getStandardDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setStandardDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string counterparty_denom = 3; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getCounterpartyDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setCounterpartyDenom = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string escrow_address = 4; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getEscrowAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setEscrowAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string lpt_denom = 5; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getLptDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setLptDenom = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -477,7 +749,8 @@ proto.irismod.coinswap.Params.prototype.toObject = function(opt_includeInstance) proto.irismod.coinswap.Params.toObject = function(includeInstance, msg) { var f, obj = { fee: (f = msg.getFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - standardDenom: jspb.Message.getFieldWithDefault(msg, 2, "") + poolCreationFee: (f = msg.getPoolCreationFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + taxRate: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -520,8 +793,13 @@ proto.irismod.coinswap.Params.deserializeBinaryFromReader = function(msg, reader msg.setFee(value); break; case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setPoolCreationFee(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); - msg.setStandardDenom(value); + msg.setTaxRate(value); break; default: reader.skipField(); @@ -560,10 +838,18 @@ proto.irismod.coinswap.Params.serializeBinaryToWriter = function(message, writer cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } - f = message.getStandardDenom(); + f = message.getPoolCreationFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTaxRate(); if (f.length > 0) { writer.writeString( - 2, + 3, f ); } @@ -608,11 +894,48 @@ proto.irismod.coinswap.Params.prototype.hasFee = function() { /** - * optional string standard_denom = 2; + * optional cosmos.base.v1beta1.Coin pool_creation_fee = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Params.prototype.getPoolCreationFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.coinswap.Params} returns this +*/ +proto.irismod.coinswap.Params.prototype.setPoolCreationFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.clearPoolCreationFee = function() { + return this.setPoolCreationFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Params.prototype.hasPoolCreationFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string tax_rate = 3; * @return {string} */ -proto.irismod.coinswap.Params.prototype.getStandardDenom = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.irismod.coinswap.Params.prototype.getTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -620,8 +943,8 @@ proto.irismod.coinswap.Params.prototype.getStandardDenom = function() { * @param {string} value * @return {!proto.irismod.coinswap.Params} returns this */ -proto.irismod.coinswap.Params.prototype.setStandardDenom = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.irismod.coinswap.Params.prototype.setTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; diff --git a/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js b/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js index b8e31866..7e86ee61 100644 --- a/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js +++ b/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js @@ -28,7 +28,7 @@ goog.exportSymbol('proto.irismod.coinswap.GenesisState', null, global); * @constructor */ proto.irismod.coinswap.GenesisState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.coinswap.GenesisState.repeatedFields_, null); }; goog.inherits(proto.irismod.coinswap.GenesisState, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -39,6 +39,13 @@ if (goog.DEBUG && !COMPILED) { proto.irismod.coinswap.GenesisState.displayName = 'proto.irismod.coinswap.GenesisState'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.coinswap.GenesisState.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -70,7 +77,11 @@ proto.irismod.coinswap.GenesisState.prototype.toObject = function(opt_includeIns */ proto.irismod.coinswap.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && irismod_coinswap_coinswap_pb.Params.toObject(includeInstance, f) + params: (f = msg.getParams()) && irismod_coinswap_coinswap_pb.Params.toObject(includeInstance, f), + standardDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), + poolList: jspb.Message.toObjectList(msg.getPoolList(), + irismod_coinswap_coinswap_pb.Pool.toObject, includeInstance), + sequence: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -112,6 +123,19 @@ proto.irismod.coinswap.GenesisState.deserializeBinaryFromReader = function(msg, reader.readMessage(value,irismod_coinswap_coinswap_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStandardDenom(value); + break; + case 3: + var value = new irismod_coinswap_coinswap_pb.Pool; + reader.readMessage(value,irismod_coinswap_coinswap_pb.Pool.deserializeBinaryFromReader); + msg.addPool(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; default: reader.skipField(); break; @@ -149,6 +173,28 @@ proto.irismod.coinswap.GenesisState.serializeBinaryToWriter = function(message, irismod_coinswap_coinswap_pb.Params.serializeBinaryToWriter ); } + f = message.getStandardDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPoolList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_coinswap_coinswap_pb.Pool.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } }; @@ -189,4 +235,78 @@ proto.irismod.coinswap.GenesisState.prototype.hasParams = function() { }; +/** + * optional string standard_denom = 2; + * @return {string} + */ +proto.irismod.coinswap.GenesisState.prototype.getStandardDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.setStandardDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Pool pool = 3; + * @return {!Array} + */ +proto.irismod.coinswap.GenesisState.prototype.getPoolList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_coinswap_coinswap_pb.Pool, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.coinswap.GenesisState} returns this +*/ +proto.irismod.coinswap.GenesisState.prototype.setPoolList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.coinswap.Pool=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.coinswap.Pool} + */ +proto.irismod.coinswap.GenesisState.prototype.addPool = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.coinswap.Pool, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.clearPoolList = function() { + return this.setPoolList([]); +}; + + +/** + * optional uint64 sequence = 4; + * @return {number} + */ +proto.irismod.coinswap.GenesisState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + goog.object.extend(exports, proto.irismod.coinswap); diff --git a/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js index d3141770..7ebca247 100644 --- a/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js @@ -21,6 +21,8 @@ var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js' var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') const proto = {}; proto.irismod = {}; proto.irismod.coinswap = require('./query_pb.js'); @@ -80,80 +82,160 @@ proto.irismod.coinswap.QueryPromiseClient = /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.irismod.coinswap.QueryLiquidityRequest, - * !proto.irismod.coinswap.QueryLiquidityResponse>} + * !proto.irismod.coinswap.QueryLiquidityPoolRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolResponse>} + */ +const methodDescriptor_Query_LiquidityPool = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Query/LiquidityPool', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.QueryLiquidityPoolRequest, + proto.irismod.coinswap.QueryLiquidityPoolResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.QueryLiquidityPoolRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolResponse>} + */ +const methodInfo_Query_LiquidityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.QueryLiquidityPoolResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.QueryClient.prototype.liquidityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Query/LiquidityPool', + request, + metadata || {}, + methodDescriptor_Query_LiquidityPool, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.QueryPromiseClient.prototype.liquidityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Query/LiquidityPool', + request, + metadata || {}, + methodDescriptor_Query_LiquidityPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.QueryLiquidityPoolsRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolsResponse>} */ -const methodDescriptor_Query_Liquidity = new grpc.web.MethodDescriptor( - '/irismod.coinswap.Query/Liquidity', +const methodDescriptor_Query_LiquidityPools = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Query/LiquidityPools', grpc.web.MethodType.UNARY, - proto.irismod.coinswap.QueryLiquidityRequest, - proto.irismod.coinswap.QueryLiquidityResponse, + proto.irismod.coinswap.QueryLiquidityPoolsRequest, + proto.irismod.coinswap.QueryLiquidityPoolsResponse, /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary + proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinary ); /** * @const * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.irismod.coinswap.QueryLiquidityRequest, - * !proto.irismod.coinswap.QueryLiquidityResponse>} + * !proto.irismod.coinswap.QueryLiquidityPoolsRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolsResponse>} */ -const methodInfo_Query_Liquidity = new grpc.web.AbstractClientBase.MethodInfo( - proto.irismod.coinswap.QueryLiquidityResponse, +const methodInfo_Query_LiquidityPools = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.QueryLiquidityPoolsResponse, /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary + proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinary ); /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityResponse)} + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityPoolsResponse)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.irismod.coinswap.QueryClient.prototype.liquidity = +proto.irismod.coinswap.QueryClient.prototype.liquidityPools = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/irismod.coinswap.Query/Liquidity', + '/irismod.coinswap.Query/LiquidityPools', request, metadata || {}, - methodDescriptor_Query_Liquidity, + methodDescriptor_Query_LiquidityPools, callback); }; /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ -proto.irismod.coinswap.QueryPromiseClient.prototype.liquidity = +proto.irismod.coinswap.QueryPromiseClient.prototype.liquidityPools = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/irismod.coinswap.Query/Liquidity', + '/irismod.coinswap.Query/LiquidityPools', request, metadata || {}, - methodDescriptor_Query_Liquidity); + methodDescriptor_Query_LiquidityPools); }; diff --git a/dist/src/types/proto-types/irismod/coinswap/query_pb.js b/dist/src/types/proto-types/irismod/coinswap/query_pb.js index bf9166da..fffd8b4d 100644 --- a/dist/src/types/proto-types/irismod/coinswap/query_pb.js +++ b/dist/src/types/proto-types/irismod/coinswap/query_pb.js @@ -18,8 +18,13 @@ 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); -goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityRequest', null, global); -goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityResponse', null, global); +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.irismod.coinswap.PoolInfo', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolRequest', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolsRequest', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,16 +35,16 @@ goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityResponse', null, global) * @extends {jspb.Message} * @constructor */ -proto.irismod.coinswap.QueryLiquidityRequest = function(opt_data) { +proto.irismod.coinswap.QueryLiquidityPoolRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.irismod.coinswap.QueryLiquidityRequest, jspb.Message); +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.irismod.coinswap.QueryLiquidityRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityRequest'; + proto.irismod.coinswap.QueryLiquidityPoolRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolRequest'; } /** * Generated by JsPbCodeGenerator. @@ -51,16 +56,79 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.irismod.coinswap.QueryLiquidityResponse = function(opt_data) { +proto.irismod.coinswap.QueryLiquidityPoolResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.irismod.coinswap.QueryLiquidityResponse, jspb.Message); +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.irismod.coinswap.QueryLiquidityResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityResponse'; + proto.irismod.coinswap.QueryLiquidityPoolResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolResponse'; +} +/** + * 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.irismod.coinswap.QueryLiquidityPoolsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityPoolsRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolsRequest'; +} +/** + * 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.irismod.coinswap.QueryLiquidityPoolsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.coinswap.QueryLiquidityPoolsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityPoolsResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolsResponse'; +} +/** + * 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.irismod.coinswap.PoolInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.PoolInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.PoolInfo.displayName = 'proto.irismod.coinswap.PoolInfo'; } @@ -78,8 +146,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.irismod.coinswap.QueryLiquidityRequest.toObject(opt_includeInstance, this); +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolRequest.toObject(opt_includeInstance, this); }; @@ -88,13 +156,13 @@ proto.irismod.coinswap.QueryLiquidityRequest.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The msg instance to transform. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityRequest.toObject = function(includeInstance, msg) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") + lptDenom: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -108,23 +176,23 @@ proto.irismod.coinswap.QueryLiquidityRequest.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.irismod.coinswap.QueryLiquidityRequest} + * @return {!proto.irismod.coinswap.QueryLiquidityPoolRequest} */ -proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinary = function(bytes) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.irismod.coinswap.QueryLiquidityRequest; - return proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolRequest; + return proto.irismod.coinswap.QueryLiquidityPoolRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The message object to deserialize into. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.irismod.coinswap.QueryLiquidityRequest} + * @return {!proto.irismod.coinswap.QueryLiquidityPoolRequest} */ -proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -133,7 +201,7 @@ proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader = funct switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + msg.setLptDenom(value); break; default: reader.skipField(); @@ -148,9 +216,9 @@ proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.serializeBinary = function() { +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter(this, writer); + proto.irismod.coinswap.QueryLiquidityPoolRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -158,13 +226,13 @@ proto.irismod.coinswap.QueryLiquidityRequest.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} message + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter = function(message, writer) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getLptDenom(); if (f.length > 0) { writer.writeString( 1, @@ -175,19 +243,19 @@ proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter = function( /** - * optional string id = 1; + * optional string lpt_denom = 1; * @return {string} */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.getId = function() { +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.getLptDenom = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.irismod.coinswap.QueryLiquidityRequest} returns this + * @return {!proto.irismod.coinswap.QueryLiquidityPoolRequest} returns this */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.setId = function(value) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.setLptDenom = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -208,8 +276,159 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.irismod.coinswap.QueryLiquidityResponse.toObject(opt_includeInstance, this); +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolResponse.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.irismod.coinswap.QueryLiquidityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pool: (f = msg.getPool()) && proto.irismod.coinswap.PoolInfo.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.irismod.coinswap.QueryLiquidityPoolResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolResponse; + return proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.coinswap.PoolInfo; + reader.readMessage(value,proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader); + msg.setPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPool(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PoolInfo pool = 1; + * @return {?proto.irismod.coinswap.PoolInfo} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.getPool = function() { + return /** @type{?proto.irismod.coinswap.PoolInfo} */ ( + jspb.Message.getWrapperField(this, proto.irismod.coinswap.PoolInfo, 1)); +}; + + +/** + * @param {?proto.irismod.coinswap.PoolInfo|undefined} value + * @return {!proto.irismod.coinswap.QueryLiquidityPoolResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.setPool = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.clearPool = function() { + return this.setPool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.hasPool = 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_, 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.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolsRequest.toObject(opt_includeInstance, this); }; @@ -218,16 +437,380 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The msg instance to transform. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityResponse.toObject = function(includeInstance, msg) { +proto.irismod.coinswap.QueryLiquidityPoolsRequest.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.irismod.coinswap.QueryLiquidityPoolsRequest} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolsRequest; + return proto.irismod.coinswap.QueryLiquidityPoolsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityPoolsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.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_, 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.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolsResponse.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.irismod.coinswap.QueryLiquidityPoolsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + poolsList: jspb.Message.toObjectList(msg.getPoolsList(), + proto.irismod.coinswap.PoolInfo.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.irismod.coinswap.QueryLiquidityPoolsResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolsResponse; + return proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.coinswap.PoolInfo; + reader.readMessage(value,proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader); + msg.addPools(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.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityPoolsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PoolInfo pools = 1; + * @return {!Array} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.getPoolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.coinswap.PoolInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.setPoolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.coinswap.PoolInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.coinswap.PoolInfo} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.addPools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.coinswap.PoolInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.clearPoolsList = function() { + return this.setPoolsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.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.irismod.coinswap.QueryLiquidityPoolsResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.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_, 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.irismod.coinswap.PoolInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.PoolInfo.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.irismod.coinswap.PoolInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.PoolInfo.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + escrowAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), standard: (f = msg.getStandard()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), token: (f = msg.getToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - liquidity: (f = msg.getLiquidity()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - fee: jspb.Message.getFieldWithDefault(msg, 4, "") + lpt: (f = msg.getLpt()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + fee: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -241,23 +824,23 @@ proto.irismod.coinswap.QueryLiquidityResponse.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} + * @return {!proto.irismod.coinswap.PoolInfo} */ -proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary = function(bytes) { +proto.irismod.coinswap.PoolInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.irismod.coinswap.QueryLiquidityResponse; - return proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.irismod.coinswap.PoolInfo; + return proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The message object to deserialize into. + * @param {!proto.irismod.coinswap.PoolInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} + * @return {!proto.irismod.coinswap.PoolInfo} */ -proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -265,21 +848,29 @@ proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEscrowAddress(value); + break; + case 3: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.setStandard(value); break; - case 2: + case 4: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.setToken(value); break; - case 3: + case 5: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.setLiquidity(value); + msg.setLpt(value); break; - case 4: + case 6: var value = /** @type {string} */ (reader.readString()); msg.setFee(value); break; @@ -296,9 +887,9 @@ proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.serializeBinary = function() { +proto.irismod.coinswap.PoolInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter(this, writer); + proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -306,16 +897,30 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.irismod.coinswap.QueryLiquidityResponse} message + * @param {!proto.irismod.coinswap.PoolInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function(message, writer) { +proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEscrowAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } f = message.getStandard(); if (f != null) { writer.writeMessage( - 1, + 3, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -323,15 +928,15 @@ proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function f = message.getToken(); if (f != null) { writer.writeMessage( - 2, + 4, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } - f = message.getLiquidity(); + f = message.getLpt(); if (f != null) { writer.writeMessage( - 3, + 5, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -339,7 +944,7 @@ proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function f = message.getFee(); if (f.length > 0) { writer.writeString( - 4, + 6, f ); } @@ -347,29 +952,65 @@ proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function /** - * optional cosmos.base.v1beta1.Coin standard = 1; + * optional string id = 1; + * @return {string} + */ +proto.irismod.coinswap.PoolInfo.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.PoolInfo} returns this + */ +proto.irismod.coinswap.PoolInfo.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string escrow_address = 2; + * @return {string} + */ +proto.irismod.coinswap.PoolInfo.prototype.getEscrowAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.PoolInfo} returns this + */ +proto.irismod.coinswap.PoolInfo.prototype.setEscrowAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin standard = 3; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getStandard = function() { +proto.irismod.coinswap.PoolInfo.prototype.getStandard = function() { return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setStandard = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.irismod.coinswap.PoolInfo.prototype.setStandard = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearStandard = function() { +proto.irismod.coinswap.PoolInfo.prototype.clearStandard = function() { return this.setStandard(undefined); }; @@ -378,35 +1019,35 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearStandard = function * Returns whether this field is set. * @return {boolean} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasStandard = function() { - return jspb.Message.getField(this, 1) != null; +proto.irismod.coinswap.PoolInfo.prototype.hasStandard = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional cosmos.base.v1beta1.Coin token = 2; + * optional cosmos.base.v1beta1.Coin token = 4; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getToken = function() { +proto.irismod.coinswap.PoolInfo.prototype.getToken = function() { return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setToken = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.irismod.coinswap.PoolInfo.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearToken = function() { +proto.irismod.coinswap.PoolInfo.prototype.clearToken = function() { return this.setToken(undefined); }; @@ -415,36 +1056,36 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearToken = function() * Returns whether this field is set. * @return {boolean} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasToken = function() { - return jspb.Message.getField(this, 2) != null; +proto.irismod.coinswap.PoolInfo.prototype.hasToken = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional cosmos.base.v1beta1.Coin liquidity = 3; + * optional cosmos.base.v1beta1.Coin lpt = 5; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getLiquidity = function() { +proto.irismod.coinswap.PoolInfo.prototype.getLpt = function() { return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setLiquidity = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.irismod.coinswap.PoolInfo.prototype.setLpt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearLiquidity = function() { - return this.setLiquidity(undefined); +proto.irismod.coinswap.PoolInfo.prototype.clearLpt = function() { + return this.setLpt(undefined); }; @@ -452,26 +1093,26 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearLiquidity = functio * Returns whether this field is set. * @return {boolean} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasLiquidity = function() { - return jspb.Message.getField(this, 3) != null; +proto.irismod.coinswap.PoolInfo.prototype.hasLpt = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional string fee = 4; + * optional string fee = 6; * @return {string} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getFee = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.irismod.coinswap.PoolInfo.prototype.getFee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setFee = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.irismod.coinswap.PoolInfo.prototype.setFee = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; diff --git a/dist/src/types/proto-types/irismod/farm/farm_pb.js b/dist/src/types/proto-types/irismod/farm/farm_pb.js new file mode 100644 index 00000000..d0eb388d --- /dev/null +++ b/dist/src/types/proto-types/irismod/farm/farm_pb.js @@ -0,0 +1,1942 @@ +// source: irismod/farm/farm.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.farm.CommunityPoolCreateFarmProposal', null, global); +goog.exportSymbol('proto.irismod.farm.EscrowInfo', null, global); +goog.exportSymbol('proto.irismod.farm.FarmInfo', null, global); +goog.exportSymbol('proto.irismod.farm.FarmPool', null, global); +goog.exportSymbol('proto.irismod.farm.Params', null, global); +goog.exportSymbol('proto.irismod.farm.RewardRule', 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.irismod.farm.FarmPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.FarmPool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.FarmPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.FarmPool.displayName = 'proto.irismod.farm.FarmPool'; +} +/** + * 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.irismod.farm.RewardRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.RewardRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.RewardRule.displayName = 'proto.irismod.farm.RewardRule'; +} +/** + * 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.irismod.farm.FarmInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.FarmInfo.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.FarmInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.FarmInfo.displayName = 'proto.irismod.farm.FarmInfo'; +} +/** + * 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.irismod.farm.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.Params.displayName = 'proto.irismod.farm.Params'; +} +/** + * 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.irismod.farm.EscrowInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.EscrowInfo.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.EscrowInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.EscrowInfo.displayName = 'proto.irismod.farm.EscrowInfo'; +} +/** + * 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.irismod.farm.CommunityPoolCreateFarmProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.CommunityPoolCreateFarmProposal.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.CommunityPoolCreateFarmProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.CommunityPoolCreateFarmProposal.displayName = 'proto.irismod.farm.CommunityPoolCreateFarmProposal'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.FarmPool.repeatedFields_ = [9]; + + + +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_, 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.irismod.farm.FarmPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.FarmPool.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.irismod.farm.FarmPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPool.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + creator: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + lastHeightDistrRewards: jspb.Message.getFieldWithDefault(msg, 6, 0), + editable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + totalLptLocked: (f = msg.getTotalLptLocked()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.irismod.farm.RewardRule.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.irismod.farm.FarmPool} + */ +proto.irismod.farm.FarmPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.FarmPool; + return proto.irismod.farm.FarmPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.FarmPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.FarmPool} + */ +proto.irismod.farm.FarmPool.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastHeightDistrRewards(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEditable(value); + break; + case 8: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setTotalLptLocked(value); + break; + case 9: + var value = new proto.irismod.farm.RewardRule; + reader.readMessage(value,proto.irismod.farm.RewardRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.FarmPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.FarmPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.FarmPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getEndHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLastHeightDistrRewards(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getEditable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getTotalLptLocked(); + if (f != null) { + writer.writeMessage( + 8, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.irismod.farm.RewardRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.farm.FarmPool.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.farm.FarmPool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.irismod.farm.FarmPool.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 start_height = 4; + * @return {number} + */ +proto.irismod.farm.FarmPool.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 end_height = 5; + * @return {number} + */ +proto.irismod.farm.FarmPool.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setEndHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 last_height_distr_rewards = 6; + * @return {number} + */ +proto.irismod.farm.FarmPool.prototype.getLastHeightDistrRewards = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setLastHeightDistrRewards = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool editable = 7; + * @return {boolean} + */ +proto.irismod.farm.FarmPool.prototype.getEditable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setEditable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin total_lpt_locked = 8; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPool.prototype.getTotalLptLocked = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 8)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.FarmPool} returns this +*/ +proto.irismod.farm.FarmPool.prototype.setTotalLptLocked = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.clearTotalLptLocked = function() { + return this.setTotalLptLocked(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.FarmPool.prototype.hasTotalLptLocked = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated RewardRule rules = 9; + * @return {!Array} + */ +proto.irismod.farm.FarmPool.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.farm.RewardRule, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPool} returns this +*/ +proto.irismod.farm.FarmPool.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.irismod.farm.RewardRule=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.RewardRule} + */ +proto.irismod.farm.FarmPool.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.irismod.farm.RewardRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + + + + +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_, 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.irismod.farm.RewardRule.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.RewardRule.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.irismod.farm.RewardRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.RewardRule.toObject = function(includeInstance, msg) { + var f, obj = { + reward: jspb.Message.getFieldWithDefault(msg, 1, ""), + totalReward: jspb.Message.getFieldWithDefault(msg, 2, ""), + remainingReward: jspb.Message.getFieldWithDefault(msg, 3, ""), + rewardPerBlock: jspb.Message.getFieldWithDefault(msg, 4, ""), + rewardPerShare: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.RewardRule} + */ +proto.irismod.farm.RewardRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.RewardRule; + return proto.irismod.farm.RewardRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.RewardRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.RewardRule} + */ +proto.irismod.farm.RewardRule.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.setReward(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTotalReward(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRemainingReward(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setRewardPerBlock(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRewardPerShare(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.RewardRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.RewardRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.RewardRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.RewardRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReward(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTotalReward(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRemainingReward(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRewardPerBlock(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRewardPerShare(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string reward = 1; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setReward = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string total_reward = 2; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getTotalReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setTotalReward = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string remaining_reward = 3; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getRemainingReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setRemainingReward = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string reward_per_block = 4; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getRewardPerBlock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setRewardPerBlock = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string reward_per_share = 5; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getRewardPerShare = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setRewardPerShare = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.FarmInfo.repeatedFields_ = [4]; + + + +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_, 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.irismod.farm.FarmInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.FarmInfo.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.irismod.farm.FarmInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmInfo.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + locked: jspb.Message.getFieldWithDefault(msg, 3, ""), + rewardDebtList: jspb.Message.toObjectList(msg.getRewardDebtList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.FarmInfo} + */ +proto.irismod.farm.FarmInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.FarmInfo; + return proto.irismod.farm.FarmInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.FarmInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.FarmInfo} + */ +proto.irismod.farm.FarmInfo.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.setPoolId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLocked(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardDebt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.FarmInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.FarmInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.FarmInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLocked(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRewardDebtList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.FarmInfo.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string address = 2; + * @return {string} + */ +proto.irismod.farm.FarmInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string locked = 3; + * @return {string} + */ +proto.irismod.farm.FarmInfo.prototype.getLocked = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.setLocked = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_debt = 4; + * @return {!Array} + */ +proto.irismod.farm.FarmInfo.prototype.getRewardDebtList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmInfo} returns this +*/ +proto.irismod.farm.FarmInfo.prototype.setRewardDebtList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmInfo.prototype.addRewardDebt = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.clearRewardDebtList = function() { + return this.setRewardDebtList([]); +}; + + + + + +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_, 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.irismod.farm.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.Params.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.irismod.farm.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.Params.toObject = function(includeInstance, msg) { + var f, obj = { + poolCreationFee: (f = msg.getPoolCreationFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + maxRewardCategories: jspb.Message.getFieldWithDefault(msg, 2, 0), + taxRate: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.Params} + */ +proto.irismod.farm.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.Params; + return proto.irismod.farm.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.Params} + */ +proto.irismod.farm.Params.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.setPoolCreationFee(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxRewardCategories(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTaxRate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolCreationFee(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMaxRewardCategories(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTaxRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin pool_creation_fee = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.Params.prototype.getPoolCreationFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.Params} returns this +*/ +proto.irismod.farm.Params.prototype.setPoolCreationFee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.Params} returns this + */ +proto.irismod.farm.Params.prototype.clearPoolCreationFee = function() { + return this.setPoolCreationFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.Params.prototype.hasPoolCreationFee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 max_reward_categories = 2; + * @return {number} + */ +proto.irismod.farm.Params.prototype.getMaxRewardCategories = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.Params} returns this + */ +proto.irismod.farm.Params.prototype.setMaxRewardCategories = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string tax_rate = 3; + * @return {string} + */ +proto.irismod.farm.Params.prototype.getTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.Params} returns this + */ +proto.irismod.farm.Params.prototype.setTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.EscrowInfo.repeatedFields_ = [2,3]; + + + +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_, 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.irismod.farm.EscrowInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.EscrowInfo.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.irismod.farm.EscrowInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.EscrowInfo.toObject = function(includeInstance, msg) { + var f, obj = { + proposer: jspb.Message.getFieldWithDefault(msg, 1, ""), + fundAppliedList: jspb.Message.toObjectList(msg.getFundAppliedList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + fundSelfBondList: jspb.Message.toObjectList(msg.getFundSelfBondList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + proposalId: jspb.Message.getFieldWithDefault(msg, 4, 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.irismod.farm.EscrowInfo} + */ +proto.irismod.farm.EscrowInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.EscrowInfo; + return proto.irismod.farm.EscrowInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.EscrowInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.EscrowInfo} + */ +proto.irismod.farm.EscrowInfo.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.setProposer(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundApplied(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundSelfBond(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProposalId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.EscrowInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.EscrowInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.EscrowInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.EscrowInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFundAppliedList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFundSelfBondList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string proposer = 1; + * @return {string} + */ +proto.irismod.farm.EscrowInfo.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.setProposer = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_applied = 2; + * @return {!Array} + */ +proto.irismod.farm.EscrowInfo.prototype.getFundAppliedList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.EscrowInfo} returns this +*/ +proto.irismod.farm.EscrowInfo.prototype.setFundAppliedList = 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.irismod.farm.EscrowInfo.prototype.addFundApplied = 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.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.clearFundAppliedList = function() { + return this.setFundAppliedList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_self_bond = 3; + * @return {!Array} + */ +proto.irismod.farm.EscrowInfo.prototype.getFundSelfBondList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.EscrowInfo} returns this +*/ +proto.irismod.farm.EscrowInfo.prototype.setFundSelfBondList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.EscrowInfo.prototype.addFundSelfBond = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.clearFundSelfBondList = function() { + return this.setFundSelfBondList([]); +}; + + +/** + * optional uint64 proposal_id = 4; + * @return {number} + */ +proto.irismod.farm.EscrowInfo.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.repeatedFields_ = [5,6,7]; + + + +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_, 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.irismod.farm.CommunityPoolCreateFarmProposal.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.CommunityPoolCreateFarmProposal.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.irismod.farm.CommunityPoolCreateFarmProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + poolDescription: jspb.Message.getFieldWithDefault(msg, 3, ""), + lptDenom: jspb.Message.getFieldWithDefault(msg, 4, ""), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + fundAppliedList: jspb.Message.toObjectList(msg.getFundAppliedList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + fundSelfBondList: jspb.Message.toObjectList(msg.getFundSelfBondList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.CommunityPoolCreateFarmProposal} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.CommunityPoolCreateFarmProposal; + return proto.irismod.farm.CommunityPoolCreateFarmProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.CommunityPoolCreateFarmProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPoolDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLptDenom(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundApplied(value); + break; + case 7: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundSelfBond(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.CommunityPoolCreateFarmProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.CommunityPoolCreateFarmProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPoolDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLptDenom(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFundAppliedList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFundSelfBondList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string pool_description = 3; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getPoolDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setPoolDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string lpt_denom = 4; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getLptDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setLptDenom = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 5; + * @return {!Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this +*/ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_applied = 6; + * @return {!Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getFundAppliedList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this +*/ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setFundAppliedList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.addFundApplied = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.clearFundAppliedList = function() { + return this.setFundAppliedList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_self_bond = 7; + * @return {!Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getFundSelfBondList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this +*/ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setFundSelfBondList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.addFundSelfBond = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.clearFundSelfBondList = function() { + return this.setFundSelfBondList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/dist/src/types/proto-types/irismod/farm/genesis_pb.js b/dist/src/types/proto-types/irismod/farm/genesis_pb.js new file mode 100644 index 00000000..e820e9bd --- /dev/null +++ b/dist/src/types/proto-types/irismod/farm/genesis_pb.js @@ -0,0 +1,388 @@ +// source: irismod/farm/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js'); +goog.object.extend(proto, irismod_farm_farm_pb); +goog.exportSymbol('proto.irismod.farm.GenesisState', 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.irismod.farm.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.GenesisState.displayName = 'proto.irismod.farm.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.GenesisState.repeatedFields_ = [2,3,5]; + + + +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_, 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.irismod.farm.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.GenesisState.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.irismod.farm.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_farm_farm_pb.Params.toObject(includeInstance, f), + poolsList: jspb.Message.toObjectList(msg.getPoolsList(), + irismod_farm_farm_pb.FarmPool.toObject, includeInstance), + farmInfosList: jspb.Message.toObjectList(msg.getFarmInfosList(), + irismod_farm_farm_pb.FarmInfo.toObject, includeInstance), + sequence: jspb.Message.getFieldWithDefault(msg, 4, 0), + escrowList: jspb.Message.toObjectList(msg.getEscrowList(), + irismod_farm_farm_pb.EscrowInfo.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.irismod.farm.GenesisState} + */ +proto.irismod.farm.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.GenesisState; + return proto.irismod.farm.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.GenesisState} + */ +proto.irismod.farm.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_farm_farm_pb.Params; + reader.readMessage(value,irismod_farm_farm_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new irismod_farm_farm_pb.FarmPool; + reader.readMessage(value,irismod_farm_farm_pb.FarmPool.deserializeBinaryFromReader); + msg.addPools(value); + break; + case 3: + var value = new irismod_farm_farm_pb.FarmInfo; + reader.readMessage(value,irismod_farm_farm_pb.FarmInfo.deserializeBinaryFromReader); + msg.addFarmInfos(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 5: + var value = new irismod_farm_farm_pb.EscrowInfo; + reader.readMessage(value,irismod_farm_farm_pb.EscrowInfo.deserializeBinaryFromReader); + msg.addEscrow(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_farm_farm_pb.Params.serializeBinaryToWriter + ); + } + f = message.getPoolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_farm_farm_pb.FarmPool.serializeBinaryToWriter + ); + } + f = message.getFarmInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_farm_farm_pb.FarmInfo.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getEscrowList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + irismod_farm_farm_pb.EscrowInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.farm.Params} + */ +proto.irismod.farm.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.farm.Params} */ ( + jspb.Message.getWrapperField(this, irismod_farm_farm_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.farm.Params|undefined} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated FarmPool pools = 2; + * @return {!Array} + */ +proto.irismod.farm.GenesisState.prototype.getPoolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_farm_farm_pb.FarmPool, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setPoolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.farm.FarmPool=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.FarmPool} + */ +proto.irismod.farm.GenesisState.prototype.addPools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.farm.FarmPool, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearPoolsList = function() { + return this.setPoolsList([]); +}; + + +/** + * repeated FarmInfo farm_infos = 3; + * @return {!Array} + */ +proto.irismod.farm.GenesisState.prototype.getFarmInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_farm_farm_pb.FarmInfo, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setFarmInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.farm.FarmInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.FarmInfo} + */ +proto.irismod.farm.GenesisState.prototype.addFarmInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.farm.FarmInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearFarmInfosList = function() { + return this.setFarmInfosList([]); +}; + + +/** + * optional uint64 sequence = 4; + * @return {number} + */ +proto.irismod.farm.GenesisState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * repeated EscrowInfo escrow = 5; + * @return {!Array} + */ +proto.irismod.farm.GenesisState.prototype.getEscrowList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_farm_farm_pb.EscrowInfo, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setEscrowList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.irismod.farm.EscrowInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.EscrowInfo} + */ +proto.irismod.farm.GenesisState.prototype.addEscrow = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.irismod.farm.EscrowInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearEscrowList = function() { + return this.setEscrowList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/dist/src/types/proto-types/irismod/farm/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/farm/query_grpc_web_pb.js new file mode 100644 index 00000000..3ca92485 --- /dev/null +++ b/dist/src/types/proto-types/irismod/farm/query_grpc_web_pb.js @@ -0,0 +1,405 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.farm + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.farm = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryFarmPoolsRequest, + * !proto.irismod.farm.QueryFarmPoolsResponse>} + */ +const methodDescriptor_Query_FarmPools = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/FarmPools', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryFarmPoolsRequest, + proto.irismod.farm.QueryFarmPoolsResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryFarmPoolsRequest, + * !proto.irismod.farm.QueryFarmPoolsResponse>} + */ +const methodInfo_Query_FarmPools = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryFarmPoolsResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryFarmPoolsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.farmPools = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/FarmPools', + request, + metadata || {}, + methodDescriptor_Query_FarmPools, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.farmPools = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/FarmPools', + request, + metadata || {}, + methodDescriptor_Query_FarmPools); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryFarmPoolRequest, + * !proto.irismod.farm.QueryFarmPoolResponse>} + */ +const methodDescriptor_Query_FarmPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/FarmPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryFarmPoolRequest, + proto.irismod.farm.QueryFarmPoolResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryFarmPoolRequest, + * !proto.irismod.farm.QueryFarmPoolResponse>} + */ +const methodInfo_Query_FarmPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryFarmPoolResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryFarmPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.farmPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/FarmPool', + request, + metadata || {}, + methodDescriptor_Query_FarmPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.farmPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/FarmPool', + request, + metadata || {}, + methodDescriptor_Query_FarmPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryFarmerRequest, + * !proto.irismod.farm.QueryFarmerResponse>} + */ +const methodDescriptor_Query_Farmer = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/Farmer', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryFarmerRequest, + proto.irismod.farm.QueryFarmerResponse, + /** + * @param {!proto.irismod.farm.QueryFarmerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmerResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryFarmerRequest, + * !proto.irismod.farm.QueryFarmerResponse>} + */ +const methodInfo_Query_Farmer = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryFarmerResponse, + /** + * @param {!proto.irismod.farm.QueryFarmerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmerResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryFarmerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryFarmerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.farmer = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/Farmer', + request, + metadata || {}, + methodDescriptor_Query_Farmer, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryFarmerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.farmer = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/Farmer', + request, + metadata || {}, + methodDescriptor_Query_Farmer); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryParamsRequest, + * !proto.irismod.farm.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/Params', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryParamsRequest, + proto.irismod.farm.QueryParamsResponse, + /** + * @param {!proto.irismod.farm.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryParamsRequest, + * !proto.irismod.farm.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryParamsResponse, + /** + * @param {!proto.irismod.farm.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.irismod.farm; + diff --git a/dist/src/types/proto-types/irismod/farm/query_pb.js b/dist/src/types/proto-types/irismod/farm/query_pb.js new file mode 100644 index 00000000..91e7eb33 --- /dev/null +++ b/dist/src/types/proto-types/irismod/farm/query_pb.js @@ -0,0 +1,2258 @@ +// source: irismod/farm/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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); +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 irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js'); +goog.object.extend(proto, irismod_farm_farm_pb); +goog.exportSymbol('proto.irismod.farm.FarmPoolEntry', null, global); +goog.exportSymbol('proto.irismod.farm.LockedInfo', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolRequest', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolsRequest', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolsResponse', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmerRequest', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmerResponse', null, global); +goog.exportSymbol('proto.irismod.farm.QueryParamsRequest', null, global); +goog.exportSymbol('proto.irismod.farm.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.irismod.farm.QueryFarmPoolsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolsRequest.displayName = 'proto.irismod.farm.QueryFarmPoolsRequest'; +} +/** + * 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.irismod.farm.FarmPoolEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.FarmPoolEntry.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.FarmPoolEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.FarmPoolEntry.displayName = 'proto.irismod.farm.FarmPoolEntry'; +} +/** + * 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.irismod.farm.QueryFarmPoolsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.QueryFarmPoolsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolsResponse.displayName = 'proto.irismod.farm.QueryFarmPoolsResponse'; +} +/** + * 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.irismod.farm.QueryFarmPoolRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolRequest.displayName = 'proto.irismod.farm.QueryFarmPoolRequest'; +} +/** + * 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.irismod.farm.QueryFarmPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolResponse.displayName = 'proto.irismod.farm.QueryFarmPoolResponse'; +} +/** + * 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.irismod.farm.QueryFarmerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmerRequest.displayName = 'proto.irismod.farm.QueryFarmerRequest'; +} +/** + * 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.irismod.farm.QueryFarmerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.QueryFarmerResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmerResponse.displayName = 'proto.irismod.farm.QueryFarmerResponse'; +} +/** + * 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.irismod.farm.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryParamsRequest.displayName = 'proto.irismod.farm.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.irismod.farm.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryParamsResponse.displayName = 'proto.irismod.farm.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.irismod.farm.LockedInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.LockedInfo.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.LockedInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.LockedInfo.displayName = 'proto.irismod.farm.LockedInfo'; +} + + + +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_, 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.irismod.farm.QueryFarmPoolsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolsRequest.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.irismod.farm.QueryFarmPoolsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsRequest.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.irismod.farm.QueryFarmPoolsRequest} + */ +proto.irismod.farm.QueryFarmPoolsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolsRequest; + return proto.irismod.farm.QueryFarmPoolsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolsRequest} + */ +proto.irismod.farm.QueryFarmPoolsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + 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.irismod.farm.QueryFarmPoolsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.farm.QueryFarmPoolsRequest} returns this +*/ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryFarmPoolsRequest} returns this + */ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.FarmPoolEntry.repeatedFields_ = [9,10,11]; + + + +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_, 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.irismod.farm.FarmPoolEntry.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.FarmPoolEntry.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.irismod.farm.FarmPoolEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPoolEntry.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + creator: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + editable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + expired: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + totalLptLocked: (f = msg.getTotalLptLocked()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + totalRewardList: jspb.Message.toObjectList(msg.getTotalRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + remainingRewardList: jspb.Message.toObjectList(msg.getRemainingRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.FarmPoolEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.FarmPoolEntry; + return proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.FarmPoolEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.FarmPoolEntry.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndHeight(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEditable(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExpired(value); + break; + case 8: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setTotalLptLocked(value); + break; + case 9: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalReward(value); + break; + case 10: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRemainingReward(value); + break; + case 11: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.FarmPoolEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getEndHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getEditable(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getExpired(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getTotalLptLocked(); + if (f != null) { + writer.writeMessage( + 8, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTotalRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRemainingRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 start_height = 4; + * @return {number} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 end_height = 5; + * @return {number} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setEndHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bool editable = 6; + * @return {boolean} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getEditable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setEditable = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool expired = 7; + * @return {boolean} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getExpired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setExpired = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin total_lpt_locked = 8; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getTotalLptLocked = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 8)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setTotalLptLocked = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearTotalLptLocked = function() { + return this.setTotalLptLocked(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.FarmPoolEntry.prototype.hasTotalLptLocked = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_reward = 9; + * @return {!Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getTotalRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setTotalRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.addTotalReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearTotalRewardList = function() { + return this.setTotalRewardList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin remaining_reward = 10; + * @return {!Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getRemainingRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setRemainingRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.addRemainingReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearRemainingRewardList = function() { + return this.setRemainingRewardList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 11; + * @return {!Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.QueryFarmPoolsResponse.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_, 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.irismod.farm.QueryFarmPoolsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolsResponse.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.irismod.farm.QueryFarmPoolsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + poolsList: jspb.Message.toObjectList(msg.getPoolsList(), + proto.irismod.farm.FarmPoolEntry.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.irismod.farm.QueryFarmPoolsResponse} + */ +proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolsResponse; + return proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} + */ +proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.farm.FarmPoolEntry; + reader.readMessage(value,proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader); + msg.addPools(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.irismod.farm.QueryFarmPoolsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FarmPoolEntry pools = 1; + * @return {!Array} + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.getPoolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.farm.FarmPoolEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} returns this +*/ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.setPoolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.farm.FarmPoolEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.addPools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.farm.FarmPoolEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} returns this + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.clearPoolsList = function() { + return this.setPoolsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.farm.QueryFarmPoolsResponse.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.irismod.farm.QueryFarmPoolsResponse} returns this +*/ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} returns this + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryFarmPoolsResponse.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_, 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.irismod.farm.QueryFarmPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolRequest.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.irismod.farm.QueryFarmPoolRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.QueryFarmPoolRequest} + */ +proto.irismod.farm.QueryFarmPoolRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolRequest; + return proto.irismod.farm.QueryFarmPoolRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolRequest} + */ +proto.irismod.farm.QueryFarmPoolRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmPoolRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.farm.QueryFarmPoolRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.QueryFarmPoolRequest} returns this + */ +proto.irismod.farm.QueryFarmPoolRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.farm.QueryFarmPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolResponse.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.irismod.farm.QueryFarmPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pool: (f = msg.getPool()) && proto.irismod.farm.FarmPoolEntry.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.irismod.farm.QueryFarmPoolResponse} + */ +proto.irismod.farm.QueryFarmPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolResponse; + return proto.irismod.farm.QueryFarmPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolResponse} + */ +proto.irismod.farm.QueryFarmPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.farm.FarmPoolEntry; + reader.readMessage(value,proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader); + msg.setPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPool(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional FarmPoolEntry pool = 1; + * @return {?proto.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.getPool = function() { + return /** @type{?proto.irismod.farm.FarmPoolEntry} */ ( + jspb.Message.getWrapperField(this, proto.irismod.farm.FarmPoolEntry, 1)); +}; + + +/** + * @param {?proto.irismod.farm.FarmPoolEntry|undefined} value + * @return {!proto.irismod.farm.QueryFarmPoolResponse} returns this +*/ +proto.irismod.farm.QueryFarmPoolResponse.prototype.setPool = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryFarmPoolResponse} returns this + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.clearPool = function() { + return this.setPool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.hasPool = 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_, 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.irismod.farm.QueryFarmerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmerRequest.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.irismod.farm.QueryFarmerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + farmer: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: 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.irismod.farm.QueryFarmerRequest} + */ +proto.irismod.farm.QueryFarmerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmerRequest; + return proto.irismod.farm.QueryFarmerRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmerRequest} + */ +proto.irismod.farm.QueryFarmerRequest.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.setFarmer(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPoolId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFarmer(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string farmer = 1; + * @return {string} + */ +proto.irismod.farm.QueryFarmerRequest.prototype.getFarmer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.QueryFarmerRequest} returns this + */ +proto.irismod.farm.QueryFarmerRequest.prototype.setFarmer = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pool_id = 2; + * @return {string} + */ +proto.irismod.farm.QueryFarmerRequest.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.QueryFarmerRequest} returns this + */ +proto.irismod.farm.QueryFarmerRequest.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.QueryFarmerResponse.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_, 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.irismod.farm.QueryFarmerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmerResponse.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.irismod.farm.QueryFarmerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + listList: jspb.Message.toObjectList(msg.getListList(), + proto.irismod.farm.LockedInfo.toObject, includeInstance), + height: jspb.Message.getFieldWithDefault(msg, 2, 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.irismod.farm.QueryFarmerResponse} + */ +proto.irismod.farm.QueryFarmerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmerResponse; + return proto.irismod.farm.QueryFarmerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmerResponse} + */ +proto.irismod.farm.QueryFarmerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.farm.LockedInfo; + reader.readMessage(value,proto.irismod.farm.LockedInfo.deserializeBinaryFromReader); + msg.addList(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getListList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.farm.LockedInfo.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * repeated LockedInfo list = 1; + * @return {!Array} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.getListList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.farm.LockedInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.QueryFarmerResponse} returns this +*/ +proto.irismod.farm.QueryFarmerResponse.prototype.setListList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.farm.LockedInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.LockedInfo} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.addList = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.farm.LockedInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.QueryFarmerResponse} returns this + */ +proto.irismod.farm.QueryFarmerResponse.prototype.clearListList = function() { + return this.setListList([]); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.QueryFarmerResponse} returns this + */ +proto.irismod.farm.QueryFarmerResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(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_, 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.irismod.farm.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.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.irismod.farm.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.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.irismod.farm.QueryParamsRequest} + */ +proto.irismod.farm.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryParamsRequest; + return proto.irismod.farm.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryParamsRequest} + */ +proto.irismod.farm.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.irismod.farm.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.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.irismod.farm.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.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_, 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.irismod.farm.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.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.irismod.farm.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_farm_farm_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.irismod.farm.QueryParamsResponse} + */ +proto.irismod.farm.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryParamsResponse; + return proto.irismod.farm.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryParamsResponse} + */ +proto.irismod.farm.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_farm_farm_pb.Params; + reader.readMessage(value,irismod_farm_farm_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.irismod.farm.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.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.irismod.farm.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_farm_farm_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.farm.Params} + */ +proto.irismod.farm.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.irismod.farm.Params} */ ( + jspb.Message.getWrapperField(this, irismod_farm_farm_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.farm.Params|undefined} value + * @return {!proto.irismod.farm.QueryParamsResponse} returns this +*/ +proto.irismod.farm.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryParamsResponse} returns this + */ +proto.irismod.farm.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.LockedInfo.repeatedFields_ = [3]; + + + +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_, 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.irismod.farm.LockedInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.LockedInfo.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.irismod.farm.LockedInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.LockedInfo.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + locked: (f = msg.getLocked()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + pendingRewardList: jspb.Message.toObjectList(msg.getPendingRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.LockedInfo} + */ +proto.irismod.farm.LockedInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.LockedInfo; + return proto.irismod.farm.LockedInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.LockedInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.LockedInfo} + */ +proto.irismod.farm.LockedInfo.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setLocked(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPendingReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.LockedInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.LockedInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.LockedInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.LockedInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocked(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPendingRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.LockedInfo.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.LockedInfo} returns this + */ +proto.irismod.farm.LockedInfo.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin locked = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.LockedInfo.prototype.getLocked = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.LockedInfo} returns this +*/ +proto.irismod.farm.LockedInfo.prototype.setLocked = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.LockedInfo} returns this + */ +proto.irismod.farm.LockedInfo.prototype.clearLocked = function() { + return this.setLocked(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.LockedInfo.prototype.hasLocked = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin pending_reward = 3; + * @return {!Array} + */ +proto.irismod.farm.LockedInfo.prototype.getPendingRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.LockedInfo} returns this +*/ +proto.irismod.farm.LockedInfo.prototype.setPendingRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.LockedInfo.prototype.addPendingReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.LockedInfo} returns this + */ +proto.irismod.farm.LockedInfo.prototype.clearPendingRewardList = function() { + return this.setPendingRewardList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/dist/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js new file mode 100644 index 00000000..76305031 --- /dev/null +++ b/dist/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js @@ -0,0 +1,641 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.farm + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.farm = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgCreatePool, + * !proto.irismod.farm.MsgCreatePoolResponse>} + */ +const methodDescriptor_Msg_CreatePool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/CreatePool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgCreatePool, + proto.irismod.farm.MsgCreatePoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgCreatePool, + * !proto.irismod.farm.MsgCreatePoolResponse>} + */ +const methodInfo_Msg_CreatePool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgCreatePoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgCreatePool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgCreatePoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.createPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/CreatePool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgCreatePool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.createPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/CreatePool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgCreatePoolWithCommunityPool, + * !proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse>} + */ +const methodDescriptor_Msg_CreatePoolWithCommunityPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/CreatePoolWithCommunityPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgCreatePoolWithCommunityPool, + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgCreatePoolWithCommunityPool, + * !proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse>} + */ +const methodInfo_Msg_CreatePoolWithCommunityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.createPoolWithCommunityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/CreatePoolWithCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePoolWithCommunityPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.createPoolWithCommunityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/CreatePoolWithCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePoolWithCommunityPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgDestroyPool, + * !proto.irismod.farm.MsgDestroyPoolResponse>} + */ +const methodDescriptor_Msg_DestroyPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/DestroyPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgDestroyPool, + proto.irismod.farm.MsgDestroyPoolResponse, + /** + * @param {!proto.irismod.farm.MsgDestroyPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgDestroyPool, + * !proto.irismod.farm.MsgDestroyPoolResponse>} + */ +const methodInfo_Msg_DestroyPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgDestroyPoolResponse, + /** + * @param {!proto.irismod.farm.MsgDestroyPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgDestroyPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgDestroyPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.destroyPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/DestroyPool', + request, + metadata || {}, + methodDescriptor_Msg_DestroyPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgDestroyPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.destroyPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/DestroyPool', + request, + metadata || {}, + methodDescriptor_Msg_DestroyPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgAdjustPool, + * !proto.irismod.farm.MsgAdjustPoolResponse>} + */ +const methodDescriptor_Msg_AdjustPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/AdjustPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgAdjustPool, + proto.irismod.farm.MsgAdjustPoolResponse, + /** + * @param {!proto.irismod.farm.MsgAdjustPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgAdjustPool, + * !proto.irismod.farm.MsgAdjustPoolResponse>} + */ +const methodInfo_Msg_AdjustPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgAdjustPoolResponse, + /** + * @param {!proto.irismod.farm.MsgAdjustPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgAdjustPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgAdjustPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.adjustPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/AdjustPool', + request, + metadata || {}, + methodDescriptor_Msg_AdjustPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgAdjustPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.adjustPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/AdjustPool', + request, + metadata || {}, + methodDescriptor_Msg_AdjustPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgStake, + * !proto.irismod.farm.MsgStakeResponse>} + */ +const methodDescriptor_Msg_Stake = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/Stake', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgStake, + proto.irismod.farm.MsgStakeResponse, + /** + * @param {!proto.irismod.farm.MsgStake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgStakeResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgStake, + * !proto.irismod.farm.MsgStakeResponse>} + */ +const methodInfo_Msg_Stake = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgStakeResponse, + /** + * @param {!proto.irismod.farm.MsgStake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgStakeResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgStake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgStakeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.stake = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/Stake', + request, + metadata || {}, + methodDescriptor_Msg_Stake, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgStake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.stake = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/Stake', + request, + metadata || {}, + methodDescriptor_Msg_Stake); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgUnstake, + * !proto.irismod.farm.MsgUnstakeResponse>} + */ +const methodDescriptor_Msg_Unstake = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/Unstake', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgUnstake, + proto.irismod.farm.MsgUnstakeResponse, + /** + * @param {!proto.irismod.farm.MsgUnstake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgUnstakeResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgUnstake, + * !proto.irismod.farm.MsgUnstakeResponse>} + */ +const methodInfo_Msg_Unstake = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgUnstakeResponse, + /** + * @param {!proto.irismod.farm.MsgUnstake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgUnstakeResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgUnstake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgUnstakeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.unstake = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/Unstake', + request, + metadata || {}, + methodDescriptor_Msg_Unstake, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgUnstake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.unstake = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/Unstake', + request, + metadata || {}, + methodDescriptor_Msg_Unstake); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgHarvest, + * !proto.irismod.farm.MsgHarvestResponse>} + */ +const methodDescriptor_Msg_Harvest = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/Harvest', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgHarvest, + proto.irismod.farm.MsgHarvestResponse, + /** + * @param {!proto.irismod.farm.MsgHarvest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgHarvestResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgHarvest, + * !proto.irismod.farm.MsgHarvestResponse>} + */ +const methodInfo_Msg_Harvest = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgHarvestResponse, + /** + * @param {!proto.irismod.farm.MsgHarvest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgHarvestResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgHarvest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgHarvestResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.harvest = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/Harvest', + request, + metadata || {}, + methodDescriptor_Msg_Harvest, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgHarvest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.harvest = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/Harvest', + request, + metadata || {}, + methodDescriptor_Msg_Harvest); +}; + + +module.exports = proto.irismod.farm; + diff --git a/dist/src/types/proto-types/irismod/farm/tx_pb.js b/dist/src/types/proto-types/irismod/farm/tx_pb.js new file mode 100644 index 00000000..2a4c4cc6 --- /dev/null +++ b/dist/src/types/proto-types/irismod/farm/tx_pb.js @@ -0,0 +1,2832 @@ +// source: irismod/farm/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js'); +goog.object.extend(proto, irismod_farm_farm_pb); +goog.exportSymbol('proto.irismod.farm.MsgAdjustPool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgAdjustPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePoolWithCommunityPool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgDestroyPool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgDestroyPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgHarvest', null, global); +goog.exportSymbol('proto.irismod.farm.MsgHarvestResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgStake', null, global); +goog.exportSymbol('proto.irismod.farm.MsgStakeResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgUnstake', null, global); +goog.exportSymbol('proto.irismod.farm.MsgUnstakeResponse', 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.irismod.farm.MsgCreatePool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgCreatePool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePool.displayName = 'proto.irismod.farm.MsgCreatePool'; +} +/** + * 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.irismod.farm.MsgCreatePoolWithCommunityPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgCreatePoolWithCommunityPool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePoolWithCommunityPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePoolWithCommunityPool.displayName = 'proto.irismod.farm.MsgCreatePoolWithCommunityPool'; +} +/** + * 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.irismod.farm.MsgDestroyPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgDestroyPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgDestroyPool.displayName = 'proto.irismod.farm.MsgDestroyPool'; +} +/** + * 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.irismod.farm.MsgAdjustPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgAdjustPool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgAdjustPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgAdjustPool.displayName = 'proto.irismod.farm.MsgAdjustPool'; +} +/** + * 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.irismod.farm.MsgStake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgStake, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgStake.displayName = 'proto.irismod.farm.MsgStake'; +} +/** + * 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.irismod.farm.MsgUnstake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgUnstake, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgUnstake.displayName = 'proto.irismod.farm.MsgUnstake'; +} +/** + * 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.irismod.farm.MsgHarvest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgHarvest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgHarvest.displayName = 'proto.irismod.farm.MsgHarvest'; +} +/** + * 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.irismod.farm.MsgCreatePoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePoolResponse.displayName = 'proto.irismod.farm.MsgCreatePoolResponse'; +} +/** + * 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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.displayName = 'proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse'; +} +/** + * 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.irismod.farm.MsgDestroyPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgDestroyPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgDestroyPoolResponse.displayName = 'proto.irismod.farm.MsgDestroyPoolResponse'; +} +/** + * 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.irismod.farm.MsgAdjustPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgAdjustPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgAdjustPoolResponse.displayName = 'proto.irismod.farm.MsgAdjustPoolResponse'; +} +/** + * 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.irismod.farm.MsgStakeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgStakeResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgStakeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgStakeResponse.displayName = 'proto.irismod.farm.MsgStakeResponse'; +} +/** + * 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.irismod.farm.MsgUnstakeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgUnstakeResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgUnstakeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgUnstakeResponse.displayName = 'proto.irismod.farm.MsgUnstakeResponse'; +} +/** + * 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.irismod.farm.MsgHarvestResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgHarvestResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgHarvestResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgHarvestResponse.displayName = 'proto.irismod.farm.MsgHarvestResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgCreatePool.repeatedFields_ = [4,5]; + + + +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_, 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.irismod.farm.MsgCreatePool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePool.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.irismod.farm.MsgCreatePool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePool.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + lptDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + totalRewardList: jspb.Message.toObjectList(msg.getTotalRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + editable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + creator: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgCreatePool} + */ +proto.irismod.farm.MsgCreatePool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePool; + return proto.irismod.farm.MsgCreatePool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePool} + */ +proto.irismod.farm.MsgCreatePool.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.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLptDenom(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartHeight(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalReward(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEditable(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgCreatePool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLptDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTotalRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getEditable(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.irismod.farm.MsgCreatePool.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string lpt_denom = 2; + * @return {string} + */ +proto.irismod.farm.MsgCreatePool.prototype.getLptDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setLptDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 start_height = 3; + * @return {number} + */ +proto.irismod.farm.MsgCreatePool.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 4; + * @return {!Array} + */ +proto.irismod.farm.MsgCreatePool.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this +*/ +proto.irismod.farm.MsgCreatePool.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgCreatePool.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_reward = 5; + * @return {!Array} + */ +proto.irismod.farm.MsgCreatePool.prototype.getTotalRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this +*/ +proto.irismod.farm.MsgCreatePool.prototype.setTotalRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgCreatePool.prototype.addTotalReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.clearTotalRewardList = function() { + return this.setTotalRewardList([]); +}; + + +/** + * optional bool editable = 6; + * @return {boolean} + */ +proto.irismod.farm.MsgCreatePool.prototype.getEditable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setEditable = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string creator = 7; + * @return {string} + */ +proto.irismod.farm.MsgCreatePool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.repeatedFields_ = [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_, 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.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePoolWithCommunityPool.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.irismod.farm.MsgCreatePoolWithCommunityPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.toObject = function(includeInstance, msg) { + var f, obj = { + content: (f = msg.getContent()) && irismod_farm_farm_pb.CommunityPoolCreateFarmProposal.toObject(includeInstance, f), + initialDepositList: jspb.Message.toObjectList(msg.getInitialDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + proposer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePoolWithCommunityPool; + return proto.irismod.farm.MsgCreatePoolWithCommunityPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_farm_farm_pb.CommunityPoolCreateFarmProposal; + reader.readMessage(value,irismod_farm_farm_pb.CommunityPoolCreateFarmProposal.deserializeBinaryFromReader); + msg.setContent(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addInitialDeposit(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProposer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePoolWithCommunityPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContent(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_farm_farm_pb.CommunityPoolCreateFarmProposal.serializeBinaryToWriter + ); + } + f = message.getInitialDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional CommunityPoolCreateFarmProposal content = 1; + * @return {?proto.irismod.farm.CommunityPoolCreateFarmProposal} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.getContent = function() { + return /** @type{?proto.irismod.farm.CommunityPoolCreateFarmProposal} */ ( + jspb.Message.getWrapperField(this, irismod_farm_farm_pb.CommunityPoolCreateFarmProposal, 1)); +}; + + +/** + * @param {?proto.irismod.farm.CommunityPoolCreateFarmProposal|undefined} value + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this +*/ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.hasContent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin initial_deposit = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.getInitialDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this +*/ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.setInitialDepositList = 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.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.addInitialDeposit = 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.irismod.farm.MsgCreatePoolWithCommunityPool} returns this + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.clearInitialDepositList = function() { + return this.setInitialDepositList([]); +}; + + +/** + * optional string proposer = 3; + * @return {string} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.setProposer = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.farm.MsgDestroyPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgDestroyPool.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.irismod.farm.MsgDestroyPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPool.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + creator: 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.irismod.farm.MsgDestroyPool} + */ +proto.irismod.farm.MsgDestroyPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgDestroyPool; + return proto.irismod.farm.MsgDestroyPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgDestroyPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgDestroyPool} + */ +proto.irismod.farm.MsgDestroyPool.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.setPoolId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgDestroyPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgDestroyPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgDestroyPool.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgDestroyPool} returns this + */ +proto.irismod.farm.MsgDestroyPool.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.farm.MsgDestroyPool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgDestroyPool} returns this + */ +proto.irismod.farm.MsgDestroyPool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgAdjustPool.repeatedFields_ = [2,3]; + + + +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_, 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.irismod.farm.MsgAdjustPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgAdjustPool.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.irismod.farm.MsgAdjustPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPool.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + additionalRewardList: jspb.Message.toObjectList(msg.getAdditionalRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + creator: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgAdjustPool} + */ +proto.irismod.farm.MsgAdjustPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgAdjustPool; + return proto.irismod.farm.MsgAdjustPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgAdjustPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgAdjustPool} + */ +proto.irismod.farm.MsgAdjustPool.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAdditionalReward(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgAdjustPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgAdjustPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAdditionalRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin additional_reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getAdditionalRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this +*/ +proto.irismod.farm.MsgAdjustPool.prototype.setAdditionalRewardList = 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.irismod.farm.MsgAdjustPool.prototype.addAdditionalReward = 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.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.clearAdditionalRewardList = function() { + return this.setAdditionalRewardList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 3; + * @return {!Array} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this +*/ +proto.irismod.farm.MsgAdjustPool.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgAdjustPool.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.farm.MsgStake.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgStake.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.irismod.farm.MsgStake} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStake.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: (f = msg.getAmount()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgStake} + */ +proto.irismod.farm.MsgStake.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgStake; + return proto.irismod.farm.MsgStake.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgStake} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgStake} + */ +proto.irismod.farm.MsgStake.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgStake.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgStake.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgStake} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStake.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgStake.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgStake} returns this + */ +proto.irismod.farm.MsgStake.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgStake.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.MsgStake} returns this +*/ +proto.irismod.farm.MsgStake.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.MsgStake} returns this + */ +proto.irismod.farm.MsgStake.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.MsgStake.prototype.hasAmount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.farm.MsgStake.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgStake} returns this + */ +proto.irismod.farm.MsgStake.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.farm.MsgUnstake.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgUnstake.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.irismod.farm.MsgUnstake} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstake.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: (f = msg.getAmount()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgUnstake} + */ +proto.irismod.farm.MsgUnstake.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgUnstake; + return proto.irismod.farm.MsgUnstake.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgUnstake} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgUnstake} + */ +proto.irismod.farm.MsgUnstake.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgUnstake.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgUnstake.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgUnstake} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstake.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgUnstake.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgUnstake} returns this + */ +proto.irismod.farm.MsgUnstake.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgUnstake.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.MsgUnstake} returns this +*/ +proto.irismod.farm.MsgUnstake.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.MsgUnstake} returns this + */ +proto.irismod.farm.MsgUnstake.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.MsgUnstake.prototype.hasAmount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.farm.MsgUnstake.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgUnstake} returns this + */ +proto.irismod.farm.MsgUnstake.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.farm.MsgHarvest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgHarvest.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.irismod.farm.MsgHarvest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvest.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + sender: 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.irismod.farm.MsgHarvest} + */ +proto.irismod.farm.MsgHarvest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgHarvest; + return proto.irismod.farm.MsgHarvest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgHarvest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgHarvest} + */ +proto.irismod.farm.MsgHarvest.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.setPoolId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgHarvest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgHarvest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgHarvest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgHarvest.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgHarvest} returns this + */ +proto.irismod.farm.MsgHarvest.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.irismod.farm.MsgHarvest.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgHarvest} returns this + */ +proto.irismod.farm.MsgHarvest.prototype.setSender = 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_, 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.irismod.farm.MsgCreatePoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePoolResponse.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.irismod.farm.MsgCreatePoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolResponse.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.irismod.farm.MsgCreatePoolResponse} + */ +proto.irismod.farm.MsgCreatePoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePoolResponse; + return proto.irismod.farm.MsgCreatePoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePoolResponse} + */ +proto.irismod.farm.MsgCreatePoolResponse.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.irismod.farm.MsgCreatePoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolResponse.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_, 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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse; + return proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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_, 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.irismod.farm.MsgDestroyPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgDestroyPoolResponse.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.irismod.farm.MsgDestroyPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPoolResponse.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.irismod.farm.MsgDestroyPoolResponse} + */ +proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgDestroyPoolResponse; + return proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgDestroyPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgDestroyPoolResponse} + */ +proto.irismod.farm.MsgDestroyPoolResponse.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.irismod.farm.MsgDestroyPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgDestroyPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgDestroyPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPoolResponse.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_, 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.irismod.farm.MsgAdjustPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgAdjustPoolResponse.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.irismod.farm.MsgAdjustPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPoolResponse.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.irismod.farm.MsgAdjustPoolResponse} + */ +proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgAdjustPoolResponse; + return proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgAdjustPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgAdjustPoolResponse} + */ +proto.irismod.farm.MsgAdjustPoolResponse.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.irismod.farm.MsgAdjustPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgAdjustPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgAdjustPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgStakeResponse.repeatedFields_ = [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_, 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.irismod.farm.MsgStakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgStakeResponse.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.irismod.farm.MsgStakeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStakeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.MsgStakeResponse} + */ +proto.irismod.farm.MsgStakeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgStakeResponse; + return proto.irismod.farm.MsgStakeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgStakeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgStakeResponse} + */ +proto.irismod.farm.MsgStakeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgStakeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgStakeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgStakeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStakeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgStakeResponse.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgStakeResponse} returns this +*/ +proto.irismod.farm.MsgStakeResponse.prototype.setRewardList = 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.irismod.farm.MsgStakeResponse.prototype.addReward = 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.irismod.farm.MsgStakeResponse} returns this + */ +proto.irismod.farm.MsgStakeResponse.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgUnstakeResponse.repeatedFields_ = [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_, 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.irismod.farm.MsgUnstakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgUnstakeResponse.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.irismod.farm.MsgUnstakeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstakeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.MsgUnstakeResponse} + */ +proto.irismod.farm.MsgUnstakeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgUnstakeResponse; + return proto.irismod.farm.MsgUnstakeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgUnstakeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgUnstakeResponse} + */ +proto.irismod.farm.MsgUnstakeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgUnstakeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgUnstakeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgUnstakeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstakeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgUnstakeResponse.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgUnstakeResponse} returns this +*/ +proto.irismod.farm.MsgUnstakeResponse.prototype.setRewardList = 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.irismod.farm.MsgUnstakeResponse.prototype.addReward = 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.irismod.farm.MsgUnstakeResponse} returns this + */ +proto.irismod.farm.MsgUnstakeResponse.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgHarvestResponse.repeatedFields_ = [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_, 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.irismod.farm.MsgHarvestResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgHarvestResponse.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.irismod.farm.MsgHarvestResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvestResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.MsgHarvestResponse} + */ +proto.irismod.farm.MsgHarvestResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgHarvestResponse; + return proto.irismod.farm.MsgHarvestResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgHarvestResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgHarvestResponse} + */ +proto.irismod.farm.MsgHarvestResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgHarvestResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgHarvestResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgHarvestResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvestResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgHarvestResponse.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgHarvestResponse} returns this +*/ +proto.irismod.farm.MsgHarvestResponse.prototype.setRewardList = 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.irismod.farm.MsgHarvestResponse.prototype.addReward = 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.irismod.farm.MsgHarvestResponse} returns this + */ +proto.irismod.farm.MsgHarvestResponse.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/dist/src/types/proto-types/irismod/mt/genesis_pb.js b/dist/src/types/proto-types/irismod/mt/genesis_pb.js new file mode 100644 index 00000000..ffda865f --- /dev/null +++ b/dist/src/types/proto-types/irismod/mt/genesis_pb.js @@ -0,0 +1,911 @@ +// source: irismod/mt/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var irismod_mt_mt_pb = require('../../irismod/mt/mt_pb.js'); +goog.object.extend(proto, irismod_mt_mt_pb); +goog.exportSymbol('proto.irismod.mt.Collection', null, global); +goog.exportSymbol('proto.irismod.mt.DenomBalance', null, global); +goog.exportSymbol('proto.irismod.mt.GenesisState', null, global); +goog.exportSymbol('proto.irismod.mt.Owner', 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.irismod.mt.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.GenesisState.displayName = 'proto.irismod.mt.GenesisState'; +} +/** + * 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.irismod.mt.Collection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.Collection.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.Collection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Collection.displayName = 'proto.irismod.mt.Collection'; +} +/** + * 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.irismod.mt.Owner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.Owner.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.Owner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Owner.displayName = 'proto.irismod.mt.Owner'; +} +/** + * 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.irismod.mt.DenomBalance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.DenomBalance.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.DenomBalance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.DenomBalance.displayName = 'proto.irismod.mt.DenomBalance'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.GenesisState.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_, 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.irismod.mt.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.GenesisState.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.irismod.mt.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + collectionsList: jspb.Message.toObjectList(msg.getCollectionsList(), + proto.irismod.mt.Collection.toObject, includeInstance), + ownersList: jspb.Message.toObjectList(msg.getOwnersList(), + proto.irismod.mt.Owner.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.irismod.mt.GenesisState} + */ +proto.irismod.mt.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.GenesisState; + return proto.irismod.mt.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.GenesisState} + */ +proto.irismod.mt.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.mt.Collection; + reader.readMessage(value,proto.irismod.mt.Collection.deserializeBinaryFromReader); + msg.addCollections(value); + break; + case 2: + var value = new proto.irismod.mt.Owner; + reader.readMessage(value,proto.irismod.mt.Owner.deserializeBinaryFromReader); + msg.addOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.mt.Collection.serializeBinaryToWriter + ); + } + f = message.getOwnersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.mt.Owner.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Collection collections = 1; + * @return {!Array} + */ +proto.irismod.mt.GenesisState.prototype.getCollectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.mt.Collection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.GenesisState} returns this +*/ +proto.irismod.mt.GenesisState.prototype.setCollectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.Collection=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Collection} + */ +proto.irismod.mt.GenesisState.prototype.addCollections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.Collection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.GenesisState} returns this + */ +proto.irismod.mt.GenesisState.prototype.clearCollectionsList = function() { + return this.setCollectionsList([]); +}; + + +/** + * repeated Owner owners = 2; + * @return {!Array} + */ +proto.irismod.mt.GenesisState.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.mt.Owner, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.GenesisState} returns this +*/ +proto.irismod.mt.GenesisState.prototype.setOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.Owner=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Owner} + */ +proto.irismod.mt.GenesisState.prototype.addOwners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.Owner, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.GenesisState} returns this + */ +proto.irismod.mt.GenesisState.prototype.clearOwnersList = function() { + return this.setOwnersList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.Collection.repeatedFields_ = [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_, 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.irismod.mt.Collection.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Collection.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.irismod.mt.Collection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Collection.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && irismod_mt_mt_pb.Denom.toObject(includeInstance, f), + mtsList: jspb.Message.toObjectList(msg.getMtsList(), + irismod_mt_mt_pb.MT.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.irismod.mt.Collection} + */ +proto.irismod.mt.Collection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Collection; + return proto.irismod.mt.Collection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Collection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Collection} + */ +proto.irismod.mt.Collection.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Denom; + reader.readMessage(value,irismod_mt_mt_pb.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + case 2: + var value = new irismod_mt_mt_pb.MT; + reader.readMessage(value,irismod_mt_mt_pb.MT.deserializeBinaryFromReader); + msg.addMts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Collection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Collection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Collection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Collection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_mt_mt_pb.Denom.serializeBinaryToWriter + ); + } + f = message.getMtsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_mt_mt_pb.MT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.mt.Denom} + */ +proto.irismod.mt.Collection.prototype.getDenom = function() { + return /** @type{?proto.irismod.mt.Denom} */ ( + jspb.Message.getWrapperField(this, irismod_mt_mt_pb.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.mt.Denom|undefined} value + * @return {!proto.irismod.mt.Collection} returns this +*/ +proto.irismod.mt.Collection.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.Collection} returns this + */ +proto.irismod.mt.Collection.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.Collection.prototype.hasDenom = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated MT mts = 2; + * @return {!Array} + */ +proto.irismod.mt.Collection.prototype.getMtsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.MT, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.Collection} returns this +*/ +proto.irismod.mt.Collection.prototype.setMtsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.MT=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.Collection.prototype.addMts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.MT, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.Collection} returns this + */ +proto.irismod.mt.Collection.prototype.clearMtsList = function() { + return this.setMtsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.Owner.repeatedFields_ = [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_, 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.irismod.mt.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Owner.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.irismod.mt.Owner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Owner.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomsList: jspb.Message.toObjectList(msg.getDenomsList(), + proto.irismod.mt.DenomBalance.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.irismod.mt.Owner} + */ +proto.irismod.mt.Owner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Owner; + return proto.irismod.mt.Owner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Owner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Owner} + */ +proto.irismod.mt.Owner.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.setAddress(value); + break; + case 2: + var value = new proto.irismod.mt.DenomBalance; + reader.readMessage(value,proto.irismod.mt.DenomBalance.deserializeBinaryFromReader); + msg.addDenoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Owner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Owner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Owner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Owner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.mt.DenomBalance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.mt.Owner.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Owner} returns this + */ +proto.irismod.mt.Owner.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated DenomBalance denoms = 2; + * @return {!Array} + */ +proto.irismod.mt.Owner.prototype.getDenomsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.mt.DenomBalance, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.Owner} returns this +*/ +proto.irismod.mt.Owner.prototype.setDenomsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.DenomBalance=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.DenomBalance} + */ +proto.irismod.mt.Owner.prototype.addDenoms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.DenomBalance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.Owner} returns this + */ +proto.irismod.mt.Owner.prototype.clearDenomsList = function() { + return this.setDenomsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.DenomBalance.repeatedFields_ = [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_, 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.irismod.mt.DenomBalance.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.DenomBalance.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.irismod.mt.DenomBalance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.DenomBalance.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + balancesList: jspb.Message.toObjectList(msg.getBalancesList(), + irismod_mt_mt_pb.Balance.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.irismod.mt.DenomBalance} + */ +proto.irismod.mt.DenomBalance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.DenomBalance; + return proto.irismod.mt.DenomBalance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.DenomBalance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.DenomBalance} + */ +proto.irismod.mt.DenomBalance.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.setDenomId(value); + break; + case 2: + var value = new irismod_mt_mt_pb.Balance; + reader.readMessage(value,irismod_mt_mt_pb.Balance.deserializeBinaryFromReader); + msg.addBalances(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.DenomBalance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.DenomBalance.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.DenomBalance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.DenomBalance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_mt_mt_pb.Balance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.DenomBalance.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.DenomBalance} returns this + */ +proto.irismod.mt.DenomBalance.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Balance balances = 2; + * @return {!Array} + */ +proto.irismod.mt.DenomBalance.prototype.getBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.Balance, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.DenomBalance} returns this +*/ +proto.irismod.mt.DenomBalance.prototype.setBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Balance} + */ +proto.irismod.mt.DenomBalance.prototype.addBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.DenomBalance} returns this + */ +proto.irismod.mt.DenomBalance.prototype.clearBalancesList = function() { + return this.setBalancesList([]); +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/dist/src/types/proto-types/irismod/mt/mt_pb.js b/dist/src/types/proto-types/irismod/mt/mt_pb.js new file mode 100644 index 00000000..dd248373 --- /dev/null +++ b/dist/src/types/proto-types/irismod/mt/mt_pb.js @@ -0,0 +1,701 @@ +// source: irismod/mt/mt.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.mt.Balance', null, global); +goog.exportSymbol('proto.irismod.mt.Denom', null, global); +goog.exportSymbol('proto.irismod.mt.MT', 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.irismod.mt.Denom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.Denom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Denom.displayName = 'proto.irismod.mt.Denom'; +} +/** + * 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.irismod.mt.MT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MT.displayName = 'proto.irismod.mt.MT'; +} +/** + * 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.irismod.mt.Balance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.Balance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Balance.displayName = 'proto.irismod.mt.Balance'; +} + + + +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_, 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.irismod.mt.Denom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Denom.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.irismod.mt.Denom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Denom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64(), + owner: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.Denom} + */ +proto.irismod.mt.Denom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Denom; + return proto.irismod.mt.Denom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Denom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Denom} + */ +proto.irismod.mt.Denom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Denom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Denom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Denom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Denom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.Denom.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.Denom.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.mt.MT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MT.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.irismod.mt.MT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + supply: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.MT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MT; + return proto.irismod.mt.MT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.MT.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.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSupply(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSupply(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MT} returns this + */ +proto.irismod.mt.MT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 supply = 2; + * @return {number} + */ +proto.irismod.mt.MT.prototype.getSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MT} returns this + */ +proto.irismod.mt.MT.prototype.setSupply = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MT.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MT.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MT.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MT} returns this + */ +proto.irismod.mt.MT.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, 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_, 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.irismod.mt.Balance.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Balance.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.irismod.mt.Balance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Balance.toObject = function(includeInstance, msg) { + var f, obj = { + mtId: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 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.irismod.mt.Balance} + */ +proto.irismod.mt.Balance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Balance; + return proto.irismod.mt.Balance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Balance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Balance} + */ +proto.irismod.mt.Balance.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.setMtId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Balance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Balance.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Balance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Balance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMtId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string mt_id = 1; + * @return {string} + */ +proto.irismod.mt.Balance.prototype.getMtId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Balance} returns this + */ +proto.irismod.mt.Balance.prototype.setMtId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.irismod.mt.Balance.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.Balance} returns this + */ +proto.irismod.mt.Balance.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/dist/src/types/proto-types/irismod/mt/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/mt/query_grpc_web_pb.js new file mode 100644 index 00000000..1bee991a --- /dev/null +++ b/dist/src/types/proto-types/irismod/mt/query_grpc_web_pb.js @@ -0,0 +1,643 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.mt + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_mt_mt_pb = require('../../irismod/mt/mt_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.mt = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QuerySupplyRequest, + * !proto.irismod.mt.QuerySupplyResponse>} + */ +const methodDescriptor_Query_Supply = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Supply', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QuerySupplyRequest, + proto.irismod.mt.QuerySupplyResponse, + /** + * @param {!proto.irismod.mt.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QuerySupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QuerySupplyRequest, + * !proto.irismod.mt.QuerySupplyResponse>} + */ +const methodInfo_Query_Supply = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QuerySupplyResponse, + /** + * @param {!proto.irismod.mt.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QuerySupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QuerySupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.supply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.supply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryDenomsRequest, + * !proto.irismod.mt.QueryDenomsResponse>} + */ +const methodDescriptor_Query_Denoms = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Denoms', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryDenomsRequest, + proto.irismod.mt.QueryDenomsResponse, + /** + * @param {!proto.irismod.mt.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryDenomsRequest, + * !proto.irismod.mt.QueryDenomsResponse>} + */ +const methodInfo_Query_Denoms = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryDenomsResponse, + /** + * @param {!proto.irismod.mt.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryDenomsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.denoms = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.denoms = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryDenomRequest, + * !proto.irismod.mt.QueryDenomResponse>} + */ +const methodDescriptor_Query_Denom = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Denom', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryDenomRequest, + proto.irismod.mt.QueryDenomResponse, + /** + * @param {!proto.irismod.mt.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryDenomRequest, + * !proto.irismod.mt.QueryDenomResponse>} + */ +const methodInfo_Query_Denom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryDenomResponse, + /** + * @param {!proto.irismod.mt.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.denom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.denom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryMTSupplyRequest, + * !proto.irismod.mt.QueryMTSupplyResponse>} + */ +const methodDescriptor_Query_MTSupply = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/MTSupply', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryMTSupplyRequest, + proto.irismod.mt.QueryMTSupplyResponse, + /** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTSupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryMTSupplyRequest, + * !proto.irismod.mt.QueryMTSupplyResponse>} + */ +const methodInfo_Query_MTSupply = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryMTSupplyResponse, + /** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTSupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryMTSupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.mTSupply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/MTSupply', + request, + metadata || {}, + methodDescriptor_Query_MTSupply, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.mTSupply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/MTSupply', + request, + metadata || {}, + methodDescriptor_Query_MTSupply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryMTsRequest, + * !proto.irismod.mt.QueryMTsResponse>} + */ +const methodDescriptor_Query_MTs = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/MTs', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryMTsRequest, + proto.irismod.mt.QueryMTsResponse, + /** + * @param {!proto.irismod.mt.QueryMTsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryMTsRequest, + * !proto.irismod.mt.QueryMTsResponse>} + */ +const methodInfo_Query_MTs = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryMTsResponse, + /** + * @param {!proto.irismod.mt.QueryMTsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryMTsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryMTsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.mTs = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/MTs', + request, + metadata || {}, + methodDescriptor_Query_MTs, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryMTsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.mTs = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/MTs', + request, + metadata || {}, + methodDescriptor_Query_MTs); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryMTRequest, + * !proto.irismod.mt.QueryMTResponse>} + */ +const methodDescriptor_Query_MT = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/MT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryMTRequest, + proto.irismod.mt.QueryMTResponse, + /** + * @param {!proto.irismod.mt.QueryMTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryMTRequest, + * !proto.irismod.mt.QueryMTResponse>} + */ +const methodInfo_Query_MT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryMTResponse, + /** + * @param {!proto.irismod.mt.QueryMTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryMTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.mT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/MT', + request, + metadata || {}, + methodDescriptor_Query_MT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryMTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.mT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/MT', + request, + metadata || {}, + methodDescriptor_Query_MT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryBalancesRequest, + * !proto.irismod.mt.QueryBalancesResponse>} + */ +const methodDescriptor_Query_Balances = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Balances', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryBalancesRequest, + proto.irismod.mt.QueryBalancesResponse, + /** + * @param {!proto.irismod.mt.QueryBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryBalancesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryBalancesRequest, + * !proto.irismod.mt.QueryBalancesResponse>} + */ +const methodInfo_Query_Balances = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryBalancesResponse, + /** + * @param {!proto.irismod.mt.QueryBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryBalancesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryBalancesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.balances = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Balances', + request, + metadata || {}, + methodDescriptor_Query_Balances, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.balances = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Balances', + request, + metadata || {}, + methodDescriptor_Query_Balances); +}; + + +module.exports = proto.irismod.mt; + diff --git a/dist/src/types/proto-types/irismod/mt/query_pb.js b/dist/src/types/proto-types/irismod/mt/query_pb.js new file mode 100644 index 00000000..27adbdf5 --- /dev/null +++ b/dist/src/types/proto-types/irismod/mt/query_pb.js @@ -0,0 +1,2679 @@ +// source: irismod/mt/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 irismod_mt_mt_pb = require('../../irismod/mt/mt_pb.js'); +goog.object.extend(proto, irismod_mt_mt_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.irismod.mt.QueryBalancesRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryBalancesResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomsRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomsResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTSupplyRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTSupplyResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTsRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTsResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QuerySupplyRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QuerySupplyResponse', 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.irismod.mt.QuerySupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QuerySupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QuerySupplyRequest.displayName = 'proto.irismod.mt.QuerySupplyRequest'; +} +/** + * 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.irismod.mt.QuerySupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QuerySupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QuerySupplyResponse.displayName = 'proto.irismod.mt.QuerySupplyResponse'; +} +/** + * 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.irismod.mt.QueryDenomsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomsRequest.displayName = 'proto.irismod.mt.QueryDenomsRequest'; +} +/** + * 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.irismod.mt.QueryDenomsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.QueryDenomsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomsResponse.displayName = 'proto.irismod.mt.QueryDenomsResponse'; +} +/** + * 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.irismod.mt.QueryDenomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomRequest.displayName = 'proto.irismod.mt.QueryDenomRequest'; +} +/** + * 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.irismod.mt.QueryDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomResponse.displayName = 'proto.irismod.mt.QueryDenomResponse'; +} +/** + * 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.irismod.mt.QueryMTSupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTSupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTSupplyRequest.displayName = 'proto.irismod.mt.QueryMTSupplyRequest'; +} +/** + * 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.irismod.mt.QueryMTSupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTSupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTSupplyResponse.displayName = 'proto.irismod.mt.QueryMTSupplyResponse'; +} +/** + * 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.irismod.mt.QueryMTsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTsRequest.displayName = 'proto.irismod.mt.QueryMTsRequest'; +} +/** + * 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.irismod.mt.QueryMTsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.QueryMTsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.QueryMTsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTsResponse.displayName = 'proto.irismod.mt.QueryMTsResponse'; +} +/** + * 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.irismod.mt.QueryMTRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTRequest.displayName = 'proto.irismod.mt.QueryMTRequest'; +} +/** + * 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.irismod.mt.QueryMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTResponse.displayName = 'proto.irismod.mt.QueryMTResponse'; +} +/** + * 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.irismod.mt.QueryBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryBalancesRequest.displayName = 'proto.irismod.mt.QueryBalancesRequest'; +} +/** + * 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.irismod.mt.QueryBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.QueryBalancesResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.QueryBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryBalancesResponse.displayName = 'proto.irismod.mt.QueryBalancesResponse'; +} + + + +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_, 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.irismod.mt.QuerySupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QuerySupplyRequest.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.irismod.mt.QuerySupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.mt.QuerySupplyRequest} + */ +proto.irismod.mt.QuerySupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QuerySupplyRequest; + return proto.irismod.mt.QuerySupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QuerySupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QuerySupplyRequest} + */ +proto.irismod.mt.QuerySupplyRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QuerySupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QuerySupplyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QuerySupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QuerySupplyRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QuerySupplyRequest} returns this + */ +proto.irismod.mt.QuerySupplyRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.mt.QuerySupplyRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QuerySupplyRequest} returns this + */ +proto.irismod.mt.QuerySupplyRequest.prototype.setOwner = 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_, 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.irismod.mt.QuerySupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QuerySupplyResponse.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.irismod.mt.QuerySupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 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.irismod.mt.QuerySupplyResponse} + */ +proto.irismod.mt.QuerySupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QuerySupplyResponse; + return proto.irismod.mt.QuerySupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QuerySupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QuerySupplyResponse} + */ +proto.irismod.mt.QuerySupplyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QuerySupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QuerySupplyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QuerySupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.irismod.mt.QuerySupplyResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.QuerySupplyResponse} returns this + */ +proto.irismod.mt.QuerySupplyResponse.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.mt.QueryDenomsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomsRequest.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.irismod.mt.QueryDenomsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsRequest.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.irismod.mt.QueryDenomsRequest} + */ +proto.irismod.mt.QueryDenomsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomsRequest; + return proto.irismod.mt.QueryDenomsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomsRequest} + */ +proto.irismod.mt.QueryDenomsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryDenomsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.mt.QueryDenomsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.mt.QueryDenomsRequest} returns this +*/ +proto.irismod.mt.QueryDenomsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryDenomsRequest} returns this + */ +proto.irismod.mt.QueryDenomsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryDenomsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.QueryDenomsResponse.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_, 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.irismod.mt.QueryDenomsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomsResponse.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.irismod.mt.QueryDenomsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomsList: jspb.Message.toObjectList(msg.getDenomsList(), + irismod_mt_mt_pb.Denom.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.irismod.mt.QueryDenomsResponse} + */ +proto.irismod.mt.QueryDenomsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomsResponse; + return proto.irismod.mt.QueryDenomsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomsResponse} + */ +proto.irismod.mt.QueryDenomsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Denom; + reader.readMessage(value,irismod_mt_mt_pb.Denom.deserializeBinaryFromReader); + msg.addDenoms(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.irismod.mt.QueryDenomsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_mt_mt_pb.Denom.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Denom denoms = 1; + * @return {!Array} + */ +proto.irismod.mt.QueryDenomsResponse.prototype.getDenomsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.Denom, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.QueryDenomsResponse} returns this +*/ +proto.irismod.mt.QueryDenomsResponse.prototype.setDenomsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.Denom=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Denom} + */ +proto.irismod.mt.QueryDenomsResponse.prototype.addDenoms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.Denom, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.QueryDenomsResponse} returns this + */ +proto.irismod.mt.QueryDenomsResponse.prototype.clearDenomsList = function() { + return this.setDenomsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.mt.QueryDenomsResponse.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.irismod.mt.QueryDenomsResponse} returns this +*/ +proto.irismod.mt.QueryDenomsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryDenomsResponse} returns this + */ +proto.irismod.mt.QueryDenomsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryDenomsResponse.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_, 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.irismod.mt.QueryDenomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomRequest.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.irismod.mt.QueryDenomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.QueryDenomRequest} + */ +proto.irismod.mt.QueryDenomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomRequest; + return proto.irismod.mt.QueryDenomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomRequest} + */ +proto.irismod.mt.QueryDenomRequest.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.setDenomId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryDenomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryDenomRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryDenomRequest} returns this + */ +proto.irismod.mt.QueryDenomRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.mt.QueryDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomResponse.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.irismod.mt.QueryDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && irismod_mt_mt_pb.Denom.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.irismod.mt.QueryDenomResponse} + */ +proto.irismod.mt.QueryDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomResponse; + return proto.irismod.mt.QueryDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomResponse} + */ +proto.irismod.mt.QueryDenomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Denom; + reader.readMessage(value,irismod_mt_mt_pb.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_mt_mt_pb.Denom.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.mt.Denom} + */ +proto.irismod.mt.QueryDenomResponse.prototype.getDenom = function() { + return /** @type{?proto.irismod.mt.Denom} */ ( + jspb.Message.getWrapperField(this, irismod_mt_mt_pb.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.mt.Denom|undefined} value + * @return {!proto.irismod.mt.QueryDenomResponse} returns this +*/ +proto.irismod.mt.QueryDenomResponse.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryDenomResponse} returns this + */ +proto.irismod.mt.QueryDenomResponse.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryDenomResponse.prototype.hasDenom = 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_, 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.irismod.mt.QueryMTSupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTSupplyRequest.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.irismod.mt.QueryMTSupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + mtId: 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.irismod.mt.QueryMTSupplyRequest} + */ +proto.irismod.mt.QueryMTSupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTSupplyRequest; + return proto.irismod.mt.QueryMTSupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTSupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTSupplyRequest} + */ +proto.irismod.mt.QueryMTSupplyRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMtId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTSupplyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTSupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMtId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTSupplyRequest} returns this + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mt_id = 2; + * @return {string} + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.getMtId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTSupplyRequest} returns this + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.setMtId = 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_, 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.irismod.mt.QueryMTSupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTSupplyResponse.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.irismod.mt.QueryMTSupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 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.irismod.mt.QueryMTSupplyResponse} + */ +proto.irismod.mt.QueryMTSupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTSupplyResponse; + return proto.irismod.mt.QueryMTSupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTSupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTSupplyResponse} + */ +proto.irismod.mt.QueryMTSupplyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTSupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTSupplyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTSupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.irismod.mt.QueryMTSupplyResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.QueryMTSupplyResponse} returns this + */ +proto.irismod.mt.QueryMTSupplyResponse.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.mt.QueryMTsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTsRequest.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.irismod.mt.QueryMTsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: 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.irismod.mt.QueryMTsRequest} + */ +proto.irismod.mt.QueryMTsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTsRequest; + return proto.irismod.mt.QueryMTsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTsRequest} + */ +proto.irismod.mt.QueryMTsRequest.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.setDenomId(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.irismod.mt.QueryMTsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + 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 denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryMTsRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTsRequest} returns this + */ +proto.irismod.mt.QueryMTsRequest.prototype.setDenomId = 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.irismod.mt.QueryMTsRequest.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.irismod.mt.QueryMTsRequest} returns this +*/ +proto.irismod.mt.QueryMTsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryMTsRequest} returns this + */ +proto.irismod.mt.QueryMTsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryMTsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.QueryMTsResponse.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_, 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.irismod.mt.QueryMTsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTsResponse.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.irismod.mt.QueryMTsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mtsList: jspb.Message.toObjectList(msg.getMtsList(), + irismod_mt_mt_pb.MT.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.irismod.mt.QueryMTsResponse} + */ +proto.irismod.mt.QueryMTsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTsResponse; + return proto.irismod.mt.QueryMTsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTsResponse} + */ +proto.irismod.mt.QueryMTsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.MT; + reader.readMessage(value,irismod_mt_mt_pb.MT.deserializeBinaryFromReader); + msg.addMts(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.irismod.mt.QueryMTsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMtsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_mt_mt_pb.MT.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MT mts = 1; + * @return {!Array} + */ +proto.irismod.mt.QueryMTsResponse.prototype.getMtsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.MT, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.QueryMTsResponse} returns this +*/ +proto.irismod.mt.QueryMTsResponse.prototype.setMtsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.MT=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.QueryMTsResponse.prototype.addMts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.MT, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.QueryMTsResponse} returns this + */ +proto.irismod.mt.QueryMTsResponse.prototype.clearMtsList = function() { + return this.setMtsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.mt.QueryMTsResponse.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.irismod.mt.QueryMTsResponse} returns this +*/ +proto.irismod.mt.QueryMTsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryMTsResponse} returns this + */ +proto.irismod.mt.QueryMTsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryMTsResponse.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_, 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.irismod.mt.QueryMTRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTRequest.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.irismod.mt.QueryMTRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + mtId: 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.irismod.mt.QueryMTRequest} + */ +proto.irismod.mt.QueryMTRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTRequest; + return proto.irismod.mt.QueryMTRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTRequest} + */ +proto.irismod.mt.QueryMTRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMtId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMtId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryMTRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTRequest} returns this + */ +proto.irismod.mt.QueryMTRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mt_id = 2; + * @return {string} + */ +proto.irismod.mt.QueryMTRequest.prototype.getMtId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTRequest} returns this + */ +proto.irismod.mt.QueryMTRequest.prototype.setMtId = 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_, 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.irismod.mt.QueryMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTResponse.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.irismod.mt.QueryMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mt: (f = msg.getMt()) && irismod_mt_mt_pb.MT.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.irismod.mt.QueryMTResponse} + */ +proto.irismod.mt.QueryMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTResponse; + return proto.irismod.mt.QueryMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTResponse} + */ +proto.irismod.mt.QueryMTResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.MT; + reader.readMessage(value,irismod_mt_mt_pb.MT.deserializeBinaryFromReader); + msg.setMt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMt(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_mt_mt_pb.MT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional MT mt = 1; + * @return {?proto.irismod.mt.MT} + */ +proto.irismod.mt.QueryMTResponse.prototype.getMt = function() { + return /** @type{?proto.irismod.mt.MT} */ ( + jspb.Message.getWrapperField(this, irismod_mt_mt_pb.MT, 1)); +}; + + +/** + * @param {?proto.irismod.mt.MT|undefined} value + * @return {!proto.irismod.mt.QueryMTResponse} returns this +*/ +proto.irismod.mt.QueryMTResponse.prototype.setMt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryMTResponse} returns this + */ +proto.irismod.mt.QueryMTResponse.prototype.clearMt = function() { + return this.setMt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryMTResponse.prototype.hasMt = 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_, 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.irismod.mt.QueryBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryBalancesRequest.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.irismod.mt.QueryBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.irismod.mt.QueryBalancesRequest} + */ +proto.irismod.mt.QueryBalancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryBalancesRequest; + return proto.irismod.mt.QueryBalancesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryBalancesRequest} + */ +proto.irismod.mt.QueryBalancesRequest.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.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + 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.irismod.mt.QueryBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryBalancesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this + */ +proto.irismod.mt.QueryBalancesRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this + */ +proto.irismod.mt.QueryBalancesRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this +*/ +proto.irismod.mt.QueryBalancesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this + */ +proto.irismod.mt.QueryBalancesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.QueryBalancesResponse.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_, 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.irismod.mt.QueryBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryBalancesResponse.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.irismod.mt.QueryBalancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + balanceList: jspb.Message.toObjectList(msg.getBalanceList(), + irismod_mt_mt_pb.Balance.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.irismod.mt.QueryBalancesResponse} + */ +proto.irismod.mt.QueryBalancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryBalancesResponse; + return proto.irismod.mt.QueryBalancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryBalancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryBalancesResponse} + */ +proto.irismod.mt.QueryBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Balance; + reader.readMessage(value,irismod_mt_mt_pb.Balance.deserializeBinaryFromReader); + msg.addBalance(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.irismod.mt.QueryBalancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryBalancesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryBalancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalanceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_mt_mt_pb.Balance.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Balance balance = 1; + * @return {!Array} + */ +proto.irismod.mt.QueryBalancesResponse.prototype.getBalanceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.Balance, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.QueryBalancesResponse} returns this +*/ +proto.irismod.mt.QueryBalancesResponse.prototype.setBalanceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Balance} + */ +proto.irismod.mt.QueryBalancesResponse.prototype.addBalance = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.QueryBalancesResponse} returns this + */ +proto.irismod.mt.QueryBalancesResponse.prototype.clearBalanceList = function() { + return this.setBalanceList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.mt.QueryBalancesResponse.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.irismod.mt.QueryBalancesResponse} returns this +*/ +proto.irismod.mt.QueryBalancesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryBalancesResponse} returns this + */ +proto.irismod.mt.QueryBalancesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryBalancesResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/dist/src/types/proto-types/irismod/mt/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/mt/tx_grpc_web_pb.js new file mode 100644 index 00000000..771a8329 --- /dev/null +++ b/dist/src/types/proto-types/irismod/mt/tx_grpc_web_pb.js @@ -0,0 +1,557 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.mt + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.mt = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgIssueDenom, + * !proto.irismod.mt.MsgIssueDenomResponse>} + */ +const methodDescriptor_Msg_IssueDenom = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/IssueDenom', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgIssueDenom, + proto.irismod.mt.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.mt.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgIssueDenom, + * !proto.irismod.mt.MsgIssueDenomResponse>} + */ +const methodInfo_Msg_IssueDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.mt.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgIssueDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.issueDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.issueDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgTransferDenom, + * !proto.irismod.mt.MsgTransferDenomResponse>} + */ +const methodDescriptor_Msg_TransferDenom = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/TransferDenom', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgTransferDenom, + proto.irismod.mt.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.mt.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgTransferDenom, + * !proto.irismod.mt.MsgTransferDenomResponse>} + */ +const methodInfo_Msg_TransferDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.mt.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgTransferDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.transferDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.transferDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgMintMT, + * !proto.irismod.mt.MsgMintMTResponse>} + */ +const methodDescriptor_Msg_MintMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/MintMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgMintMT, + proto.irismod.mt.MsgMintMTResponse, + /** + * @param {!proto.irismod.mt.MsgMintMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgMintMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgMintMT, + * !proto.irismod.mt.MsgMintMTResponse>} + */ +const methodInfo_Msg_MintMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgMintMTResponse, + /** + * @param {!proto.irismod.mt.MsgMintMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgMintMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgMintMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgMintMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.mintMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/MintMT', + request, + metadata || {}, + methodDescriptor_Msg_MintMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgMintMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.mintMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/MintMT', + request, + metadata || {}, + methodDescriptor_Msg_MintMT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgEditMT, + * !proto.irismod.mt.MsgEditMTResponse>} + */ +const methodDescriptor_Msg_EditMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/EditMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgEditMT, + proto.irismod.mt.MsgEditMTResponse, + /** + * @param {!proto.irismod.mt.MsgEditMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgEditMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgEditMT, + * !proto.irismod.mt.MsgEditMTResponse>} + */ +const methodInfo_Msg_EditMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgEditMTResponse, + /** + * @param {!proto.irismod.mt.MsgEditMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgEditMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgEditMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgEditMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.editMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/EditMT', + request, + metadata || {}, + methodDescriptor_Msg_EditMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgEditMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.editMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/EditMT', + request, + metadata || {}, + methodDescriptor_Msg_EditMT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgTransferMT, + * !proto.irismod.mt.MsgTransferMTResponse>} + */ +const methodDescriptor_Msg_TransferMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/TransferMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgTransferMT, + proto.irismod.mt.MsgTransferMTResponse, + /** + * @param {!proto.irismod.mt.MsgTransferMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgTransferMT, + * !proto.irismod.mt.MsgTransferMTResponse>} + */ +const methodInfo_Msg_TransferMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgTransferMTResponse, + /** + * @param {!proto.irismod.mt.MsgTransferMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgTransferMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgTransferMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.transferMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/TransferMT', + request, + metadata || {}, + methodDescriptor_Msg_TransferMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgTransferMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.transferMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/TransferMT', + request, + metadata || {}, + methodDescriptor_Msg_TransferMT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgBurnMT, + * !proto.irismod.mt.MsgBurnMTResponse>} + */ +const methodDescriptor_Msg_BurnMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/BurnMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgBurnMT, + proto.irismod.mt.MsgBurnMTResponse, + /** + * @param {!proto.irismod.mt.MsgBurnMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgBurnMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgBurnMT, + * !proto.irismod.mt.MsgBurnMTResponse>} + */ +const methodInfo_Msg_BurnMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgBurnMTResponse, + /** + * @param {!proto.irismod.mt.MsgBurnMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgBurnMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgBurnMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgBurnMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.burnMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/BurnMT', + request, + metadata || {}, + methodDescriptor_Msg_BurnMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgBurnMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.burnMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/BurnMT', + request, + metadata || {}, + methodDescriptor_Msg_BurnMT); +}; + + +module.exports = proto.irismod.mt; + diff --git a/dist/src/types/proto-types/irismod/mt/tx_pb.js b/dist/src/types/proto-types/irismod/mt/tx_pb.js new file mode 100644 index 00000000..33597694 --- /dev/null +++ b/dist/src/types/proto-types/irismod/mt/tx_pb.js @@ -0,0 +1,2309 @@ +// source: irismod/mt/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.mt.MsgBurnMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgBurnMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgEditMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgEditMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgIssueDenom', null, global); +goog.exportSymbol('proto.irismod.mt.MsgIssueDenomResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgMintMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgMintMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferDenom', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferDenomResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferMTResponse', 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.irismod.mt.MsgIssueDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgIssueDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgIssueDenom.displayName = 'proto.irismod.mt.MsgIssueDenom'; +} +/** + * 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.irismod.mt.MsgIssueDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgIssueDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgIssueDenomResponse.displayName = 'proto.irismod.mt.MsgIssueDenomResponse'; +} +/** + * 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.irismod.mt.MsgTransferDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferDenom.displayName = 'proto.irismod.mt.MsgTransferDenom'; +} +/** + * 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.irismod.mt.MsgTransferDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferDenomResponse.displayName = 'proto.irismod.mt.MsgTransferDenomResponse'; +} +/** + * 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.irismod.mt.MsgMintMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgMintMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgMintMT.displayName = 'proto.irismod.mt.MsgMintMT'; +} +/** + * 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.irismod.mt.MsgMintMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgMintMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgMintMTResponse.displayName = 'proto.irismod.mt.MsgMintMTResponse'; +} +/** + * 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.irismod.mt.MsgEditMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgEditMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgEditMT.displayName = 'proto.irismod.mt.MsgEditMT'; +} +/** + * 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.irismod.mt.MsgEditMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgEditMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgEditMTResponse.displayName = 'proto.irismod.mt.MsgEditMTResponse'; +} +/** + * 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.irismod.mt.MsgTransferMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferMT.displayName = 'proto.irismod.mt.MsgTransferMT'; +} +/** + * 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.irismod.mt.MsgTransferMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferMTResponse.displayName = 'proto.irismod.mt.MsgTransferMTResponse'; +} +/** + * 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.irismod.mt.MsgBurnMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgBurnMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgBurnMT.displayName = 'proto.irismod.mt.MsgBurnMT'; +} +/** + * 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.irismod.mt.MsgBurnMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgBurnMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgBurnMTResponse.displayName = 'proto.irismod.mt.MsgBurnMTResponse'; +} + + + +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_, 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.irismod.mt.MsgIssueDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgIssueDenom.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.irismod.mt.MsgIssueDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenom.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgIssueDenom} + */ +proto.irismod.mt.MsgIssueDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgIssueDenom; + return proto.irismod.mt.MsgIssueDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgIssueDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgIssueDenom} + */ +proto.irismod.mt.MsgIssueDenom.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.setName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgIssueDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgIssueDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgIssueDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgIssueDenom} returns this + */ +proto.irismod.mt.MsgIssueDenom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MsgIssueDenom} returns this + */ +proto.irismod.mt.MsgIssueDenom.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgIssueDenom} returns this + */ +proto.irismod.mt.MsgIssueDenom.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.mt.MsgIssueDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgIssueDenomResponse.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.irismod.mt.MsgIssueDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenomResponse.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.irismod.mt.MsgIssueDenomResponse} + */ +proto.irismod.mt.MsgIssueDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgIssueDenomResponse; + return proto.irismod.mt.MsgIssueDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgIssueDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgIssueDenomResponse} + */ +proto.irismod.mt.MsgIssueDenomResponse.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.irismod.mt.MsgIssueDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgIssueDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgIssueDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenomResponse.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_, 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.irismod.mt.MsgTransferDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferDenom.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.irismod.mt.MsgTransferDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + sender: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgTransferDenom} + */ +proto.irismod.mt.MsgTransferDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferDenom; + return proto.irismod.mt.MsgTransferDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferDenom} + */ +proto.irismod.mt.MsgTransferDenom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgTransferDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgTransferDenom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferDenom} returns this + */ +proto.irismod.mt.MsgTransferDenom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.irismod.mt.MsgTransferDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferDenom} returns this + */ +proto.irismod.mt.MsgTransferDenom.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.irismod.mt.MsgTransferDenom.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferDenom} returns this + */ +proto.irismod.mt.MsgTransferDenom.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.mt.MsgTransferDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferDenomResponse.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.irismod.mt.MsgTransferDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenomResponse.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.irismod.mt.MsgTransferDenomResponse} + */ +proto.irismod.mt.MsgTransferDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferDenomResponse; + return proto.irismod.mt.MsgTransferDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferDenomResponse} + */ +proto.irismod.mt.MsgTransferDenomResponse.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.irismod.mt.MsgTransferDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenomResponse.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_, 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.irismod.mt.MsgMintMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgMintMT.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.irismod.mt.MsgMintMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + data: msg.getData_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 5, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgMintMT} + */ +proto.irismod.mt.MsgMintMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgMintMT; + return proto.irismod.mt.MsgMintMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgMintMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgMintMT} + */ +proto.irismod.mt.MsgMintMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgMintMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgMintMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgMintMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {number} + */ +proto.irismod.mt.MsgMintMT.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes data = 4; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MsgMintMT.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes data = 4; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgMintMT.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional string sender = 5; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string recipient = 6; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 6, 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_, 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.irismod.mt.MsgMintMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgMintMTResponse.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.irismod.mt.MsgMintMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMTResponse.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.irismod.mt.MsgMintMTResponse} + */ +proto.irismod.mt.MsgMintMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgMintMTResponse; + return proto.irismod.mt.MsgMintMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgMintMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgMintMTResponse} + */ +proto.irismod.mt.MsgMintMTResponse.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.irismod.mt.MsgMintMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgMintMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgMintMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMTResponse.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_, 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.irismod.mt.MsgEditMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgEditMT.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.irismod.mt.MsgEditMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgEditMT} + */ +proto.irismod.mt.MsgEditMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgEditMT; + return proto.irismod.mt.MsgEditMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgEditMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgEditMT} + */ +proto.irismod.mt.MsgEditMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgEditMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgEditMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgEditMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MsgEditMT.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgEditMT.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.mt.MsgEditMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgEditMTResponse.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.irismod.mt.MsgEditMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMTResponse.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.irismod.mt.MsgEditMTResponse} + */ +proto.irismod.mt.MsgEditMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgEditMTResponse; + return proto.irismod.mt.MsgEditMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgEditMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgEditMTResponse} + */ +proto.irismod.mt.MsgEditMTResponse.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.irismod.mt.MsgEditMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgEditMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgEditMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMTResponse.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_, 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.irismod.mt.MsgTransferMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferMT.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.irismod.mt.MsgTransferMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + sender: jspb.Message.getFieldWithDefault(msg, 4, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgTransferMT} + */ +proto.irismod.mt.MsgTransferMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferMT; + return proto.irismod.mt.MsgTransferMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferMT} + */ +proto.irismod.mt.MsgTransferMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgTransferMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {number} + */ +proto.irismod.mt.MsgTransferMT.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string recipient = 5; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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_, 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.irismod.mt.MsgTransferMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferMTResponse.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.irismod.mt.MsgTransferMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMTResponse.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.irismod.mt.MsgTransferMTResponse} + */ +proto.irismod.mt.MsgTransferMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferMTResponse; + return proto.irismod.mt.MsgTransferMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferMTResponse} + */ +proto.irismod.mt.MsgTransferMTResponse.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.irismod.mt.MsgTransferMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMTResponse.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_, 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.irismod.mt.MsgBurnMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgBurnMT.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.irismod.mt.MsgBurnMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + sender: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgBurnMT} + */ +proto.irismod.mt.MsgBurnMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgBurnMT; + return proto.irismod.mt.MsgBurnMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgBurnMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgBurnMT} + */ +proto.irismod.mt.MsgBurnMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgBurnMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgBurnMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgBurnMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgBurnMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgBurnMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {number} + */ +proto.irismod.mt.MsgBurnMT.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.mt.MsgBurnMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.mt.MsgBurnMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgBurnMTResponse.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.irismod.mt.MsgBurnMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMTResponse.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.irismod.mt.MsgBurnMTResponse} + */ +proto.irismod.mt.MsgBurnMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgBurnMTResponse; + return proto.irismod.mt.MsgBurnMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgBurnMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgBurnMTResponse} + */ +proto.irismod.mt.MsgBurnMTResponse.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.irismod.mt.MsgBurnMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgBurnMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgBurnMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/dist/src/types/proto-types/irismod/nft/nft_pb.js b/dist/src/types/proto-types/irismod/nft/nft_pb.js index dedb84c0..f606d8f1 100644 --- a/dist/src/types/proto-types/irismod/nft/nft_pb.js +++ b/dist/src/types/proto-types/irismod/nft/nft_pb.js @@ -160,7 +160,8 @@ proto.irismod.nft.BaseNFT.toObject = function(includeInstance, msg) { name: jspb.Message.getFieldWithDefault(msg, 2, ""), uri: jspb.Message.getFieldWithDefault(msg, 3, ""), data: jspb.Message.getFieldWithDefault(msg, 4, ""), - owner: jspb.Message.getFieldWithDefault(msg, 5, "") + owner: jspb.Message.getFieldWithDefault(msg, 5, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -217,6 +218,10 @@ proto.irismod.nft.BaseNFT.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setOwner(value); break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -281,6 +286,13 @@ proto.irismod.nft.BaseNFT.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } }; @@ -374,6 +386,24 @@ proto.irismod.nft.BaseNFT.prototype.setOwner = function(value) { }; +/** + * optional string uri_hash = 6; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + @@ -409,7 +439,14 @@ proto.irismod.nft.Denom.toObject = function(includeInstance, msg) { id: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), schema: jspb.Message.getFieldWithDefault(msg, 3, ""), - creator: jspb.Message.getFieldWithDefault(msg, 4, "") + creator: jspb.Message.getFieldWithDefault(msg, 4, ""), + symbol: jspb.Message.getFieldWithDefault(msg, 5, ""), + mintRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + updateRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + description: jspb.Message.getFieldWithDefault(msg, 8, ""), + uri: jspb.Message.getFieldWithDefault(msg, 9, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 10, ""), + data: jspb.Message.getFieldWithDefault(msg, 11, "") }; if (includeInstance) { @@ -462,6 +499,34 @@ proto.irismod.nft.Denom.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setCreator(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintRestricted(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUpdateRestricted(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; default: reader.skipField(); break; @@ -519,6 +584,55 @@ proto.irismod.nft.Denom.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMintRestricted(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getUpdateRestricted(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } }; @@ -594,6 +708,132 @@ proto.irismod.nft.Denom.prototype.setCreator = function(value) { }; +/** + * optional string symbol = 5; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool mint_restricted = 6; + * @return {boolean} + */ +proto.irismod.nft.Denom.prototype.getMintRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setMintRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool update_restricted = 7; + * @return {boolean} + */ +proto.irismod.nft.Denom.prototype.getUpdateRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setUpdateRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string description = 8; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string uri = 9; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string uri_hash = 10; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string data = 11; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + /** * List of repeated fields within this message type. diff --git a/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js index 9d6e6643..fc203093 100644 --- a/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js @@ -21,6 +21,8 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') var google_api_annotations_pb = require('../../google/api/annotations_pb.js') var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') const proto = {}; proto.irismod = {}; proto.irismod.nft = require('./query_pb.js'); diff --git a/dist/src/types/proto-types/irismod/nft/query_pb.js b/dist/src/types/proto-types/irismod/nft/query_pb.js index aa45c68d..acd99cf0 100644 --- a/dist/src/types/proto-types/irismod/nft/query_pb.js +++ b/dist/src/types/proto-types/irismod/nft/query_pb.js @@ -18,6 +18,8 @@ var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js'); goog.object.extend(proto, irismod_nft_nft_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.irismod.nft.QueryCollectionRequest', null, global); goog.exportSymbol('proto.irismod.nft.QueryCollectionResponse', null, global); goog.exportSymbol('proto.irismod.nft.QueryDenomRequest', null, global); @@ -605,7 +607,8 @@ proto.irismod.nft.QueryOwnerRequest.prototype.toObject = function(opt_includeIns proto.irismod.nft.QueryOwnerRequest.toObject = function(includeInstance, msg) { var f, obj = { denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), - owner: jspb.Message.getFieldWithDefault(msg, 2, "") + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -650,6 +653,11 @@ proto.irismod.nft.QueryOwnerRequest.deserializeBinaryFromReader = function(msg, var value = /** @type {string} */ (reader.readString()); msg.setOwner(value); break; + case 3: + 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; @@ -693,6 +701,14 @@ proto.irismod.nft.QueryOwnerRequest.serializeBinaryToWriter = function(message, f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -732,6 +748,43 @@ proto.irismod.nft.QueryOwnerRequest.prototype.setOwner = function(value) { }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this +*/ +proto.irismod.nft.QueryOwnerRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this + */ +proto.irismod.nft.QueryOwnerRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + @@ -764,7 +817,8 @@ proto.irismod.nft.QueryOwnerResponse.prototype.toObject = function(opt_includeIn */ proto.irismod.nft.QueryOwnerResponse.toObject = function(includeInstance, msg) { var f, obj = { - owner: (f = msg.getOwner()) && irismod_nft_nft_pb.Owner.toObject(includeInstance, f) + owner: (f = msg.getOwner()) && irismod_nft_nft_pb.Owner.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -806,6 +860,11 @@ proto.irismod.nft.QueryOwnerResponse.deserializeBinaryFromReader = function(msg, reader.readMessage(value,irismod_nft_nft_pb.Owner.deserializeBinaryFromReader); msg.setOwner(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; @@ -843,6 +902,14 @@ proto.irismod.nft.QueryOwnerResponse.serializeBinaryToWriter = function(message, irismod_nft_nft_pb.Owner.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -883,6 +950,43 @@ proto.irismod.nft.QueryOwnerResponse.prototype.hasOwner = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.nft.QueryOwnerResponse.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.irismod.nft.QueryOwnerResponse} returns this +*/ +proto.irismod.nft.QueryOwnerResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryOwnerResponse} returns this + */ +proto.irismod.nft.QueryOwnerResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -915,7 +1019,8 @@ proto.irismod.nft.QueryCollectionRequest.prototype.toObject = function(opt_inclu */ proto.irismod.nft.QueryCollectionRequest.toObject = function(includeInstance, msg) { var f, obj = { - denomId: jspb.Message.getFieldWithDefault(msg, 1, "") + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -956,6 +1061,11 @@ proto.irismod.nft.QueryCollectionRequest.deserializeBinaryFromReader = function( var value = /** @type {string} */ (reader.readString()); msg.setDenomId(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; @@ -992,6 +1102,14 @@ proto.irismod.nft.QueryCollectionRequest.serializeBinaryToWriter = function(mess f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -1013,6 +1131,43 @@ proto.irismod.nft.QueryCollectionRequest.prototype.setDenomId = function(value) }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.nft.QueryCollectionRequest.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.irismod.nft.QueryCollectionRequest} returns this +*/ +proto.irismod.nft.QueryCollectionRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryCollectionRequest} returns this + */ +proto.irismod.nft.QueryCollectionRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryCollectionRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -1045,7 +1200,8 @@ proto.irismod.nft.QueryCollectionResponse.prototype.toObject = function(opt_incl */ proto.irismod.nft.QueryCollectionResponse.toObject = function(includeInstance, msg) { var f, obj = { - collection: (f = msg.getCollection()) && irismod_nft_nft_pb.Collection.toObject(includeInstance, f) + collection: (f = msg.getCollection()) && irismod_nft_nft_pb.Collection.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1087,6 +1243,11 @@ proto.irismod.nft.QueryCollectionResponse.deserializeBinaryFromReader = function reader.readMessage(value,irismod_nft_nft_pb.Collection.deserializeBinaryFromReader); msg.setCollection(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; @@ -1124,6 +1285,14 @@ proto.irismod.nft.QueryCollectionResponse.serializeBinaryToWriter = function(mes irismod_nft_nft_pb.Collection.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1164,6 +1333,43 @@ proto.irismod.nft.QueryCollectionResponse.prototype.hasCollection = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.nft.QueryCollectionResponse.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.irismod.nft.QueryCollectionResponse} returns this +*/ +proto.irismod.nft.QueryCollectionResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryCollectionResponse} returns this + */ +proto.irismod.nft.QueryCollectionResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -1477,7 +1683,7 @@ proto.irismod.nft.QueryDenomsRequest.prototype.toObject = function(opt_includeIn */ proto.irismod.nft.QueryDenomsRequest.toObject = function(includeInstance, msg) { var f, obj = { - + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -1514,6 +1720,11 @@ proto.irismod.nft.QueryDenomsRequest.deserializeBinaryFromReader = function(msg, } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -1543,6 +1754,51 @@ proto.irismod.nft.QueryDenomsRequest.prototype.serializeBinary = function() { */ proto.irismod.nft.QueryDenomsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.nft.QueryDenomsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.nft.QueryDenomsRequest} returns this +*/ +proto.irismod.nft.QueryDenomsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryDenomsRequest} returns this + */ +proto.irismod.nft.QueryDenomsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryDenomsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -1586,7 +1842,8 @@ proto.irismod.nft.QueryDenomsResponse.prototype.toObject = function(opt_includeI proto.irismod.nft.QueryDenomsResponse.toObject = function(includeInstance, msg) { var f, obj = { denomsList: jspb.Message.toObjectList(msg.getDenomsList(), - irismod_nft_nft_pb.Denom.toObject, includeInstance) + irismod_nft_nft_pb.Denom.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1628,6 +1885,11 @@ proto.irismod.nft.QueryDenomsResponse.deserializeBinaryFromReader = function(msg reader.readMessage(value,irismod_nft_nft_pb.Denom.deserializeBinaryFromReader); msg.addDenoms(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; @@ -1665,6 +1927,14 @@ proto.irismod.nft.QueryDenomsResponse.serializeBinaryToWriter = function(message irismod_nft_nft_pb.Denom.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1706,6 +1976,43 @@ proto.irismod.nft.QueryDenomsResponse.prototype.clearDenomsList = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.nft.QueryDenomsResponse.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.irismod.nft.QueryDenomsResponse} returns this +*/ +proto.irismod.nft.QueryDenomsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryDenomsResponse} returns this + */ +proto.irismod.nft.QueryDenomsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js index 06011161..a97453e9 100644 --- a/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js +++ b/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js @@ -473,5 +473,85 @@ proto.irismod.nft.MsgPromiseClient.prototype.burnNFT = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgTransferDenom, + * !proto.irismod.nft.MsgTransferDenomResponse>} + */ +const methodDescriptor_Msg_TransferDenom = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/TransferDenom', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgTransferDenom, + proto.irismod.nft.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.nft.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgTransferDenom, + * !proto.irismod.nft.MsgTransferDenomResponse>} + */ +const methodInfo_Msg_TransferDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.nft.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgTransferDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.transferDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.transferDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom); +}; + + module.exports = proto.irismod.nft; diff --git a/dist/src/types/proto-types/irismod/nft/tx_pb.js b/dist/src/types/proto-types/irismod/nft/tx_pb.js index 608d9eac..d0027c71 100644 --- a/dist/src/types/proto-types/irismod/nft/tx_pb.js +++ b/dist/src/types/proto-types/irismod/nft/tx_pb.js @@ -22,6 +22,8 @@ goog.exportSymbol('proto.irismod.nft.MsgIssueDenom', null, global); goog.exportSymbol('proto.irismod.nft.MsgIssueDenomResponse', null, global); goog.exportSymbol('proto.irismod.nft.MsgMintNFT', null, global); goog.exportSymbol('proto.irismod.nft.MsgMintNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferDenom', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferDenomResponse', null, global); goog.exportSymbol('proto.irismod.nft.MsgTransferNFT', null, global); goog.exportSymbol('proto.irismod.nft.MsgTransferNFTResponse', null, global); /** @@ -234,6 +236,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.nft.MsgBurnNFTResponse.displayName = 'proto.irismod.nft.MsgBurnNFTResponse'; } +/** + * 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.irismod.nft.MsgTransferDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferDenom.displayName = 'proto.irismod.nft.MsgTransferDenom'; +} +/** + * 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.irismod.nft.MsgTransferDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferDenomResponse.displayName = 'proto.irismod.nft.MsgTransferDenomResponse'; +} @@ -269,7 +313,14 @@ proto.irismod.nft.MsgIssueDenom.toObject = function(includeInstance, msg) { id: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), schema: jspb.Message.getFieldWithDefault(msg, 3, ""), - sender: jspb.Message.getFieldWithDefault(msg, 4, "") + sender: jspb.Message.getFieldWithDefault(msg, 4, ""), + symbol: jspb.Message.getFieldWithDefault(msg, 5, ""), + mintRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + updateRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + description: jspb.Message.getFieldWithDefault(msg, 8, ""), + uri: jspb.Message.getFieldWithDefault(msg, 9, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 10, ""), + data: jspb.Message.getFieldWithDefault(msg, 11, "") }; if (includeInstance) { @@ -322,6 +373,34 @@ proto.irismod.nft.MsgIssueDenom.deserializeBinaryFromReader = function(msg, read var value = /** @type {string} */ (reader.readString()); msg.setSender(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintRestricted(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUpdateRestricted(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; default: reader.skipField(); break; @@ -379,6 +458,55 @@ proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter = function(message, writ f ); } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMintRestricted(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getUpdateRestricted(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } }; @@ -454,6 +582,132 @@ proto.irismod.nft.MsgIssueDenom.prototype.setSender = function(value) { }; +/** + * optional string symbol = 5; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool mint_restricted = 6; + * @return {boolean} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getMintRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setMintRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool update_restricted = 7; + * @return {boolean} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getUpdateRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setUpdateRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string description = 8; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string uri = 9; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string uri_hash = 10; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string data = 11; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + @@ -593,7 +847,8 @@ proto.irismod.nft.MsgTransferNFT.toObject = function(includeInstance, msg) { uri: jspb.Message.getFieldWithDefault(msg, 4, ""), data: jspb.Message.getFieldWithDefault(msg, 5, ""), sender: jspb.Message.getFieldWithDefault(msg, 6, ""), - recipient: jspb.Message.getFieldWithDefault(msg, 7, "") + recipient: jspb.Message.getFieldWithDefault(msg, 7, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -658,6 +913,10 @@ proto.irismod.nft.MsgTransferNFT.deserializeBinaryFromReader = function(msg, rea var value = /** @type {string} */ (reader.readString()); msg.setRecipient(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -736,6 +995,13 @@ proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter = function(message, wri f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -865,6 +1131,24 @@ proto.irismod.nft.MsgTransferNFT.prototype.setRecipient = function(value) { }; +/** + * optional string uri_hash = 8; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + @@ -1003,7 +1287,8 @@ proto.irismod.nft.MsgEditNFT.toObject = function(includeInstance, msg) { name: jspb.Message.getFieldWithDefault(msg, 3, ""), uri: jspb.Message.getFieldWithDefault(msg, 4, ""), data: jspb.Message.getFieldWithDefault(msg, 5, ""), - sender: jspb.Message.getFieldWithDefault(msg, 6, "") + sender: jspb.Message.getFieldWithDefault(msg, 6, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -1064,6 +1349,10 @@ proto.irismod.nft.MsgEditNFT.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setSender(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -1135,6 +1424,13 @@ proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } }; @@ -1246,6 +1542,24 @@ proto.irismod.nft.MsgEditNFT.prototype.setSender = function(value) { }; +/** + * optional string uri_hash = 7; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + @@ -1385,7 +1699,8 @@ proto.irismod.nft.MsgMintNFT.toObject = function(includeInstance, msg) { uri: jspb.Message.getFieldWithDefault(msg, 4, ""), data: jspb.Message.getFieldWithDefault(msg, 5, ""), sender: jspb.Message.getFieldWithDefault(msg, 6, ""), - recipient: jspb.Message.getFieldWithDefault(msg, 7, "") + recipient: jspb.Message.getFieldWithDefault(msg, 7, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -1450,6 +1765,10 @@ proto.irismod.nft.MsgMintNFT.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setRecipient(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -1528,6 +1847,13 @@ proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -1657,6 +1983,24 @@ proto.irismod.nft.MsgMintNFT.prototype.setRecipient = function(value) { }; +/** + * optional string uri_hash = 8; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + @@ -2049,4 +2393,295 @@ proto.irismod.nft.MsgBurnNFTResponse.serializeBinaryToWriter = function(message, }; + + + +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_, 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.irismod.nft.MsgTransferDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferDenom.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.irismod.nft.MsgTransferDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + sender: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.nft.MsgTransferDenom} + */ +proto.irismod.nft.MsgTransferDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferDenom; + return proto.irismod.nft.MsgTransferDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferDenom} + */ +proto.irismod.nft.MsgTransferDenom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.MsgTransferDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgTransferDenom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferDenom} returns this + */ +proto.irismod.nft.MsgTransferDenom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.irismod.nft.MsgTransferDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferDenom} returns this + */ +proto.irismod.nft.MsgTransferDenom.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.irismod.nft.MsgTransferDenom.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferDenom} returns this + */ +proto.irismod.nft.MsgTransferDenom.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.nft.MsgTransferDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferDenomResponse.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.irismod.nft.MsgTransferDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenomResponse.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.irismod.nft.MsgTransferDenomResponse} + */ +proto.irismod.nft.MsgTransferDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferDenomResponse; + return proto.irismod.nft.MsgTransferDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferDenomResponse} + */ +proto.irismod.nft.MsgTransferDenomResponse.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.irismod.nft.MsgTransferDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.irismod.nft); diff --git a/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js index 3b1b58b5..49af5578 100644 --- a/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js @@ -25,6 +25,8 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') var google_api_annotations_pb = require('../../google/api/annotations_pb.js') var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') const proto = {}; proto.irismod = {}; proto.irismod.oracle = require('./query_pb.js'); diff --git a/dist/src/types/proto-types/irismod/oracle/query_pb.js b/dist/src/types/proto-types/irismod/oracle/query_pb.js index 45b15ee6..4c4a09bb 100644 --- a/dist/src/types/proto-types/irismod/oracle/query_pb.js +++ b/dist/src/types/proto-types/irismod/oracle/query_pb.js @@ -22,6 +22,8 @@ var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_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.irismod.oracle.FeedContext', null, global); goog.exportSymbol('proto.irismod.oracle.QueryFeedRequest', null, global); goog.exportSymbol('proto.irismod.oracle.QueryFeedResponse', null, global); @@ -489,7 +491,8 @@ proto.irismod.oracle.QueryFeedsRequest.prototype.toObject = function(opt_include */ proto.irismod.oracle.QueryFeedsRequest.toObject = function(includeInstance, msg) { var f, obj = { - state: jspb.Message.getFieldWithDefault(msg, 1, "") + state: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -530,6 +533,11 @@ proto.irismod.oracle.QueryFeedsRequest.deserializeBinaryFromReader = function(ms var value = /** @type {string} */ (reader.readString()); msg.setState(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; @@ -566,6 +574,14 @@ proto.irismod.oracle.QueryFeedsRequest.serializeBinaryToWriter = function(messag f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -587,6 +603,43 @@ proto.irismod.oracle.QueryFeedsRequest.prototype.setState = function(value) { }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.oracle.QueryFeedsRequest.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.irismod.oracle.QueryFeedsRequest} returns this +*/ +proto.irismod.oracle.QueryFeedsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.QueryFeedsRequest} returns this + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + /** * List of repeated fields within this message type. @@ -627,7 +680,8 @@ proto.irismod.oracle.QueryFeedsResponse.prototype.toObject = function(opt_includ proto.irismod.oracle.QueryFeedsResponse.toObject = function(includeInstance, msg) { var f, obj = { feedsList: jspb.Message.toObjectList(msg.getFeedsList(), - proto.irismod.oracle.FeedContext.toObject, includeInstance) + proto.irismod.oracle.FeedContext.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -669,6 +723,11 @@ proto.irismod.oracle.QueryFeedsResponse.deserializeBinaryFromReader = function(m reader.readMessage(value,proto.irismod.oracle.FeedContext.deserializeBinaryFromReader); msg.addFeeds(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; @@ -706,6 +765,14 @@ proto.irismod.oracle.QueryFeedsResponse.serializeBinaryToWriter = function(messa proto.irismod.oracle.FeedContext.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -747,6 +814,43 @@ proto.irismod.oracle.QueryFeedsResponse.prototype.clearFeedsList = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.oracle.QueryFeedsResponse.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.irismod.oracle.QueryFeedsResponse} returns this +*/ +proto.irismod.oracle.QueryFeedsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.QueryFeedsResponse} returns this + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/dist/src/types/proto-types/irismod/service/genesis_pb.js b/dist/src/types/proto-types/irismod/service/genesis_pb.js index dc92e95d..431f869c 100644 --- a/dist/src/types/proto-types/irismod/service/genesis_pb.js +++ b/dist/src/types/proto-types/irismod/service/genesis_pb.js @@ -138,7 +138,7 @@ proto.irismod.service.GenesisState.deserializeBinaryFromReader = function(msg, r case 4: var value = msg.getWithdrawAddressesMap(); reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", ""); + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 5: @@ -202,7 +202,7 @@ proto.irismod.service.GenesisState.serializeBinaryToWriter = function(message, w } f = message.getWithdrawAddressesMap(true); if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes); + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getRequestContextsMap(true); if (f && f.getLength() > 0) { @@ -325,13 +325,13 @@ proto.irismod.service.GenesisState.prototype.clearBindingsList = function() { /** - * map withdraw_addresses = 4; + * map withdraw_addresses = 4; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` - * @return {!jspb.Map} + * @return {!jspb.Map} */ proto.irismod.service.GenesisState.prototype.getWithdrawAddressesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( + return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 4, opt_noLazyCreate, null)); }; diff --git a/dist/src/types/proto-types/irismod/service/query_pb.js b/dist/src/types/proto-types/irismod/service/query_pb.js index dde83401..9a080c26 100644 --- a/dist/src/types/proto-types/irismod/service/query_pb.js +++ b/dist/src/types/proto-types/irismod/service/query_pb.js @@ -1219,7 +1219,8 @@ proto.irismod.service.QueryBindingsRequest.prototype.toObject = function(opt_inc proto.irismod.service.QueryBindingsRequest.toObject = function(includeInstance, msg) { var f, obj = { serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), - owner: jspb.Message.getFieldWithDefault(msg, 2, "") + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -1264,6 +1265,11 @@ proto.irismod.service.QueryBindingsRequest.deserializeBinaryFromReader = functio var value = /** @type {string} */ (reader.readString()); msg.setOwner(value); break; + case 3: + 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; @@ -1307,6 +1313,14 @@ proto.irismod.service.QueryBindingsRequest.serializeBinaryToWriter = function(me f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -1346,6 +1360,43 @@ proto.irismod.service.QueryBindingsRequest.prototype.setOwner = function(value) }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryBindingsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryBindingsRequest} returns this +*/ +proto.irismod.service.QueryBindingsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryBindingsRequest} returns this + */ +proto.irismod.service.QueryBindingsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryBindingsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -1386,7 +1437,8 @@ proto.irismod.service.QueryBindingsResponse.prototype.toObject = function(opt_in proto.irismod.service.QueryBindingsResponse.toObject = function(includeInstance, msg) { var f, obj = { serviceBindingsList: jspb.Message.toObjectList(msg.getServiceBindingsList(), - irismod_service_service_pb.ServiceBinding.toObject, includeInstance) + irismod_service_service_pb.ServiceBinding.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1428,6 +1480,11 @@ proto.irismod.service.QueryBindingsResponse.deserializeBinaryFromReader = functi reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); msg.addServiceBindings(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; @@ -1465,6 +1522,14 @@ proto.irismod.service.QueryBindingsResponse.serializeBinaryToWriter = function(m irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1506,6 +1571,43 @@ proto.irismod.service.QueryBindingsResponse.prototype.clearServiceBindingsList = }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryBindingsResponse.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.irismod.service.QueryBindingsResponse} returns this +*/ +proto.irismod.service.QueryBindingsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryBindingsResponse} returns this + */ +proto.irismod.service.QueryBindingsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryBindingsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -2361,7 +2463,8 @@ proto.irismod.service.QueryRequestsRequest.prototype.toObject = function(opt_inc proto.irismod.service.QueryRequestsRequest.toObject = function(includeInstance, msg) { var f, obj = { serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), - provider: jspb.Message.getFieldWithDefault(msg, 2, "") + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -2406,6 +2509,11 @@ proto.irismod.service.QueryRequestsRequest.deserializeBinaryFromReader = functio var value = /** @type {string} */ (reader.readString()); msg.setProvider(value); break; + case 3: + 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; @@ -2449,6 +2557,14 @@ proto.irismod.service.QueryRequestsRequest.serializeBinaryToWriter = function(me f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -2488,6 +2604,43 @@ proto.irismod.service.QueryRequestsRequest.prototype.setProvider = function(valu }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryRequestsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryRequestsRequest} returns this +*/ +proto.irismod.service.QueryRequestsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsRequest} returns this + */ +proto.irismod.service.QueryRequestsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -2528,7 +2681,8 @@ proto.irismod.service.QueryRequestsResponse.prototype.toObject = function(opt_in proto.irismod.service.QueryRequestsResponse.toObject = function(includeInstance, msg) { var f, obj = { requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - irismod_service_service_pb.Request.toObject, includeInstance) + irismod_service_service_pb.Request.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -2570,6 +2724,11 @@ proto.irismod.service.QueryRequestsResponse.deserializeBinaryFromReader = functi reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); msg.addRequests(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; @@ -2607,6 +2766,14 @@ proto.irismod.service.QueryRequestsResponse.serializeBinaryToWriter = function(m irismod_service_service_pb.Request.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -2648,6 +2815,43 @@ proto.irismod.service.QueryRequestsResponse.prototype.clearRequestsList = functi }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryRequestsResponse.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.irismod.service.QueryRequestsResponse} returns this +*/ +proto.irismod.service.QueryRequestsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsResponse} returns this + */ +proto.irismod.service.QueryRequestsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -2681,7 +2885,8 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.toObject = function proto.irismod.service.QueryRequestsByReqCtxRequest.toObject = function(includeInstance, msg) { var f, obj = { requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), - batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0) + batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -2726,6 +2931,11 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.deserializeBinaryFromReader = var value = /** @type {number} */ (reader.readUint64()); msg.setBatchCounter(value); break; + case 3: + 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; @@ -2769,6 +2979,14 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.serializeBinaryToWriter = fun f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -2808,6 +3026,43 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setBatchCounter = f }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this +*/ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -2848,7 +3103,8 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.toObject = functio proto.irismod.service.QueryRequestsByReqCtxResponse.toObject = function(includeInstance, msg) { var f, obj = { requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - irismod_service_service_pb.Request.toObject, includeInstance) + irismod_service_service_pb.Request.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -2890,6 +3146,11 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinaryFromReader reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); msg.addRequests(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; @@ -2927,6 +3188,14 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.serializeBinaryToWriter = fu irismod_service_service_pb.Request.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -2968,6 +3237,43 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.clearRequestsList }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.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.irismod.service.QueryRequestsByReqCtxResponse} returns this +*/ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -3282,7 +3588,8 @@ proto.irismod.service.QueryResponsesRequest.prototype.toObject = function(opt_in proto.irismod.service.QueryResponsesRequest.toObject = function(includeInstance, msg) { var f, obj = { requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), - batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0) + batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -3327,6 +3634,11 @@ proto.irismod.service.QueryResponsesRequest.deserializeBinaryFromReader = functi var value = /** @type {number} */ (reader.readUint64()); msg.setBatchCounter(value); break; + case 3: + 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; @@ -3370,6 +3682,14 @@ proto.irismod.service.QueryResponsesRequest.serializeBinaryToWriter = function(m f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -3409,6 +3729,43 @@ proto.irismod.service.QueryResponsesRequest.prototype.setBatchCounter = function }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryResponsesRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryResponsesRequest} returns this +*/ +proto.irismod.service.QueryResponsesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryResponsesRequest} returns this + */ +proto.irismod.service.QueryResponsesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryResponsesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -3449,7 +3806,8 @@ proto.irismod.service.QueryResponsesResponse.prototype.toObject = function(opt_i proto.irismod.service.QueryResponsesResponse.toObject = function(includeInstance, msg) { var f, obj = { responsesList: jspb.Message.toObjectList(msg.getResponsesList(), - irismod_service_service_pb.Response.toObject, includeInstance) + irismod_service_service_pb.Response.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -3491,6 +3849,11 @@ proto.irismod.service.QueryResponsesResponse.deserializeBinaryFromReader = funct reader.readMessage(value,irismod_service_service_pb.Response.deserializeBinaryFromReader); msg.addResponses(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; @@ -3528,6 +3891,14 @@ proto.irismod.service.QueryResponsesResponse.serializeBinaryToWriter = function( irismod_service_service_pb.Response.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -3569,6 +3940,43 @@ proto.irismod.service.QueryResponsesResponse.prototype.clearResponsesList = func }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryResponsesResponse.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.irismod.service.QueryResponsesResponse} returns this +*/ +proto.irismod.service.QueryResponsesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryResponsesResponse} returns this + */ +proto.irismod.service.QueryResponsesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryResponsesResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/dist/src/types/proto-types/irismod/service/service_pb.js b/dist/src/types/proto-types/irismod/service/service_pb.js index a71a67f6..bfda732d 100644 --- a/dist/src/types/proto-types/irismod/service/service_pb.js +++ b/dist/src/types/proto-types/irismod/service/service_pb.js @@ -1016,17 +1016,16 @@ proto.irismod.service.RequestContext.toObject = function(includeInstance, msg) { cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), moduleName: jspb.Message.getFieldWithDefault(msg, 6, ""), timeout: jspb.Message.getFieldWithDefault(msg, 7, 0), - superMode: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - repeated: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatedTotal: jspb.Message.getFieldWithDefault(msg, 11, 0), - batchCounter: jspb.Message.getFieldWithDefault(msg, 12, 0), - batchRequestCount: jspb.Message.getFieldWithDefault(msg, 13, 0), - batchResponseCount: jspb.Message.getFieldWithDefault(msg, 14, 0), - batchResponseThreshold: jspb.Message.getFieldWithDefault(msg, 15, 0), - responseThreshold: jspb.Message.getFieldWithDefault(msg, 16, 0), - batchState: jspb.Message.getFieldWithDefault(msg, 17, 0), - state: jspb.Message.getFieldWithDefault(msg, 18, 0) + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 9, 0), + repeatedTotal: jspb.Message.getFieldWithDefault(msg, 10, 0), + batchCounter: jspb.Message.getFieldWithDefault(msg, 11, 0), + batchRequestCount: jspb.Message.getFieldWithDefault(msg, 12, 0), + batchResponseCount: jspb.Message.getFieldWithDefault(msg, 13, 0), + batchResponseThreshold: jspb.Message.getFieldWithDefault(msg, 14, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 15, 0), + batchState: jspb.Message.getFieldWithDefault(msg, 16, 0), + state: jspb.Message.getFieldWithDefault(msg, 17, 0) }; if (includeInstance) { @@ -1093,46 +1092,42 @@ proto.irismod.service.RequestContext.deserializeBinaryFromReader = function(msg, msg.setTimeout(value); break; case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuperMode(value); - break; - case 9: var value = /** @type {boolean} */ (reader.readBool()); msg.setRepeated(value); break; - case 10: + case 9: var value = /** @type {number} */ (reader.readUint64()); msg.setRepeatedFrequency(value); break; - case 11: + case 10: var value = /** @type {number} */ (reader.readInt64()); msg.setRepeatedTotal(value); break; - case 12: + case 11: var value = /** @type {number} */ (reader.readUint64()); msg.setBatchCounter(value); break; - case 13: + case 12: var value = /** @type {number} */ (reader.readUint32()); msg.setBatchRequestCount(value); break; - case 14: + case 13: var value = /** @type {number} */ (reader.readUint32()); msg.setBatchResponseCount(value); break; - case 15: + case 14: var value = /** @type {number} */ (reader.readUint32()); msg.setBatchResponseThreshold(value); break; - case 16: + case 15: var value = /** @type {number} */ (reader.readUint32()); msg.setResponseThreshold(value); break; - case 17: + case 16: var value = /** @type {!proto.irismod.service.RequestContextBatchState} */ (reader.readEnum()); msg.setBatchState(value); break; - case 18: + case 17: var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); msg.setState(value); break; @@ -1215,80 +1210,73 @@ proto.irismod.service.RequestContext.serializeBinaryToWriter = function(message, f ); } - f = message.getSuperMode(); - if (f) { - writer.writeBool( - 8, - f - ); - } f = message.getRepeated(); if (f) { writer.writeBool( - 9, + 8, f ); } f = message.getRepeatedFrequency(); if (f !== 0) { writer.writeUint64( - 10, + 9, f ); } f = message.getRepeatedTotal(); if (f !== 0) { writer.writeInt64( - 11, + 10, f ); } f = message.getBatchCounter(); if (f !== 0) { writer.writeUint64( - 12, + 11, f ); } f = message.getBatchRequestCount(); if (f !== 0) { writer.writeUint32( - 13, + 12, f ); } f = message.getBatchResponseCount(); if (f !== 0) { writer.writeUint32( - 14, + 13, f ); } f = message.getBatchResponseThreshold(); if (f !== 0) { writer.writeUint32( - 15, + 14, f ); } f = message.getResponseThreshold(); if (f !== 0) { writer.writeUint32( - 16, + 15, f ); } f = message.getBatchState(); if (f !== 0.0) { writer.writeEnum( - 17, + 16, f ); } f = message.getState(); if (f !== 0.0) { writer.writeEnum( - 18, + 17, f ); } @@ -1461,29 +1449,11 @@ proto.irismod.service.RequestContext.prototype.setTimeout = function(value) { /** - * optional bool super_mode = 8; - * @return {boolean} - */ -proto.irismod.service.RequestContext.prototype.getSuperMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.irismod.service.RequestContext} returns this - */ -proto.irismod.service.RequestContext.prototype.setSuperMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional bool repeated = 9; + * optional bool repeated = 8; * @return {boolean} */ proto.irismod.service.RequestContext.prototype.getRepeated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; @@ -1492,16 +1462,16 @@ proto.irismod.service.RequestContext.prototype.getRepeated = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setRepeated = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); + return jspb.Message.setProto3BooleanField(this, 8, value); }; /** - * optional uint64 repeated_frequency = 10; + * optional uint64 repeated_frequency = 9; * @return {number} */ proto.irismod.service.RequestContext.prototype.getRepeatedFrequency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; @@ -1510,16 +1480,16 @@ proto.irismod.service.RequestContext.prototype.getRepeatedFrequency = function() * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setRepeatedFrequency = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional int64 repeated_total = 11; + * optional int64 repeated_total = 10; * @return {number} */ proto.irismod.service.RequestContext.prototype.getRepeatedTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; @@ -1528,16 +1498,16 @@ proto.irismod.service.RequestContext.prototype.getRepeatedTotal = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setRepeatedTotal = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); + return jspb.Message.setProto3IntField(this, 10, value); }; /** - * optional uint64 batch_counter = 12; + * optional uint64 batch_counter = 11; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchCounter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; @@ -1546,16 +1516,16 @@ proto.irismod.service.RequestContext.prototype.getBatchCounter = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchCounter = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * optional uint32 batch_request_count = 13; + * optional uint32 batch_request_count = 12; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchRequestCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; @@ -1564,16 +1534,16 @@ proto.irismod.service.RequestContext.prototype.getBatchRequestCount = function() * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchRequestCount = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); + return jspb.Message.setProto3IntField(this, 12, value); }; /** - * optional uint32 batch_response_count = 14; + * optional uint32 batch_response_count = 13; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchResponseCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; @@ -1582,16 +1552,16 @@ proto.irismod.service.RequestContext.prototype.getBatchResponseCount = function( * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchResponseCount = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); + return jspb.Message.setProto3IntField(this, 13, value); }; /** - * optional uint32 batch_response_threshold = 15; + * optional uint32 batch_response_threshold = 14; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchResponseThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; @@ -1600,16 +1570,16 @@ proto.irismod.service.RequestContext.prototype.getBatchResponseThreshold = funct * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchResponseThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); + return jspb.Message.setProto3IntField(this, 14, value); }; /** - * optional uint32 response_threshold = 16; + * optional uint32 response_threshold = 15; * @return {number} */ proto.irismod.service.RequestContext.prototype.getResponseThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; @@ -1618,16 +1588,16 @@ proto.irismod.service.RequestContext.prototype.getResponseThreshold = function() * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setResponseThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); + return jspb.Message.setProto3IntField(this, 15, value); }; /** - * optional RequestContextBatchState batch_state = 17; + * optional RequestContextBatchState batch_state = 16; * @return {!proto.irismod.service.RequestContextBatchState} */ proto.irismod.service.RequestContext.prototype.getBatchState = function() { - return /** @type {!proto.irismod.service.RequestContextBatchState} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); + return /** @type {!proto.irismod.service.RequestContextBatchState} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; @@ -1636,16 +1606,16 @@ proto.irismod.service.RequestContext.prototype.getBatchState = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchState = function(value) { - return jspb.Message.setProto3EnumField(this, 17, value); + return jspb.Message.setProto3EnumField(this, 16, value); }; /** - * optional RequestContextState state = 18; + * optional RequestContextState state = 17; * @return {!proto.irismod.service.RequestContextState} */ proto.irismod.service.RequestContext.prototype.getState = function() { - return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); }; @@ -1654,7 +1624,7 @@ proto.irismod.service.RequestContext.prototype.getState = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 18, value); + return jspb.Message.setProto3EnumField(this, 17, value); }; @@ -1704,11 +1674,10 @@ proto.irismod.service.Request.toObject = function(includeInstance, msg) { input: jspb.Message.getFieldWithDefault(msg, 5, ""), serviceFeeList: jspb.Message.toObjectList(msg.getServiceFeeList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - requestHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), - expirationHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - requestContextId: jspb.Message.getFieldWithDefault(msg, 10, ""), - requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 11, 0) + requestHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + requestContextId: jspb.Message.getFieldWithDefault(msg, 9, ""), + requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -1771,22 +1740,18 @@ proto.irismod.service.Request.deserializeBinaryFromReader = function(msg, reader msg.addServiceFee(value); break; case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuperMode(value); - break; - case 8: var value = /** @type {number} */ (reader.readInt64()); msg.setRequestHeight(value); break; - case 9: + case 8: var value = /** @type {number} */ (reader.readInt64()); msg.setExpirationHeight(value); break; - case 10: + case 9: var value = /** @type {string} */ (reader.readString()); msg.setRequestContextId(value); break; - case 11: + case 10: var value = /** @type {number} */ (reader.readUint64()); msg.setRequestContextBatchCounter(value); break; @@ -1862,38 +1827,31 @@ proto.irismod.service.Request.serializeBinaryToWriter = function(message, writer cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } - f = message.getSuperMode(); - if (f) { - writer.writeBool( - 7, - f - ); - } f = message.getRequestHeight(); if (f !== 0) { writer.writeInt64( - 8, + 7, f ); } f = message.getExpirationHeight(); if (f !== 0) { writer.writeInt64( - 9, + 8, f ); } f = message.getRequestContextId(); if (f.length > 0) { writer.writeString( - 10, + 9, f ); } f = message.getRequestContextBatchCounter(); if (f !== 0) { writer.writeUint64( - 11, + 10, f ); } @@ -2029,29 +1987,11 @@ proto.irismod.service.Request.prototype.clearServiceFeeList = function() { /** - * optional bool super_mode = 7; - * @return {boolean} - */ -proto.irismod.service.Request.prototype.getSuperMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.irismod.service.Request} returns this - */ -proto.irismod.service.Request.prototype.setSuperMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional int64 request_height = 8; + * optional int64 request_height = 7; * @return {number} */ proto.irismod.service.Request.prototype.getRequestHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; @@ -2060,16 +2000,16 @@ proto.irismod.service.Request.prototype.getRequestHeight = function() { * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setRequestHeight = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional int64 expiration_height = 9; + * optional int64 expiration_height = 8; * @return {number} */ proto.irismod.service.Request.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; @@ -2078,16 +2018,16 @@ proto.irismod.service.Request.prototype.getExpirationHeight = function() { * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setExpirationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional string request_context_id = 10; + * optional string request_context_id = 9; * @return {string} */ proto.irismod.service.Request.prototype.getRequestContextId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; @@ -2096,16 +2036,16 @@ proto.irismod.service.Request.prototype.getRequestContextId = function() { * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setRequestContextId = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); + return jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional uint64 request_context_batch_counter = 11; + * optional uint64 request_context_batch_counter = 10; * @return {number} */ proto.irismod.service.Request.prototype.getRequestContextBatchCounter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; @@ -2114,7 +2054,7 @@ proto.irismod.service.Request.prototype.getRequestContextBatchCounter = function * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setRequestContextBatchCounter = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); + return jspb.Message.setProto3IntField(this, 10, value); }; @@ -3414,7 +3354,8 @@ proto.irismod.service.Params.toObject = function(includeInstance, msg) { complaintRetrospect: (f = msg.getComplaintRetrospect()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), arbitrationTimeLimit: (f = msg.getArbitrationTimeLimit()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), txSizeLimit: jspb.Message.getFieldWithDefault(msg, 8, 0), - baseDenom: jspb.Message.getFieldWithDefault(msg, 9, "") + baseDenom: jspb.Message.getFieldWithDefault(msg, 9, ""), + restrictedServiceFeeDenom: jspb.Message.getBooleanFieldWithDefault(msg, 10, false) }; if (includeInstance) { @@ -3490,6 +3431,10 @@ proto.irismod.service.Params.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setBaseDenom(value); break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRestrictedServiceFeeDenom(value); + break; default: reader.skipField(); break; @@ -3585,6 +3530,13 @@ proto.irismod.service.Params.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getRestrictedServiceFeeDenom(); + if (f) { + writer.writeBool( + 10, + f + ); + } }; @@ -3808,6 +3760,24 @@ proto.irismod.service.Params.prototype.setBaseDenom = function(value) { }; +/** + * optional bool restricted_service_fee_denom = 10; + * @return {boolean} + */ +proto.irismod.service.Params.prototype.getRestrictedServiceFeeDenom = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setRestrictedServiceFeeDenom = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + /** * @enum {number} */ diff --git a/dist/src/types/proto-types/irismod/service/tx_pb.js b/dist/src/types/proto-types/irismod/service/tx_pb.js index f075c923..071b1e33 100644 --- a/dist/src/types/proto-types/irismod/service/tx_pb.js +++ b/dist/src/types/proto-types/irismod/service/tx_pb.js @@ -3161,10 +3161,9 @@ proto.irismod.service.MsgCallService.toObject = function(includeInstance, msg) { serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), timeout: jspb.Message.getFieldWithDefault(msg, 6, 0), - superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - repeated: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 9, 0), - repeatedTotal: jspb.Message.getFieldWithDefault(msg, 10, 0) + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 8, 0), + repeatedTotal: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -3227,18 +3226,14 @@ proto.irismod.service.MsgCallService.deserializeBinaryFromReader = function(msg, msg.setTimeout(value); break; case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuperMode(value); - break; - case 8: var value = /** @type {boolean} */ (reader.readBool()); msg.setRepeated(value); break; - case 9: + case 8: var value = /** @type {number} */ (reader.readUint64()); msg.setRepeatedFrequency(value); break; - case 10: + case 9: var value = /** @type {number} */ (reader.readInt64()); msg.setRepeatedTotal(value); break; @@ -3314,31 +3309,24 @@ proto.irismod.service.MsgCallService.serializeBinaryToWriter = function(message, f ); } - f = message.getSuperMode(); - if (f) { - writer.writeBool( - 7, - f - ); - } f = message.getRepeated(); if (f) { writer.writeBool( - 8, + 7, f ); } f = message.getRepeatedFrequency(); if (f !== 0) { writer.writeUint64( - 9, + 8, f ); } f = message.getRepeatedTotal(); if (f !== 0) { writer.writeInt64( - 10, + 9, f ); } @@ -3493,29 +3481,11 @@ proto.irismod.service.MsgCallService.prototype.setTimeout = function(value) { /** - * optional bool super_mode = 7; - * @return {boolean} - */ -proto.irismod.service.MsgCallService.prototype.getSuperMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.irismod.service.MsgCallService} returns this - */ -proto.irismod.service.MsgCallService.prototype.setSuperMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional bool repeated = 8; + * optional bool repeated = 7; * @return {boolean} */ proto.irismod.service.MsgCallService.prototype.getRepeated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; @@ -3524,16 +3494,16 @@ proto.irismod.service.MsgCallService.prototype.getRepeated = function() { * @return {!proto.irismod.service.MsgCallService} returns this */ proto.irismod.service.MsgCallService.prototype.setRepeated = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); + return jspb.Message.setProto3BooleanField(this, 7, value); }; /** - * optional uint64 repeated_frequency = 9; + * optional uint64 repeated_frequency = 8; * @return {number} */ proto.irismod.service.MsgCallService.prototype.getRepeatedFrequency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; @@ -3542,16 +3512,16 @@ proto.irismod.service.MsgCallService.prototype.getRepeatedFrequency = function() * @return {!proto.irismod.service.MsgCallService} returns this */ proto.irismod.service.MsgCallService.prototype.setRepeatedFrequency = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional int64 repeated_total = 10; + * optional int64 repeated_total = 9; * @return {number} */ proto.irismod.service.MsgCallService.prototype.getRepeatedTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; @@ -3560,7 +3530,7 @@ proto.irismod.service.MsgCallService.prototype.getRepeatedTotal = function() { * @return {!proto.irismod.service.MsgCallService} returns this */ proto.irismod.service.MsgCallService.prototype.setRepeatedTotal = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); + return jspb.Message.setProto3IntField(this, 9, value); }; diff --git a/dist/src/types/proto-types/irismod/token/genesis_pb.js b/dist/src/types/proto-types/irismod/token/genesis_pb.js index b10f95d7..232841f0 100644 --- a/dist/src/types/proto-types/irismod/token/genesis_pb.js +++ b/dist/src/types/proto-types/irismod/token/genesis_pb.js @@ -16,6 +16,8 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var irismod_token_token_pb = require('../../irismod/token/token_pb.js'); goog.object.extend(proto, irismod_token_token_pb); +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); goog.exportSymbol('proto.irismod.token.GenesisState', null, global); /** * Generated by JsPbCodeGenerator. @@ -44,7 +46,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.irismod.token.GenesisState.repeatedFields_ = [2]; +proto.irismod.token.GenesisState.repeatedFields_ = [2,3]; @@ -79,7 +81,9 @@ proto.irismod.token.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { params: (f = msg.getParams()) && irismod_token_token_pb.Params.toObject(includeInstance, f), tokensList: jspb.Message.toObjectList(msg.getTokensList(), - irismod_token_token_pb.Token.toObject, includeInstance) + irismod_token_token_pb.Token.toObject, includeInstance), + burnedCoinsList: jspb.Message.toObjectList(msg.getBurnedCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) }; if (includeInstance) { @@ -126,6 +130,11 @@ proto.irismod.token.GenesisState.deserializeBinaryFromReader = function(msg, rea reader.readMessage(value,irismod_token_token_pb.Token.deserializeBinaryFromReader); msg.addTokens(value); break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addBurnedCoins(value); + break; default: reader.skipField(); break; @@ -171,6 +180,14 @@ proto.irismod.token.GenesisState.serializeBinaryToWriter = function(message, wri irismod_token_token_pb.Token.serializeBinaryToWriter ); } + f = message.getBurnedCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } }; @@ -249,4 +266,42 @@ proto.irismod.token.GenesisState.prototype.clearTokensList = function() { }; +/** + * repeated cosmos.base.v1beta1.Coin burned_coins = 3; + * @return {!Array} + */ +proto.irismod.token.GenesisState.prototype.getBurnedCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.GenesisState} returns this +*/ +proto.irismod.token.GenesisState.prototype.setBurnedCoinsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.GenesisState.prototype.addBurnedCoins = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.token.GenesisState} returns this + */ +proto.irismod.token.GenesisState.prototype.clearBurnedCoinsList = function() { + return this.setBurnedCoinsList([]); +}; + + goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js index 42d1cb4f..45e5ab5a 100644 --- a/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js +++ b/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js @@ -405,5 +405,85 @@ proto.irismod.token.QueryPromiseClient.prototype.params = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryTotalBurnRequest, + * !proto.irismod.token.QueryTotalBurnResponse>} + */ +const methodDescriptor_Query_TotalBurn = new grpc.web.MethodDescriptor( + '/irismod.token.Query/TotalBurn', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryTotalBurnRequest, + proto.irismod.token.QueryTotalBurnResponse, + /** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTotalBurnResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryTotalBurnRequest, + * !proto.irismod.token.QueryTotalBurnResponse>} + */ +const methodInfo_Query_TotalBurn = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryTotalBurnResponse, + /** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTotalBurnResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryTotalBurnResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.totalBurn = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/TotalBurn', + request, + metadata || {}, + methodDescriptor_Query_TotalBurn, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.totalBurn = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/TotalBurn', + request, + metadata || {}, + methodDescriptor_Query_TotalBurn); +}; + + module.exports = proto.irismod.token; diff --git a/dist/src/types/proto-types/irismod/token/query_pb.js b/dist/src/types/proto-types/irismod/token/query_pb.js index 08f32097..9382adc4 100644 --- a/dist/src/types/proto-types/irismod/token/query_pb.js +++ b/dist/src/types/proto-types/irismod/token/query_pb.js @@ -34,6 +34,8 @@ goog.exportSymbol('proto.irismod.token.QueryTokenRequest', null, global); goog.exportSymbol('proto.irismod.token.QueryTokenResponse', null, global); goog.exportSymbol('proto.irismod.token.QueryTokensRequest', null, global); goog.exportSymbol('proto.irismod.token.QueryTokensResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryTotalBurnRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryTotalBurnResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -202,6 +204,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.token.QueryParamsResponse.displayName = 'proto.irismod.token.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.irismod.token.QueryTotalBurnRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTotalBurnRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTotalBurnRequest.displayName = 'proto.irismod.token.QueryTotalBurnRequest'; +} +/** + * 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.irismod.token.QueryTotalBurnResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.token.QueryTotalBurnResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.token.QueryTotalBurnResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTotalBurnResponse.displayName = 'proto.irismod.token.QueryTotalBurnResponse'; +} @@ -515,7 +559,8 @@ proto.irismod.token.QueryTokensRequest.prototype.toObject = function(opt_include */ proto.irismod.token.QueryTokensRequest.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -556,6 +601,11 @@ proto.irismod.token.QueryTokensRequest.deserializeBinaryFromReader = function(ms var value = /** @type {string} */ (reader.readString()); msg.setOwner(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; @@ -592,6 +642,14 @@ proto.irismod.token.QueryTokensRequest.serializeBinaryToWriter = function(messag f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -613,6 +671,43 @@ proto.irismod.token.QueryTokensRequest.prototype.setOwner = function(value) { }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.token.QueryTokensRequest.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.irismod.token.QueryTokensRequest} returns this +*/ +proto.irismod.token.QueryTokensRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryTokensRequest} returns this + */ +proto.irismod.token.QueryTokensRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryTokensRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + /** * List of repeated fields within this message type. @@ -653,7 +748,8 @@ proto.irismod.token.QueryTokensResponse.prototype.toObject = function(opt_includ proto.irismod.token.QueryTokensResponse.toObject = function(includeInstance, msg) { var f, obj = { tokensList: jspb.Message.toObjectList(msg.getTokensList(), - google_protobuf_any_pb.Any.toObject, includeInstance) + google_protobuf_any_pb.Any.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -695,6 +791,11 @@ proto.irismod.token.QueryTokensResponse.deserializeBinaryFromReader = function(m reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.addTokens(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; @@ -732,6 +833,14 @@ proto.irismod.token.QueryTokensResponse.serializeBinaryToWriter = function(messa google_protobuf_any_pb.Any.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -773,6 +882,43 @@ proto.irismod.token.QueryTokensResponse.prototype.clearTokensList = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.token.QueryTokensResponse.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.irismod.token.QueryTokensResponse} returns this +*/ +proto.irismod.token.QueryTokensResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryTokensResponse} returns this + */ +proto.irismod.token.QueryTokensResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryTokensResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -1438,4 +1584,265 @@ proto.irismod.token.QueryParamsResponse.prototype.hasRes = function() { }; + + + +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_, 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.irismod.token.QueryTotalBurnRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTotalBurnRequest.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.irismod.token.QueryTotalBurnRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnRequest.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.irismod.token.QueryTotalBurnRequest} + */ +proto.irismod.token.QueryTotalBurnRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTotalBurnRequest; + return proto.irismod.token.QueryTotalBurnRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTotalBurnRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTotalBurnRequest} + */ +proto.irismod.token.QueryTotalBurnRequest.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.irismod.token.QueryTotalBurnRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTotalBurnRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTotalBurnRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.token.QueryTotalBurnResponse.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_, 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.irismod.token.QueryTotalBurnResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTotalBurnResponse.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.irismod.token.QueryTotalBurnResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnResponse.toObject = function(includeInstance, msg) { + var f, obj = { + burnedCoinsList: jspb.Message.toObjectList(msg.getBurnedCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.token.QueryTotalBurnResponse} + */ +proto.irismod.token.QueryTotalBurnResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTotalBurnResponse; + return proto.irismod.token.QueryTotalBurnResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTotalBurnResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTotalBurnResponse} + */ +proto.irismod.token.QueryTotalBurnResponse.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.addBurnedCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTotalBurnResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTotalBurnResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTotalBurnResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBurnedCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin burned_coins = 1; + * @return {!Array} + */ +proto.irismod.token.QueryTotalBurnResponse.prototype.getBurnedCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.QueryTotalBurnResponse} returns this +*/ +proto.irismod.token.QueryTotalBurnResponse.prototype.setBurnedCoinsList = 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.irismod.token.QueryTotalBurnResponse.prototype.addBurnedCoins = 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.irismod.token.QueryTotalBurnResponse} returns this + */ +proto.irismod.token.QueryTotalBurnResponse.prototype.clearBurnedCoinsList = function() { + return this.setBurnedCoinsList([]); +}; + + goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js index 6505dba2..45c6b8ef 100644 --- a/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js +++ b/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js @@ -313,6 +313,86 @@ proto.irismod.token.MsgPromiseClient.prototype.mintToken = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgBurnToken, + * !proto.irismod.token.MsgBurnTokenResponse>} + */ +const methodDescriptor_Msg_BurnToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/BurnToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgBurnToken, + proto.irismod.token.MsgBurnTokenResponse, + /** + * @param {!proto.irismod.token.MsgBurnToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgBurnTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgBurnToken, + * !proto.irismod.token.MsgBurnTokenResponse>} + */ +const methodInfo_Msg_BurnToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgBurnTokenResponse, + /** + * @param {!proto.irismod.token.MsgBurnToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgBurnTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgBurnToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgBurnTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.burnToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/BurnToken', + request, + metadata || {}, + methodDescriptor_Msg_BurnToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgBurnToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.burnToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/BurnToken', + request, + metadata || {}, + methodDescriptor_Msg_BurnToken); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/dist/src/types/proto-types/irismod/token/tx_pb.js b/dist/src/types/proto-types/irismod/token/tx_pb.js index 2de8a0ec..f2e37662 100644 --- a/dist/src/types/proto-types/irismod/token/tx_pb.js +++ b/dist/src/types/proto-types/irismod/token/tx_pb.js @@ -14,6 +14,8 @@ var global = Function('return this')(); var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.token.MsgBurnToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgBurnTokenResponse', null, global); goog.exportSymbol('proto.irismod.token.MsgEditToken', null, global); goog.exportSymbol('proto.irismod.token.MsgEditTokenResponse', null, global); goog.exportSymbol('proto.irismod.token.MsgIssueToken', null, global); @@ -190,6 +192,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.token.MsgMintTokenResponse.displayName = 'proto.irismod.token.MsgMintTokenResponse'; } +/** + * 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.irismod.token.MsgBurnToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgBurnToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgBurnToken.displayName = 'proto.irismod.token.MsgBurnToken'; +} +/** + * 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.irismod.token.MsgBurnTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgBurnTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgBurnTokenResponse.displayName = 'proto.irismod.token.MsgBurnTokenResponse'; +} @@ -1594,4 +1638,295 @@ proto.irismod.token.MsgMintTokenResponse.serializeBinaryToWriter = function(mess }; + + + +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_, 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.irismod.token.MsgBurnToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgBurnToken.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.irismod.token.MsgBurnToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.token.MsgBurnToken} + */ +proto.irismod.token.MsgBurnToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgBurnToken; + return proto.irismod.token.MsgBurnToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgBurnToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgBurnToken} + */ +proto.irismod.token.MsgBurnToken.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.setSymbol(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgBurnToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgBurnToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgBurnToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgBurnToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgBurnToken} returns this + */ +proto.irismod.token.MsgBurnToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.irismod.token.MsgBurnToken.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgBurnToken} returns this + */ +proto.irismod.token.MsgBurnToken.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.token.MsgBurnToken.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgBurnToken} returns this + */ +proto.irismod.token.MsgBurnToken.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.token.MsgBurnTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgBurnTokenResponse.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.irismod.token.MsgBurnTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnTokenResponse.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.irismod.token.MsgBurnTokenResponse} + */ +proto.irismod.token.MsgBurnTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgBurnTokenResponse; + return proto.irismod.token.MsgBurnTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgBurnTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgBurnTokenResponse} + */ +proto.irismod.token.MsgBurnTokenResponse.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.irismod.token.MsgBurnTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgBurnTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgBurnTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto.d.ts b/dist/src/types/proto.d.ts index c4c111a8..08d49494 100644 --- a/dist/src/types/proto.d.ts +++ b/dist/src/types/proto.d.ts @@ -16,6 +16,7 @@ export declare const random_tx_pb: any; export declare const record_tx_pb: any; export declare const service_tx_pb: any; export declare const token_tx_pb: any; +export declare const farm_tx_pb: any; export declare const ibc_transfer_tx_pb: any; /***************QUERY***************/ export declare const base_query_pagination_pb: any; @@ -37,12 +38,15 @@ export declare const random_query_pb: any; export declare const record_query_pb: any; export declare const service_query_pb: any; export declare const token_query_pb: any; +export declare const farm_query_pb: any; export declare const ibc_transfer_query_pb: any; export declare const ibc_channel_query_pb: any; /***************MODULES***************/ export declare const auth_auth_pb: any; -export declare const crypto_secp256k1_keys_pb: any; export declare const crypto_ed25519_keys_pb: any; +export declare const crypto_multisig_keys_pb: any; +export declare const crypto_secp256k1_keys_pb: any; +export declare const crypto_secp256r1_keys_pb: any; export declare const crypto_sm2_keys_pb: any; export declare const base_coin_pb: any; export declare const signing_signing_pb: any; @@ -56,3 +60,4 @@ export declare const ibc_core_client_pb: any; export declare const google_protobuf_timestamp_pb: any; export declare const token_token_pb: any; export declare const any_pb: any; +export declare const custom_base_pb: any; diff --git a/dist/src/types/proto.js b/dist/src/types/proto.js index f272a645..4f7f9e70 100644 --- a/dist/src/types/proto.js +++ b/dist/src/types/proto.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.any_pb = exports.token_token_pb = exports.google_protobuf_timestamp_pb = exports.ibc_core_client_pb = exports.slashing_slashing_pb = exports.upgrade_upgrade_pb = exports.params_params_pb = exports.distribution_distribution_pb = exports.coinswap_coinswap_pb = exports.gov_gov_pb = exports.signing_signing_pb = exports.base_coin_pb = exports.crypto_sm2_keys_pb = exports.crypto_ed25519_keys_pb = exports.crypto_secp256k1_keys_pb = exports.auth_auth_pb = exports.ibc_channel_query_pb = exports.ibc_transfer_query_pb = exports.token_query_pb = exports.service_query_pb = exports.record_query_pb = exports.random_query_pb = exports.oracle_query_pb = exports.nft_query_pb = exports.htlc_query_pb = exports.coinswap_query_pb = exports.upgrade_query_pb = exports.staking_query_pb = exports.slashing_query_pb = exports.params_query_pb = exports.mint_query_pb = exports.gov_query_pb = exports.evidence_query_pb = exports.distribution_query_pb = exports.bank_query_pb = exports.auth_query_pb = exports.base_query_pagination_pb = exports.ibc_transfer_tx_pb = exports.token_tx_pb = exports.service_tx_pb = exports.record_tx_pb = exports.random_tx_pb = exports.oracle_tx_pb = exports.nft_tx_pb = exports.htlc_tx_pb = exports.coinswap_tx_pb = exports.vesting_tx_pb = exports.tx_tx_pb = exports.staking_tx_pb = exports.slashing_tx_pb = exports.gov_tx_pb = exports.evidence_tx_pb = exports.distribution_tx_pb = exports.crisis_tx_pb = exports.bank_tx_pb = void 0; +exports.custom_base_pb = exports.any_pb = exports.token_token_pb = exports.google_protobuf_timestamp_pb = exports.ibc_core_client_pb = exports.slashing_slashing_pb = exports.upgrade_upgrade_pb = exports.params_params_pb = exports.distribution_distribution_pb = exports.coinswap_coinswap_pb = exports.gov_gov_pb = exports.signing_signing_pb = exports.base_coin_pb = exports.crypto_sm2_keys_pb = exports.crypto_secp256r1_keys_pb = exports.crypto_secp256k1_keys_pb = exports.crypto_multisig_keys_pb = exports.crypto_ed25519_keys_pb = exports.auth_auth_pb = exports.ibc_channel_query_pb = exports.ibc_transfer_query_pb = exports.farm_query_pb = exports.token_query_pb = exports.service_query_pb = exports.record_query_pb = exports.random_query_pb = exports.oracle_query_pb = exports.nft_query_pb = exports.htlc_query_pb = exports.coinswap_query_pb = exports.upgrade_query_pb = exports.staking_query_pb = exports.slashing_query_pb = exports.params_query_pb = exports.mint_query_pb = exports.gov_query_pb = exports.evidence_query_pb = exports.distribution_query_pb = exports.bank_query_pb = exports.auth_query_pb = exports.base_query_pagination_pb = exports.ibc_transfer_tx_pb = exports.farm_tx_pb = exports.token_tx_pb = exports.service_tx_pb = exports.record_tx_pb = exports.random_tx_pb = exports.oracle_tx_pb = exports.nft_tx_pb = exports.htlc_tx_pb = exports.coinswap_tx_pb = exports.vesting_tx_pb = exports.tx_tx_pb = exports.staking_tx_pb = exports.slashing_tx_pb = exports.gov_tx_pb = exports.evidence_tx_pb = exports.distribution_tx_pb = exports.crisis_tx_pb = exports.bank_tx_pb = void 0; /***************TX*****************/ //cosmos tx @@ -72,11 +72,16 @@ var service_tx_pb = require('./proto-types/irismod/service/tx_pb'); exports.service_tx_pb = service_tx_pb; -var token_tx_pb = require('./proto-types/irismod/token/tx_pb'); //ibc tx +var token_tx_pb = require('./proto-types/irismod/token/tx_pb'); //farm tx exports.token_tx_pb = token_tx_pb; +var farm_tx_pb = require('./proto-types/irismod/farm/tx_pb'); //ibc tx + + +exports.farm_tx_pb = farm_tx_pb; + var ibc_transfer_tx_pb = require('./proto-types/ibc/applications/transfer/v1/tx_pb'); /***************QUERY***************/ @@ -157,11 +162,15 @@ var service_query_pb = require('./proto-types/irismod/service/query_pb'); exports.service_query_pb = service_query_pb; -var token_query_pb = require('./proto-types/irismod/token/query_pb'); //ibc query - +var token_query_pb = require('./proto-types/irismod/token/query_pb'); exports.token_query_pb = token_query_pb; +var farm_query_pb = require('./proto-types/irismod/farm/query_pb'); //ibc query + + +exports.farm_query_pb = farm_query_pb; + var ibc_transfer_query_pb = require('./proto-types/ibc/applications/transfer/v1/query_pb'); exports.ibc_transfer_query_pb = ibc_transfer_query_pb; @@ -173,19 +182,29 @@ var ibc_channel_query_pb = require('./proto-types/ibc/core/channel/v1/query_pb') exports.ibc_channel_query_pb = ibc_channel_query_pb; -var auth_auth_pb = require('./proto-types/cosmos/auth/v1beta1/auth_pb'); +var auth_auth_pb = require('./proto-types/cosmos/auth/v1beta1/auth_pb'); // ->keys + exports.auth_auth_pb = auth_auth_pb; +var crypto_ed25519_keys_pb = require('./proto-types/cosmos/crypto/ed25519/keys_pb'); + +exports.crypto_ed25519_keys_pb = crypto_ed25519_keys_pb; + +var crypto_multisig_keys_pb = require('./proto-types/cosmos/crypto/multisig/keys_pb'); + +exports.crypto_multisig_keys_pb = crypto_multisig_keys_pb; + var crypto_secp256k1_keys_pb = require('./proto-types/cosmos/crypto/secp256k1/keys_pb'); exports.crypto_secp256k1_keys_pb = crypto_secp256k1_keys_pb; -var crypto_ed25519_keys_pb = require('./proto-types/cosmos/crypto/ed25519/keys_pb'); +var crypto_secp256r1_keys_pb = require('./proto-types/cosmos/crypto/secp256r1/keys_pb'); -exports.crypto_ed25519_keys_pb = crypto_ed25519_keys_pb; +exports.crypto_secp256r1_keys_pb = crypto_secp256r1_keys_pb; + +var crypto_sm2_keys_pb = require('./proto-types/cosmos/crypto/sm2/keys_pb'); // ->coin -var crypto_sm2_keys_pb = require('./proto-types/cosmos/crypto/sm2/keys_pb'); exports.crypto_sm2_keys_pb = crypto_sm2_keys_pb; @@ -241,6 +260,11 @@ var token_token_pb = require('./proto-types/irismod/token/token_pb'); //any exports.token_token_pb = token_token_pb; -var any_pb = require('./proto-types/google/protobuf/any_pb'); +var any_pb = require('./proto-types/google/protobuf/any_pb'); //custom + + +exports.any_pb = any_pb; + +var custom_base_pb = require('./proto-types/custom/base_pb.js'); -exports.any_pb = any_pb; \ No newline at end of file +exports.custom_base_pb = custom_base_pb; \ No newline at end of file diff --git a/dist/src/types/protoTx.js b/dist/src/types/protoTx.js index e432d74a..bf957d05 100644 --- a/dist/src/types/protoTx.js +++ b/dist/src/types/protoTx.js @@ -71,7 +71,7 @@ var ProtoTx = /*#__PURE__*/function () { */ function addSignature(signature) { if (!signature || !signature.length) { - throw new _errors.SdkError("signature is empty", _errors.CODES.NoSignatures); + throw new _errors.SdkError("signature is empty", _errors.CODES.NoSignatures); } this.signatures.push(signature); @@ -110,11 +110,11 @@ var ProtoTx = /*#__PURE__*/function () { } if (typeof account_number == 'undefined' && typeof this.txData.account_number == 'undefined') { - throw new _errors.SdkError("account_number is empty", _errors.CODES.IncorrectAccountSequence); + throw new _errors.SdkError("account_number is empty", _errors.CODES.IncorrectAccountSequence); } if (!chain_id && !this.txData.chain_id) { - throw new _errors.SdkError("chain_id is empty", _errors.CODES.InvalidChainId); + throw new _errors.SdkError("chain_id is empty", _errors.CODES.InvalidChainId); } var signDoc = new types.tx_tx_pb.SignDoc(); diff --git a/dist/src/types/types.d.ts b/dist/src/types/types.d.ts index 4727f379..04d7157d 100644 --- a/dist/src/types/types.d.ts +++ b/dist/src/types/types.d.ts @@ -29,6 +29,9 @@ export declare enum TxType { MsgAddLiquidity = "irismod.coinswap.MsgAddLiquidity", MsgRemoveLiquidity = "irismod.coinswap.MsgRemoveLiquidity", MsgSwapOrder = "irismod.coinswap.MsgSwapOrder", + MsgStake = "irismod.farm.MsgStake", + MsgUnstake = "irismod.farm.MsgUnstake", + MsgHarvest = "irismod.farm.MsgHarvest", MsgIssueDenom = "irismod.nft.MsgIssueDenom", MsgTransferNFT = "irismod.nft.MsgTransferNFT", MsgEditNFT = "irismod.nft.MsgEditNFT", @@ -117,3 +120,10 @@ export interface Bech32Prefix { ConsAddr: string; ConsPub: string; } +export interface Pagination { + page_number?: number; + page_size?: number; + count_total?: boolean; + reverse?: boolean; + key?: string; +} diff --git a/dist/src/types/types.js b/dist/src/types/types.js index c36acef0..b6556e69 100644 --- a/dist/src/types/types.js +++ b/dist/src/types/types.js @@ -92,6 +92,9 @@ exports.TxType = TxType; TxType["MsgAddLiquidity"] = "irismod.coinswap.MsgAddLiquidity"; TxType["MsgRemoveLiquidity"] = "irismod.coinswap.MsgRemoveLiquidity"; TxType["MsgSwapOrder"] = "irismod.coinswap.MsgSwapOrder"; + TxType["MsgStake"] = "irismod.farm.MsgStake"; + TxType["MsgUnstake"] = "irismod.farm.MsgUnstake"; + TxType["MsgHarvest"] = "irismod.farm.MsgHarvest"; TxType["MsgIssueDenom"] = "irismod.nft.MsgIssueDenom"; TxType["MsgTransferNFT"] = "irismod.nft.MsgTransferNFT"; TxType["MsgEditNFT"] = "irismod.nft.MsgEditNFT"; diff --git a/package.json b/package.json index 4f0716f4..85c7829f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@irisnet/irishub-sdk", - "version": "2.0.1", + "version": "3.0.0", "description": "IRISHub JavaScript SDK", "main": "index.js", "typings": "index.ts", @@ -26,6 +26,7 @@ "check": "gts check", "clean": "gts clean", "build": "rm -rf dist/* && tsc --emitDeclarationOnly && babel --extensions '.ts' src -d dist/src && cp LICENSE dist/ && cp README.md dist/ && cp package.json dist/ && cp -rf src/types/proto-types dist/src/types/proto-types", + "buildForWindows": "rm -rf dist/* && tsc --emitDeclarationOnly && babel --extensions .ts src -d dist/src && cp LICENSE dist/ && cp README.md dist/ && cp package.json dist/ && cp -rf src/types/proto-types dist/src/types/proto-types", "fix": "gts fix", "docs": "npx typedoc && docker build -t irisnet/docs-irishub-sdk-js .", "proto-gen": "sh ./scripts/protocgen.sh" diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index a8857926..76d30dd6 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package cosmos.auth.v1beta1; +import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; @@ -11,6 +12,11 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // Query defines the gRPC querier service. service Query { + // Accounts returns all the existing accounts + rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; + } + // Account returns account details based on address. rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; @@ -22,6 +28,21 @@ service Query { } } +// QueryAccountsRequest is the request type for the Query/Accounts RPC method. +message QueryAccountsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAccountsResponse is the response type for the Query/Accounts RPC method. +message QueryAccountsResponse { + // accounts are the existing accounts + repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // QueryAccountRequest is the request type for the Query/Account RPC method. message QueryAccountRequest { option (gogoproto.equal) = false; diff --git a/proto/cosmos/authz/v1beta1/authz.proto b/proto/cosmos/authz/v1beta1/authz.proto new file mode 100644 index 00000000..c69a93c1 --- /dev/null +++ b/proto/cosmos/authz/v1beta1/authz.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; +option (gogoproto.goproto_getters_all) = false; + +// GenericAuthorization gives the grantee unrestricted permissions to execute +// the provided method on behalf of the granter's account. +message GenericAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // Msg, identified by it's type URL, to grant unrestricted permissions to execute + string msg = 1; +} + +// Grant gives permissions to execute +// the provide method with expiration time. +message Grant { + google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/authz/v1beta1/event.proto b/proto/cosmos/authz/v1beta1/event.proto new file mode 100644 index 00000000..c77cea3e --- /dev/null +++ b/proto/cosmos/authz/v1beta1/event.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// EventGrant is emitted on Msg/Grant +message EventGrant { + // Msg type URL for which an autorization is granted + string msg_type_url = 2; + // Granter account address + string granter = 3; + // Grantee account address + string grantee = 4; +} + +// EventRevoke is emitted on Msg/Revoke +message EventRevoke { + // Msg type URL for which an autorization is revoked + string msg_type_url = 2; + // Granter account address + string granter = 3; + // Grantee account address + string grantee = 4; +} diff --git a/proto/cosmos/authz/v1beta1/genesis.proto b/proto/cosmos/authz/v1beta1/genesis.proto new file mode 100644 index 00000000..411fd276 --- /dev/null +++ b/proto/cosmos/authz/v1beta1/genesis.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// GenesisState defines the authz module's genesis state. +message GenesisState { + repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false]; +} + +// GrantAuthorization defines the GenesisState/GrantAuthorization type. +message GrantAuthorization { + string granter = 1; + string grantee = 2; + + google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; + google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/proto/cosmos/authz/v1beta1/query.proto b/proto/cosmos/authz/v1beta1/query.proto new file mode 100644 index 00000000..3b66e031 --- /dev/null +++ b/proto/cosmos/authz/v1beta1/query.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/authz/v1beta1/authz.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// Query defines the gRPC querier service. +service Query { + // Returns list of `Authorization`, granted to the grantee by the granter. + rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { + option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; + } +} + +// QueryGrantsRequest is the request type for the Query/Grants RPC method. +message QueryGrantsRequest { + string granter = 1; + string grantee = 2; + // Optional, msg_type_url, when set, will query only grants matching given msg type. + string msg_type_url = 3; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +message QueryGrantsResponse { + // authorizations is a list of grants granted for grantee by granter. + repeated cosmos.authz.v1beta1.Grant grants = 1; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/authz/v1beta1/tx.proto b/proto/cosmos/authz/v1beta1/tx.proto new file mode 100644 index 00000000..dd68984e --- /dev/null +++ b/proto/cosmos/authz/v1beta1/tx.proto @@ -0,0 +1,69 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "cosmos/base/abci/v1beta1/abci.proto"; +import "cosmos/authz/v1beta1/authz.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the authz Msg service. +service Msg { + // Grant grants the provided authorization to the grantee on the granter's + // account with the provided expiration time. If there is already a grant + // for the given (granter, grantee, Authorization) triple, then the grant + // will be overwritten. + rpc Grant(MsgGrant) returns (MsgGrantResponse); + + // Exec attempts to execute the provided messages using + // authorizations granted to the grantee. Each message should have only + // one signer corresponding to the granter of the authorization. + rpc Exec(MsgExec) returns (MsgExecResponse); + + // Revoke revokes any authorization corresponding to the provided method name on the + // granter's account that has been granted to the grantee. + rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); +} + +// MsgGrant is a request type for Grant method. It declares authorization to the grantee +// on behalf of the granter with the provided expiration time. +message MsgGrant { + string granter = 1; + string grantee = 2; + + cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; +} + +// MsgExecResponse defines the Msg/MsgExecResponse response type. +message MsgExecResponse { + repeated bytes results = 1; +} + +// MsgExec attempts to execute the provided messages using +// authorizations granted to the grantee. Each message should have only +// one signer corresponding to the granter of the authorization. +message MsgExec { + string grantee = 1; + // Authorization Msg requests to execute. Each msg must implement Authorization interface + // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) + // triple and validate it. + repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"]; +} + +// MsgGrantResponse defines the Msg/MsgGrant response type. +message MsgGrantResponse {} + +// MsgRevoke revokes any authorization with the provided sdk.Msg type on the +// granter's account with that has been granted to the grantee. +message MsgRevoke { + string granter = 1; + string grantee = 2; + string msg_type_url = 3; +} + +// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +message MsgRevokeResponse {} diff --git a/proto/cosmos/bank/v1beta1/authz.proto b/proto/cosmos/bank/v1beta1/authz.proto new file mode 100644 index 00000000..f3505ad4 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/authz.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// SendAuthorization allows the grantee to spend up to spend_limit coins from +// the granter's account. +message SendAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} diff --git a/proto/cosmos/bank/v1beta1/bank.proto b/proto/cosmos/bank/v1beta1/bank.proto index 5a938336..eb843b2c 100644 --- a/proto/cosmos/bank/v1beta1/bank.proto +++ b/proto/cosmos/bank/v1beta1/bank.proto @@ -45,12 +45,14 @@ message Output { // Supply represents a struct that passively keeps track of the total supply // amounts in the network. +// This message is deprecated now that supply is indexed by denom. message Supply { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option deprecated = true; + + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI"; + option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI"; repeated cosmos.base.v1beta1.Coin total = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; @@ -82,4 +84,9 @@ message Metadata { // display indicates the suggested denom that should be // displayed in clients. string display = 4; + // name defines the name of the token (eg: Cosmos Atom) + string name = 5; + // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + // be the same as the display. + string symbol = 6; } diff --git a/proto/cosmos/bank/v1beta1/genesis.proto b/proto/cosmos/bank/v1beta1/genesis.proto index 25c80a38..8fd7329a 100644 --- a/proto/cosmos/bank/v1beta1/genesis.proto +++ b/proto/cosmos/bank/v1beta1/genesis.proto @@ -15,7 +15,8 @@ message GenesisState { // balances is an array containing the balances of all the accounts. repeated Balance balances = 2 [(gogoproto.nullable) = false]; - // supply represents the total supply. + // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided + // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. repeated cosmos.base.v1beta1.Coin supply = 3 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index bc5e2913..e3a464f8 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -90,7 +90,13 @@ message QueryAllBalancesResponse { // QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC // method. -message QueryTotalSupplyRequest {} +message QueryTotalSupplyRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} // QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC // method @@ -98,6 +104,9 @@ message QueryTotalSupplyResponse { // supply is the supply of the coins repeated cosmos.base.v1beta1.Coin supply = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. diff --git a/proto/cosmos/base/query/v1beta1/pagination.proto b/proto/cosmos/base/query/v1beta1/pagination.proto index 2a8cbcce..784c4795 100644 --- a/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/proto/cosmos/base/query/v1beta1/pagination.proto @@ -30,6 +30,9 @@ message PageRequest { // count_total is only respected when offset is used. It is ignored when key // is set. bool count_total = 4; + + // reverse is set to true if results are to be returned in the descending order. + bool reverse = 5; } // PageResponse is to be embedded in gRPC response messages where the diff --git a/proto/cosmos/base/reflection/v2alpha1/reflection.proto b/proto/cosmos/base/reflection/v2alpha1/reflection.proto new file mode 100644 index 00000000..3e8e9404 --- /dev/null +++ b/proto/cosmos/base/reflection/v2alpha1/reflection.proto @@ -0,0 +1,217 @@ +syntax = "proto3"; +package cosmos.base.reflection.v2alpha1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; + +// AppDescriptor describes a cosmos-sdk based application +message AppDescriptor { + // AuthnDescriptor provides information on how to authenticate transactions on the application + // NOTE: experimental and subject to change in future releases. + AuthnDescriptor authn = 1; + // chain provides the chain descriptor + ChainDescriptor chain = 2; + // codec provides metadata information regarding codec related types + CodecDescriptor codec = 3; + // configuration provides metadata information regarding the sdk.Config type + ConfigurationDescriptor configuration = 4; + // query_services provides metadata information regarding the available queriable endpoints + QueryServicesDescriptor query_services = 5; + // tx provides metadata information regarding how to send transactions to the given application + TxDescriptor tx = 6; +} + +// TxDescriptor describes the accepted transaction type +message TxDescriptor { + // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) + // it is not meant to support polymorphism of transaction types, it is supposed to be used by + // reflection clients to understand if they can handle a specific transaction type in an application. + string fullname = 1; + // msgs lists the accepted application messages (sdk.Msg) + repeated MsgDescriptor msgs = 2; +} + +// AuthnDescriptor provides information on how to sign transactions without relying +// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures +message AuthnDescriptor { + // sign_modes defines the supported signature algorithm + repeated SigningModeDescriptor sign_modes = 1; +} + +// SigningModeDescriptor provides information on a signing flow of the application +// NOTE(fdymylja): here we could go as far as providing an entire flow on how +// to sign a message given a SigningModeDescriptor, but it's better to think about +// this another time +message SigningModeDescriptor { + // name defines the unique name of the signing mode + string name = 1; + // number is the unique int32 identifier for the sign_mode enum + int32 number = 2; + // authn_info_provider_method_fullname defines the fullname of the method to call to get + // the metadata required to authenticate using the provided sign_modes + string authn_info_provider_method_fullname = 3; +} + +// ChainDescriptor describes chain information of the application +message ChainDescriptor { + // id is the chain id + string id = 1; +} + +// CodecDescriptor describes the registered interfaces and provides metadata information on the types +message CodecDescriptor { + // interfaces is a list of the registerted interfaces descriptors + repeated InterfaceDescriptor interfaces = 1; +} + +// InterfaceDescriptor describes the implementation of an interface +message InterfaceDescriptor { + // fullname is the name of the interface + string fullname = 1; + // interface_accepting_messages contains information regarding the proto messages which contain the interface as + // google.protobuf.Any field + repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; + // interface_implementers is a list of the descriptors of the interface implementers + repeated InterfaceImplementerDescriptor interface_implementers = 3; +} + +// InterfaceImplementerDescriptor describes an interface implementer +message InterfaceImplementerDescriptor { + // fullname is the protobuf queryable name of the interface implementer + string fullname = 1; + // type_url defines the type URL used when marshalling the type as any + // this is required so we can provide type safe google.protobuf.Any marshalling and + // unmarshalling, making sure that we don't accept just 'any' type + // in our interface fields + string type_url = 2; +} + +// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains +// an interface represented as a google.protobuf.Any +message InterfaceAcceptingMessageDescriptor { + // fullname is the protobuf fullname of the type containing the interface + string fullname = 1; + // field_descriptor_names is a list of the protobuf name (not fullname) of the field + // which contains the interface as google.protobuf.Any (the interface is the same, but + // it can be in multiple fields of the same proto message) + repeated string field_descriptor_names = 2; +} + +// ConfigurationDescriptor contains metadata information on the sdk.Config +message ConfigurationDescriptor { + // bech32_account_address_prefix is the account address prefix + string bech32_account_address_prefix = 1; +} + +// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction +message MsgDescriptor { + // msg_type_url contains the TypeURL of a sdk.Msg. + string msg_type_url = 1; +} + +// ReflectionService defines a service for application reflection. +service ReflectionService { + // GetAuthnDescriptor returns information on how to authenticate transactions in the application + // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in + // future releases of the cosmos-sdk. + rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; + } + // GetChainDescriptor returns the description of the chain + rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; + }; + // GetCodecDescriptor returns the descriptor of the codec of the application + rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; + } + // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application + rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; + } + // GetQueryServicesDescriptor returns the available gRPC queryable services of the application + rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; + } + // GetTxDescriptor returns information on the used transaction object and available msgs that can be used + rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; + } +} + +// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC +message GetAuthnDescriptorRequest {} +// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC +message GetAuthnDescriptorResponse { + // authn describes how to authenticate to the application when sending transactions + AuthnDescriptor authn = 1; +} + +// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC +message GetChainDescriptorRequest {} +// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC +message GetChainDescriptorResponse { + // chain describes application chain information + ChainDescriptor chain = 1; +} + +// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC +message GetCodecDescriptorRequest {} +// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC +message GetCodecDescriptorResponse { + // codec describes the application codec such as registered interfaces and implementations + CodecDescriptor codec = 1; +} + +// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC +message GetConfigurationDescriptorRequest {} +// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC +message GetConfigurationDescriptorResponse { + // config describes the application's sdk.Config + ConfigurationDescriptor config = 1; +} + +// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC +message GetQueryServicesDescriptorRequest {} +// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC +message GetQueryServicesDescriptorResponse { + // queries provides information on the available queryable services + QueryServicesDescriptor queries = 1; +} + +// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC +message GetTxDescriptorRequest {} +// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC +message GetTxDescriptorResponse { + // tx provides information on msgs that can be forwarded to the application + // alongside the accepted transaction protobuf type + TxDescriptor tx = 1; +} + +// QueryServicesDescriptor contains the list of cosmos-sdk queriable services +message QueryServicesDescriptor { + // query_services is a list of cosmos-sdk QueryServiceDescriptor + repeated QueryServiceDescriptor query_services = 1; +} + +// QueryServiceDescriptor describes a cosmos-sdk queryable service +message QueryServiceDescriptor { + // fullname is the protobuf fullname of the service descriptor + string fullname = 1; + // is_module describes if this service is actually exposed by an application's module + bool is_module = 2; + // methods provides a list of query service methods + repeated QueryMethodDescriptor methods = 3; +} + +// QueryMethodDescriptor describes a queryable method of a query service +// no other info is provided beside method name and tendermint queryable path +// because it would be redundant with the grpc reflection service +message QueryMethodDescriptor { + // name is the protobuf name (not fullname) of the method + string name = 1; + // full_query_path is the path that can be used to query + // this method via tendermint abci.Query + string full_query_path = 2; +} diff --git a/proto/cosmos/base/store/v1beta1/listening.proto b/proto/cosmos/base/store/v1beta1/listening.proto new file mode 100644 index 00000000..186ecee4 --- /dev/null +++ b/proto/cosmos/base/store/v1beta1/listening.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) +// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and +// Deletes +message StoreKVPair { + string store_key = 1; // the store key for the KVStore this pair originates from + bool delete = 2; // true indicates a delete operation, false indicates a set operation + bytes key = 3; + bytes value = 4; +} diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto index 50cb5852..505d4131 100644 --- a/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -116,13 +116,14 @@ message GetNodeInfoResponse { // VersionInfo is the type for the GetNodeInfoResponse message. message VersionInfo { - string name = 1; - string app_name = 2; - string version = 3; - string git_commit = 4; - string build_tags = 5; - string go_version = 6; - repeated Module build_deps = 7; + string name = 1; + string app_name = 2; + string version = 3; + string git_commit = 4; + string build_tags = 5; + string go_version = 6; + repeated Module build_deps = 7; + string cosmos_sdk_version = 8; } // Module is the type for VersionInfo diff --git a/proto/cosmos/crypto/ed25519/keys.proto b/proto/cosmos/crypto/ed25519/keys.proto index bed9c29c..6ffec344 100644 --- a/proto/cosmos/crypto/ed25519/keys.proto +++ b/proto/cosmos/crypto/ed25519/keys.proto @@ -5,18 +5,19 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; -// PubKey defines a ed25519 public key -// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -// if the y-coordinate is the lexicographically largest of the two associated with -// the x-coordinate. Otherwise the first byte is a 0x03. -// This prefix is followed with the x-coordinate. +// PubKey is an ed25519 public key for handling Tendermint keys in SDK. +// It's needed for Any serialization and SDK compatibility. +// It must not be used in a non Tendermint key context because it doesn't implement +// ADR-28. Nevertheless, you will like to use ed25519 in app user level +// then you must create a new proto message and follow ADR-28 for Address construction. message PubKey { option (gogoproto.goproto_stringer) = false; bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; } -// PrivKey defines a ed25519 private key. +// Deprecated: PrivKey defines a ed25519 private key. +// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. message PrivKey { bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; } diff --git a/proto/cosmos/crypto/secp256r1/keys.proto b/proto/cosmos/crypto/secp256r1/keys.proto new file mode 100644 index 00000000..b0aad99d --- /dev/null +++ b/proto/cosmos/crypto/secp256r1/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.crypto.secp256r1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; +option (gogoproto.messagename_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// PubKey defines a secp256r1 ECDSA public key. +message PubKey { + // Point on secp256r1 curve in a compressed representation as specified in section + // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 + bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; +} + +// PrivKey defines a secp256r1 ECDSA private key. +message PrivKey { + // secret number serialized using big-endian encoding + bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; +} diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto new file mode 100644 index 00000000..dfd9b782 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// BasicAllowance implements Allowance with a one-time grant of tokens +// that optionally expires. The grantee can use up to SpendLimit to cover fees. +message BasicAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // spend_limit specifies the maximum amount of tokens that can be spent + // by this allowance and will be updated as tokens are spent. If it is + // empty, there is no spend limit and any amount of coins can be spent. + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // expiration specifies an optional time when this allowance expires + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; +} + +// PeriodicAllowance extends Allowance to allow for both a maximum cap, +// as well as a limit per time period. +message PeriodicAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // basic specifies a struct of `BasicAllowance` + BasicAllowance basic = 1 [(gogoproto.nullable) = false]; + + // period specifies the time duration in which period_spend_limit coins can + // be spent before that allowance is reset + google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + // period_spend_limit specifies the maximum number of coins that can be spent + // in the period + repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_can_spend is the number of coins left to be spent before the period_reset time + repeated cosmos.base.v1beta1.Coin period_can_spend = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_reset is the time at which this period resets and a new one begins, + // it is calculated from the start time of the first transaction after the + // last period ended + google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} + +// AllowedMsgAllowance creates allowance only for specified message types. +message AllowedMsgAllowance { + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; + + // allowed_messages are the messages for which the grantee has the access. + repeated string allowed_messages = 2; +} + +// Grant is stored in the KVStore to record a grant with full context +message Grant { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} diff --git a/proto/cosmos/feegrant/v1beta1/genesis.proto b/proto/cosmos/feegrant/v1beta1/genesis.proto new file mode 100644 index 00000000..4c1e51fd --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/feegrant/v1beta1/feegrant.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// GenesisState contains a set of fee allowances, persisted from the store +message GenesisState { + repeated Grant allowances = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto new file mode 100644 index 00000000..00ea598b --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "cosmos/feegrant/v1beta1/feegrant.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// Query defines the gRPC querier service. +service Query { + + // Allowance returns fee granted to the grantee by the granter. + rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; + } + + // Allowances returns all the grants for address. + rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; + } +} + +// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +message QueryAllowanceRequest { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; +} + +// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +message QueryAllowanceResponse { + // allowance is a allowance granted for grantee by granter. + cosmos.feegrant.v1beta1.Grant allowance = 1; +} + +// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +message QueryAllowancesRequest { + string grantee = 1; + + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +message QueryAllowancesResponse { + // allowances are allowance's granted for grantee by granter. + repeated cosmos.feegrant.v1beta1.Grant allowances = 1; + + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto new file mode 100644 index 00000000..66c27a79 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// Msg defines the feegrant msg service. +service Msg { + + // GrantAllowance grants fee allowance to the grantee on the granter's + // account with the provided expiration time. + rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); + + // RevokeAllowance revokes any fee allowance of granter's account that + // has been granted to the grantee. + rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); +} + +// MsgGrantAllowance adds permission for Grantee to spend up to Allowance +// of fees from the account of Granter. +message MsgGrantAllowance { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} + +// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +message MsgGrantAllowanceResponse {} + +// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +message MsgRevokeAllowance { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; +} + +// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +message MsgRevokeAllowanceResponse {} diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 1d72e643..f040772e 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -29,6 +29,16 @@ enum VoteOption { VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; } +// WeightedVoteOption defines a unit of vote for vote split. +message WeightedVoteOption { + VoteOption option = 1; + string weight = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"weight\"" + ]; +} + // TextProposal defines a standard text proposal whose changes need to be // manually updated in case of approval. message TextProposal { @@ -119,9 +129,13 @@ message Vote { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - VoteOption option = 3; + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + // Deprecated: Prefer to use `options` instead. This field is set in queries + // if and only if `len(options) == 1` and that option has weight 1. In all + // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + VoteOption option = 3 [deprecated = true]; + repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; } // DepositParams defines the params for deposits on governance proposals. diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index d4f0c1f9..ecb1cdfe 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -17,6 +17,9 @@ service Msg { // Vote defines a method to add a vote on a specific proposal. rpc Vote(MsgVote) returns (MsgVoteResponse); + // VoteWeighted defines a method to add a weighted vote on a specific proposal. + rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); + // Deposit defines a method to add deposit on a specific proposal. rpc Deposit(MsgDeposit) returns (MsgDepositResponse); } @@ -58,6 +61,21 @@ message MsgVote { // MsgVoteResponse defines the Msg/Vote response type. message MsgVoteResponse {} +// MsgVoteWeighted defines a message to cast a vote. +message MsgVoteWeighted { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; +} + +// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +message MsgVoteWeightedResponse {} + // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { option (gogoproto.equal) = false; diff --git a/proto/cosmos/slashing/v1beta1/genesis.proto b/proto/cosmos/slashing/v1beta1/genesis.proto index c8135613..a7aebcfb 100644 --- a/proto/cosmos/slashing/v1beta1/genesis.proto +++ b/proto/cosmos/slashing/v1beta1/genesis.proto @@ -16,7 +16,7 @@ message GenesisState { repeated SigningInfo signing_infos = 2 [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; - // signing_infos represents a map between validator addresses and their + // missed_blocks represents a map between validator addresses and their // missed blocks. repeated ValidatorMissedBlocks missed_blocks = 3 [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; diff --git a/proto/cosmos/slashing/v1beta1/slashing.proto b/proto/cosmos/slashing/v1beta1/slashing.proto index 657a90f1..882a0fb6 100644 --- a/proto/cosmos/slashing/v1beta1/slashing.proto +++ b/proto/cosmos/slashing/v1beta1/slashing.proto @@ -15,17 +15,20 @@ message ValidatorSigningInfo { option (gogoproto.goproto_stringer) = false; string address = 1; - // height at which validator was first a candidate OR was unjailed + // Height at which validator was first a candidate OR was unjailed int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; - // index offset into signed block bit array + // Index which is incremented each time the validator was a bonded + // in a block and may have signed a precommit or not. This in conjunction with the + // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""]; - // timestamp validator cannot be unjailed until + // Timestamp until which the validator is jailed due to liveness downtime. google.protobuf.Timestamp jailed_until = 4 [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // whether or not a validator has been tombstoned (killed out of validator - // set) + // Whether or not a validator has been tombstoned (killed out of validator set). It is set + // once the validator commits an equivocation or for any other configured misbehiavor. bool tombstoned = 5; - // missed blocks counter (to avoid scanning the array every time) + // A counter kept to avoid unnecessary array reads. + // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; } diff --git a/proto/cosmos/staking/v1beta1/authz.proto b/proto/cosmos/staking/v1beta1/authz.proto new file mode 100644 index 00000000..6345612f --- /dev/null +++ b/proto/cosmos/staking/v1beta1/authz.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +message StakeAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + // empty, there is no spend limit and any amount of coins can be delegated. + cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; + // validators is the oneof that represents either allow_list or deny_list + oneof validators { + // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + // account. + Validators allow_list = 2; + // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + Validators deny_list = 3; + } + // Validators defines list of validator addresses. + message Validators { + repeated string address = 1; + } + // authorization_type defines one of AuthorizationType. + AuthorizationType authorization_type = 4; +} + +// AuthorizationType defines the type of staking module authorization type +enum AuthorizationType { + // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + AUTHORIZATION_TYPE_UNSPECIFIED = 0; + // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + AUTHORIZATION_TYPE_DELEGATE = 1; + // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + AUTHORIZATION_TYPE_UNDELEGATE = 2; + // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + AUTHORIZATION_TYPE_REDELEGATE = 3; +} diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index e37b28b6..76e9599e 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -28,7 +28,7 @@ message CommissionRates { option (gogoproto.goproto_stringer) = false; // rate is the commission rate charged to delegators, as a fraction. - string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. string max_rate = 2 [ (gogoproto.moretags) = "yaml:\"max_rate\"", @@ -49,9 +49,9 @@ message Commission { option (gogoproto.goproto_stringer) = false; // commission_rates defines the initial commission rates to be used for creating a validator. - CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; // update_time is the last time the commission rate was changed. - google.protobuf.Timestamp update_time = 2 + google.protobuf.Timestamp update_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; } @@ -61,15 +61,15 @@ message Description { option (gogoproto.goproto_stringer) = false; // moniker defines a human-readable name for the validator. - string moniker = 1; + string moniker = 1; // identity defines an optional identity signature (ex. UPort or Keybase). - string identity = 2; + string identity = 2; // website defines an optional website link. - string website = 3; + string website = 3; // security_contact defines an optional email for security contact. string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; // details define other optional details. - string details = 5; + string details = 5; } // Validator defines a validator, together with the total amount of the @@ -86,12 +86,12 @@ message Validator { option (gogoproto.goproto_getters) = false; // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. google.protobuf.Any consensus_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; // jailed defined whether the validator has been jailed from bonded status or not. - bool jailed = 3; + bool jailed = 3; // status is the validator status (bonded/unbonding/unbonded). BondStatus status = 4; // tokens define the delegated tokens (incl. self-delegation). @@ -103,16 +103,16 @@ message Validator { (gogoproto.nullable) = false ]; // description defines the description terms for the validator. - Description description = 7 [(gogoproto.nullable) = false]; + Description description = 7 [(gogoproto.nullable) = false]; // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; + int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - google.protobuf.Timestamp unbonding_time = 9 + google.protobuf.Timestamp unbonding_time = 9 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; // commission defines the commission parameters. - Commission commission = 10 [(gogoproto.nullable) = false]; + Commission commission = 10 [(gogoproto.nullable) = false]; // min_self_delegation is the validator's self declared minimum self delegation. - string min_self_delegation = 11 [ + string min_self_delegation = 11 [ (gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false @@ -201,9 +201,9 @@ message UnbondingDelegation { option (gogoproto.goproto_stringer) = false; // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // entries are the unbonding delegation entries. repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } @@ -214,7 +214,7 @@ message UnbondingDelegationEntry { option (gogoproto.goproto_stringer) = false; // creation_height is the height which the unbonding took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; // completion_time is the unix time for unbonding completion. google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; @@ -234,7 +234,7 @@ message RedelegationEntry { option (gogoproto.goproto_stringer) = false; // creation_height defines the height which the redelegation took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; // completion_time defines the unix time for redelegation completion. google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; @@ -257,13 +257,13 @@ message Redelegation { option (gogoproto.goproto_stringer) = false; // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; // entries are the redelegation entries. - repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries + repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries } // Params defines the parameters for the staking module. @@ -275,13 +275,13 @@ message Params { google.protobuf.Duration unbonding_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; // max_validators is the maximum number of validators. - uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; + uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; + uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; // historical_entries is the number of historical entries to persist. uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; // bond_denom defines the bondable coin denomination. - string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; + string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; } // DelegationResponse is equivalent to Delegation except that it contains a diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index 25214c43..646175c0 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -8,7 +8,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; option (gogoproto.goproto_registration) = true; -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; // Service defines a gRPC service for interacting with transactions. service Service { @@ -43,7 +43,7 @@ message GetTxsEventRequest { repeated string events = 1; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; - OrderBy order_by = 3; + OrderBy order_by = 3; } // OrderBy defines the sorting order @@ -51,9 +51,9 @@ enum OrderBy { // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. ORDER_BY_UNSPECIFIED = 0; // ORDER_BY_ASC defines ascending order - ORDER_BY_ASC = 1; + ORDER_BY_ASC = 1; // ORDER_BY_DESC defines descending order - ORDER_BY_DESC = 2; + ORDER_BY_DESC = 2; } // GetTxsEventResponse is the response type for the Service.TxsByEvents @@ -101,7 +101,10 @@ message BroadcastTxResponse { // RPC method. message SimulateRequest { // tx is the transaction to simulate. - cosmos.tx.v1beta1.Tx tx = 1; + // Deprecated. Send raw tx bytes instead. + cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; + // tx_bytes is the raw transaction. + bytes tx_bytes = 2; } // SimulateResponse is the response type for the diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto index 2b02874c..6d5caf12 100644 --- a/proto/cosmos/tx/v1beta1/tx.proto +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -74,7 +74,9 @@ message TxBody { // transaction. repeated google.protobuf.Any messages = 1; - // memo is any arbitrary memo to be added to the transaction + // memo is any arbitrary note/comment to be added to the transaction. + // WARNING: in clients, any publicly exposed text should not be called memo, + // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). string memo = 2; // timeout is the block height after which this transaction will not diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index 9eab27e7..0703ef34 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -23,9 +23,17 @@ service Query { // as a trusted kernel for the next version of this chain. It will only be // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier + // This rpc is deprecated now that IBC has its own replacement + // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { + option deprecated = true; option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; } + + // ModuleVersions queries the list of module versions from state. + rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; + } } // QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC @@ -56,6 +64,8 @@ message QueryAppliedPlanResponse { // QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState // RPC method. message QueryUpgradedConsensusStateRequest { + option deprecated = true; + // last height of the current chain must be sent in request // as this is the height under which next consensus state is stored int64 last_height = 1; @@ -64,5 +74,24 @@ message QueryUpgradedConsensusStateRequest { // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. message QueryUpgradedConsensusStateResponse { - google.protobuf.Any upgraded_consensus_state = 1; + option deprecated = true; + reserved 1; + + bytes upgraded_consensus_state = 2; +} + +// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions +// RPC method. +message QueryModuleVersionsRequest { + // module_name is a field to query a specific module + // consensus version from state. Leaving this empty will + // fetch the full list of module versions from state + string module_name = 1; +} + +// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions +// RPC method. +message QueryModuleVersionsResponse { + // module_versions is a list of module names with their consensus versions. + repeated ModuleVersion module_versions = 1; } diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto index 6d6839ca..4e1d69aa 100644 --- a/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -5,13 +5,13 @@ import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; +option (gogoproto.goproto_getters_all) = false; // Plan specifies information about a planned upgrade and when it should occur. message Plan { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; // Sets the name for the upgrade. This name will be used by the upgraded // version of the software to apply any special "on-upgrade" commands during @@ -22,9 +22,10 @@ message Plan { // reached and the software will exit. string name = 1; - // The time after which the upgrade must be performed. - // Leave set to its zero value to use a pre-defined Height instead. - google.protobuf.Timestamp time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + // has been removed from the SDK. + // If this field is not empty, an error will be thrown. + google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // The height at which the upgrade must be performed. // Only used if Time is not set. @@ -34,18 +35,18 @@ message Plan { // such as a git commit that validators could automatically upgrade to string info = 4; - // IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan - // This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs, - // so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the - // previous version of the chain. - // This will allow IBC connections to persist smoothly across planned chain upgrades - google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; + // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been + // moved to the IBC module in the sub module 02-client. + // If this field is not empty, an error will be thrown. + google.protobuf.Any upgraded_client_state = 5 + [deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; } // SoftwareUpgradeProposal is a gov Content type for initiating a software // upgrade. message SoftwareUpgradeProposal { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; @@ -55,8 +56,21 @@ message SoftwareUpgradeProposal { // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software // upgrade. message CancelSoftwareUpgradeProposal { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; } + +// ModuleVersion specifies a module and its consensus version. +message ModuleVersion { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = true; + + // name of the app module + string name = 1; + + // consensus version of the app module + uint64 version = 2; +} diff --git a/proto/cosmos/vesting/v1beta1/vesting.proto b/proto/cosmos/vesting/v1beta1/vesting.proto index 6bdbbf08..26e78683 100644 --- a/proto/cosmos/vesting/v1beta1/vesting.proto +++ b/proto/cosmos/vesting/v1beta1/vesting.proto @@ -71,3 +71,13 @@ message PeriodicVestingAccount { int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; } + +// PermanentLockedAccount implements the VestingAccount interface. It does +// not ever release coins, locking them indefinitely. Coins in this account can +// still be used for delegating and for governance votes even while locked. +message PermanentLockedAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; +} diff --git a/proto/custom/base.proto b/proto/custom/base.proto new file mode 100644 index 00000000..70bf9fc8 --- /dev/null +++ b/proto/custom/base.proto @@ -0,0 +1,8 @@ +//部分 rpc 返回结构没有对应的 protobuf message, 此处自定义 protobuf message 结构 + +syntax = "proto3"; +package custom; + +message MsgGlobalAccountNumber { + uint64 global_account_number = 1; +} diff --git a/proto/ibc/applications/transfer/v1/genesis.proto b/proto/ibc/applications/transfer/v1/genesis.proto index 98cf2296..9c6b78ac 100644 --- a/proto/ibc/applications/transfer/v1/genesis.proto +++ b/proto/ibc/applications/transfer/v1/genesis.proto @@ -1,10 +1,11 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; -import "gogoproto/gogo.proto"; import "ibc/applications/transfer/v1/transfer.proto"; +import "gogoproto/gogo.proto"; // GenesisState defines the ibc-transfer genesis state message GenesisState { diff --git a/proto/ibc/applications/transfer/v1/query.proto b/proto/ibc/applications/transfer/v1/query.proto index e9cbd02a..cd428413 100644 --- a/proto/ibc/applications/transfer/v1/query.proto +++ b/proto/ibc/applications/transfer/v1/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; import "gogoproto/gogo.proto"; @@ -6,23 +7,23 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/transfer/v1/transfer.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; // Query provides defines the gRPC querier service. service Query { // DenomTrace queries a denomination trace information. rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces/{hash}"; + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; } // DenomTraces queries all denomination traces. rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { - option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces"; + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; } // Params queries all parameters of the ibc-transfer module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/applications/transfer/v1beta1/params"; + option (google.api.http).get = "/ibc/apps/transfer/v1/params"; } } diff --git a/proto/ibc/applications/transfer/v1/transfer.proto b/proto/ibc/applications/transfer/v1/transfer.proto index b388c3b8..b1c41f6a 100644 --- a/proto/ibc/applications/transfer/v1/transfer.proto +++ b/proto/ibc/applications/transfer/v1/transfer.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto index a0f0827a..eb56b470 100644 --- a/proto/ibc/applications/transfer/v1/tx.proto +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 302a4806..edb39d04 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.channel.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/proto/ibc/core/channel/v1/genesis.proto b/proto/ibc/core/channel/v1/genesis.proto index d3b2c042..75bf1fdb 100644 --- a/proto/ibc/core/channel/v1/genesis.proto +++ b/proto/ibc/core/channel/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.channel.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index d9e3ceb8..194fe867 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -1,6 +1,9 @@ syntax = "proto3"; + package ibc.core.channel.v1; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; + import "ibc/core/client/v1/client.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/channel/v1/channel.proto"; @@ -8,88 +11,92 @@ import "google/api/annotations.proto"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; - // Query provides defines the gRPC querier service service Query { // Channel queries an IBC Channel. rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}"; } // Channels queries all the IBC channels of a chain. rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels"; + option (google.api.http).get = "/ibc/core/channel/v1/channels"; } // ConnectionChannels queries all the channels associated with a connection // end. rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/connections/{connection}/channels"; + option (google.api.http).get = "/ibc/core/channel/v1/connections/{connection}/channels"; } // ChannelClientState queries for the client state for the channel associated // with the provided channel identifiers. rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/client_state"; } // ChannelConsensusState queries for the consensus state for the channel // associated with the provided channel identifiers. rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/" - "{revision_number}/height/{revision_height}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/consensus_state/revision/" + "{revision_number}/height/{revision_height}"; } // PacketCommitment queries a stored packet commitment hash. rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" + "packet_commitments/{sequence}"; } // PacketCommitments returns all the packet commitments hashes associated // with a channel. rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_commitments"; } - // PacketReceipt queries if a given packet sequence has been received on the queried chain + // PacketReceipt queries if a given packet sequence has been received on the + // queried chain rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_receipts/{sequence}"; } // PacketAcknowledgement queries a stored packet acknowledgement hash. rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_acks/{sequence}"; } // PacketAcknowledgements returns all the packet acknowledgements associated // with a channel. rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_acknowledgements"; } // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" + "packet_commitments/" "{packet_commitment_sequences}/unreceived_packets"; } - // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a - // channel and sequences. + // UnreceivedAcks returns all the unreceived IBC acknowledgements associated + // with a channel and sequences. rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_commitments/" "{packet_ack_sequences}/unreceived_acks"; } // NextSequenceReceive returns the next receive sequence for a given channel. rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/next_sequence"; } } @@ -250,8 +257,8 @@ message QueryPacketReceiptRequest { uint64 sequence = 3; } -// QueryPacketReceiptResponse defines the client query response for a packet receipt -// which also includes a proof, and the height from which the proof was +// QueryPacketReceiptResponse defines the client query response for a packet +// receipt which also includes a proof, and the height from which the proof was // retrieved message QueryPacketReceiptResponse { // success flag for if receipt exists diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index 5f842641..59af0d3f 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.channel.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; @@ -24,7 +25,8 @@ service Msg { // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. rpc ChannelCloseInit(MsgChannelCloseInit) returns (MsgChannelCloseInitResponse); - // ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. + // ChannelCloseConfirm defines a rpc handler method for + // MsgChannelCloseConfirm. rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); // RecvPacket defines a rpc handler method for MsgRecvPacket. @@ -61,8 +63,8 @@ message MsgChannelOpenTry { option (gogoproto.goproto_getters) = false; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need the channel identifier - // of the previous channel in state INIT + // in the case of crossing hello's, when both chains call OpenInit, we need + // the channel identifier of the previous channel in state INIT string previous_channel_id = 2 [(gogoproto.moretags) = "yaml:\"previous_channel_id\""]; Channel channel = 3 [(gogoproto.nullable) = false]; string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; @@ -108,7 +110,8 @@ message MsgChannelOpenConfirm { string signer = 5; } -// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. +// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response +// type. message MsgChannelOpenConfirmResponse {} // MsgChannelCloseInit defines a msg sent by a Relayer to Chain A @@ -139,7 +142,8 @@ message MsgChannelCloseConfirm { string signer = 5; } -// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. +// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response +// type. message MsgChannelCloseConfirmResponse {} // MsgRecvPacket receives incoming IBC packet diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index 11d2195a..88a6c343 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -1,10 +1,12 @@ syntax = "proto3"; + package ibc.core.client.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; // IdentifiedClientState defines a client state with an additional client // identifier field. @@ -15,7 +17,8 @@ message IdentifiedClientState { google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; } -// ConsensusStateWithHeight defines a consensus state with an additional height field. +// ConsensusStateWithHeight defines a consensus state with an additional height +// field. message ConsensusStateWithHeight { // consensus state height Height height = 1 [(gogoproto.nullable) = false]; @@ -33,9 +36,10 @@ message ClientConsensusStates { [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; } -// ClientUpdateProposal is a governance proposal. If it passes, the client is -// updated with the provided header. The update may fail if the header is not -// valid given certain conditions specified by the client implementation. +// ClientUpdateProposal is a governance proposal. If it passes, the substitute +// client's latest consensus state is copied over to the subject client. The proposal +// handler may fail if the subject and the substitute do not match in client and +// chain parameters (with exception to latest height, frozen height, and chain-id). message ClientUpdateProposal { option (gogoproto.goproto_getters) = false; // the title of the update proposal @@ -43,20 +47,42 @@ message ClientUpdateProposal { // the description of the proposal string description = 2; // the client identifier for the client to be updated if the proposal passes - string client_id = 3 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // the header used to update the client if the proposal passes - google.protobuf.Any header = 4; + string subject_client_id = 3 [(gogoproto.moretags) = "yaml:\"subject_client_id\""]; + // the substitute client identifier for the client standing in for the subject + // client + string substitute_client_id = 4 [(gogoproto.moretags) = "yaml:\"substitute_client_id\""]; +} + +// UpgradeProposal is a gov Content type for initiating an IBC breaking +// upgrade. +message UpgradeProposal { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; + cosmos.upgrade.v1beta1.Plan plan = 3 [(gogoproto.nullable) = false]; + + // An UpgradedClientState must be provided to perform an IBC breaking upgrade. + // This will make the chain commit to the correct upgraded (self) client state + // before the upgrade occurs, so that connecting chains can verify that the + // new upgraded client is valid by verifying a proof on the previous version + // of the chain. This will allow IBC connections to persist smoothly across + // planned chain upgrades + google.protobuf.Any upgraded_client_state = 4 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; } // Height is a monotonically increasing data type // that can be compared against another Height for the purposes of updating and // freezing clients // -// Normally the RevisionHeight is incremented at each height while keeping RevisionNumber -// the same. However some consensus algorithms may choose to reset the -// height in certain conditions e.g. hard forks, state-machine breaking changes -// In these cases, the RevisionNumber is incremented so that height continues to -// be monitonically increasing even as the RevisionHeight gets reset +// Normally the RevisionHeight is incremented at each height while keeping +// RevisionNumber the same. However some consensus algorithms may choose to +// reset the height in certain conditions e.g. hard forks, state-machine +// breaking changes In these cases, the RevisionNumber is incremented so that +// height continues to be monitonically increasing even as the RevisionHeight +// gets reset message Height { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; diff --git a/proto/ibc/core/client/v1/genesis.proto b/proto/ibc/core/client/v1/genesis.proto index 16febbce..30592cf7 100644 --- a/proto/ibc/core/client/v1/genesis.proto +++ b/proto/ibc/core/client/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.client.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; import "ibc/core/client/v1/client.proto"; import "gogoproto/gogo.proto"; @@ -38,9 +39,10 @@ message GenesisMetadata { bytes value = 2; } -// IdentifiedGenesisMetadata has the client metadata with the corresponding client id. +// IdentifiedGenesisMetadata has the client metadata with the corresponding +// client id. message IdentifiedGenesisMetadata { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; repeated GenesisMetadata client_metadata = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_metadata\""]; -} \ No newline at end of file +} diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index 97f3acd6..36a51357 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -1,42 +1,59 @@ syntax = "proto3"; + package ibc.core.client.v1; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; + import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; - // Query provides defines the gRPC querier service service Query { // ClientState queries an IBC light client. rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/client_states/{client_id}"; + option (google.api.http).get = "/ibc/core/client/v1/client_states/{client_id}"; } // ClientStates queries all the IBC light clients of a chain. rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/client_states"; + option (google.api.http).get = "/ibc/core/client/v1/client_states"; } // ConsensusState queries a consensus state associated with a client state at // a given height. rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/" + option (google.api.http).get = "/ibc/core/client/v1/consensus_states/" + "{client_id}/revision/{revision_number}/" "height/{revision_height}"; } // ConsensusStates queries all the consensus state associated with a given // client. rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}"; + option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}"; + } + + // Status queries the status of an IBC client. + rpc ClientStatus(QueryClientStatusRequest) returns (QueryClientStatusResponse) { + option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; } // ClientParams queries all parameters of the ibc client. rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/params"; + option (google.api.http).get = "/ibc/client/v1/params"; + } + + // UpgradedClientState queries an Upgraded IBC light client. + rpc UpgradedClientState(QueryUpgradedClientStateRequest) returns (QueryUpgradedClientStateResponse) { + option (google.api.http).get = "/ibc/core/client/v1/upgraded_client_states"; + } + + // UpgradedConsensusState queries an Upgraded IBC consensus state. + rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { + option (google.api.http).get = "/ibc/core/client/v1/upgraded_consensus_states"; } } @@ -120,11 +137,48 @@ message QueryConsensusStatesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. +// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC +// method +message QueryClientStatusRequest { + // client unique identifier + string client_id = 1; +} + +// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +// method. It returns the current status of the IBC client. +message QueryClientStatusResponse { + string status = 1; +} + +// QueryClientParamsRequest is the request type for the Query/ClientParams RPC +// method. message QueryClientParamsRequest {} -// QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. +// QueryClientParamsResponse is the response type for the Query/ClientParams RPC +// method. message QueryClientParamsResponse { // params defines the parameters of the module. Params params = 1; } + +// QueryUpgradedClientStateRequest is the request type for the +// Query/UpgradedClientState RPC method +message QueryUpgradedClientStateRequest {} + +// QueryUpgradedClientStateResponse is the response type for the +// Query/UpgradedClientState RPC method. +message QueryUpgradedClientStateResponse { + // client state associated with the request identifier + google.protobuf.Any upgraded_client_state = 1; +} + +// QueryUpgradedConsensusStateRequest is the request type for the +// Query/UpgradedConsensusState RPC method +message QueryUpgradedConsensusStateRequest {} + +// QueryUpgradedConsensusStateResponse is the response type for the +// Query/UpgradedConsensusState RPC method. +message QueryUpgradedConsensusStateResponse { + // Consensus state associated with the request identifier + google.protobuf.Any upgraded_consensus_state = 1; +} diff --git a/proto/ibc/core/client/v1/tx.proto b/proto/ibc/core/client/v1/tx.proto index a30ec8bb..35386adb 100644 --- a/proto/ibc/core/client/v1/tx.proto +++ b/proto/ibc/core/client/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.client.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -56,7 +57,8 @@ message MsgUpdateClient { // MsgUpdateClientResponse defines the Msg/UpdateClient response type. message MsgUpdateClientResponse {} -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state +// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client +// state message MsgUpgradeClient { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -65,7 +67,8 @@ message MsgUpgradeClient { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // upgraded client state google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // upgraded consensus state, only contains enough information to serve as a basis of trust in update logic + // upgraded consensus state, only contains enough information to serve as a + // basis of trust in update logic google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; // proof that old chain committed to new client bytes proof_upgrade_client = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade_client\""]; @@ -92,5 +95,6 @@ message MsgSubmitMisbehaviour { string signer = 3; } -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. +// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response +// type. message MsgSubmitMisbehaviourResponse {} diff --git a/proto/ibc/core/commitment/v1/commitment.proto b/proto/ibc/core/commitment/v1/commitment.proto index 51c10273..47d82394 100644 --- a/proto/ibc/core/commitment/v1/commitment.proto +++ b/proto/ibc/core/commitment/v1/commitment.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.commitment.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/23-commitment/types"; import "gogoproto/gogo.proto"; import "confio/proofs.proto"; @@ -37,4 +38,4 @@ message MerklePath { // MerkleProofs are ordered from leaf-to-root message MerkleProof { repeated ics23.CommitmentProof proofs = 1; -} \ No newline at end of file +} diff --git a/proto/ibc/core/connection/v1/connection.proto b/proto/ibc/core/connection/v1/connection.proto index d21e5951..72c0ff7d 100644 --- a/proto/ibc/core/connection/v1/connection.proto +++ b/proto/ibc/core/connection/v1/connection.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.connection.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/commitment/v1/commitment.proto"; @@ -24,8 +25,9 @@ message ConnectionEnd { State state = 3; // counterparty chain associated with this connection. Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - // delay period that must pass before a consensus state can be used for packet-verification - // NOTE: delay period logic is only implemented by some clients. + // delay period that must pass before a consensus state can be used for + // packet-verification NOTE: delay period logic is only implemented by some + // clients. uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; } @@ -102,3 +104,11 @@ message Version { // list of features compatible with the specified identifier repeated string features = 2; } + +// Params defines the set of Connection parameters. +message Params { + // maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the + // largest amount of time that the chain might reasonably take to produce the next block under normal operating + // conditions. A safe choice is 3-5x the expected time per block. + uint64 max_expected_time_per_block = 1 [(gogoproto.moretags) = "yaml:\"max_expected_time_per_block\""]; +} diff --git a/proto/ibc/core/connection/v1/genesis.proto b/proto/ibc/core/connection/v1/genesis.proto index 11df4ba1..64f2e026 100644 --- a/proto/ibc/core/connection/v1/genesis.proto +++ b/proto/ibc/core/connection/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.connection.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/connection/v1/connection.proto"; @@ -13,4 +14,5 @@ message GenesisState { [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""]; // the sequence for the next generated connection identifier uint64 next_connection_sequence = 3 [(gogoproto.moretags) = "yaml:\"next_connection_sequence\""]; + Params params = 4 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto index c5085a13..ca90e0ee 100644 --- a/proto/ibc/core/connection/v1/query.proto +++ b/proto/ibc/core/connection/v1/query.proto @@ -1,6 +1,9 @@ syntax = "proto3"; + package ibc.core.connection.v1; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; + import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; @@ -8,36 +11,34 @@ import "ibc/core/connection/v1/connection.proto"; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; - // Query provides defines the gRPC querier service service Query { // Connection queries an IBC connection end. rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}"; + option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}"; } // Connections queries all the IBC connections of a chain. rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections"; + option (google.api.http).get = "/ibc/core/connection/v1/connections"; } // ClientConnections queries the connection paths associated with a client // state. rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/client_connections/{client_id}"; + option (google.api.http).get = "/ibc/core/connection/v1/client_connections/{client_id}"; } // ConnectionClientState queries the client state associated with the // connection. rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/client_state"; + option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/client_state"; } // ConnectionConsensusState queries the consensus state associated with the // connection. rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/" + option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" "revision/{revision_number}/height/{revision_height}"; } } diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 19b40c69..6318f9fd 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.connection.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -19,7 +20,8 @@ service Msg { // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); - // ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. + // ConnectionOpenConfirm defines a rpc handler method for + // MsgConnectionOpenConfirm. rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); } @@ -36,7 +38,8 @@ message MsgConnectionOpenInit { string signer = 5; } -// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. +// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response +// type. message MsgConnectionOpenInitResponse {} // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a @@ -46,8 +49,8 @@ message MsgConnectionOpenTry { option (gogoproto.goproto_getters) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need the connection identifier - // of the previous connection in state INIT + // in the case of crossing hello's, when both chains call OpenInit, we need + // the connection identifier of the previous connection in state INIT string previous_connection_id = 2 [(gogoproto.moretags) = "yaml:\"previous_connection_id\""]; google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; Counterparty counterparty = 4 [(gogoproto.nullable) = false]; @@ -111,5 +114,6 @@ message MsgConnectionOpenConfirm { string signer = 4; } -// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. +// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm +// response type. message MsgConnectionOpenConfirmResponse {} diff --git a/proto/ibc/core/types/v1/genesis.proto b/proto/ibc/core/types/v1/genesis.proto index ace50859..2451da32 100644 --- a/proto/ibc/core/types/v1/genesis.proto +++ b/proto/ibc/core/types/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.types.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/genesis.proto"; diff --git a/proto/ibc/lightclients/localhost/v1/localhost.proto b/proto/ibc/lightclients/localhost/v1/localhost.proto index d48a1c00..77e17bc3 100644 --- a/proto/ibc/lightclients/localhost/v1/localhost.proto +++ b/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -1,11 +1,12 @@ syntax = "proto3"; + package ibc.lightclients.localhost.v1; +option go_package = "github.com/cosmos/ibc-go/modules/light-clients/09-localhost/types"; + import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/09-localhost/types"; - // ClientState defines a loopback (localhost) client. It requires (read-only) // access to keys outside the client prefix. message ClientState { diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/proto/ibc/lightclients/solomachine/v1/solomachine.proto index 89686f3b..4ba0da25 100644 --- a/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.lightclients.solomachine.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/legacy/v100"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; @@ -22,14 +23,16 @@ message ClientState { bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; } -// ConsensusState defines a solo machine consensus state. The sequence of a consensus state -// is contained in the "height" key used in storing the consensus state. +// ConsensusState defines a solo machine consensus state. The sequence of a +// consensus state is contained in the "height" key used in storing the +// consensus state. message ConsensusState { option (gogoproto.goproto_getters) = false; // public key of the solo machine google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo machine clients - // (potentially on different chains) without being considered misbehaviour. + // diversifier allows the same public key to be re-used across different solo + // machine clients (potentially on different chains) without being considered + // misbehaviour. string diversifier = 2; uint64 timestamp = 3; } @@ -86,8 +89,8 @@ message SignBytes { bytes data = 5; } -// DataType defines the type of solo machine proof being created. This is done to preserve uniqueness of different -// data sign byte encodings. +// DataType defines the type of solo machine proof being created. This is done +// to preserve uniqueness of different data sign byte encodings. enum DataType { option (gogoproto.goproto_enum_prefix) = false; diff --git a/proto/ibc/lightclients/solomachine/v2/solomachine.proto b/proto/ibc/lightclients/solomachine/v2/solomachine.proto new file mode 100644 index 00000000..fdb659f6 --- /dev/null +++ b/proto/ibc/lightclients/solomachine/v2/solomachine.proto @@ -0,0 +1,189 @@ +syntax = "proto3"; + +package ibc.lightclients.solomachine.v2; + +option go_package = "github.com/cosmos/ibc-go/modules/light-clients/06-solomachine/types"; + +import "ibc/core/connection/v1/connection.proto"; +import "ibc/core/channel/v1/channel.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +// ClientState defines a solo machine client that tracks the current consensus +// state and if the client is frozen. +message ClientState { + option (gogoproto.goproto_getters) = false; + // latest sequence of the client state + uint64 sequence = 1; + // frozen sequence of the solo machine + bool is_frozen = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""]; + ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; + // when set to true, will allow governance to update a solo machine client. + // The client will be unfrozen if it is frozen. + bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; +} + +// ConsensusState defines a solo machine consensus state. The sequence of a +// consensus state is contained in the "height" key used in storing the +// consensus state. +message ConsensusState { + option (gogoproto.goproto_getters) = false; + // public key of the solo machine + google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; + // diversifier allows the same public key to be re-used across different solo + // machine clients (potentially on different chains) without being considered + // misbehaviour. + string diversifier = 2; + uint64 timestamp = 3; +} + +// Header defines a solo machine consensus header +message Header { + option (gogoproto.goproto_getters) = false; + // sequence to update solo machine public key at + uint64 sequence = 1; + uint64 timestamp = 2; + bytes signature = 3; + google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; + string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; +} + +// Misbehaviour defines misbehaviour for a solo machine which consists +// of a sequence and two signatures over different messages at that sequence. +message Misbehaviour { + option (gogoproto.goproto_getters) = false; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + uint64 sequence = 2; + SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; + SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; +} + +// SignatureAndData contains a signature and the data signed over to create that +// signature. +message SignatureAndData { + option (gogoproto.goproto_getters) = false; + bytes signature = 1; + DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; + bytes data = 3; + uint64 timestamp = 4; +} + +// TimestampedSignatureData contains the signature data and the timestamp of the +// signature. +message TimestampedSignatureData { + option (gogoproto.goproto_getters) = false; + bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; + uint64 timestamp = 2; +} + +// SignBytes defines the signed bytes used for signature verification. +message SignBytes { + option (gogoproto.goproto_getters) = false; + + uint64 sequence = 1; + uint64 timestamp = 2; + string diversifier = 3; + // type of the data used + DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; + // marshaled data + bytes data = 5; +} + +// DataType defines the type of solo machine proof being created. This is done +// to preserve uniqueness of different data sign byte encodings. +enum DataType { + option (gogoproto.goproto_enum_prefix) = false; + + // Default State + DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; + // Data type for client state verification + DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; + // Data type for consensus state verification + DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; + // Data type for connection state verification + DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; + // Data type for channel state verification + DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; + // Data type for packet commitment verification + DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; + // Data type for packet acknowledgement verification + DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; + // Data type for packet receipt absence verification + DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; + // Data type for next sequence recv verification + DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; + // Data type for header verification + DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; +} + +// HeaderData returns the SignBytes data for update verification. +message HeaderData { + option (gogoproto.goproto_getters) = false; + + // header public key + google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; + // header diversifier + string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; +} + +// ClientStateData returns the SignBytes data for client state verification. +message ClientStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; +} + +// ConsensusStateData returns the SignBytes data for consensus state +// verification. +message ConsensusStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; +} + +// ConnectionStateData returns the SignBytes data for connection state +// verification. +message ConnectionStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + ibc.core.connection.v1.ConnectionEnd connection = 2; +} + +// ChannelStateData returns the SignBytes data for channel state +// verification. +message ChannelStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + ibc.core.channel.v1.Channel channel = 2; +} + +// PacketCommitmentData returns the SignBytes data for packet commitment +// verification. +message PacketCommitmentData { + bytes path = 1; + bytes commitment = 2; +} + +// PacketAcknowledgementData returns the SignBytes data for acknowledgement +// verification. +message PacketAcknowledgementData { + bytes path = 1; + bytes acknowledgement = 2; +} + +// PacketReceiptAbsenceData returns the SignBytes data for +// packet receipt absence verification. +message PacketReceiptAbsenceData { + bytes path = 1; +} + +// NextSequenceRecvData returns the SignBytes data for verification of the next +// sequence to be received. +message NextSequenceRecvData { + bytes path = 1; + uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; +} diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index a6882bf4..17a6cce4 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.lightclients.tendermint.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types"; +option go_package = "github.com/cosmos/ibc-go/modules/light-clients/07-tendermint/types"; import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; @@ -43,10 +44,12 @@ message ClientState { repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; // Path at which next upgraded client will be committed. - // Each element corresponds to the key for a single CommitmentProof in the chained proof. - // NOTE: ClientState must stored under `{upgradePath}/{upgradeHeight}/clientState` - // ConsensusState must be stored under `{upgradepath}/{upgradeHeight}/consensusState` - // For SDK chains using the default upgrade module, upgrade_path should be []string{"upgrade", "upgradedIBCState"}` + // Each element corresponds to the key for a single CommitmentProof in the + // chained proof. NOTE: ClientState must stored under + // `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored + // under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using + // the default upgrade module, upgrade_path should be []string{"upgrade", + // "upgradedIBCState"}` repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; // This flag, when set to true, will allow governance to recover a client @@ -104,7 +107,8 @@ message Header { .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; } -// Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. +// Fraction defines the protobuf message type for tmmath.Fraction that only +// supports positive values. message Fraction { uint64 numerator = 1; uint64 denominator = 2; diff --git a/proto/irismod/coinswap/coinswap.proto b/proto/irismod/coinswap/coinswap.proto index 408735dd..76768630 100644 --- a/proto/irismod/coinswap/coinswap.proto +++ b/proto/irismod/coinswap/coinswap.proto @@ -9,22 +9,44 @@ option (gogoproto.goproto_getters_all) = false; // Input defines the properties of order's input message Input { - string address = 1; - cosmos.base.v1beta1.Coin coin = 2 [(gogoproto.nullable) = false]; + string address = 1; + cosmos.base.v1beta1.Coin coin = 2 [ (gogoproto.nullable) = false ]; } // Output defines the properties of order's output message Output { - string address = 1; - cosmos.base.v1beta1.Coin coin = 2 [(gogoproto.nullable) = false]; + string address = 1; + cosmos.base.v1beta1.Coin coin = 2 [ (gogoproto.nullable) = false ]; } -// token parameters +message Pool { + string id = 1; + // denom of base coin of the pool + string standard_denom = 2; + // denom of counterparty coin of the pool + string counterparty_denom = 3; + // escrow account for deposit tokens + string escrow_address = 4; + // denom of the liquidity pool coin + string lpt_denom = 5; +} + +// Params defines token module's parameters message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + cosmos.base.v1beta1.Coin fee = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; - cosmos.base.v1beta1.Coin fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin pool_creation_fee = 2 [ + (gogoproto.nullable) = false + ]; - string standard_denom = 2 [(gogoproto.moretags) = "yaml:\"standard_denom\""]; + string tax_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/proto/irismod/coinswap/genesis.proto b/proto/irismod/coinswap/genesis.proto index 19407cf6..2a2ff24a 100644 --- a/proto/irismod/coinswap/genesis.proto +++ b/proto/irismod/coinswap/genesis.proto @@ -6,8 +6,11 @@ import "irismod/coinswap/coinswap.proto"; option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; -// GenesisState defines the coinswap module's genesis state. +// GenesisState defines the coinswap module's genesis state message GenesisState { - Params params = 1 [(gogoproto.nullable) = false]; + Params params = 1 [ (gogoproto.nullable) = false ]; + string standard_denom = 2 + [ (gogoproto.moretags) = "yaml:\"standard_denom\"" ]; + repeated irismod.coinswap.Pool pool = 3 [ (gogoproto.nullable) = false ]; + uint64 sequence = 4; } - diff --git a/proto/irismod/coinswap/query.proto b/proto/irismod/coinswap/query.proto index 87a8b4e0..c2090162 100644 --- a/proto/irismod/coinswap/query.proto +++ b/proto/irismod/coinswap/query.proto @@ -4,26 +4,60 @@ package irismod.coinswap; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; // Query creates service with coinswap as rpc service Query { - // Liquidity returns the total liquidity available for the provided denomination - rpc Liquidity (QueryLiquidityRequest) returns (QueryLiquidityResponse) { - option (google.api.http).get = "/irismod/coinswap/liquidities/{id}"; - } + // LiquidityPool returns the liquidity pool for the provided + // lpt_denom + rpc LiquidityPool(QueryLiquidityPoolRequest) + returns (QueryLiquidityPoolResponse) { + option (google.api.http).get = "/irismod/coinswap/pools/{lpt_denom}"; + } + + // LiquidityPools returns all the liquidity pools available + rpc LiquidityPools(QueryLiquidityPoolsRequest) + returns (QueryLiquidityPoolsResponse) { + option (google.api.http).get = "/irismod/coinswap/pools"; + } +} + +// QueryLiquidityPoolRequest is request type for the Query/LiquidityPool RPC +// method +message QueryLiquidityPoolRequest { string lpt_denom = 1; } + +// QueryLiquidityPoolResponse is response type for the Query/LiquidityPool RPC +// method +message QueryLiquidityPoolResponse { + PoolInfo pool = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryLiquidityPoolsRequest is request type for the Query/LiquidityPools RPC +// method +message QueryLiquidityPoolsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// QueryLiquidityRequest is request type for the Query/Liquidity RPC method -message QueryLiquidityRequest { - string id = 1; +// QueryLiquidityPoolsResponse is response type for the Query/LiquidityPools RPC +// method +message QueryLiquidityPoolsResponse { + repeated PoolInfo pools = 1 [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryLiquidityResponse is response type for the Query/Liquidity RPC method -message QueryLiquidityResponse { - cosmos.base.v1beta1.Coin standard = 1 [(gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin token = 2 [(gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin liquidity = 3 [(gogoproto.nullable) = false]; - string fee = 4; +message PoolInfo { + string id = 1; + // escrow account for deposit tokens + string escrow_address = 2; + // main token balance + cosmos.base.v1beta1.Coin standard = 3 [ (gogoproto.nullable) = false ]; + // counterparty token balance + cosmos.base.v1beta1.Coin token = 4 [ (gogoproto.nullable) = false ]; + // liquidity token balance + cosmos.base.v1beta1.Coin lpt = 5 [ (gogoproto.nullable) = false ]; + // liquidity pool fee + string fee = 6; } \ No newline at end of file diff --git a/proto/irismod/coinswap/tx.proto b/proto/irismod/coinswap/tx.proto index 15af60d3..2c869ec6 100644 --- a/proto/irismod/coinswap/tx.proto +++ b/proto/irismod/coinswap/tx.proto @@ -8,53 +8,53 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; option (gogoproto.goproto_getters_all) = false; -// Msg defines the coinswap Msg service. +// Msg defines the coinswap Msg service service Msg { - // AddLiquidity defines a method for depositing some tokens to the liquidity pool. + // AddLiquidity defines a method for depositing some tokens to the liquidity pool rpc AddLiquidity(MsgAddLiquidity) returns (MsgAddLiquidityResponse); - // RemoveLiquidity defines a method for withdraw some tokens from the liquidity pool. + // RemoveLiquidity defines a method for withdraw some tokens from the liquidity pool rpc RemoveLiquidity(MsgRemoveLiquidity) returns (MsgRemoveLiquidityResponse); - // SwapCoin defines a method for swapping a token with the other token from the liquidity pool. + // SwapCoin defines a method for swapping a token with the other token from the liquidity pool rpc SwapCoin(MsgSwapOrder) returns (MsgSwapCoinResponse); } -// MsgAddLiquidity represents a msg for adding liquidity to a reserve pool +// MsgAddLiquidity defines a msg for adding liquidity to a reserve pool message MsgAddLiquidity { - cosmos.base.v1beta1.Coin max_token = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"max_token\""]; - string exact_standard_amt = 2 [(gogoproto.moretags) = "yaml:\"exact_standard_amt\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string min_liquidity = 3 [(gogoproto.moretags) = "yaml:\"min_liquidity\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin max_token = 1 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"max_token\"" ]; + string exact_standard_amt = 2 [ (gogoproto.moretags) = "yaml:\"exact_standard_amt\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + string min_liquidity = 3 [ (gogoproto.moretags) = "yaml:\"min_liquidity\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; int64 deadline = 4; string sender = 5; } -// MsgAddLiquidityResponse defines the Msg/AddLiquidity response type. +// MsgAddLiquidityResponse defines the Msg/AddLiquidity response type message MsgAddLiquidityResponse { cosmos.base.v1beta1.Coin mint_token = 1; } -// MsgRemoveLiquidity - struct for removing liquidity from a reserve pool +// MsgRemoveLiquidity defines a msg for removing liquidity from a reserve pool message MsgRemoveLiquidity { - cosmos.base.v1beta1.Coin withdraw_liquidity = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"withdraw_liquidity\""]; - string min_token = 2 [(gogoproto.moretags) = "yaml:\"min_token\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string min_standard_amt = 3 [(gogoproto.moretags) = "yaml:\"min_standard_amt\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin withdraw_liquidity = 1 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"withdraw_liquidity\"" ]; + string min_token = 2 [ (gogoproto.moretags) = "yaml:\"min_token\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + string min_standard_amt = 3 [ (gogoproto.moretags) = "yaml:\"min_standard_amt\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; int64 deadline = 4; string sender = 5; } -// MsgRemoveLiquidityResponse defines the Msg/RemoveLiquidity response type. +// MsgRemoveLiquidityResponse defines the Msg/RemoveLiquidity response type message MsgRemoveLiquidityResponse { - repeated cosmos.base.v1beta1.Coin withdraw_coins = 1; + repeated cosmos.base.v1beta1.Coin withdraw_coins = 1; } -// MsgSwapOrder represents a msg for swap order +// MsgSwapOrder defines a msg for swap order message MsgSwapOrder { - Input input = 1 [(gogoproto.nullable) = false]; - Output output = 2 [(gogoproto.nullable) = false]; + Input input = 1 [ (gogoproto.nullable) = false ]; + Output output = 2 [ (gogoproto.nullable) = false ]; int64 deadline = 3; - bool is_buy_order = 4 [(gogoproto.moretags) = "yaml:\"is_buy_order\""]; + bool is_buy_order = 4 [ (gogoproto.moretags) = "yaml:\"is_buy_order\"" ]; } -// MsgSwapCoinResponse defines the Msg/SwapCoin response type. +// MsgSwapCoinResponse defines the Msg/SwapCoin response type message MsgSwapCoinResponse {} \ No newline at end of file diff --git a/proto/irismod/farm/farm.proto b/proto/irismod/farm/farm.proto new file mode 100644 index 00000000..2c5e9052 --- /dev/null +++ b/proto/irismod/farm/farm.proto @@ -0,0 +1,98 @@ +syntax = "proto3"; +package irismod.farm; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/farm/types"; +option (gogoproto.goproto_getters_all) = false; + +message FarmPool { + option (gogoproto.equal) = true; + + string id = 1; + string creator = 2; + string description = 3; + int64 start_height = 4; + int64 end_height = 5; + int64 last_height_distr_rewards = 6; + bool editable = 7; + cosmos.base.v1beta1.Coin total_lpt_locked = 8 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + repeated RewardRule rules = 9 [ (gogoproto.nullable) = false ]; +} + +message RewardRule { + option (gogoproto.equal) = true; + + string reward = 1; + string total_reward = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string remaining_reward = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string reward_per_block = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string reward_per_share = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +message FarmInfo { + option (gogoproto.equal) = true; + + string pool_id = 1; + string address = 2; + string locked = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin reward_debt = 4 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} + +message Params { + cosmos.base.v1beta1.Coin pool_creation_fee = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + uint32 max_reward_categories = 2; + string tax_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +message EscrowInfo { + option (gogoproto.equal) = true; + + string proposer = 1; + repeated cosmos.base.v1beta1.Coin fund_applied = 2 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin fund_self_bond = 3 [(gogoproto.nullable) = false]; + uint64 proposal_id = 4; +} + + +// CommunityPoolCreateFarmProposal is a gov Content type for creating a farm pool with community pool +message CommunityPoolCreateFarmProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + string pool_description = 3; + string lpt_denom = 4; + repeated cosmos.base.v1beta1.Coin reward_per_block = 5 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin fund_applied = 6 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin fund_self_bond = 7 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/irismod/farm/genesis.proto b/proto/irismod/farm/genesis.proto new file mode 100644 index 00000000..656b0a9f --- /dev/null +++ b/proto/irismod/farm/genesis.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package irismod.farm; + +import "gogoproto/gogo.proto"; +import "irismod/farm/farm.proto"; + +option go_package = "github.com/irisnet/irismod/modules/farm/types"; + +message GenesisState { + Params params = 1 [ (gogoproto.nullable) = false ]; + repeated FarmPool pools = 2 [ (gogoproto.nullable) = false ]; + repeated FarmInfo farm_infos = 3 [ (gogoproto.nullable) = false ]; + uint64 sequence = 4; + repeated EscrowInfo escrow = 5 [ (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/proto/irismod/farm/query.proto b/proto/irismod/farm/query.proto new file mode 100644 index 00000000..0c871fa2 --- /dev/null +++ b/proto/irismod/farm/query.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; +package irismod.farm; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "irismod/farm/farm.proto"; + +option go_package = "github.com/irisnet/irismod/modules/farm/types"; + +service Query { + rpc FarmPools(QueryFarmPoolsRequest) returns (QueryFarmPoolsResponse) { + option (google.api.http).get = "/irismod/farm/pools"; + } + + rpc FarmPool(QueryFarmPoolRequest) returns (QueryFarmPoolResponse) { + option (google.api.http).get = "/irismod/farm/pool/{id}"; + } + + rpc Farmer(QueryFarmerRequest) returns (QueryFarmerResponse) { + option (google.api.http).get = "/irismod/farm/farmers/{farmer}"; + } + + // Params queries the htlc parameters + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/irismod/farm/params"; + } +} + +message QueryFarmPoolsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +message FarmPoolEntry { + string id = 1; + string creator = 2; + string description = 3; + int64 start_height = 4; + int64 end_height = 5; + bool editable = 6; + bool expired = 7; + cosmos.base.v1beta1.Coin total_lpt_locked = 8 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin total_reward = 9 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin remaining_reward = 10 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin reward_per_block = 11 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} + +message QueryFarmPoolsResponse { + repeated FarmPoolEntry pools = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryFarmPoolRequest { string id = 1; } +message QueryFarmPoolResponse { FarmPoolEntry pool = 1; } + +message QueryFarmerRequest { + string farmer = 1; + string pool_id = 2; +} + +message QueryFarmerResponse { + repeated LockedInfo list = 1; + int64 height = 2; +} + +message QueryParamsRequest {} + +message QueryParamsResponse { + Params params = 1 [ (gogoproto.nullable) = false ]; +} + +message LockedInfo { + string pool_id = 1; + cosmos.base.v1beta1.Coin locked = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin pending_reward = 3 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} \ No newline at end of file diff --git a/proto/irismod/farm/tx.proto b/proto/irismod/farm/tx.proto new file mode 100644 index 00000000..c106cd54 --- /dev/null +++ b/proto/irismod/farm/tx.proto @@ -0,0 +1,138 @@ +syntax = "proto3"; +package irismod.farm; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "irismod/farm/farm.proto"; + +option go_package = "github.com/irisnet/irismod/modules/farm/types"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the farm Msg service. +service Msg { + // CreatePool defines a method for creating a new farm pool + rpc CreatePool(MsgCreatePool) returns (MsgCreatePoolResponse); + + // CreatePoolWithCommunityPool defines a method for creating a new farm pool + rpc CreatePoolWithCommunityPool(MsgCreatePoolWithCommunityPool) returns (MsgCreatePoolWithCommunityPoolResponse); + + // DestroyPool defines a method for destroying a existed farm pool + rpc DestroyPool(MsgDestroyPool) returns (MsgDestroyPoolResponse); + + // AdjustPool defines a method for adjusting the farm pool params + rpc AdjustPool(MsgAdjustPool) returns (MsgAdjustPoolResponse); + + // Stake defines a method for staking some lp token to a farm pool + rpc Stake(MsgStake) returns (MsgStakeResponse); + + // Unstake defines a method for unstaking some lp token from a farm pool and + // withdraw some reward + rpc Unstake(MsgUnstake) returns (MsgUnstakeResponse); + + // Harvest defines a method withdraw some reward from a farm pool + rpc Harvest(MsgHarvest) returns (MsgHarvestResponse); +} + +message MsgCreatePool { + option (gogoproto.equal) = true; + + string description = 1; + string lpt_denom = 2; + int64 start_height = 3; + repeated cosmos.base.v1beta1.Coin reward_per_block = 4 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin total_reward = 5 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + bool editable = 6; + string creator = 7; +} + +message MsgCreatePoolWithCommunityPool { + option (gogoproto.equal) = true; + + CommunityPoolCreateFarmProposal content = 1 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"initial_deposit\"" + ]; + string proposer = 3; +} + +message MsgDestroyPool { + option (gogoproto.equal) = true; + + string pool_id = 1; + string creator = 2; +} + +message MsgAdjustPool { + option (gogoproto.equal) = true; + + string pool_id = 1; + repeated cosmos.base.v1beta1.Coin additional_reward = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.Coin reward_per_block = 3 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + string creator = 4; +} + +message MsgStake { + option (gogoproto.equal) = true; + + string pool_id = 1; + cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string sender = 3; +} + +message MsgUnstake { + option (gogoproto.equal) = true; + + string pool_id = 1; + cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string sender = 3; +} + +message MsgHarvest { + option (gogoproto.equal) = true; + + string pool_id = 1; + string sender = 2; +} + +message MsgCreatePoolResponse {} +message MsgCreatePoolWithCommunityPoolResponse {} +message MsgDestroyPoolResponse {} +message MsgAdjustPoolResponse {} +message MsgStakeResponse { + repeated cosmos.base.v1beta1.Coin reward = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} +message MsgUnstakeResponse { + repeated cosmos.base.v1beta1.Coin reward = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} +message MsgHarvestResponse { + repeated cosmos.base.v1beta1.Coin reward = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} \ No newline at end of file diff --git a/proto/irismod/mt/genesis.proto b/proto/irismod/mt/genesis.proto new file mode 100644 index 00000000..56fc4264 --- /dev/null +++ b/proto/irismod/mt/genesis.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package irismod.mt; + +import "gogoproto/gogo.proto"; +import "irismod/mt/mt.proto"; + +option go_package = "github.com/irisnet/irismod/modules/mt/types"; + +// GenesisState defines the MT module's genesis state +message GenesisState { + repeated Collection collections = 1 [(gogoproto.nullable) = false]; + repeated Owner owners = 2 [(gogoproto.nullable) = false]; +} + +// Collection defines a type of collection +message Collection { + option (gogoproto.equal) = true; + + Denom denom = 1; + repeated MT mts = 2 [(gogoproto.nullable) = false]; +} + +// Owner defines a type of account balances +message Owner { + option (gogoproto.equal) = true; + + string address = 1; + repeated DenomBalance denoms = 2 [(gogoproto.nullable) = false]; +} + +// DenomBalance defines a type of denom balances owned by an account +message DenomBalance { + option (gogoproto.equal) = true; + + string denom_id = 1; + repeated Balance balances = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/irismod/mt/mt.proto b/proto/irismod/mt/mt.proto new file mode 100644 index 00000000..b660deaf --- /dev/null +++ b/proto/irismod/mt/mt.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package irismod.mt; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/mt/types"; +option (gogoproto.goproto_getters_all) = false; + +// Denom defines a class of MTs +message Denom { + option (gogoproto.equal) = true; + + string id = 1; + string name = 2; + bytes data = 3; + string owner = 4; +} + +// MT defines a multi token +message MT { + option (gogoproto.equal) = true; + + string id = 1; + uint64 supply = 2; + bytes data = 3; +} + +// Balance defines multi token balance for owners +message Balance { + option (gogoproto.equal) = true; + + string mt_id = 1; + uint64 amount = 2; +} \ No newline at end of file diff --git a/proto/irismod/mt/query.proto b/proto/irismod/mt/query.proto new file mode 100644 index 00000000..efcb19de --- /dev/null +++ b/proto/irismod/mt/query.proto @@ -0,0 +1,129 @@ +syntax = "proto3"; +package irismod.mt; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "irismod/mt/mt.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/irisnet/irismod/modules/mt/types"; + +// Query defines the gRPC querier service for MT module +service Query { + // Supply queries the total supply of a given denom or owner + rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { + option (google.api.http).get = "/irismod/mt/denoms/supply"; + } + + // Denoms queries all the denoms + rpc Denoms(QueryDenomsRequest) returns (QueryDenomsResponse) { + option (google.api.http).get = "/irismod/mt/denoms"; + } + + // Denom queries the definition of a given denom ID + rpc Denom(QueryDenomRequest) returns (QueryDenomResponse) { + option (google.api.http).get = "/irismod/mt/denoms/{denom_id}"; + } + + // MTSupply queries the total supply of given denom and mt ID + rpc MTSupply(QueryMTSupplyRequest) returns (QueryMTSupplyResponse) { + option (google.api.http).get = "/irismod/mt/mts/{denom_id}/{mt_id}/supply"; + } + + // MTs queries all the MTs of a given denom ID + rpc MTs(QueryMTsRequest) returns (QueryMTsResponse) { + option (google.api.http).get = "/irismod/mt/mts/{denom_id}"; + } + + // MT queries the MT of the given denom and mt ID + rpc MT(QueryMTRequest) returns (QueryMTResponse) { + option (google.api.http).get = "/irismod/mt/mts/{denom_id}/{mt_id}"; + } + + // Balances queries the MT balances of a specified owner + rpc Balances(QueryBalancesRequest) returns (QueryBalancesResponse) { + option (google.api.http).get = "/irismod/mt/mts/{owner}/balances"; + } +} + +// QuerySupplyRequest is the request type for the Query RPC method +message QuerySupplyRequest { + string denom_id = 1; + string owner = 2; +} + +// QuerySupplyResponse is the response type for the Query/Supply RPC method +message QuerySupplyResponse { + uint64 amount = 1; +} + +// QueryDenomsRequest is the request type for the Query/Denoms RPC method +message QueryDenomsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryDenomsResponse is the response type for the Query/Denoms RPC method +message QueryDenomsResponse { + repeated Denom denoms = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDenomRequest is the request type for the Query/Denom RPC method +message QueryDenomRequest { + string denom_id = 1; +} + +// QueryDenomResponse is the response type for the Query/Denom RPC method +message QueryDenomResponse { + Denom denom = 1; +} + +message QueryMTSupplyRequest { + string denom_id = 1; + string mt_id = 2; +} + +message QueryMTSupplyResponse { + uint64 amount = 1; +} + +// QueryMTsRequest is the request type for the Query/MTs RPC method +message QueryMTsRequest { + string denom_id = 1; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryMTsResponse is the response type for the Query/MTs RPC method +message QueryMTsResponse { + repeated MT mts = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryMTRequest is the request type for the Query/MT RPC method +message QueryMTRequest { + string denom_id = 1; + string mt_id = 2; +} + +// QueryMTResponse is the response type for the Query/MT RPC method +message QueryMTResponse { + MT mt = 1; +} + +// QueryBalancesRequest is the request type for the Query/Balances RPC method +message QueryBalancesRequest { + string owner = 1; + string denom_id = 2; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +// QueryBalancesResponse is the response type for the Query/Balances RPC method +message QueryBalancesResponse { + repeated Balance balance = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/irismod/mt/tx.proto b/proto/irismod/mt/tx.proto new file mode 100644 index 00000000..92c94894 --- /dev/null +++ b/proto/irismod/mt/tx.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; +package irismod.mt; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/mt/types"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the mt Msg service. +service Msg { + // IssueDenom defines a method for issuing a denom. + rpc IssueDenom(MsgIssueDenom) returns (MsgIssueDenomResponse); + + // TransferDenom defines a method for transferring a denom. + rpc TransferDenom(MsgTransferDenom) returns (MsgTransferDenomResponse); + + // MintMT defines a method for creating a new MT or minting amounts of an existing MT + rpc MintMT(MsgMintMT) returns (MsgMintMTResponse); + + // EditMT defines a method for editing an MT. + rpc EditMT(MsgEditMT) returns (MsgEditMTResponse); + + // TransferMT defines a method for transferring an MT. + rpc TransferMT(MsgTransferMT) returns (MsgTransferMTResponse); + + // BurnMT defines a method for burning an MT. + rpc BurnMT(MsgBurnMT) returns (MsgBurnMTResponse); +} + +// MsgIssueDenom defines an SDK message for creating a new denom. +message MsgIssueDenom { + option (gogoproto.equal) = true; + + string name = 1; + bytes data = 2; + string sender = 3; +} + +// MsgIssueDenomResponse defines the Msg/IssueDenom response type. +message MsgIssueDenomResponse {} + +// MsgTransferDenom defines an SDK message for transferring an denom to recipient. +message MsgTransferDenom { + option (gogoproto.equal) = true; + string id = 1; + string sender = 2; + string recipient = 3; +} + +// MsgTransferDenomResponse defines the Msg/TransferDenom response type. +message MsgTransferDenomResponse {} + +// MsgMintMT defines an SDK message for creating a new MT. +message MsgMintMT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2; + uint64 amount = 3; + bytes data = 4; + string sender = 5; + string recipient = 6; +} + +// MsgMintMTResponse defines the Msg/MintMT response type. +message MsgMintMTResponse {} + +// MsgEditMT defines an SDK message for editing an MT. +message MsgEditMT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2; + bytes data = 3; + string sender = 4; +} + +// MsgEditMTResponse defines the Msg/EditMT response type. +message MsgEditMTResponse {} + +// MsgTransferMT defines an SDK message for transferring an MT to recipient. +message MsgTransferMT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2; + uint64 amount = 3; + string sender = 4; + string recipient = 5; +} + +// MsgTransferMTResponse defines the Msg/TransferMT response type. +message MsgTransferMTResponse {} + +// MsgBurnMT defines an SDK message for burning an MT. +message MsgBurnMT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2; + uint64 amount = 3; + string sender = 4; +} + +// MsgBurnMTResponse defines the Msg/BurnMT response type. +message MsgBurnMTResponse {} \ No newline at end of file diff --git a/proto/irismod/nft/genesis.proto b/proto/irismod/nft/genesis.proto index e9c975d3..d5721b50 100644 --- a/proto/irismod/nft/genesis.proto +++ b/proto/irismod/nft/genesis.proto @@ -6,8 +6,7 @@ import "irismod/nft/nft.proto"; option go_package = "github.com/irisnet/irismod/modules/nft/types"; -// GenesisState defines the nft module's genesis state. +// GenesisState defines the NFT module's genesis state message GenesisState { - repeated Collection collections = 1 [(gogoproto.nullable) = false]; + repeated Collection collections = 1 [ (gogoproto.nullable) = false ]; } - diff --git a/proto/irismod/nft/nft.proto b/proto/irismod/nft/nft.proto index e9d2c747..982900cf 100644 --- a/proto/irismod/nft/nft.proto +++ b/proto/irismod/nft/nft.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/nft/types"; option (gogoproto.goproto_getters_all) = false; -// BaseNFT defines a non fungible token. +// BaseNFT defines a non-fungible token message BaseNFT { option (gogoproto.equal) = true; @@ -15,9 +15,10 @@ message BaseNFT { string uri = 3 [ (gogoproto.customname) = "URI" ]; string data = 4; string owner = 5; + string uri_hash = 6; } -// Denom defines a type of NFT. +// Denom defines a type of NFT message Denom { option (gogoproto.equal) = true; @@ -25,8 +26,16 @@ message Denom { string name = 2; string schema = 3; string creator = 4; + string symbol = 5; + bool mint_restricted = 6 ; + bool update_restricted = 7 ; + string description = 8; + string uri = 9; + string uri_hash = 10; + string data = 11; } +// IDCollection defines a type of collection with specified ID message IDCollection { option (gogoproto.equal) = true; @@ -34,6 +43,7 @@ message IDCollection { repeated string token_ids = 2 [ (gogoproto.moretags) = "yaml:\"token_ids\"" ]; } +// Owner defines a type of owner message Owner { option (gogoproto.equal) = true; @@ -41,6 +51,7 @@ message Owner { repeated IDCollection id_collections = 2 [ (gogoproto.moretags) = "yaml:\"idcs\"", (gogoproto.customname) = "IDCollections", (gogoproto.nullable) = false ]; } +// Collection defines a type of collection message Collection { option (gogoproto.equal) = true; diff --git a/proto/irismod/nft/query.proto b/proto/irismod/nft/query.proto index 77d56cf7..f3358b5a 100644 --- a/proto/irismod/nft/query.proto +++ b/proto/irismod/nft/query.proto @@ -4,10 +4,11 @@ package irismod.nft; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "irismod/nft/nft.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/irisnet/irismod/modules/nft/types"; -// Query defines the gRPC querier service for nft module +// Query defines the gRPC querier service for NFT module service Query { // Supply queries the total supply of a given denom or owner rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { @@ -16,7 +17,7 @@ service Query { // Owner queries the NFTs of the specified owner rpc Owner(QueryOwnerRequest) returns (QueryOwnerResponse) { - option (google.api.http).get = "/irismod/nft/owners/{owner}"; + option (google.api.http).get = "/irismod/nft/nfts"; } // Collection queries the NFTs of the specified denom @@ -54,22 +55,28 @@ message QuerySupplyResponse { // QueryOwnerRequest is the request type for the Query/Owner RPC method message QueryOwnerRequest { string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; - string owner = 2; + string owner = 2 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryOwnerResponse is the response type for the Query/Owner RPC method message QueryOwnerResponse { Owner owner = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryCollectionRequest is the request type for the Query/Collection RPC method message QueryCollectionRequest { string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryCollectionResponse is the response type for the Query/Collection RPC method message QueryCollectionResponse { Collection collection = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryDenomRequest is the request type for the Query/Denom RPC method @@ -84,11 +91,15 @@ message QueryDenomResponse { // QueryDenomsRequest is the request type for the Query/Denoms RPC method message QueryDenomsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; } // QueryDenomsResponse is the response type for the Query/Denoms RPC method message QueryDenomsResponse { repeated Denom denoms = 1 [ (gogoproto.nullable) = false ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryNFTRequest is the request type for the Query/NFT RPC method diff --git a/proto/irismod/nft/tx.proto b/proto/irismod/nft/tx.proto index bbe221b8..d2d8f5b5 100644 --- a/proto/irismod/nft/tx.proto +++ b/proto/irismod/nft/tx.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/nft/types"; option (gogoproto.goproto_getters_all) = false; -// Msg defines the htlc Msg service. +// Msg defines the nft Msg service. service Msg { // IssueDenom defines a method for issue a denom. rpc IssueDenom(MsgIssueDenom) returns (MsgIssueDenomResponse); @@ -22,6 +22,9 @@ service Msg { // BurnNFT defines a method for burning a nft. rpc BurnNFT(MsgBurnNFT) returns (MsgBurnNFTResponse); + + // TransferDenom defines a method for transferring a denom. + rpc TransferDenom(MsgTransferDenom) returns (MsgTransferDenomResponse); } // MsgIssueDenom defines an SDK message for creating a new denom. @@ -32,6 +35,13 @@ message MsgIssueDenom { string name = 2; string schema = 3; string sender = 4; + string symbol = 5; + bool mint_restricted = 6 ; + bool update_restricted = 7 ; + string description = 8; + string uri = 9; + string uri_hash = 10; + string data = 11; } // MsgIssueDenomResponse defines the Msg/IssueDenom response type. @@ -48,6 +58,7 @@ message MsgTransferNFT { string data = 5; string sender = 6; string recipient = 7; + string uri_hash = 8; } // MsgTransferNFTResponse defines the Msg/TransferNFT response type. @@ -63,6 +74,7 @@ message MsgEditNFT { string uri = 4 [ (gogoproto.customname) = "URI" ]; string data = 5; string sender = 6; + string uri_hash = 7; } // MsgEditNFTResponse defines the Msg/EditNFT response type. @@ -79,6 +91,7 @@ message MsgMintNFT { string data = 5; string sender = 6; string recipient = 7; + string uri_hash = 8; } // MsgMintNFTResponse defines the Msg/MintNFT response type. @@ -94,4 +107,16 @@ message MsgBurnNFT { } // MsgBurnNFTResponse defines the Msg/BurnNFT response type. -message MsgBurnNFTResponse {} \ No newline at end of file +message MsgBurnNFTResponse {} + + +// MsgTransferDenom defines an SDK message for transferring an denom to recipient. +message MsgTransferDenom { + option (gogoproto.equal) = true; + string id = 1; + string sender = 2; + string recipient = 3; +} + +// MsgTransferDenomResponse defines the Msg/TransferDenom response type. +message MsgTransferDenomResponse {} diff --git a/proto/irismod/oracle/genesis.proto b/proto/irismod/oracle/genesis.proto index f15a3e1d..b058f6aa 100644 --- a/proto/irismod/oracle/genesis.proto +++ b/proto/irismod/oracle/genesis.proto @@ -7,13 +7,13 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/oracle/types"; -// GenesisState defines the oracle module's genesis state. +// GenesisState defines the oracle module's genesis state message GenesisState { - repeated FeedEntry entries = 1 [(gogoproto.nullable) = false]; + repeated FeedEntry entries = 1 [ (gogoproto.nullable) = false ]; } message FeedEntry { - Feed feed = 1 [(gogoproto.nullable) = false]; + Feed feed = 1 [ (gogoproto.nullable) = false ]; irismod.service.RequestContextState state = 2; - repeated FeedValue values = 3 [(gogoproto.nullable) = false]; + repeated FeedValue values = 3 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/irismod/oracle/query.proto b/proto/irismod/oracle/query.proto index 4d7434eb..2aedcb61 100644 --- a/proto/irismod/oracle/query.proto +++ b/proto/irismod/oracle/query.proto @@ -6,6 +6,7 @@ import "irismod/service/service.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/irisnet/irismod/modules/oracle/types"; @@ -16,7 +17,7 @@ service Query { option (google.api.http).get = "/irismod/oracle/feeds/{feed_name}"; } - // QueryFeedsRequest queries the feed list + // Feeds queries the feed list rpc Feeds(QueryFeedsRequest) returns (QueryFeedsResponse) { option (google.api.http).get = "/irismod/oracle/feeds"; } @@ -40,11 +41,15 @@ message QueryFeedResponse { // QueryFeedsRequest is request type for the Query/Feeds RPC method message QueryFeedsRequest { string state = 1; + // pagination defines an optional pagination for the request + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryFeedsResponse is response type for the Query/Feeds RPC method message QueryFeedsResponse { repeated FeedContext feeds = 1 [ (gogoproto.nullable) = false ]; + // pagination defines an optional pagination for the request + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryFeedValueRequest is request type for the Query/FeedValue RPC method diff --git a/proto/irismod/oracle/tx.proto b/proto/irismod/oracle/tx.proto index 16a2db3e..1a0b5efb 100644 --- a/proto/irismod/oracle/tx.proto +++ b/proto/irismod/oracle/tx.proto @@ -6,18 +6,18 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/irisnet/irismod/modules/oracle/types"; -// Msg defines the oracle Msg service. +// Msg defines the oracle Msg service service Msg { - // CreateFeed defines a method for creating a new feed. + // CreateFeed defines a method for creating a new feed rpc CreateFeed(MsgCreateFeed) returns (MsgCreateFeedResponse); - // EditFeed defines a method for editing a feed. + // EditFeed defines a method for editing a feed rpc EditFeed(MsgEditFeed) returns (MsgEditFeedResponse); // StartFeed defines a method for starting a feed rpc StartFeed(MsgStartFeed) returns (MsgStartFeedResponse); - // PauseFeed defines a method for pausing a feed. + // PauseFeed defines a method for pausing a feed rpc PauseFeed(MsgPauseFeed) returns (MsgPauseFeedResponse); } @@ -38,7 +38,7 @@ message MsgCreateFeed { uint32 response_threshold = 13 [ (gogoproto.moretags) = "yaml:\"response_threshold\"" ]; } -// MsgCreateFeedResponse defines the Msg/CreateFeed response type. +// MsgCreateFeedResponse defines the Msg/CreateFeed response type message MsgCreateFeedResponse {} // MsgPauseFeed defines an sdk.Msg type that supports stating a feed @@ -47,7 +47,7 @@ message MsgStartFeed { string creator = 2; } -// MsgStartFeedResponse defines the Msg/StartFeed response type. +// MsgStartFeedResponse defines the Msg/StartFeed response type message MsgStartFeedResponse {} // MsgPauseFeed defines an sdk.Msg type that supports pausing a feed @@ -56,7 +56,7 @@ message MsgPauseFeed { string creator = 2; } -// MsgPauseFeedResponse defines the Msg/PauseFeed response type. +// MsgPauseFeedResponse defines the Msg/PauseFeed response type message MsgPauseFeedResponse {} // MsgEditFeed defines an sdk.Msg type that supports editing a feed @@ -72,5 +72,5 @@ message MsgEditFeed { string creator = 9; } -// MsgEditFeedResponse defines the Msg/EditFeed response type. +// MsgEditFeedResponse defines the Msg/EditFeed response type message MsgEditFeedResponse {} \ No newline at end of file diff --git a/proto/irismod/random/genesis.proto b/proto/irismod/random/genesis.proto index c810f03b..744b09c7 100644 --- a/proto/irismod/random/genesis.proto +++ b/proto/irismod/random/genesis.proto @@ -6,11 +6,12 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/random/types"; -// GenesisState defines the random module's genesis state. +// GenesisState defines the random module's genesis state message GenesisState { - map pending_random_requests = 1 [(gogoproto.nullable) = false]; + map pending_random_requests = 1 [ (gogoproto.nullable) = false ]; } +// Requests defines the random requests message Requests { - repeated Request requests = 1 [(gogoproto.nullable) = false]; + repeated Request requests = 1 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/irismod/random/tx.proto b/proto/irismod/random/tx.proto index c33bff5c..aedb7de9 100644 --- a/proto/irismod/random/tx.proto +++ b/proto/irismod/random/tx.proto @@ -6,9 +6,9 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/irisnet/irismod/modules/random/types"; -// Msg defines the oracle Msg service. +// Msg defines the oracle Msg service service Msg { - // RequestRandom defines a method for requesting a new random number. + // RequestRandom defines a method for requesting a new random number rpc RequestRandom(MsgRequestRandom) returns (MsgRequestRandomResponse); } @@ -20,7 +20,5 @@ message MsgRequestRandom { repeated cosmos.base.v1beta1.Coin service_fee_cap = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; } - -// MsgRequestRandomResponse defines the Msg/RequestRandom response type. +// MsgRequestRandomResponse defines the Msg/RequestRandom response type message MsgRequestRandomResponse {} - diff --git a/proto/irismod/record/genesis.proto b/proto/irismod/record/genesis.proto index f6ddbacb..e1a8cd7a 100644 --- a/proto/irismod/record/genesis.proto +++ b/proto/irismod/record/genesis.proto @@ -6,8 +6,7 @@ import "irismod/record/record.proto"; option go_package = "github.com/irisnet/irismod/modules/record/types"; -// GenesisState defines the record module's genesis state. +// GenesisState defines the record module's genesis state message GenesisState { - repeated Record records = 1 [(gogoproto.nullable) = false]; + repeated Record records = 1 [ (gogoproto.nullable) = false ]; } - diff --git a/proto/irismod/record/query.proto b/proto/irismod/record/query.proto index 5e6415f3..5b0cbb90 100644 --- a/proto/irismod/record/query.proto +++ b/proto/irismod/record/query.proto @@ -9,8 +9,8 @@ option go_package = "github.com/irisnet/irismod/modules/record/types"; // Query defines the gRPC querier service for record module service Query { // Record queries the record by the given record ID - rpc Record (QueryRecordRequest) returns (QueryRecordResponse) { - option (google.api.http).get = "/irismod/record/records/{record_id}"; + rpc Record(QueryRecordRequest) returns (QueryRecordResponse) { + option (google.api.http).get = "/irismod/record/records/{record_id}"; } } diff --git a/proto/irismod/record/record.proto b/proto/irismod/record/record.proto index 572ffaa6..9f36d388 100644 --- a/proto/irismod/record/record.proto +++ b/proto/irismod/record/record.proto @@ -6,20 +6,21 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/record/types"; option (gogoproto.goproto_getters_all) = false; -// Content defines the detailed information for a record. +// Content defines the detailed information for a record message Content { option (gogoproto.equal) = true; string digest = 1; - string digest_algo = 2 [(gogoproto.moretags) = "yaml:\"digest_algo\""]; - string uri = 3 [(gogoproto.customname) = "URI"]; + string digest_algo = 2 [ (gogoproto.moretags) = "yaml:\"digest_algo\"" ]; + string uri = 3 [ (gogoproto.customname) = "URI" ]; string meta = 4; } +// Record defines the record standard message Record { option (gogoproto.equal) = true; - string tx_hash = 1 [(gogoproto.moretags) = "yaml:\"tx_hash\""]; - repeated Content contents = 2 [(gogoproto.nullable) = false]; + string tx_hash = 1 [ (gogoproto.moretags) = "yaml:\"tx_hash\"" ]; + repeated Content contents = 2 [ (gogoproto.nullable) = false ]; string creator = 3; } diff --git a/proto/irismod/record/tx.proto b/proto/irismod/record/tx.proto index 36e42043..d123b641 100644 --- a/proto/irismod/record/tx.proto +++ b/proto/irismod/record/tx.proto @@ -7,22 +7,21 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/record/types"; option (gogoproto.goproto_getters_all) = false; - -// Msg defines the oracle Msg service. +// Msg defines the oracle Msg service service Msg { - // CreateRecord defines a method for creating a new record. + // CreateRecord defines a method for creating a new record rpc CreateRecord(MsgCreateRecord) returns (MsgCreateRecordResponse); } -// MsgCreateRecord defines an SDK message for creating a new record. +// MsgCreateRecord defines an SDK message for creating a new record message MsgCreateRecord { option (gogoproto.equal) = true; - repeated Content contents = 1 [(gogoproto.nullable) = false]; + repeated Content contents = 1 [ (gogoproto.nullable) = false ]; string creator = 2; } -// MsgCreateRecordResponse defines the Msg/CreateRecord response type. +// MsgCreateRecordResponse defines the Msg/CreateRecord response type message MsgCreateRecordResponse { string id = 1; } \ No newline at end of file diff --git a/proto/irismod/service/genesis.proto b/proto/irismod/service/genesis.proto index 408fd742..9310df49 100644 --- a/proto/irismod/service/genesis.proto +++ b/proto/irismod/service/genesis.proto @@ -6,11 +6,11 @@ import "irismod/service/service.proto"; option go_package = "github.com/irisnet/irismod/modules/service/types"; -// GenesisState defines the service module's genesis state. +// GenesisState defines the service module's genesis state message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; repeated ServiceDefinition definitions = 2 [ (gogoproto.nullable) = false ]; repeated ServiceBinding bindings = 3 [ (gogoproto.nullable) = false ]; - map withdraw_addresses = 4 [ (gogoproto.moretags) = "yaml:\"withdraw_addresses\"" ]; + map withdraw_addresses = 4 [ (gogoproto.moretags) = "yaml:\"withdraw_addresses\"" ]; map request_contexts = 5 [ (gogoproto.moretags) = "yaml:\"request_contexts\"" ]; } \ No newline at end of file diff --git a/proto/irismod/service/query.proto b/proto/irismod/service/query.proto index 489e6a7d..7a64738a 100644 --- a/proto/irismod/service/query.proto +++ b/proto/irismod/service/query.proto @@ -102,11 +102,14 @@ message QueryBindingResponse { message QueryBindingsRequest { string service_name = 1; string owner = 2; + // pagination defines an optional pagination for the request + cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryDefinitionsResponse is response type for the Query/Bindings RPC method message QueryBindingsResponse { repeated ServiceBinding service_bindings = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryWithdrawAddressRequest is request type for the Query/WithdrawAddress RPC method @@ -143,22 +146,26 @@ message QueryRequestResponse { message QueryRequestsRequest { string service_name = 1; string provider = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryRequestsResponse is response type for the Query/Requests RPC method message QueryRequestsResponse { repeated Request requests = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryRequestsByReqCtxRequest is request type for the Query/RequestsByReqCtx RPC method message QueryRequestsByReqCtxRequest { string request_context_id = 1; uint64 batch_counter = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryRequestsByReqCtxResponse is response type for the Query/RequestsByReqCtx RPC method message QueryRequestsByReqCtxResponse { repeated Request requests = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryResponseRequest is request type for the Query/Response RPC method @@ -175,11 +182,13 @@ message QueryResponseResponse { message QueryResponsesRequest { string request_context_id = 1; uint64 batch_counter = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryResponsesResponse is response type for the Query/Responses RPC method message QueryResponsesResponse { repeated Response responses = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryEarnedFeesRequest is request type for the Query/EarnedFees RPC method diff --git a/proto/irismod/service/service.proto b/proto/irismod/service/service.proto index 85f30909..f227ff12 100644 --- a/proto/irismod/service/service.proto +++ b/proto/irismod/service/service.proto @@ -9,104 +9,102 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/irisnet/irismod/modules/service/types"; option (gogoproto.goproto_getters_all) = false; -// ServiceDefinition defines a standard for service definition. +// ServiceDefinition defines a standard for service definition message ServiceDefinition { string name = 1; string description = 2; repeated string tags = 3; string author = 4; - string author_description = 5 [(gogoproto.moretags) = "yaml:\"author_description\""]; + string author_description = 5 [ (gogoproto.moretags) = "yaml:\"author_description\"" ]; string schemas = 6; } -// ServiceBinding defines a standard for service binding. +// ServiceBinding defines a standard for service binding message ServiceBinding { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 2; - repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; string pricing = 4; - uint64 qos = 5 [(gogoproto.customname) = "QoS"]; + uint64 qos = 5 [ (gogoproto.customname) = "QoS" ]; string options = 6; bool available = 7; - google.protobuf.Timestamp disabled_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"disabled_time\""]; + google.protobuf.Timestamp disabled_time = 8 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"disabled_time\"" ]; string owner = 9; } -// RequestContext defines a standard for request context. +// RequestContext defines a standard for request context message RequestContext { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; repeated string providers = 2; string consumer = 3; string input = 4; - repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\""]; - string module_name = 6 [(gogoproto.moretags) = "yaml:\"module_name\""]; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; + string module_name = 6 [ (gogoproto.moretags) = "yaml:\"module_name\"" ]; int64 timeout = 7; - bool super_mode = 8 [(gogoproto.moretags) = "yaml:\"super_mode\""]; - bool repeated = 9; - uint64 repeated_frequency = 10 [(gogoproto.moretags) = "yaml:\"repeated_frequency\""]; - int64 repeated_total = 11 [(gogoproto.moretags) = "yaml:\"repeated_total\""]; - uint64 batch_counter = 12 [(gogoproto.moretags) = "yaml:\"batch_counter\""]; - uint32 batch_request_count = 13 [(gogoproto.moretags) = "yaml:\"batch_request_count\""]; - uint32 batch_response_count = 14 [(gogoproto.moretags) = "yaml:\"batch_response_count\""]; - uint32 batch_response_threshold = 15 [(gogoproto.moretags) = "yaml:\"batch_response_threshold\""]; - uint32 response_threshold = 16 [(gogoproto.moretags) = "yaml:\"response_threshold\""]; - RequestContextBatchState batch_state = 17 [(gogoproto.moretags) = "yaml:\"batch_state\""]; - RequestContextState state = 18; + bool repeated = 8; + uint64 repeated_frequency = 9 [ (gogoproto.moretags) = "yaml:\"repeated_frequency\"" ]; + int64 repeated_total = 10 [ (gogoproto.moretags) = "yaml:\"repeated_total\"" ]; + uint64 batch_counter = 11 [ (gogoproto.moretags) = "yaml:\"batch_counter\"" ]; + uint32 batch_request_count = 12 [ (gogoproto.moretags) = "yaml:\"batch_request_count\"" ]; + uint32 batch_response_count = 13 [ (gogoproto.moretags) = "yaml:\"batch_response_count\"" ]; + uint32 batch_response_threshold = 14 [ (gogoproto.moretags) = "yaml:\"batch_response_threshold\"" ]; + uint32 response_threshold = 15 [ (gogoproto.moretags) = "yaml:\"response_threshold\"" ]; + RequestContextBatchState batch_state = 16 [ (gogoproto.moretags) = "yaml:\"batch_state\"" ]; + RequestContextState state = 17; } -// Request defines a standard for request. +// Request defines a standard for request message Request { string id = 1; - string service_name = 2 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 2 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 3; string consumer = 4; string input = 5; - repeated cosmos.base.v1beta1.Coin service_fee = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\""]; - bool super_mode = 7 [(gogoproto.moretags) = "yaml:\"super_mode\""]; - int64 request_height = 8 [(gogoproto.moretags) = "yaml:\"request_height\""]; - int64 expiration_height = 9 [(gogoproto.moretags) = "yaml:\"expiration_height\""]; - string request_context_id = 10 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; - uint64 request_context_batch_counter = 11 [(gogoproto.moretags) = "yaml:\"request_context_batch_counter\""]; + repeated cosmos.base.v1beta1.Coin service_fee = 6 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\"" ]; + int64 request_height = 7 [ (gogoproto.moretags) = "yaml:\"request_height\"" ]; + int64 expiration_height = 8 [ (gogoproto.moretags) = "yaml:\"expiration_height\"" ]; + string request_context_id = 9 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; + uint64 request_context_batch_counter = 10 [ (gogoproto.moretags) = "yaml:\"request_context_batch_counter\"" ]; } -// CompactRequest defines a standard for compact request. +// CompactRequest defines a standard for compact request message CompactRequest { - string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; - uint64 request_context_batch_counter = 2 [(gogoproto.moretags) = "yaml:\"request_context_batch_counter\""]; + string request_context_id = 1 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; + uint64 request_context_batch_counter = 2 [ (gogoproto.moretags) = "yaml:\"request_context_batch_counter\"" ]; string provider = 3; - repeated cosmos.base.v1beta1.Coin service_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\""]; - int64 request_height = 5 [(gogoproto.moretags) = "yaml:\"request_height\""]; - int64 expiration_height = 6 [(gogoproto.moretags) = "yaml:\"expiration_height\""]; + repeated cosmos.base.v1beta1.Coin service_fee = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\"" ]; + int64 request_height = 5 [ (gogoproto.moretags) = "yaml:\"request_height\"" ]; + int64 expiration_height = 6 [ (gogoproto.moretags) = "yaml:\"expiration_height\"" ]; } -// Response defines a standard for response. +// Response defines a standard for response message Response { string provider = 1; string consumer = 2; string result = 3; string output = 4; - string request_context_id = 5 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; - uint64 request_context_batch_counter = 6 [(gogoproto.moretags) = "yaml:\"request_context_batch_counter\""]; + string request_context_id = 5 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; + uint64 request_context_batch_counter = 6 [ (gogoproto.moretags) = "yaml:\"request_context_batch_counter\"" ]; } -// Pricing defines a standard for service pricing. +// Pricing defines a standard for service pricing message Pricing { - repeated cosmos.base.v1beta1.Coin price = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated PromotionByTime promotions_by_time = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"promotions_by_time\""]; - repeated PromotionByVolume promotions_by_volume = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"promotions_by_volume\""]; + repeated cosmos.base.v1beta1.Coin price = 6 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + repeated PromotionByTime promotions_by_time = 2 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"promotions_by_time\"" ]; + repeated PromotionByVolume promotions_by_volume = 3 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"promotions_by_volume\"" ]; } -// PromotionByTime defines a standard for service promotion by time. +// PromotionByTime defines a standard for service promotion by time message PromotionByTime { - google.protobuf.Timestamp start_time = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"start_time\""]; - google.protobuf.Timestamp end_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"end_time\""]; - string discount = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + google.protobuf.Timestamp start_time = 1 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"start_time\"" ]; + google.protobuf.Timestamp end_time = 2 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"end_time\"" ]; + string discount = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; } -// PromotionByVolume defines a standard for service promotion by volume. +// PromotionByVolume defines a standard for service promotion by volume message PromotionByVolume { uint64 volume = 1; - string discount = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string discount = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; } // RequestContextBatchState is a type alias that represents a request batch status as a byte @@ -116,9 +114,9 @@ enum RequestContextBatchState { option (gogoproto.goproto_enum_prefix) = false; // BATCH_RUNNING defines the running batch status. - BATCH_RUNNING = 0 [(gogoproto.enumvalue_customname) = "BATCHRUNNING"]; + BATCH_RUNNING = 0 [ (gogoproto.enumvalue_customname) = "BATCHRUNNING" ]; // BATCH_COMPLETED defines the completed batch status. - BATCH_COMPLETED = 1 [(gogoproto.enumvalue_customname) = "BATCHCOMPLETED"]; + BATCH_COMPLETED = 1 [ (gogoproto.enumvalue_customname) = "BATCHCOMPLETED" ]; } // RequestContextState is a type alias that represents a request status as a byte @@ -127,15 +125,15 @@ enum RequestContextState { option (gogoproto.goproto_enum_stringer) = false; option (gogoproto.goproto_enum_prefix) = false; - // RUNNING defines the running request context status. - RUNNING = 0 [(gogoproto.enumvalue_customname) = "RUNNING"]; - // PAUSED defines the paused request context status. - PAUSED = 1 [(gogoproto.enumvalue_customname) = "PAUSED"]; - // COMPLETED defines the completed request context status. - COMPLETED = 2 [(gogoproto.enumvalue_customname) = "COMPLETED"]; + // RUNNING defines the running request context status + RUNNING = 0 [ (gogoproto.enumvalue_customname) = "RUNNING" ]; + // PAUSED defines the paused request context status + PAUSED = 1 [ (gogoproto.enumvalue_customname) = "PAUSED" ]; + // COMPLETED defines the completed request context status + COMPLETED = 2 [ (gogoproto.enumvalue_customname) = "COMPLETED" ]; } -// service parameters +// Params defines service module's parameters message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; @@ -149,4 +147,5 @@ message Params { google.protobuf.Duration arbitration_time_limit = 7 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"arbitration_time_limit\""]; uint64 tx_size_limit = 8 [(gogoproto.moretags) = "yaml:\"tx_size_limit\""]; string base_denom = 9 [(gogoproto.moretags) = "yaml:\"base_denom\""]; + bool restricted_service_fee_denom = 10 [(gogoproto.moretags) = "yaml:\"restricted_service_fee_denom\""]; } diff --git a/proto/irismod/service/tx.proto b/proto/irismod/service/tx.proto index e888c429..2949a818 100644 --- a/proto/irismod/service/tx.proto +++ b/proto/irismod/service/tx.proto @@ -7,211 +7,207 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/service/types"; option (gogoproto.goproto_getters_all) = false; - -// Msg defines the oracle Msg service. +// Msg defines the oracle Msg service service Msg { - // DefineService defines a method for define a new service. + // DefineService defines a method for define a new service rpc DefineService(MsgDefineService) returns (MsgDefineServiceResponse); - // BindService defines a method for bind a server. + // BindService defines a method for bind a server rpc BindService(MsgBindService) returns (MsgBindServiceResponse); - // UpdateServiceBinding defines a method for update a service binding. + // UpdateServiceBinding defines a method for update a service binding rpc UpdateServiceBinding(MsgUpdateServiceBinding) returns (MsgUpdateServiceBindingResponse); - // SetWithdrawAddress defines a method for setting a withdraw address. + // SetWithdrawAddress defines a method for setting a withdraw address rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); - // EnableServiceBinding defines a method for enabling a service binding. + // EnableServiceBinding defines a method for enabling a service binding rpc EnableServiceBinding(MsgEnableServiceBinding) returns (MsgEnableServiceBindingResponse); - // DisableServiceBinding defines a method for disabling a service binding. + // DisableServiceBinding defines a method for disabling a service binding rpc DisableServiceBinding(MsgDisableServiceBinding) returns (MsgDisableServiceBindingResponse); - // RefundServiceDeposit defines a method for refunding a fee. + // RefundServiceDeposit defines a method for refunding a fee rpc RefundServiceDeposit(MsgRefundServiceDeposit) returns (MsgRefundServiceDepositResponse); - // CallService defines a method for calling a service. + // CallService defines a method for calling a service rpc CallService(MsgCallService) returns (MsgCallServiceResponse); - // RespondService defines a method for responding a service. + // RespondService defines a method for responding a service rpc RespondService(MsgRespondService) returns (MsgRespondServiceResponse); - // PauseRequestContext defines a method for pausing a service call. + // PauseRequestContext defines a method for pausing a service call rpc PauseRequestContext(MsgPauseRequestContext) returns (MsgPauseRequestContextResponse); - // StartRequestContext defines a method for starting a service call. + // StartRequestContext defines a method for starting a service call rpc StartRequestContext(MsgStartRequestContext) returns (MsgStartRequestContextResponse); - // KillRequestContext defines a method for killing a service call. + // KillRequestContext defines a method for killing a service call rpc KillRequestContext(MsgKillRequestContext) returns (MsgKillRequestContextResponse); - // UpdateRequestContext defines a method for updating a service call. + // UpdateRequestContext defines a method for updating a service call rpc UpdateRequestContext(MsgUpdateRequestContext) returns (MsgUpdateRequestContextResponse); - // WithdrawEarnedFees defines a method for Withdrawing a earned fees. + // WithdrawEarnedFees defines a method for Withdrawing a earned fees rpc WithdrawEarnedFees(MsgWithdrawEarnedFees) returns (MsgWithdrawEarnedFeesResponse); } -// MsgDefineService defines an SDK message for defining a new service. +// MsgDefineService defines an SDK message for defining a new service message MsgDefineService { string name = 1; string description = 2; repeated string tags = 3; string author = 4; - string author_description = 5 [(gogoproto.moretags) = "yaml:\"author_description\""]; + string author_description = 5 [ (gogoproto.moretags) = "yaml:\"author_description\"" ]; string schemas = 6; } - -// MsgDefineServiceResponse defines the Msg/DefineService response type. +// MsgDefineServiceResponse defines the Msg/DefineService response type message MsgDefineServiceResponse {} -// MsgBindService defines an SDK message for binding to an existing service. +// MsgBindService defines an SDK message for binding to an existing service message MsgBindService { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 2; - repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; string pricing = 4; - uint64 qos = 5 [(gogoproto.customname) = "QoS"]; + uint64 qos = 5 [ (gogoproto.customname) = "QoS" ]; string options = 6; string owner = 7; } -// MsgBindServiceResponse defines the Msg/BindService response type. +// MsgBindServiceResponse defines the Msg/BindService response type message MsgBindServiceResponse {} -// MsgUpdateServiceBinding defines an SDK message for updating an existing service binding. +// MsgUpdateServiceBinding defines an SDK message for updating an existing service binding message MsgUpdateServiceBinding { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 2; - repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; string pricing = 4; - uint64 qos = 5 [(gogoproto.customname) = "QoS"]; + uint64 qos = 5 [ (gogoproto.customname) = "QoS" ]; string options = 6; string owner = 7; } -// MsgUpdateServiceBindingResponse defines the Msg/UpdateServiceBinding response type. +// MsgUpdateServiceBindingResponse defines the Msg/UpdateServiceBinding response type message MsgUpdateServiceBindingResponse {} -// MsgSetWithdrawAddress defines an SDK message to set the withdrawal address for a provider. +// MsgSetWithdrawAddress defines an SDK message to set the withdrawal address for a provider message MsgSetWithdrawAddress { string owner = 1; - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; + string withdraw_address = 2 [ (gogoproto.moretags) = "yaml:\"withdraw_address\"" ]; } -// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type message MsgSetWithdrawAddressResponse {} -// MsgDisableServiceBinding defines an SDK message to disable a service binding. +// MsgDisableServiceBinding defines an SDK message to disable a service binding message MsgDisableServiceBinding { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 2; string owner = 3; } -// MsgDisableServiceBindingResponse defines the Msg/DisableServiceBinding response type. +// MsgDisableServiceBindingResponse defines the Msg/DisableServiceBinding response type message MsgDisableServiceBindingResponse {} -// MsgEnableServiceBinding defines an SDK message to enable a service binding. +// MsgEnableServiceBinding defines an SDK message to enable a service binding message MsgEnableServiceBinding { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 2; - repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; string owner = 4; } -// MsgEnableServiceBindingResponse defines the Msg/EnableServiceBinding response type. +// MsgEnableServiceBindingResponse defines the Msg/EnableServiceBinding response type message MsgEnableServiceBindingResponse {} -// MsgRefundServiceDeposit defines an SDK message to refund deposit from a service binding. +// MsgRefundServiceDeposit defines an SDK message to refund deposit from a service binding message MsgRefundServiceDeposit { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; string provider = 2; string owner = 3; } -// MsgRefundServiceDepositResponse defines the Msg/RefundServiceDeposit response type. +// MsgRefundServiceDepositResponse defines the Msg/RefundServiceDeposit response type message MsgRefundServiceDepositResponse {} - -// MsgCallService defines an SDK message to initiate a service request context. +// MsgCallService defines an SDK message to initiate a service request context message MsgCallService { - string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string service_name = 1 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; repeated string providers = 2; string consumer = 3; string input = 4; - repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\""]; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; int64 timeout = 6; - bool super_mode = 7 [(gogoproto.moretags) = "yaml:\"super_mode\""]; - bool repeated = 8; - uint64 repeated_frequency = 9 [(gogoproto.moretags) = "yaml:\"repeated_frequency\""]; - int64 repeated_total = 10 [(gogoproto.moretags) = "yaml:\"repeated_total\""]; + bool repeated = 7; + uint64 repeated_frequency = 8 [ (gogoproto.moretags) = "yaml:\"repeated_frequency\"" ]; + int64 repeated_total = 9 [ (gogoproto.moretags) = "yaml:\"repeated_total\"" ]; } -// MsgCallServiceResponse defines the Msg/CallService response type. +// MsgCallServiceResponse defines the Msg/CallService response type message MsgCallServiceResponse { - string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string request_context_id = 1 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; } -// MsgRespondService defines an SDK message to respond a service request. +// MsgRespondService defines an SDK message to respond a service request message MsgRespondService { - string request_id = 1 [(gogoproto.moretags) = "yaml:\"request_id\""]; + string request_id = 1 [ (gogoproto.moretags) = "yaml:\"request_id\"" ]; string provider = 2; string result = 3; string output = 4; } -// MsgRespondService defines the Msg/RespondService response type. +// MsgRespondServiceResponse defines the Msg/RespondService response type message MsgRespondServiceResponse {} -// MsgPauseRequestContext defines an SDK message to pause a service request. +// MsgPauseRequestContext defines an SDK message to pause a service request message MsgPauseRequestContext { - string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string request_context_id = 1 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; string consumer = 2; } -// MsgPauseRequestContextResponse defines the Msg/PauseRequestContext response type. +// MsgPauseRequestContextResponse defines the Msg/PauseRequestContext response type message MsgPauseRequestContextResponse {} -// MsgStartRequestContext defines an SDK message to resume a service request. +// MsgStartRequestContext defines an SDK message to resume a service request message MsgStartRequestContext { - string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string request_context_id = 1 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; string consumer = 2; } -// MsgStartRequestContextResponse defines the Msg/StartRequestContext response type. +// MsgStartRequestContextResponse defines the Msg/StartRequestContext response type message MsgStartRequestContextResponse {} -// MsgKillRequestContext defines an SDK message to terminate a service request. +// MsgKillRequestContext defines an SDK message to terminate a service request message MsgKillRequestContext { - string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string request_context_id = 1 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; string consumer = 2; } -// MsgKillRequestContextResponse defines the Msg/KillRequestContext response type. +// MsgKillRequestContextResponse defines the Msg/KillRequestContext response type message MsgKillRequestContextResponse {} -// MsgUpdateRequestContext defines an SDK message to update a service request context. +// MsgUpdateRequestContext defines an SDK message to update a service request context message MsgUpdateRequestContext { - string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string request_context_id = 1 [ (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; repeated string providers = 2; string consumer = 3; - repeated cosmos.base.v1beta1.Coin service_fee_cap = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\""]; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; int64 timeout = 5; - uint64 repeated_frequency = 6 [(gogoproto.moretags) = "yaml:\"repeated_frequency\""]; - int64 repeated_total = 7 [(gogoproto.moretags) = "yaml:\"repeated_total\""]; + uint64 repeated_frequency = 6 [ (gogoproto.moretags) = "yaml:\"repeated_frequency\"" ]; + int64 repeated_total = 7 [ (gogoproto.moretags) = "yaml:\"repeated_total\"" ]; } -// MsgUpdateRequestContextResponse defines the Msg/UpdateRequestContext response type. +// MsgUpdateRequestContextResponse defines the Msg/UpdateRequestContext response type message MsgUpdateRequestContextResponse {} -// MsgWithdrawEarnedFees defines an SDK message to withdraw the fees earned by the provider or owner. +// MsgWithdrawEarnedFees defines an SDK message to withdraw the fees earned by the provider or owner message MsgWithdrawEarnedFees { string owner = 1; string provider = 2; } -// MsgWithdrawEarnedFeesResponse defines the Msg/WithdrawEarnedFees response type. +// MsgWithdrawEarnedFeesResponse defines the Msg/WithdrawEarnedFees response type message MsgWithdrawEarnedFeesResponse {} \ No newline at end of file diff --git a/proto/irismod/token/genesis.proto b/proto/irismod/token/genesis.proto index 36ee418d..f6192686 100644 --- a/proto/irismod/token/genesis.proto +++ b/proto/irismod/token/genesis.proto @@ -3,12 +3,14 @@ package irismod.token; import "gogoproto/gogo.proto"; import "irismod/token/token.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/irisnet/irismod/modules/token/types"; -// GenesisState defines the token module's genesis state. +// GenesisState defines the token module's genesis state message GenesisState { - Params params = 1 [(gogoproto.nullable) = false]; - repeated Token tokens = 2 [(gogoproto.nullable) = false]; + Params params = 1 [ (gogoproto.nullable) = false ]; + repeated Token tokens = 2 [ (gogoproto.nullable) = false ]; + repeated cosmos.base.v1beta1.Coin burned_coins = 3 + [ (gogoproto.nullable) = false ]; } - diff --git a/proto/irismod/token/query.proto b/proto/irismod/token/query.proto index b28a7aa5..b5e3aab0 100644 --- a/proto/irismod/token/query.proto +++ b/proto/irismod/token/query.proto @@ -11,7 +11,7 @@ import "irismod/token/token.proto"; option go_package = "github.com/irisnet/irismod/modules/token/types"; -// Query creates service with token as rpc +// Query creates service with token as RPC service Query { // Token returns token with token name rpc Token(QueryTokenRequest) returns (QueryTokenResponse) { @@ -29,6 +29,10 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/irismod/token/params"; } + // TotalBurn queries all the burnt coins + rpc TotalBurn(QueryTotalBurnRequest) returns (QueryTotalBurnResponse) { + option (google.api.http).get = "/irismod/token/total_burn"; + } } // QueryTokenRequest is request type for the Query/Token RPC method @@ -38,17 +42,23 @@ message QueryTokenRequest { // QueryTokenResponse is response type for the Query/Token RPC method message QueryTokenResponse { - google.protobuf.Any Token = 1 [(cosmos_proto.accepts_interface) = "ContentI"]; + google.protobuf.Any Token = 1 + [ (cosmos_proto.accepts_interface) = "ContentI" ]; } // QueryTokensRequest is request type for the Query/Tokens RPC method message QueryTokensRequest { string owner = 1; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryTokensResponse is response type for the Query/Tokens RPC method message QueryTokensResponse { - repeated google.protobuf.Any Tokens = 1 [(cosmos_proto.accepts_interface) = "ContentI"]; + repeated google.protobuf.Any Tokens = 1 + [ (cosmos_proto.accepts_interface) = "ContentI" ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryFeesRequest is request type for the Query/Fees RPC method @@ -59,17 +69,33 @@ message QueryFeesRequest { // QueryFeesResponse is response type for the Query/Fees RPC method message QueryFeesResponse { bool exist = 1; - cosmos.base.v1beta1.Coin issue_fee = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"issue_fee\"", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.Coin"]; - cosmos.base.v1beta1.Coin mint_fee = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"mint_fee\"", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.Coin"]; + cosmos.base.v1beta1.Coin issue_fee = 2 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"issue_fee\"", + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; + cosmos.base.v1beta1.Coin mint_fee = 3 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"mint_fee\"", + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; } // QueryParametersRequest is request type for the Query/Parameters RPC method -message QueryParamsRequest { -} +message QueryParamsRequest {} // QueryParametersResponse is response type for the Query/Parameters RPC method message QueryParamsResponse { - token.Params params = 1 [(gogoproto.nullable) = false]; + token.Params params = 1 [ (gogoproto.nullable) = false ]; cosmos.base.query.v1beta1.PageResponse res = 2; } + +// QueryTokenRequest is request type for the Query/TotalBurn RPC method +message QueryTotalBurnRequest {} + +// QueryTotalBurnResponse is response type for the Query/TotalBurn RPC method +message QueryTotalBurnResponse { + repeated cosmos.base.v1beta1.Coin burned_coins = 1 + [ (gogoproto.nullable) = false ]; +} diff --git a/proto/irismod/token/token.proto b/proto/irismod/token/token.proto index f9346373..67a95f62 100644 --- a/proto/irismod/token/token.proto +++ b/proto/irismod/token/token.proto @@ -15,21 +15,21 @@ message Token { string symbol = 1; string name = 2; uint32 scale = 3; - string min_unit = 4 [(gogoproto.moretags) = "yaml:\"min_unit\""]; - uint64 initial_supply = 5 [(gogoproto.moretags) = "yaml:\"initial_supply\""]; - uint64 max_supply = 6 [(gogoproto.moretags) = "yaml:\"max_supply\""]; + string min_unit = 4 [ (gogoproto.moretags) = "yaml:\"min_unit\"" ]; + uint64 initial_supply = 5 [ (gogoproto.moretags) = "yaml:\"initial_supply\"" ]; + uint64 max_supply = 6 [ (gogoproto.moretags) = "yaml:\"max_supply\"" ]; bool mintable = 7; string owner = 8; } -// token parameters +// Params defines token module's parameters message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - string token_tax_rate = 1 [(gogoproto.moretags) = "yaml:\"token_tax_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string token_tax_rate = 1 [ (gogoproto.moretags) = "yaml:\"token_tax_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin issue_token_base_fee = 2 [(gogoproto.moretags) = "yaml:\"issue_token_base_fee\"", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin issue_token_base_fee = 2 [ (gogoproto.moretags) = "yaml:\"issue_token_base_fee\"", (gogoproto.nullable) = false ]; - string mint_token_fee_ratio = 3 [(gogoproto.moretags) = "yaml:\"mint_token_fee_ratio\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string mint_token_fee_ratio = 3 [ (gogoproto.moretags) = "yaml:\"mint_token_fee_ratio\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; } diff --git a/proto/irismod/token/tx.proto b/proto/irismod/token/tx.proto index 31e68012..1768fb6d 100644 --- a/proto/irismod/token/tx.proto +++ b/proto/irismod/token/tx.proto @@ -6,59 +6,62 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irismod/modules/token/types"; option (gogoproto.goproto_getters_all) = false; -// Msg defines the oracle Msg service. +// Msg defines the oracle Msg service service Msg { - // IssueToken defines a method for issuing a new token. + // IssueToken defines a method for issuing a new token rpc IssueToken(MsgIssueToken) returns (MsgIssueTokenResponse); - // EditToken defines a method for editing a token. + // EditToken defines a method for editing a token rpc EditToken(MsgEditToken) returns (MsgEditTokenResponse); - // MintToken defines a method for minting some tokens. + // MintToken defines a method for minting some tokens rpc MintToken(MsgMintToken) returns (MsgMintTokenResponse); - // TransferTokenOwner defines a method for minting some tokens. + // BurnToken defines a method for burning some tokens + rpc BurnToken(MsgBurnToken) returns (MsgBurnTokenResponse); + + // TransferTokenOwner defines a method for minting some tokens rpc TransferTokenOwner(MsgTransferTokenOwner) returns (MsgTransferTokenOwnerResponse); } -// MsgIssueToken defines an SDK message for issuing a new token. +// MsgIssueToken defines an SDK message for issuing a new token message MsgIssueToken { string symbol = 1; string name = 2; uint32 scale = 3; - string min_unit = 4 [(gogoproto.moretags) = "yaml:\"min_unit\""]; - uint64 initial_supply = 5 [(gogoproto.moretags) = "yaml:\"initial_supply\""]; - uint64 max_supply = 6 [(gogoproto.moretags) = "yaml:\"max_supply\""]; + string min_unit = 4 [ (gogoproto.moretags) = "yaml:\"min_unit\"" ]; + uint64 initial_supply = 5 [ (gogoproto.moretags) = "yaml:\"initial_supply\"" ]; + uint64 max_supply = 6 [ (gogoproto.moretags) = "yaml:\"max_supply\"" ]; bool mintable = 7; string owner = 8; } -// MsgIssueTokenResponse defines the Msg/IssueToken response type. +// MsgIssueTokenResponse defines the Msg/IssueToken response type message MsgIssueTokenResponse {} -// MsgMintToken defines an SDK message for transferring the token owner. +// MsgTransferTokenOwner defines an SDK message for transferring the token owner message MsgTransferTokenOwner { - string src_owner = 1 [(gogoproto.moretags) = "yaml:\"src_owner\""]; - string dst_owner = 2 [(gogoproto.moretags) = "yaml:\"dst_owner\""]; + string src_owner = 1 [ (gogoproto.moretags) = "yaml:\"src_owner\"" ]; + string dst_owner = 2 [ (gogoproto.moretags) = "yaml:\"dst_owner\"" ]; string symbol = 3; } -// MsgTransferTokenOwnerResponse defines the Msg/TransferTokenOwner response type. +// MsgTransferTokenOwnerResponse defines the Msg/TransferTokenOwner response type message MsgTransferTokenOwnerResponse {} -// MsgEditToken defines an SDK message for editing a new token. +// MsgEditToken defines an SDK message for editing a new token message MsgEditToken { string symbol = 1; string name = 2; - uint64 max_supply = 3 [(gogoproto.moretags) = "yaml:\"max_supply\""]; - string mintable = 4 [(gogoproto.casttype) = "Bool"]; + uint64 max_supply = 3 [ (gogoproto.moretags) = "yaml:\"max_supply\"" ]; + string mintable = 4 [ (gogoproto.casttype) = "Bool" ]; string owner = 5; } -// MsgEditTokenResponse defines the Msg/EditToken response type. +// MsgEditTokenResponse defines the Msg/EditToken response type message MsgEditTokenResponse {} -// MsgMintToken defines an SDK message for minting a new token. +// MsgMintToken defines an SDK message for minting a new token message MsgMintToken { string symbol = 1; uint64 amount = 2; @@ -66,5 +69,15 @@ message MsgMintToken { string owner = 4; } -// MsgMintTokenResponse defines the Msg/MintToken response type. -message MsgMintTokenResponse {} \ No newline at end of file +// MsgMintTokenResponse defines the Msg/MintToken response type +message MsgMintTokenResponse {} + +// MsgBurnToken defines an SDK message for burning some tokens +message MsgBurnToken { + string symbol = 1; + uint64 amount = 2; + string sender = 3; +} + +// MsgBurnTokenResponse defines the Msg/BurnToken response type +message MsgBurnTokenResponse {} \ No newline at end of file diff --git a/proto/third_party/google/protobuf/any.proto b/proto/third_party/google/protobuf/any.proto index 1431810e..58b51158 100644 --- a/proto/third_party/google/protobuf/any.proto +++ b/proto/third_party/google/protobuf/any.proto @@ -156,6 +156,9 @@ message Any { bytes value = 2; option (gogoproto.typedecl) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.gostring) = false; + option (gogoproto.stringer) = false; } option (gogoproto.goproto_registration) = false; diff --git a/src/client.ts b/src/client.ts index 01432400..60a31d50 100644 --- a/src/client.ts +++ b/src/client.ts @@ -150,6 +150,15 @@ export class Client { if (!this._coinswap) {this._coinswap = new modules.Coinswap(this)} return this._coinswap; } + /** Farm module */ + private _farm?: modules.Farm; + get farm(): modules.Farm{ + if (this.config.chainNetwork != consts.ChainNetwork.Iris) { + throw new SdkError('This module is not supported on the current chain network.',CODES.Panic); + } + if (!this._farm) {this._farm = new modules.Farm(this)} + return this._farm; + } /** NFT module */ private _nft?: modules.Nft; diff --git a/src/helper/modelCreator.ts b/src/helper/modelCreator.ts index 2418d973..fbcd294f 100644 --- a/src/helper/modelCreator.ts +++ b/src/helper/modelCreator.ts @@ -2,19 +2,19 @@ import * as types from '../types' import * as is from "is_js"; export class ModelCreator{ - static createPaginationModel( - page_number:number = 1, - page_size:number = 30, - count_total:boolean = false, - key?:string):any{ + static createPaginationModel( pageInfo?:types.Pagination ):any{ const pagination = new types.base_query_pagination_pb.PageRequest(); - if (is.not.undefined(key)) {//only one of offset or key should be set. - pagination.setKey(key); + if (is.not.undefined(pageInfo?.key)) {//only one of offset or key should be set. + pagination.setKey(pageInfo?.key); } else { + let page_number = pageInfo?.page_number || 1; + let page_size = pageInfo?.page_size || 10; pagination.setOffset((page_number - 1) * page_size > 0 ? (page_number - 1) * page_size : 0); - pagination.setLimit(page_size > 0 ? page_size : 10); + pagination.setLimit(page_size); } - pagination.setCountTotal(count_total); + pagination.setCountTotal(pageInfo?.count_total ?? true); + pagination.setReverse(pageInfo?.reverse ?? false); + return pagination; } } \ No newline at end of file diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 65961f76..e88d2f1a 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -2,6 +2,7 @@ import { Client } from '../client'; import * as types from '../types'; import * as is from 'is_js'; import { SdkError, CODES } from '../errors'; +import { ModelCreator } from '../helper'; /** * Auth module is only used to build `StdTx` @@ -66,7 +67,7 @@ export class Auth { * Account returns account details based on address. * @param address defines the address to query for. */ - queryAccount(address:string): Promise { + queryAccount(address:string): Promise { if (!address) { throw new SdkError("address can ont be empty"); } @@ -77,15 +78,33 @@ export class Auth { '/cosmos.auth.v1beta1.Query/Account', request, types.auth_query_pb.QueryAccountResponse - ).then((data)=>{ - let result:any = {}; - if (data && data.account && data.account.value) { - result = types.auth_auth_pb.BaseAccount.deserializeBinary(data.account.value).toObject(); - if (result.pubKey && result.pubKey.value) { - result.pubKey = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(result.pubKey.value).toObject(); - } + ).then((res)=>{ + if (res && res.account) { + res.account = this.client.protobuf.deserializeAccount(res.account); } - return result as types.BaseAccount; + return res; + }); + } + + /** + * Accounts returns all the existing accounts + */ + queryAccounts(pagination?: types.Pagination): Promise { + + const request = new types.auth_query_pb.QueryAccountsRequest(); + request.setPagination(ModelCreator.createPaginationModel(pagination)); + + return this.client.rpcClient.protoQuery( + '/cosmos.auth.v1beta1.Query/Accounts', + request, + types.auth_query_pb.QueryAccountsResponse + ).then((res)=>{ + if (res && res.accountsList) { + res.accountsList = res.accountsList.map(((item:any) => { + return this.client.protobuf.deserializeAccount(item); + })); + } + return res; }); } diff --git a/src/modules/bank.ts b/src/modules/bank.ts index c5374b8a..f18d7862 100644 --- a/src/modules/bank.ts +++ b/src/modules/bank.ts @@ -2,6 +2,7 @@ import { Client } from '../client'; import { Crypto } from '../utils/crypto'; import * as types from '../types'; import { SdkError, CODES } from '../errors'; +import { ModelCreator } from '../helper'; /** * This module is mainly used to transfer coins between accounts, @@ -128,8 +129,9 @@ export class Bank { /** * TotalSupply queries the total supply of all coins. */ - queryTotalSupply(): Promise { + queryTotalSupply(pagination?:types.Pagination): Promise { const request = new types.bank_query_pb.QueryTotalSupplyRequest(); + request.setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.bank.v1beta1.Query/TotalSupply', request, @@ -137,6 +139,7 @@ export class Bank { ); } + /** * SupplyOf queries the supply of a single coin. * @param denom is the coin denom to query balances for. @@ -165,4 +168,34 @@ export class Bank { types.bank_query_pb.QueryParamsResponse ); } + + /** + * DenomsMetadata queries the client metadata of a given coin denomination. + */ + queryDenomMetadata(denom:string): Promise { + if (!denom) { + throw new SdkError("denom can ont be empty"); + } + const request = new types.bank_query_pb.QueryDenomMetadataRequest(); + request.setDenom(denom); + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/DenomMetadata', + request, + types.bank_query_pb.QueryDenomMetadataResponse + ); + } + + /** + * DenomsMetadata queries the client metadata for all registered coin denominations. + */ + queryDenomsMetadata(pagination?:types.Pagination): Promise { + const request = new types.bank_query_pb.QueryDenomsMetadataRequest(); + request.setPagination(ModelCreator.createPaginationModel(pagination)); + + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/DenomsMetadata', + request, + types.bank_query_pb.QueryDenomsMetadataResponse + ); + } } diff --git a/src/modules/coinswap.ts b/src/modules/coinswap.ts index 3eaba813..2fdce177 100644 --- a/src/modules/coinswap.ts +++ b/src/modules/coinswap.ts @@ -127,13 +127,13 @@ export class Coinswap { if (!id) { throw new SdkError("id can ont be empty"); } - const request = new types.coinswap_query_pb.QueryLiquidityRequest(); - request.setId(id); + const request = new types.coinswap_query_pb.QueryLiquidityPoolRequest(); + request.setLptDenom(id); return this.client.rpcClient.protoQuery( - '/irismod.coinswap.Query/Liquidity', + '/irismod.coinswap.Query/LiquidityPool', request, - types.coinswap_query_pb.QueryLiquidityResponse + types.coinswap_query_pb.QueryLiquidityPoolResponse ); } diff --git a/src/modules/distribution.ts b/src/modules/distribution.ts index 1cc53692..0c04131f 100644 --- a/src/modules/distribution.ts +++ b/src/modules/distribution.ts @@ -181,16 +181,14 @@ export class Distribution { validator_address:string, starting_height:number = 0, ending_height:number = 0, - page_number:number = 1, - page_size:number = 10 + pagination?:types.Pagination ): Promise { if (!validator_address) { throw new SdkError("validator_address can ont be empty"); } - const pagination = ModelCreator.createPaginationModel(page_number, page_size, true); const request = new types.distribution_query_pb.QueryValidatorSlashesRequest(); request.setValidatorAddress(validator_address); - request.setPagination(pagination); + request.setPagination(ModelCreator.createPaginationModel(pagination)); if (starting_height) {request.setStartingHeight(starting_height);} if (ending_height) {request.setEndingHeight(ending_height);} diff --git a/src/modules/farm.ts b/src/modules/farm.ts new file mode 100644 index 00000000..6271e62b --- /dev/null +++ b/src/modules/farm.ts @@ -0,0 +1,151 @@ +import {Client} from "../client"; +import { SdkError } from "../errors"; +import { ModelCreator } from "../helper"; +import * as types from '../types'; +import {BaseTx} from "../types"; + +export class Farm { + /** @hidden */ + private client: Client; + + /** @hidden */ + constructor(client: Client) { + this.client = client; + } + /** + * stake lpt + * @param farmPoolID farm pool ID + * @param lpt receive Lp + * @param baseTx { types.BaseTx } + * @returns + */ + async stakeLp( + pool_id:string, + amount:types.Coin, + baseTx:BaseTx + ):Promise{ + const sender = this.client.keys.show(baseTx.from) + const msgs:any[] = [ + { + type:types.TxType.MsgStake, + value:{ + pool_id, + amount, + sender + } + } + ] + return this.client.tx.buildAndSend(msgs, baseTx); + }; + /** + * unstake lpt + * @param farmPoolName farm pool name + * @param lpt receive Lp + * @param baseTx { types.BaseTx } + * @returns + */ + async unStakeLp( + pool_id:string, + amount:types.Coin, + baseTx:BaseTx + ):Promise{ + const sender = this.client.keys.show(baseTx.from) + const msgs:any[] = [ + { + type:types.TxType.MsgUnstake, + value:{ + pool_id, + amount, + sender + } + } + ] + return this.client.tx.buildAndSend(msgs, baseTx); + } + /** + * harvest lpt + * @param farmPoolName farm pool name + * @param baseTx { types.BaseTx } + * @returns + */ + async harvestReward( + pool_id:string, + baseTx:BaseTx + ):Promise{ + const sender = this.client.keys.show(baseTx.from) + const msgs:any[] = [ + { + type:types.TxType.MsgHarvest, + value:{ + pool_id, + sender + } + } + ] + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * query Farm Pools + */ + queryFarmPools(pagination?:types.Pagination): Promise { + const request = new types.farm_query_pb.QueryFarmPoolsRequest(); + request.setPagination(ModelCreator.createPaginationModel(pagination)); + + return this.client.rpcClient.protoQuery( + '/irismod.farm.Query/FarmPools', + request, + types.farm_query_pb.QueryFarmPoolsResponse + ); + } + + /** + * query Farm Pool + */ + queryFarmPool(id: string): Promise { + if (!id) { + throw new SdkError("id can ont be empty"); + } + const request = new types.farm_query_pb.QueryFarmPoolRequest(); + request.setId(id); + return this.client.rpcClient.protoQuery( + '/irismod.farm.Query/FarmPool', + request, + types.farm_query_pb.QueryFarmPoolResponse + ); + } + + /** + * query Farmer + */ + queryFarmer( + farmer: string, + pool_id: string): Promise { + if (!farmer) { + throw new SdkError("farmer can ont be empty"); + } + if (!pool_id) { + throw new SdkError("pool_id can ont be empty"); + } + const request = new types.farm_query_pb.QueryFarmerRequest(); + request.setFarmer(farmer); + request.setPoolId(pool_id); + return this.client.rpcClient.protoQuery( + '/irismod.farm.Query/Farmer', + request, + types.farm_query_pb.QueryFarmerResponse + ); + } + + /** + * query Params + */ + queryParams(): Promise { + const request = new types.farm_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery( + '/irismod.farm.Query/Params', + request, + types.farm_query_pb.QueryParamsResponse + ); + } +} \ No newline at end of file diff --git a/src/modules/gov.ts b/src/modules/gov.ts index 969f8c7e..97b1973c 100644 --- a/src/modules/gov.ts +++ b/src/modules/gov.ts @@ -145,11 +145,10 @@ export class Gov { voter?:string, depositor?:string }, - page_number:number = 1, - page_size:number = 10 + pagination?:types.Pagination ): Promise { - const pagination = ModelCreator.createPaginationModel(page_number, page_size, true) const request = new types.gov_query_pb.QueryProposalsRequest(); + request.setPagination(ModelCreator.createPaginationModel(pagination)); if (typeof option.proposal_status != 'undefined') { request.setProposalStatus(option.proposal_status); } @@ -159,7 +158,6 @@ export class Gov { if (option.depositor) { request.setDepositor(option.depositor); } - request.setPagination(pagination); return this.client.rpcClient.protoQuery( '/cosmos.gov.v1beta1.Query/Proposals', @@ -207,17 +205,14 @@ export class Gov { */ queryVotes( proposal_id:number, - page_number:number = 1, - page_size:number = 10 + pagination?:types.Pagination ): Promise { if (!proposal_id) { throw new SdkError("proposal_id can ont be empty"); } - const pagination = ModelCreator.createPaginationModel(page_number, page_size, true) const request = new types.gov_query_pb.QueryVotesRequest(); request.setProposalId(proposal_id); - request.setPagination(pagination); - + request.setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.gov.v1beta1.Query/Votes', request, @@ -272,16 +267,14 @@ export class Gov { */ queryDeposits( proposal_id:number, - page_number:number = 1, - page_size:number = 10 + pagination?:types.Pagination ): Promise { if (!proposal_id) { throw new SdkError("proposal_id can ont be empty"); } - const pagination = ModelCreator.createPaginationModel(page_number, page_size, true) const request = new types.gov_query_pb.QueryDepositsRequest(); request.setProposalId(proposal_id); - request.setPagination(pagination); + request.setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.gov.v1beta1.Query/Deposits', diff --git a/src/modules/ibc.ts b/src/modules/ibc.ts index 18f99595..10e87e37 100644 --- a/src/modules/ibc.ts +++ b/src/modules/ibc.ts @@ -86,13 +86,9 @@ export class Ibc { /** * DenomTraces queries all denomination traces. */ - queryDenomTraces( - page_number:number = 1, - page_size:number = 10 - ): Promise { - const pagination = ModelCreator.createPaginationModel(page_number, page_size, true) + queryDenomTraces(pagination?:types.Pagination): Promise { const request = new types.ibc_transfer_query_pb.QueryDenomTracesRequest(); - request.setPagination(pagination); + request.setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/ibc.applications.transfer.v1.Query/DenomTraces', request, @@ -115,13 +111,9 @@ export class Ibc { /** * Channels queries all the IBC channels of a chain. */ - queryChannels( - page_number:number = 1, - page_size:number = 10 - ): Promise { - const pagination = ModelCreator.createPaginationModel(page_number, page_size, true) + queryChannels(pagination?:types.Pagination): Promise { const request = new types.ibc_channel_query_pb.QueryChannelsRequest(); - request.setPagination(pagination); + request.setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/ibc.core.channel.v1.Query/Channels', request, diff --git a/src/modules/index.ts b/src/modules/index.ts index eb55a56a..f8d46214 100644 --- a/src/modules/index.ts +++ b/src/modules/index.ts @@ -17,4 +17,5 @@ export * from './coinswap'; export * from './protobuf'; export * from './nft'; export * from './htlc'; -export * from './ibc'; \ No newline at end of file +export * from './ibc'; +export * from './farm' \ No newline at end of file diff --git a/src/modules/nft.ts b/src/modules/nft.ts index 1d077149..5e84c1c6 100644 --- a/src/modules/nft.ts +++ b/src/modules/nft.ts @@ -30,6 +30,15 @@ export class Nft { id: string, name: string, schema: string, + option:{ + symbol?: string, + mint_restricted?: boolean, + update_restricted?: boolean, + description?: string, + uri?: string, + uri_hash?: string, + data?: string, + }, baseTx: types.BaseTx ): Promise { const sender = this.client.keys.show(baseTx.from); @@ -40,7 +49,8 @@ export class Nft { id, name, schema, - sender + sender, + ...option } } ]; @@ -64,6 +74,7 @@ export class Nft { denom_id:string, name: string, uri:string, + uri_hash: string, data:string, recipient: string, baseTx: types.BaseTx @@ -84,6 +95,7 @@ export class Nft { denom_id, name, uri, + uri_hash, data, sender, recipient @@ -105,7 +117,7 @@ export class Nft { async editNft( id: string, denom_id:string, - new_property:{name?:string, uri?:string, data?:string}, + new_property:{name?:string, uri?:string, data?:string, uri_hash?: string}, baseTx: types.BaseTx ): Promise { const sender = this.client.keys.show(baseTx.from); @@ -137,7 +149,7 @@ export class Nft { id: string, denom_id:string, recipient:string, - new_property:{name?:string, uri?:string, data?:string}, + new_property:{name?:string, uri?:string, data?:string, uri_hash?: string,}, baseTx: types.BaseTx ): Promise { if (recipient && !Crypto.checkAddress(recipient, this.client.config.bech32Prefix.AccAddr)) { diff --git a/src/modules/protobuf.ts b/src/modules/protobuf.ts index 72f812e2..31611218 100644 --- a/src/modules/protobuf.ts +++ b/src/modules/protobuf.ts @@ -121,6 +121,19 @@ export class Protobuf { messageModelClass = types.MsgSwapOrder.getModelClass(); break; } + //farm + case types.TxType.MsgStake: { + messageModelClass = types.MsgStake.getModelClass(); + break; + } + case types.TxType.MsgUnstake: { + messageModelClass = types.MsgUnstake.getModelClass(); + break; + } + case types.TxType.MsgHarvest: { + messageModelClass = types.MsgHarvest.getModelClass(); + break; + } //nft case types.TxType.MsgIssueDenom: { messageModelClass = types.MsgIssueDenom.getModelClass(); @@ -234,6 +247,40 @@ export class Protobuf { } } + /** + * deserialize TxBody + * @param {[type]} TxBody:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} txBody object + */ + deserializeTxBody(txBody:string, returnProtobufModel?:boolean):object{ + if (!txBody) { + throw new SdkError('txBody can not be empty'); + } + if (returnProtobufModel) { + return types.tx_tx_pb.TxBody.deserializeBinary(txBody); + }else{ + return types.tx_tx_pb.TxBody.deserializeBinary(txBody).toObject(); + } + } + + /** + * deserialize AuthInfo + * @param {[type]} AuthInfo:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} authInfo object + */ + deserializeAuthInfo(authInfo:string, returnProtobufModel?:boolean):object{ + if (!authInfo) { + throw new SdkError('authInfo can not be empty'); + } + if (returnProtobufModel) { + return types.tx_tx_pb.AuthInfo.deserializeBinary(authInfo); + }else{ + return types.tx_tx_pb.AuthInfo.deserializeBinary(authInfo).toObject(); + } + } + /** * deserialize SignDoc * @param {[type]} signDoc:string base64 string @@ -285,6 +332,36 @@ export class Protobuf { } } + /** + * deserialize Pubkey + * @param {[type]} pubKey:{typeUrl:string, value:string} + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} pubKey object + */ + deserializeAccount(account:{typeUrl:string, value:string}, returnProtobufModel?:boolean):object{ + if (!account) { + throw new SdkError('account can not be empty'); + } + let result:{typeUrl:string, value:any} = {...account}; + switch(account.typeUrl){ + case '/cosmos.auth.v1beta1.BaseAccount': + result.value = types.auth_auth_pb.BaseAccount.deserializeBinary(account.value); + break; + case '/cosmos.auth.v1beta1.ModuleAccount': + result.value = types.auth_auth_pb.ModuleAccount.deserializeBinary(account.value); + break; + } + if (!returnProtobufModel && result.value && result.value.toObject) { + result.value = result.value.toObject(); + if (result.value?.baseAccount && result.value?.baseAccount?.pubKey) { + result.value.baseAccount.pubKey = this.deserializePubkey(result.value?.baseAccount?.pubKey); + }else if (result.value?.pubKey) { + result.value.pubKey = this.deserializePubkey(result.value?.pubKey); + } + } + return result; + } + /** * deserialize Pubkey * @param {[type]} pubKey:{typeUrl:string, value:string} @@ -300,13 +377,39 @@ export class Protobuf { case '/cosmos.crypto.ed25519.PubKey': result.value = types.crypto_ed25519_keys_pb.PubKey.deserializeBinary(pubKey.value); break; + case '/cosmos.crypto.multisig.LegacyAminoPubKey': + result.value = types.crypto_multisig_keys_pb.LegacyAminoPubKey.deserializeBinary(pubKey.value); + break; case '/cosmos.crypto.secp256k1.PubKey': result.value = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(pubKey.value); break; + case '/cosmos.crypto.secp256r1.PubKey': + result.value = types.crypto_secp256r1_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; + case '/cosmos.crypto.sm2.PubKey': + result.value = types.crypto_sm2_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; } if (!returnProtobufModel && result.value && result.value.toObject) { result.value = result.value.toObject(); } return result; } + + /** + * deserialize Global Account Number + * @param {[type]} GlobalAccountNumber:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Global Account Number object + */ + deserializeGlobalAccountNumber(GlobalAccountNumber: string, returnProtobufModel?: boolean): object{ + if (!GlobalAccountNumber) { + throw new SdkError('Global Account Number can not be empty'); + } + if (returnProtobufModel) { + return types.custom_base_pb.MsgGlobalAccountNumber.deserializeBinary(GlobalAccountNumber); + }else{ + return types.custom_base_pb.MsgGlobalAccountNumber.deserializeBinary(GlobalAccountNumber).toObject(); + } + } } diff --git a/src/modules/staking.ts b/src/modules/staking.ts index b1f13780..fc9b85ba 100644 --- a/src/modules/staking.ts +++ b/src/modules/staking.ts @@ -147,20 +147,17 @@ export class Staking { */ queryDelegations( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; + pagination?:types.Pagination, delegator_addr: string; } ): Promise { - const {key, page, size, count_total, delegator_addr} = query; + const {pagination, delegator_addr} = query; if (is.undefined(delegator_addr)) { throw new SdkError('delegator address can not be empty'); } const request = new types.staking_query_pb.QueryDelegatorDelegationsRequest() .setDelegatorAddr(delegator_addr) - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.staking.v1beta1.Query/DelegatorDelegations', request, @@ -208,20 +205,18 @@ export class Staking { */ queryDelegatorUnbondingDelegations( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; + pagination?:types.Pagination, delegator_addr: string; } ): Promise { - const {key, page, size, count_total, delegator_addr} = query; + const {pagination, delegator_addr} = query; if (is.undefined(delegator_addr)) { throw new SdkError('delegator address can not be empty'); } const request = new types.staking_query_pb.QueryDelegatorUnbondingDelegationsRequest() .setDelegatorAddr(delegator_addr) - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); + return this.client.rpcClient.protoQuery( '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', request, @@ -240,22 +235,19 @@ export class Staking { */ queryRedelegation( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; + pagination?:types.Pagination, delegator_addr: string; src_validator_addr?: string; dst_validator_addr?:string; } ): Promise { - const {key, page, size, count_total, delegator_addr,src_validator_addr, dst_validator_addr} = query; + const {pagination, delegator_addr,src_validator_addr, dst_validator_addr} = query; if (is.undefined(delegator_addr)) { throw new SdkError('delegator address can not be empty'); } const request = new types.staking_query_pb.QueryRedelegationsRequest() .setDelegatorAddr(delegator_addr) - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); if (is.not.undefined(src_validator_addr)) { request.setSrcValidatorAddr(src_validator_addr) } @@ -279,20 +271,17 @@ export class Staking { */ queryDelegatorValidators( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; - delegator_addr: string; + pagination?:types.Pagination, + delegator_addr: string } ): Promise { - const {key, page, size, count_total, delegator_addr} = query; + const {pagination, delegator_addr} = query; if (is.undefined(delegator_addr)) { throw new SdkError('delegator address can not be empty'); } const request = new types.staking_query_pb.QueryDelegatorValidatorsRequest() .setDelegatorAddr(delegator_addr) - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.staking.v1beta1.Query/DelegatorValidators', request, @@ -367,20 +356,17 @@ export class Staking { */ queryValidatorDelegations( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; + pagination?:types.Pagination, validator_addr: string; } ): Promise { - const {key, page, size, count_total, validator_addr} = query; + const {pagination, validator_addr} = query; if (is.undefined(validator_addr)) { throw new SdkError('validator address can not be empty'); } const request = new types.staking_query_pb.QueryValidatorDelegationsRequest() .setValidatorAddr(validator_addr) - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.staking.v1beta1.Query/ValidatorDelegations', request, @@ -398,20 +384,17 @@ export class Staking { */ queryValidatorUnbondingDelegations( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; + pagination?:types.Pagination, validator_addr: string; } ): Promise { - const {key, page, size, count_total, validator_addr} = query; + const {pagination, validator_addr} = query; if (is.undefined(validator_addr)) { throw new SdkError('validator address can not be empty'); } const request = new types.staking_query_pb.QueryValidatorUnbondingDelegationsRequest() .setValidatorAddr(validator_addr) - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); return this.client.rpcClient.protoQuery( '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', request, @@ -453,16 +436,13 @@ export class Staking { */ queryValidators( query: { - key?: string, - page?: number; - size?: number; - count_total?: boolean; + pagination?:types.Pagination, status?: string; } ): Promise { - const {key, page, size, count_total, status} = query; + const {pagination, status} = query; const request = new types.staking_query_pb.QueryValidatorsRequest() - .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + .setPagination(ModelCreator.createPaginationModel(pagination)); if (is.not.undefined(status)) { request.setStatus(status); } diff --git a/src/modules/tendermint.ts b/src/modules/tendermint.ts index a4e43195..8f8b9cb1 100644 --- a/src/modules/tendermint.ts +++ b/src/modules/tendermint.ts @@ -1,7 +1,7 @@ import { Client } from '../client'; import * as types from '../types'; import { RpcMethods } from '../types'; -import { Utils, Crypto } from '../utils'; +import { Utils, Crypto, StoreKeys } from '../utils'; import * as hexEncoding from 'crypto-js/enc-hex'; import * as base64Encoding from 'crypto-js/enc-base64'; import { SdkError, CODES } from '../errors'; @@ -197,4 +197,20 @@ export class Tendermint { }> { return this.client.rpcClient.request(RpcMethods.NetInfo, {}); } + + /** + * Query global account number + * @param height Block height to query + * @returns + */ + queryGlobalAccountNumber(height:number = 0): Promise { + return this.client.rpcClient + .queryStore(Uint8Array.from(StoreKeys.globalAccountNumberKey), 'acc', height) + .then(res => { + if (!res || !res.response || !res.response.value) { + throw new SdkError('query Global Account Number failed:', res); + } + return this.client.protobuf.deserializeGlobalAccountNumber(res.response.value); + }); + } } diff --git a/src/modules/tx.ts b/src/modules/tx.ts index 55bea0ab..d2c04dec 100644 --- a/src/modules/tx.ts +++ b/src/modules/tx.ts @@ -140,9 +140,17 @@ export class Tx { let sequence = baseTx.sequence; // Query account info from block chain if ((typeof baseTx.account_number == 'undefined' || typeof baseTx.sequence == 'undefined') && !offline) { - const account = await this.client.auth.queryAccount(keyObj.address); - accountNumber = account.accountNumber??0; - sequence = account.sequence??0; + const accountData:any = await this.client.auth.queryAccount(keyObj.address); + if(accountData?.account?.value){ + const account:any = accountData.account.value; + if (account?.baseAccount) {// ModuleAccount + accountNumber = account?.baseAccount?.accountNumber ?? 0; + sequence = account?.baseAccount?.sequence ?? 0; + }else{ + accountNumber = account.accountNumber ?? 0; + sequence = account.sequence ?? 0; + } + } } if (!stdTx.hasPubKey()) { @@ -380,6 +388,19 @@ export class Tx { msg = new types.MsgSwapOrder(txMsg.value); break; } + // farm + case types.TxType.MsgStake: { + msg = new types.MsgStake(txMsg.value); + break; + } + case types.TxType.MsgUnstake: { + msg = new types.MsgUnstake(txMsg.value); + break; + } + case types.TxType.MsgHarvest: { + msg = new types.MsgHarvest(txMsg.value); + break; + } //nft case types.TxType.MsgIssueDenom: { msg = new types.MsgIssueDenom(txMsg.value) diff --git a/src/types/auth.ts b/src/types/auth.ts index 1818eb3d..efe4d706 100644 --- a/src/types/auth.ts +++ b/src/types/auth.ts @@ -65,10 +65,4 @@ export interface StdSignMsg { fee: StdFee; memo: string; msgs: object[]; -} - -export interface BaseAccount { - address:string, - pubKey:{key:string}, - accountNumber:number, - sequence:number} +} \ No newline at end of file diff --git a/src/types/bank.ts b/src/types/bank.ts index 047b0a74..8e3c90d9 100644 --- a/src/types/bank.ts +++ b/src/types/bank.ts @@ -35,13 +35,13 @@ export class MsgSend extends Msg { validate() { if (!this.value.from_address) { - throw new SdkError("from_address is empty"); + throw new SdkError("from_address is empty"); } if (!this.value.to_address) { - throw new SdkError("to_address is empty"); + throw new SdkError("to_address is empty"); } if (!(this.value.amount && this.value.amount.length)) { - throw new SdkError("amount is empty"); + throw new SdkError("amount is empty"); } } } @@ -92,7 +92,7 @@ export class MsgMultiSend extends Msg { throw new SdkError("inputs is empty"); } if (!this.value.outputs) { - throw new SdkError("outputs is empty"); + throw new SdkError("outputs is empty"); } } } diff --git a/src/types/coinswap.ts b/src/types/coinswap.ts index 1ab8c5be..3b942bf6 100644 --- a/src/types/coinswap.ts +++ b/src/types/coinswap.ts @@ -44,19 +44,19 @@ export class MsgAddLiquidity extends Msg { validate() { if (!this.value.max_token) { - throw new SdkError("max_token is empty"); + throw new SdkError("max_token is empty"); } if (!this.value.exact_standard_amt) { - throw new SdkError("exact_standard_amt is empty"); + throw new SdkError("exact_standard_amt is empty"); } if (!this.value.min_liquidity) { - throw new SdkError("min_liquidity is empty"); + throw new SdkError("min_liquidity is empty"); } if (!this.value.deadline) { - throw new SdkError("deadline is empty"); + throw new SdkError("deadline is empty"); } if (!this.value.sender) { - throw new SdkError("sender is empty"); + throw new SdkError("sender is empty"); } } } @@ -102,19 +102,19 @@ export class MsgRemoveLiquidity extends Msg { validate() { if (!this.value.withdraw_liquidity) { - throw new SdkError("withdraw_liquidity is empty"); + throw new SdkError("withdraw_liquidity is empty"); } if (!this.value.min_token) { - throw new SdkError("min_token is empty"); + throw new SdkError("min_token is empty"); } if (!this.value.min_standard_amt) { - throw new SdkError("min_standard_amt is empty"); + throw new SdkError("min_standard_amt is empty"); } if (!this.value.deadline) { - throw new SdkError("deadline is empty"); + throw new SdkError("deadline is empty"); } if (!this.value.sender) { - throw new SdkError("sender is empty"); + throw new SdkError("sender is empty"); } } } @@ -170,16 +170,16 @@ export class MsgSwapOrder extends Msg { validate() { if (!this.value.input) { - throw new SdkError("input is empty"); + throw new SdkError("input is empty"); } if (!this.value.output) { - throw new SdkError("output is empty"); + throw new SdkError("output is empty"); } if (!this.value.deadline) { - throw new SdkError("deadline is empty"); + throw new SdkError("deadline is empty"); } if (!this.value.is_buy_order) { - throw new SdkError("is_buy_order is empty"); + throw new SdkError("is_buy_order is empty"); } } } diff --git a/src/types/farm.ts b/src/types/farm.ts new file mode 100644 index 00000000..ee678faa --- /dev/null +++ b/src/types/farm.ts @@ -0,0 +1,131 @@ +import {Coin, Msg, TxType} from "./types"; +import * as pbs from "./proto"; +import {SdkError} from "../errors"; +import {farm_tx_pb} from "./proto"; +import {TxModelCreator} from "../helper"; + + +export interface FarmParams { + pool_id: string, + amount: Coin, + sender: string +} + + +/** + * Msg for stake lp + * + * @hidden + */ + +export class MsgStake extends Msg { + value: FarmParams; + + constructor(msg: FarmParams) { + super(TxType.MsgStake); + this.value = msg; + } + + static getModelClass(): any { + return pbs.farm_tx_pb.MsgStake; + } + + getModel(): any { + let msg = new ((this.constructor as any).getModelClass())(); + msg.setPoolId(this.value.pool_id); + msg.setAmount(TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + msg.setSender(this.value.sender); + return msg; + } + + validate() { + if (!this.value.pool_id) { + throw new SdkError("pool_id is empty"); + } + if (!this.value.amount) { + throw new SdkError("amount is empty"); + } + if (!this.value.sender) { + throw new SdkError("sender is empty"); + } + } +} + +/** + * Msg for Unstake lp + * + * @hidden + */ + +export class MsgUnstake extends Msg { + value: FarmParams; + + constructor(msg: FarmParams) { + super(TxType.MsgUnstake); + this.value = msg; + } + + static getModelClass(): any { + return pbs.farm_tx_pb.MsgUnstake; + } + + getModel(): any { + let msg = new ((this.constructor as any).getModelClass())(); + msg.setPoolId(this.value.pool_id); + msg.setAmount(TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + msg.setSender(this.value.sender); + return msg; + } + + validate() { + if (!this.value.pool_id) { + throw new SdkError("pool_id is empty"); + } + if (!this.value.amount) { + throw new SdkError("amount is empty"); + } + if (!this.value.sender) { + throw new SdkError("sender is empty"); + } + } +} + +export interface HarvestParams { + pool_id: string, + sender: string +} + +/** + * Msg for harvest reward + * + * @hidden + */ + +export class MsgHarvest extends Msg { + value: HarvestParams; + + constructor(msg: HarvestParams) { + super(TxType.MsgHarvest); + this.value = msg; + } + + static getModelClass(): any { + return pbs.farm_tx_pb.MsgHarvest; + } + + getModel(): any { + let msg = new ((this.constructor as any).getModelClass())(); + msg.setPoolId(this.value.pool_id); + msg.setSender(this.value.sender); + return msg; + } + + validate() { + if (!this.value.pool_id) { + throw new SdkError("pool_id is empty"); + } + if (!this.value.sender) { + throw new SdkError("sender is empty"); + } + } +} \ No newline at end of file diff --git a/src/types/htlc.ts b/src/types/htlc.ts index c0ef2693..ad81aaca 100644 --- a/src/types/htlc.ts +++ b/src/types/htlc.ts @@ -53,31 +53,31 @@ export class MsgCreateHTLC extends Msg { validate() { if (!this.value.sender) { - throw new SdkError("sender is empty"); + throw new SdkError("sender is empty"); } if (!this.value.to) { - throw new SdkError("to is empty"); + throw new SdkError("to is empty"); } if (!this.value.receiver_on_other_chain) { - throw new SdkError("receiver_on_other_chain is empty"); + throw new SdkError("receiver_on_other_chain is empty"); } if (!this.value.sender_on_other_chain) { - throw new SdkError("sender_on_other_chain is empty"); + throw new SdkError("sender_on_other_chain is empty"); } if (!this.value.hash_lock) { - throw new SdkError("hash_lock is empty"); + throw new SdkError("hash_lock is empty"); } if (!this.value.timestamp) { - throw new SdkError("timestamp is empty"); + throw new SdkError("timestamp is empty"); } if (!this.value.time_lock) { - throw new SdkError("time_lock is empty"); + throw new SdkError("time_lock is empty"); } if (typeof this.value.transfer == 'undefined') { - throw new SdkError("transfer is empty"); + throw new SdkError("transfer is empty"); } if (!(this.value.amount && this.value.amount.length)) { - throw new SdkError("amount is empty"); + throw new SdkError("amount is empty"); } } } @@ -118,13 +118,13 @@ export class MsgClaimHTLC extends Msg { validate() { if (!this.value.sender) { - throw new SdkError("sender is empty"); + throw new SdkError("sender is empty"); } if (!this.value.id) { - throw new SdkError("id is empty"); + throw new SdkError("id is empty"); } if (!this.value.secret) { - throw new SdkError("secret is empty"); + throw new SdkError("secret is empty"); } } } \ No newline at end of file diff --git a/src/types/ibc.ts b/src/types/ibc.ts index 1a85db0a..1249343e 100644 --- a/src/types/ibc.ts +++ b/src/types/ibc.ts @@ -56,16 +56,16 @@ export class MsgTransfer extends Msg { validate() { if (!this.value.source_port) { - throw new SdkError("source_port is empty"); + throw new SdkError("source_port is empty"); } if (!this.value.source_channel) { - throw new SdkError("source_channel is empty"); + throw new SdkError("source_channel is empty"); } if (!this.value.token) { - throw new SdkError("token is empty"); + throw new SdkError("token is empty"); } if (!this.value.receiver) { - throw new SdkError("receiver is empty"); + throw new SdkError("receiver is empty"); } if (!this.value.timeout_height && !this.value.timeout_timestamp) { throw new SdkError("there must be one timeout_height or timeout_timestamp"); diff --git a/src/types/index.ts b/src/types/index.ts index 840ca315..eedb2821 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -20,6 +20,7 @@ export * from './block-result'; export * from './validator'; export * from './query-builder'; export * from './coinswap'; +export * from "./farm" export * from './protoTx'; export * from './nft'; export * from './proto'; diff --git a/src/types/nft.ts b/src/types/nft.ts index 5a8ce68e..cd37d409 100644 --- a/src/types/nft.ts +++ b/src/types/nft.ts @@ -12,6 +12,13 @@ export interface IssueDenomParam { name:string; schema:string; sender:string; + symbol?: string; + mint_restricted?: boolean; + update_restricted?: boolean; + description?: string; + uri?: string; + uri_hash?: string; + data?: string; } /** * Msg for issue denom @@ -36,6 +43,13 @@ export class MsgIssueDenom extends Msg { msg.setName(this.value.name); msg.setSchema(this.value.schema); msg.setSender(this.value.sender); + this.value?.symbol && msg.setSymbol(this.value.symbol); + this.value?.mint_restricted && msg.setMintRestricted(this.value.mint_restricted); + this.value?.update_restricted && msg.setUpdateRestricted(this.value.update_restricted); + this.value?.description && msg.setDescription(this.value.description); + this.value?.uri && msg.setUri(this.value.uri); + this.value?.uri_hash && msg.setUriHash(this.value.uri_hash); + this.value?.data && msg.setData(this.value.data); return msg; } @@ -66,6 +80,7 @@ export interface MintNFTParam { data:string; sender:string; recipient:string; + uri_hash: string; } /** @@ -94,6 +109,7 @@ export class MsgMintNFT extends Msg { msg.setData(this.value.data); msg.setSender(this.value.sender); msg.setRecipient(this.value.recipient); + msg.setUriHash(this.value.uri_hash); return msg; } @@ -119,6 +135,9 @@ export class MsgMintNFT extends Msg { if (!this.value.recipient) { throw new SdkError("recipient can not be empty"); } + if (!this.value.uri_hash) { + throw new SdkError("uri_hash can not be empty"); + } } } @@ -131,6 +150,7 @@ export interface EditNFTParam { name?:string; uri?:string; data?:string; + uri_hash?: string; sender:string; } /** @@ -170,6 +190,12 @@ export class MsgEditNFT extends Msg { }else{ msg.setData(this.value.data); } + if (typeof this.value.uri_hash === 'undefined') { + msg.setUriHash(doNotModify); + }else{ + msg.setUriHash(this.value.uri_hash); + } + return msg; } @@ -195,6 +221,7 @@ export interface TransferNFTParam { name?:string; uri?:string; data?:string; + uri_hash?:string; sender:string; recipient:string; } @@ -236,6 +263,11 @@ export class MsgTransferNFT extends Msg { }else{ msg.setData(this.value.data); } + if (typeof this.value.uri_hash === 'undefined') { + msg.setUriHash(doNotModify); + }else{ + msg.setUriHash(this.value.uri_hash); + } return msg; } diff --git a/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js index 8806d0cb..24740416 100644 --- a/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js +++ b/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js @@ -16,6 +16,8 @@ const grpc = {}; grpc.web = require('grpc-web'); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') @@ -82,6 +84,86 @@ proto.cosmos.auth.v1beta1.QueryPromiseClient = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.auth.v1beta1.QueryAccountsRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountsResponse>} + */ +const methodDescriptor_Query_Accounts = new grpc.web.MethodDescriptor( + '/cosmos.auth.v1beta1.Query/Accounts', + grpc.web.MethodType.UNARY, + proto.cosmos.auth.v1beta1.QueryAccountsRequest, + proto.cosmos.auth.v1beta1.QueryAccountsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.auth.v1beta1.QueryAccountsRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountsResponse>} + */ +const methodInfo_Query_Accounts = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.auth.v1beta1.QueryAccountsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.auth.v1beta1.QueryAccountsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.auth.v1beta1.QueryClient.prototype.accounts = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Accounts', + request, + metadata || {}, + methodDescriptor_Query_Accounts, + callback); +}; + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient.prototype.accounts = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Accounts', + request, + metadata || {}, + methodDescriptor_Query_Accounts); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js b/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js index 160afd51..429ed276 100644 --- a/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js +++ b/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js @@ -12,6 +12,8 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); +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 gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); @@ -24,8 +26,52 @@ var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountRequest', null, global); goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountResponse', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountsRequest', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountsResponse', null, global); goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryParamsRequest', null, global); goog.exportSymbol('proto.cosmos.auth.v1beta1.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.cosmos.auth.v1beta1.QueryAccountsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountsRequest.displayName = 'proto.cosmos.auth.v1beta1.QueryAccountsRequest'; +} +/** + * 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.auth.v1beta1.QueryAccountsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.auth.v1beta1.QueryAccountsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountsResponse.displayName = 'proto.cosmos.auth.v1beta1.QueryAccountsResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -113,6 +159,368 @@ if (goog.DEBUG && !COMPILED) { +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_, 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.auth.v1beta1.QueryAccountsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.QueryAccountsRequest.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.auth.v1beta1.QueryAccountsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.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.cosmos.auth.v1beta1.QueryAccountsRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountsRequest; + return proto.cosmos.auth.v1beta1.QueryAccountsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.QueryAccountsRequest.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.auth.v1beta1.QueryAccountsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsRequest} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryAccountsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.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_, 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.auth.v1beta1.QueryAccountsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.QueryAccountsResponse.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.auth.v1beta1.QueryAccountsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accountsList: jspb.Message.toObjectList(msg.getAccountsList(), + google_protobuf_any_pb.Any.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.auth.v1beta1.QueryAccountsResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountsResponse; + return proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addAccounts(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.auth.v1beta1.QueryAccountsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.QueryAccountsResponse.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.auth.v1beta1.QueryAccountsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any accounts = 1; + * @return {!Array} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.getAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.setAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.addAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.clearAccountsList = function() { + return this.setAccountsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.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.auth.v1beta1.QueryAccountsResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountsResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryAccountsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/src/types/proto-types/cosmos/authz/v1beta1/authz_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/authz_pb.js new file mode 100644 index 00000000..8da8381c --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/authz_pb.js @@ -0,0 +1,399 @@ +// source: cosmos/authz/v1beta1/authz.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.cosmos.authz.v1beta1.GenericAuthorization', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.Grant', 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.GenericAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.GenericAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.GenericAuthorization.displayName = 'proto.cosmos.authz.v1beta1.GenericAuthorization'; +} +/** + * 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.Grant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.Grant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.Grant.displayName = 'proto.cosmos.authz.v1beta1.Grant'; +} + + + +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_, 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.GenericAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.GenericAuthorization.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.GenericAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + msg: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.GenericAuthorization; + return proto.cosmos.authz.v1beta1.GenericAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.GenericAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.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.setMsg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.GenericAuthorization.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.GenericAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsg(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string msg = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.getMsg = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.setMsg = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.Grant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.Grant.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.Grant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.Grant.toObject = function(includeInstance, msg) { + var f, obj = { + authorization: (f = msg.getAuthorization()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && google_protobuf_timestamp_pb.Timestamp.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.Grant} + */ +proto.cosmos.authz.v1beta1.Grant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.Grant; + return proto.cosmos.authz.v1beta1.Grant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.Grant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.Grant} + */ +proto.cosmos.authz.v1beta1.Grant.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setAuthorization(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.Grant.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.Grant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.Grant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthorization(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any authorization = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.getAuthorization = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this +*/ +proto.cosmos.authz.v1beta1.Grant.prototype.setAuthorization = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this + */ +proto.cosmos.authz.v1beta1.Grant.prototype.clearAuthorization = function() { + return this.setAuthorization(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.hasAuthorization = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp expiration = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.getExpiration = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this +*/ +proto.cosmos.authz.v1beta1.Grant.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.Grant} returns this + */ +proto.cosmos.authz.v1beta1.Grant.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.Grant.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/src/types/proto-types/cosmos/authz/v1beta1/event_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/event_pb.js new file mode 100644 index 00000000..da86d072 --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/event_pb.js @@ -0,0 +1,439 @@ +// source: cosmos/authz/v1beta1/event.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cosmos.authz.v1beta1.EventGrant', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.EventRevoke', 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.EventGrant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.EventGrant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.EventGrant.displayName = 'proto.cosmos.authz.v1beta1.EventGrant'; +} +/** + * 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.EventRevoke = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.EventRevoke, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.EventRevoke.displayName = 'proto.cosmos.authz.v1beta1.EventRevoke'; +} + + + +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_, 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.EventGrant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.EventGrant.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.EventGrant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventGrant.toObject = function(includeInstance, msg) { + var f, obj = { + msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), + granter: jspb.Message.getFieldWithDefault(msg, 3, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.EventGrant} + */ +proto.cosmos.authz.v1beta1.EventGrant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.EventGrant; + return proto.cosmos.authz.v1beta1.EventGrant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.EventGrant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.EventGrant} + */ +proto.cosmos.authz.v1beta1.EventGrant.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMsgTypeUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + case 4: + 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.authz.v1beta1.EventGrant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.EventGrant.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.EventGrant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventGrant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgTypeUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string msg_type_url = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventGrant} returns this + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string granter = 3; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventGrant} returns this + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string grantee = 4; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventGrant} returns this + */ +proto.cosmos.authz.v1beta1.EventGrant.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.EventRevoke.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.EventRevoke.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.EventRevoke} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventRevoke.toObject = function(includeInstance, msg) { + var f, obj = { + msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), + granter: jspb.Message.getFieldWithDefault(msg, 3, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.EventRevoke} + */ +proto.cosmos.authz.v1beta1.EventRevoke.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.EventRevoke; + return proto.cosmos.authz.v1beta1.EventRevoke.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.EventRevoke} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} + */ +proto.cosmos.authz.v1beta1.EventRevoke.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMsgTypeUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + case 4: + 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.authz.v1beta1.EventRevoke.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.EventRevoke.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.EventRevoke} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.EventRevoke.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgTypeUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string msg_type_url = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} returns this + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string granter = 3; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} returns this + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string grantee = 4; + * @return {string} + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.EventRevoke} returns this + */ +proto.cosmos.authz.v1beta1.EventRevoke.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/src/types/proto-types/cosmos/authz/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/genesis_pb.js new file mode 100644 index 00000000..f12dd180 --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/genesis_pb.js @@ -0,0 +1,489 @@ +// source: cosmos/authz/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_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.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.GrantAuthorization', 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.GenesisState.displayName = 'proto.cosmos.authz.v1beta1.GenesisState'; +} +/** + * 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.GrantAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.GrantAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.GrantAuthorization.displayName = 'proto.cosmos.authz.v1beta1.GrantAuthorization'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.GenesisState.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_, 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.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.GenesisState.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.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + authorizationList: jspb.Message.toObjectList(msg.getAuthorizationList(), + proto.cosmos.authz.v1beta1.GrantAuthorization.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.authz.v1beta1.GenesisState} + */ +proto.cosmos.authz.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.GenesisState; + return proto.cosmos.authz.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.GenesisState} + */ +proto.cosmos.authz.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.authz.v1beta1.GrantAuthorization; + reader.readMessage(value,proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinaryFromReader); + msg.addAuthorization(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.GenesisState.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.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthorizationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.authz.v1beta1.GrantAuthorization.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GrantAuthorization authorization = 1; + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.GenesisState.prototype.getAuthorizationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.authz.v1beta1.GrantAuthorization, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.authz.v1beta1.GenesisState} returns this +*/ +proto.cosmos.authz.v1beta1.GenesisState.prototype.setAuthorizationList = 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.GenesisState.prototype.addAuthorization = 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.GenesisState} returns this + */ +proto.cosmos.authz.v1beta1.GenesisState.prototype.clearAuthorizationList = function() { + return this.setAuthorizationList([]); +}; + + + + + +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_, 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.GrantAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.GrantAuthorization.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.GrantAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + granter: jspb.Message.getFieldWithDefault(msg, 1, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 2, ""), + authorization: (f = msg.getAuthorization()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + expiration: (f = msg.getExpiration()) && google_protobuf_timestamp_pb.Timestamp.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.GrantAuthorization} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.GrantAuthorization; + return proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.GrantAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.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.setAuthorization(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.GrantAuthorization.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.GrantAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.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.getAuthorization(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any authorization = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getAuthorization = 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.authz.v1beta1.GrantAuthorization} returns this +*/ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setAuthorization = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.clearAuthorization = function() { + return this.setAuthorization(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.hasAuthorization = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Timestamp expiration = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getExpiration = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this +*/ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/src/types/proto-types/cosmos/authz/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..27e543a7 --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,162 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.authz.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.authz = {}; +proto.cosmos.authz.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.QueryGrantsRequest, + * !proto.cosmos.authz.v1beta1.QueryGrantsResponse>} + */ +const methodDescriptor_Query_Grants = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Query/Grants', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.QueryGrantsRequest, + proto.cosmos.authz.v1beta1.QueryGrantsResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.QueryGrantsRequest, + * !proto.cosmos.authz.v1beta1.QueryGrantsResponse>} + */ +const methodInfo_Query_Grants = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.QueryGrantsResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.QueryGrantsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.QueryClient.prototype.grants = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Query/Grants', + request, + metadata || {}, + methodDescriptor_Query_Grants, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.QueryPromiseClient.prototype.grants = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Query/Grants', + request, + metadata || {}, + methodDescriptor_Query_Grants); +}; + + +module.exports = proto.cosmos.authz.v1beta1; + diff --git a/src/types/proto-types/cosmos/authz/v1beta1/query_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/query_pb.js new file mode 100644 index 00000000..38060346 --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/query_pb.js @@ -0,0 +1,517 @@ +// source: cosmos/authz/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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'; +} + + + +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_, 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} + * @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_, 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.QueryGrantsResponse.prototype.getGrantsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_authz_v1beta1_authz_pb.Grant, 1)); +}; + + +/** + * @param {!Array} 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; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/src/types/proto-types/cosmos/authz/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..7a46989f --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,328 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.authz.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js') + +var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.authz = {}; +proto.cosmos.authz.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.MsgGrant, + * !proto.cosmos.authz.v1beta1.MsgGrantResponse>} + */ +const methodDescriptor_Msg_Grant = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Msg/Grant', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.MsgGrant, + proto.cosmos.authz.v1beta1.MsgGrantResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.MsgGrant, + * !proto.cosmos.authz.v1beta1.MsgGrantResponse>} + */ +const methodInfo_Msg_Grant = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.MsgGrantResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.MsgGrantResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.MsgClient.prototype.grant = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Grant', + request, + metadata || {}, + methodDescriptor_Msg_Grant, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient.prototype.grant = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Grant', + request, + metadata || {}, + methodDescriptor_Msg_Grant); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.MsgExec, + * !proto.cosmos.authz.v1beta1.MsgExecResponse>} + */ +const methodDescriptor_Msg_Exec = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Msg/Exec', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.MsgExec, + proto.cosmos.authz.v1beta1.MsgExecResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.MsgExec, + * !proto.cosmos.authz.v1beta1.MsgExecResponse>} + */ +const methodInfo_Msg_Exec = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.MsgExecResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.MsgExecResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.MsgClient.prototype.exec = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Exec', + request, + metadata || {}, + methodDescriptor_Msg_Exec, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgExec} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient.prototype.exec = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Exec', + request, + metadata || {}, + methodDescriptor_Msg_Exec); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.authz.v1beta1.MsgRevoke, + * !proto.cosmos.authz.v1beta1.MsgRevokeResponse>} + */ +const methodDescriptor_Msg_Revoke = new grpc.web.MethodDescriptor( + '/cosmos.authz.v1beta1.Msg/Revoke', + grpc.web.MethodType.UNARY, + proto.cosmos.authz.v1beta1.MsgRevoke, + proto.cosmos.authz.v1beta1.MsgRevokeResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.authz.v1beta1.MsgRevoke, + * !proto.cosmos.authz.v1beta1.MsgRevokeResponse>} + */ +const methodInfo_Msg_Revoke = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.authz.v1beta1.MsgRevokeResponse, + /** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.authz.v1beta1.MsgRevokeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.authz.v1beta1.MsgClient.prototype.revoke = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Revoke', + request, + metadata || {}, + methodDescriptor_Msg_Revoke, + callback); +}; + + +/** + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.authz.v1beta1.MsgPromiseClient.prototype.revoke = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.authz.v1beta1.Msg/Revoke', + request, + metadata || {}, + methodDescriptor_Msg_Revoke); +}; + + +module.exports = proto.cosmos.authz.v1beta1; + diff --git a/src/types/proto-types/cosmos/authz/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/authz/v1beta1/tx_pb.js new file mode 100644 index 00000000..3ef0f4ec --- /dev/null +++ b/src/types/proto-types/cosmos/authz/v1beta1/tx_pb.js @@ -0,0 +1,1132 @@ +// source: cosmos/authz/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js'); +goog.object.extend(proto, cosmos_base_abci_v1beta1_abci_pb); +var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js'); +goog.object.extend(proto, cosmos_authz_v1beta1_authz_pb); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgExec', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgExecResponse', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgGrant', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgGrantResponse', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgRevoke', null, global); +goog.exportSymbol('proto.cosmos.authz.v1beta1.MsgRevokeResponse', 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.MsgGrant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgGrant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgGrant.displayName = 'proto.cosmos.authz.v1beta1.MsgGrant'; +} +/** + * 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.MsgExecResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.MsgExecResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgExecResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgExecResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgExecResponse'; +} +/** + * 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.MsgExec = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.MsgExec.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgExec, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgExec.displayName = 'proto.cosmos.authz.v1beta1.MsgExec'; +} +/** + * 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.MsgGrantResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgGrantResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgGrantResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgGrantResponse'; +} +/** + * 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.MsgRevoke = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgRevoke, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgRevoke.displayName = 'proto.cosmos.authz.v1beta1.MsgRevoke'; +} +/** + * 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.MsgRevokeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.authz.v1beta1.MsgRevokeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.authz.v1beta1.MsgRevokeResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgRevokeResponse'; +} + + + +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_, 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.MsgGrant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgGrant.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.MsgGrant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrant.toObject = function(includeInstance, msg) { + var f, obj = { + granter: jspb.Message.getFieldWithDefault(msg, 1, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 2, ""), + grant: (f = msg.getGrant()) && cosmos_authz_v1beta1_authz_pb.Grant.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.MsgGrant} + */ +proto.cosmos.authz.v1beta1.MsgGrant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgGrant; + return proto.cosmos.authz.v1beta1.MsgGrant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgGrant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} + */ +proto.cosmos.authz.v1beta1.MsgGrant.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 cosmos_authz_v1beta1_authz_pb.Grant; + reader.readMessage(value,cosmos_authz_v1beta1_authz_pb.Grant.deserializeBinaryFromReader); + msg.setGrant(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgGrant.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.MsgGrant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrant.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.getGrant(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_authz_v1beta1_authz_pb.Grant.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Grant grant = 3; + * @return {?proto.cosmos.authz.v1beta1.Grant} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.getGrant = function() { + return /** @type{?proto.cosmos.authz.v1beta1.Grant} */ ( + jspb.Message.getWrapperField(this, cosmos_authz_v1beta1_authz_pb.Grant, 3)); +}; + + +/** + * @param {?proto.cosmos.authz.v1beta1.Grant|undefined} value + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this +*/ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.setGrant = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.authz.v1beta1.MsgGrant} returns this + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.clearGrant = function() { + return this.setGrant(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.authz.v1beta1.MsgGrant.prototype.hasGrant = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.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_, 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.MsgExecResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgExecResponse.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.MsgExecResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resultsList: msg.getResultsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgExecResponse; + return proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.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.addResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgExecResponse.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.MsgExecResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResultsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes results = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes results = 1; + * This is a type-conversion wrapper around `getResultsList()` + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getResultsList())); +}; + + +/** + * repeated bytes results = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResultsList()` + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getResultsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.setResultsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.addResults = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.clearResultsList = function() { + return this.setResultsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.MsgExec.repeatedFields_ = [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_, 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.MsgExec.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgExec.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.MsgExec} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExec.toObject = function(includeInstance, msg) { + var f, obj = { + grantee: jspb.Message.getFieldWithDefault(msg, 1, ""), + msgsList: jspb.Message.toObjectList(msg.getMsgsList(), + google_protobuf_any_pb.Any.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.authz.v1beta1.MsgExec} + */ +proto.cosmos.authz.v1beta1.MsgExec.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgExec; + return proto.cosmos.authz.v1beta1.MsgExec.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgExec} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgExec} + */ +proto.cosmos.authz.v1beta1.MsgExec.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 google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addMsgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgExec.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.MsgExec} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgExec.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMsgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string grantee = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgExec} returns this + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated google.protobuf.Any msgs = 2; + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.getMsgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.authz.v1beta1.MsgExec} returns this +*/ +proto.cosmos.authz.v1beta1.MsgExec.prototype.setMsgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.addMsgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.authz.v1beta1.MsgExec} returns this + */ +proto.cosmos.authz.v1beta1.MsgExec.prototype.clearMsgsList = function() { + return this.setMsgsList([]); +}; + + + + + +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_, 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.MsgGrantResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgGrantResponse.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.MsgGrantResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.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.authz.v1beta1.MsgGrantResponse} + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgGrantResponse; + return proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgGrantResponse} + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.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.authz.v1beta1.MsgGrantResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgGrantResponse.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.MsgGrantResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgGrantResponse.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_, 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.MsgRevoke.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgRevoke.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.MsgRevoke} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevoke.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, "") + }; + + 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.MsgRevoke} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgRevoke; + return proto.cosmos.authz.v1beta1.MsgRevoke.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgRevoke} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgRevoke.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.MsgRevoke} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevoke.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 + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} returns this + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} returns this + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string msg_type_url = 3; + * @return {string} + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.authz.v1beta1.MsgRevoke} returns this + */ +proto.cosmos.authz.v1beta1.MsgRevoke.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.MsgRevokeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.MsgRevokeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.authz.v1beta1.MsgRevokeResponse} + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.authz.v1beta1.MsgRevokeResponse; + return proto.cosmos.authz.v1beta1.MsgRevokeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.authz.v1beta1.MsgRevokeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.authz.v1beta1.MsgRevokeResponse} + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.authz.v1beta1.MsgRevokeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.authz.v1beta1.MsgRevokeResponse.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.MsgRevokeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.authz.v1beta1.MsgRevokeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.authz.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/authz_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/authz_pb.js new file mode 100644 index 00000000..4a776216 --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/authz_pb.js @@ -0,0 +1,203 @@ +// source: cosmos/bank/v1beta1/authz.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.SendAuthorization', 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.bank.v1beta1.SendAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.SendAuthorization.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.SendAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.SendAuthorization.displayName = 'proto.cosmos.bank.v1beta1.SendAuthorization'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.SendAuthorization.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_, 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.bank.v1beta1.SendAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.SendAuthorization.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.bank.v1beta1.SendAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + spendLimitList: jspb.Message.toObjectList(msg.getSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.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.bank.v1beta1.SendAuthorization} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.SendAuthorization; + return proto.cosmos.bank.v1beta1.SendAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.SendAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.SendAuthorization} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.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.addSpendLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.SendAuthorization.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.bank.v1beta1.SendAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin spend_limit = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.getSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.SendAuthorization} returns this +*/ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.setSpendLimitList = 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.cosmos.bank.v1beta1.SendAuthorization.prototype.addSpendLimit = 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.cosmos.bank.v1beta1.SendAuthorization} returns this + */ +proto.cosmos.bank.v1beta1.SendAuthorization.prototype.clearSpendLimitList = function() { + return this.setSpendLimitList([]); +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js index 82261386..4d0473f9 100644 --- a/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js +++ b/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js @@ -1321,7 +1321,9 @@ proto.cosmos.bank.v1beta1.Metadata.toObject = function(includeInstance, msg) { denomUnitsList: jspb.Message.toObjectList(msg.getDenomUnitsList(), proto.cosmos.bank.v1beta1.DenomUnit.toObject, includeInstance), base: jspb.Message.getFieldWithDefault(msg, 3, ""), - display: jspb.Message.getFieldWithDefault(msg, 4, "") + display: jspb.Message.getFieldWithDefault(msg, 4, ""), + name: jspb.Message.getFieldWithDefault(msg, 5, ""), + symbol: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -1375,6 +1377,14 @@ proto.cosmos.bank.v1beta1.Metadata.deserializeBinaryFromReader = function(msg, r var value = /** @type {string} */ (reader.readString()); msg.setDisplay(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; default: reader.skipField(); break; @@ -1433,6 +1443,20 @@ proto.cosmos.bank.v1beta1.Metadata.serializeBinaryToWriter = function(message, w f ); } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } }; @@ -1528,4 +1552,40 @@ proto.cosmos.bank.v1beta1.Metadata.prototype.setDisplay = function(value) { }; +/** + * optional string name = 5; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string symbol = 6; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js index b44f4ccf..8cf3bf98 100644 --- a/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js +++ b/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js @@ -1065,7 +1065,7 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.toObject = function( */ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.toObject = function(includeInstance, msg) { var f, obj = { - + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -1102,6 +1102,11 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.deserializeBinaryFromReader = } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -1131,6 +1136,51 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.serializeBinary = fu */ proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} returns this +*/ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -1174,7 +1224,8 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.toObject = function proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.toObject = function(includeInstance, msg) { var f, obj = { supplyList: jspb.Message.toObjectList(msg.getSupplyList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1216,6 +1267,11 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinaryFromReader = reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addSupply(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; @@ -1253,6 +1309,14 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.serializeBinaryToWriter = fun cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1294,6 +1358,43 @@ proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.clearSupplyList = f }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.bank.v1beta1.QueryTotalSupplyResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js b/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js index 42631712..4093aa0c 100644 --- a/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js +++ b/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js @@ -91,7 +91,8 @@ proto.cosmos.base.query.v1beta1.PageRequest.toObject = function(includeInstance, key: msg.getKey_asB64(), offset: jspb.Message.getFieldWithDefault(msg, 2, 0), limit: jspb.Message.getFieldWithDefault(msg, 3, 0), - countTotal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + countTotal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + reverse: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -144,6 +145,10 @@ proto.cosmos.base.query.v1beta1.PageRequest.deserializeBinaryFromReader = functi var value = /** @type {boolean} */ (reader.readBool()); msg.setCountTotal(value); break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReverse(value); + break; default: reader.skipField(); break; @@ -201,6 +206,13 @@ proto.cosmos.base.query.v1beta1.PageRequest.serializeBinaryToWriter = function(m f ); } + f = message.getReverse(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; @@ -300,6 +312,24 @@ proto.cosmos.base.query.v1beta1.PageRequest.prototype.setCountTotal = function(v }; +/** + * optional bool reverse = 5; + * @return {boolean} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getReverse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setReverse = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + diff --git a/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_grpc_web_pb.js b/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_grpc_web_pb.js new file mode 100644 index 00000000..8bd2fe7a --- /dev/null +++ b/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_grpc_web_pb.js @@ -0,0 +1,559 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.base.reflection.v2alpha1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.base = {}; +proto.cosmos.base.reflection = {}; +proto.cosmos.base.reflection.v2alpha1 = require('./reflection_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetAuthnDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetAuthnDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getAuthnDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetAuthnDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getAuthnDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetAuthnDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetChainDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetChainDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getChainDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetChainDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getChainDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetChainDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetCodecDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetCodecDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getCodecDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetCodecDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getCodecDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetCodecDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetConfigurationDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetConfigurationDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getConfigurationDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetConfigurationDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getConfigurationDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetConfigurationDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetQueryServicesDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetQueryServicesDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getQueryServicesDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetQueryServicesDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getQueryServicesDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetQueryServicesDescriptor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse>} + */ +const methodDescriptor_ReflectionService_GetTxDescriptor = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, + * !proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse>} + */ +const methodInfo_ReflectionService_GetTxDescriptor = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse, + /** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServiceClient.prototype.getTxDescriptor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetTxDescriptor, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v2alpha1.ReflectionServicePromiseClient.prototype.getTxDescriptor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor', + request, + metadata || {}, + methodDescriptor_ReflectionService_GetTxDescriptor); +}; + + +module.exports = proto.cosmos.base.reflection.v2alpha1; + diff --git a/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_pb.js b/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_pb.js new file mode 100644 index 00000000..173f3437 --- /dev/null +++ b/src/types/proto-types/cosmos/base/reflection/v2alpha1/reflection_pb.js @@ -0,0 +1,4726 @@ +// source: cosmos/base/reflection/v2alpha1/reflection.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.AppDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.ChainDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.CodecDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.MsgDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v2alpha1.TxDescriptor', 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.base.reflection.v2alpha1.AppDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.AppDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.AppDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.AppDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.TxDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.TxDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.TxDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.TxDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.AuthnDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.SigningModeDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.ChainDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.ChainDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.ChainDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.CodecDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.CodecDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.CodecDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.InterfaceDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.InterfaceImplementerDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.ConfigurationDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.MsgDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.MsgDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.MsgDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.GetAuthnDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetAuthnDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetChainDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetChainDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetCodecDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetCodecDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.GetTxDescriptorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest'; +} +/** + * 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.base.reflection.v2alpha1.GetTxDescriptorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.displayName = 'proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse'; +} +/** + * 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.base.reflection.v2alpha1.QueryServicesDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.QueryServiceDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor'; +} +/** + * 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.base.reflection.v2alpha1.QueryMethodDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.displayName = 'proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor'; +} + + + +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_, 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.base.reflection.v2alpha1.AppDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.AppDescriptor.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.base.reflection.v2alpha1.AppDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + authn: (f = msg.getAuthn()) && proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.toObject(includeInstance, f), + chain: (f = msg.getChain()) && proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.toObject(includeInstance, f), + codec: (f = msg.getCodec()) && proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.toObject(includeInstance, f), + configuration: (f = msg.getConfiguration()) && proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.toObject(includeInstance, f), + queryServices: (f = msg.getQueryServices()) && proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.toObject(includeInstance, f), + tx: (f = msg.getTx()) && proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.AppDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.AppDescriptor; + return proto.cosmos.base.reflection.v2alpha1.AppDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader); + msg.setAuthn(value); + break; + case 2: + var value = new proto.cosmos.base.reflection.v2alpha1.ChainDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinaryFromReader); + msg.setChain(value); + break; + case 3: + var value = new proto.cosmos.base.reflection.v2alpha1.CodecDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader); + msg.setCodec(value); + break; + case 4: + var value = new proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 5: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader); + msg.setQueryServices(value); + break; + case 6: + var value = new proto.cosmos.base.reflection.v2alpha1.TxDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinaryFromReader); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.AppDescriptor.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.base.reflection.v2alpha1.AppDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthn(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.serializeBinaryToWriter + ); + } + f = message.getChain(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.serializeBinaryToWriter + ); + } + f = message.getCodec(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.serializeBinaryToWriter + ); + } + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.serializeBinaryToWriter + ); + } + f = message.getQueryServices(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.serializeBinaryToWriter + ); + } + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AuthnDescriptor authn = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getAuthn = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setAuthn = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearAuthn = function() { + return this.setAuthn(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasAuthn = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChainDescriptor chain = 2; + * @return {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getChain = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ChainDescriptor, 2)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setChain = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearChain = function() { + return this.setChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasChain = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional CodecDescriptor codec = 3; + * @return {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getCodec = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.CodecDescriptor, 3)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setCodec = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearCodec = function() { + return this.setCodec(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasCodec = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ConfigurationDescriptor configuration = 4; + * @return {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getConfiguration = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor, 4)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearConfiguration = function() { + return this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional QueryServicesDescriptor query_services = 5; + * @return {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getQueryServices = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor, 5)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setQueryServices = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearQueryServices = function() { + return this.setQueryServices(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasQueryServices = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional TxDescriptor tx = 6; + * @return {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.getTx = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.TxDescriptor, 6)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.AppDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.AppDescriptor.prototype.hasTx = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.repeatedFields_ = [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_, 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.base.reflection.v2alpha1.TxDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.TxDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + msgsList: jspb.Message.toObjectList(msg.getMsgsList(), + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.TxDescriptor; + return proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.setFullname(value); + break; + case 2: + var value = new proto.cosmos.base.reflection.v2alpha1.MsgDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.deserializeBinaryFromReader); + msg.addMsgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.TxDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMsgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated MsgDescriptor msgs = 2; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.getMsgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.MsgDescriptor, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.setMsgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.addMsgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.reflection.v2alpha1.MsgDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.TxDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.TxDescriptor.prototype.clearMsgsList = function() { + return this.setMsgsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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_, 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.base.reflection.v2alpha1.AuthnDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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.base.reflection.v2alpha1.AuthnDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + signModesList: jspb.Message.toObjectList(msg.getSignModesList(), + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor; + return proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.deserializeBinaryFromReader); + msg.addSignModes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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.base.reflection.v2alpha1.AuthnDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignModesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SigningModeDescriptor sign_modes = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.getSignModesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.setSignModesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.addSignModes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.prototype.clearSignModesList = function() { + return this.setSignModesList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.SigningModeDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.base.reflection.v2alpha1.SigningModeDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + number: jspb.Message.getFieldWithDefault(msg, 2, 0), + authnInfoProviderMethodFullname: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + 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.base.reflection.v2alpha1.SigningModeDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor; + return proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthnInfoProviderMethodFullname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.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.base.reflection.v2alpha1.SigningModeDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNumber(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getAuthnInfoProviderMethodFullname(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 number = 2; + * @return {number} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string authn_info_provider_method_fullname = 3; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.getAuthnInfoProviderMethodFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.SigningModeDescriptor.prototype.setAuthnInfoProviderMethodFullname = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.base.reflection.v2alpha1.ChainDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.base.reflection.v2alpha1.ChainDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.ChainDescriptor; + return proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.base.reflection.v2alpha1.ChainDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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_, 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.base.reflection.v2alpha1.CodecDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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.base.reflection.v2alpha1.CodecDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + interfacesList: jspb.Message.toObjectList(msg.getInterfacesList(), + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.CodecDescriptor; + return proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.deserializeBinaryFromReader); + msg.addInterfaces(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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.base.reflection.v2alpha1.CodecDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterfacesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated InterfaceDescriptor interfaces = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.getInterfacesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.setInterfacesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.addInterfaces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.prototype.clearInterfacesList = function() { + return this.setInterfacesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.repeatedFields_ = [2,3]; + + + +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_, 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.base.reflection.v2alpha1.InterfaceDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.base.reflection.v2alpha1.InterfaceDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + interfaceAcceptingMessagesList: jspb.Message.toObjectList(msg.getInterfaceAcceptingMessagesList(), + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.toObject, includeInstance), + interfaceImplementersList: jspb.Message.toObjectList(msg.getInterfaceImplementersList(), + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.base.reflection.v2alpha1.InterfaceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor; + return proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.setFullname(value); + break; + case 2: + var value = new proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.deserializeBinaryFromReader); + msg.addInterfaceAcceptingMessages(value); + break; + case 3: + var value = new proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.deserializeBinaryFromReader); + msg.addInterfaceImplementers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.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.base.reflection.v2alpha1.InterfaceDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInterfaceAcceptingMessagesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.serializeBinaryToWriter + ); + } + f = message.getInterfaceImplementersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.getInterfaceAcceptingMessagesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.setInterfaceAcceptingMessagesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.addInterfaceAcceptingMessages = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.clearInterfaceAcceptingMessagesList = function() { + return this.setInterfaceAcceptingMessagesList([]); +}; + + +/** + * repeated InterfaceImplementerDescriptor interface_implementers = 3; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.getInterfaceImplementersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.setInterfaceImplementersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.addInterfaceImplementers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceDescriptor.prototype.clearInterfaceImplementersList = function() { + return this.setInterfaceImplementersList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.base.reflection.v2alpha1.InterfaceImplementerDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + typeUrl: 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.base.reflection.v2alpha1.InterfaceImplementerDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor; + return proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.setFullname(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.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.base.reflection.v2alpha1.InterfaceImplementerDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTypeUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string type_url = 2; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.getTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.prototype.setTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.repeatedFields_ = [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_, 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + fieldDescriptorNamesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor; + return proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.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.setFullname(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addFieldDescriptorNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFieldDescriptorNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string field_descriptor_names = 2; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.getFieldDescriptorNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.setFieldDescriptorNamesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.addFieldDescriptorNames = 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.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.prototype.clearFieldDescriptorNamesList = function() { + return this.setFieldDescriptorNamesList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.base.reflection.v2alpha1.ConfigurationDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + bech32AccountAddressPrefix: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor; + return proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.setBech32AccountAddressPrefix(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.base.reflection.v2alpha1.ConfigurationDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBech32AccountAddressPrefix(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string bech32_account_address_prefix = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.getBech32AccountAddressPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.prototype.setBech32AccountAddressPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.base.reflection.v2alpha1.MsgDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.base.reflection.v2alpha1.MsgDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.MsgDescriptor; + return proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.setMsgTypeUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.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.base.reflection.v2alpha1.MsgDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgTypeUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string msg_type_url = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.prototype.getMsgTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.MsgDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.MsgDescriptor.prototype.setMsgTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.base.reflection.v2alpha1.GetAuthnDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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.base.reflection.v2alpha1.GetAuthnDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.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.base.reflection.v2alpha1.GetAuthnDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + authn: (f = msg.getAuthn()) && proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.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.base.reflection.v2alpha1.GetAuthnDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.deserializeBinaryFromReader); + msg.setAuthn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.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.base.reflection.v2alpha1.GetAuthnDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthn(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AuthnDescriptor authn = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.getAuthn = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.AuthnDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.setAuthn = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.clearAuthn = function() { + return this.setAuthn(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.prototype.hasAuthn = 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_, 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.base.reflection.v2alpha1.GetChainDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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.base.reflection.v2alpha1.GetChainDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.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.base.reflection.v2alpha1.GetChainDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + chain: (f = msg.getChain()) && proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.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.base.reflection.v2alpha1.GetChainDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.ChainDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.deserializeBinaryFromReader); + msg.setChain(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.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.base.reflection.v2alpha1.GetChainDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChain(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.ChainDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ChainDescriptor chain = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.getChain = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ChainDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ChainDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.setChain = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.clearChain = function() { + return this.setChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.prototype.hasChain = 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_, 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.base.reflection.v2alpha1.GetCodecDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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.base.reflection.v2alpha1.GetCodecDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.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.base.reflection.v2alpha1.GetCodecDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + codec: (f = msg.getCodec()) && proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.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.base.reflection.v2alpha1.GetCodecDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.CodecDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.deserializeBinaryFromReader); + msg.setCodec(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.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.base.reflection.v2alpha1.GetCodecDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCodec(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.CodecDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CodecDescriptor codec = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.getCodec = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.CodecDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.CodecDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.setCodec = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.clearCodec = function() { + return this.setCodec(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.prototype.hasCodec = 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_, 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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + config: (f = msg.getConfig()) && proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.deserializeBinaryFromReader); + msg.setConfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.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.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConfig(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConfigurationDescriptor config = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.getConfig = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.ConfigurationDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.setConfig = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.clearConfig = function() { + return this.setConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.prototype.hasConfig = 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_, 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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + queries: (f = msg.getQueries()) && proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader); + msg.setQueries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.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.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQueries(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional QueryServicesDescriptor queries = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.getQueries = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.setQueries = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.clearQueries = function() { + return this.setQueries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.prototype.hasQueries = 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_, 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.base.reflection.v2alpha1.GetTxDescriptorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest; + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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.base.reflection.v2alpha1.GetTxDescriptorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest.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_, 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.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.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.base.reflection.v2alpha1.GetTxDescriptorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: (f = msg.getTx()) && proto.cosmos.base.reflection.v2alpha1.TxDescriptor.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.base.reflection.v2alpha1.GetTxDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse; + return proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.TxDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.TxDescriptor.deserializeBinaryFromReader); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.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.base.reflection.v2alpha1.GetTxDescriptorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.TxDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxDescriptor tx = 1; + * @return {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.getTx = function() { + return /** @type{?proto.cosmos.base.reflection.v2alpha1.TxDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.reflection.v2alpha1.TxDescriptor, 1)); +}; + + +/** + * @param {?proto.cosmos.base.reflection.v2alpha1.TxDescriptor|undefined} value + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse} returns this + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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_, 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.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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.base.reflection.v2alpha1.QueryServicesDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + queryServicesList: jspb.Message.toObjectList(msg.getQueryServicesList(), + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor; + return proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.deserializeBinaryFromReader); + msg.addQueryServices(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.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.base.reflection.v2alpha1.QueryServicesDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQueryServicesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated QueryServiceDescriptor query_services = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.getQueryServicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.setQueryServicesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.addQueryServices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.prototype.clearQueryServicesList = function() { + return this.setQueryServicesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.repeatedFields_ = [3]; + + + +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_, 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.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.base.reflection.v2alpha1.QueryServiceDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + fullname: jspb.Message.getFieldWithDefault(msg, 1, ""), + isModule: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + methodsList: jspb.Message.toObjectList(msg.getMethodsList(), + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.base.reflection.v2alpha1.QueryServiceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor; + return proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.setFullname(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsModule(value); + break; + case 3: + var value = new proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor; + reader.readMessage(value,proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.deserializeBinaryFromReader); + msg.addMethods(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.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.base.reflection.v2alpha1.QueryServiceDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFullname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIsModule(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getMethodsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fullname = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.getFullname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.setFullname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool is_module = 2; + * @return {boolean} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.getIsModule = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.setIsModule = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated QueryMethodDescriptor methods = 3; + * @return {!Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.getMethodsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this +*/ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.setMethodsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.addMethods = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.prototype.clearMethodsList = function() { + return this.setMethodsList([]); +}; + + + + + +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_, 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.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.base.reflection.v2alpha1.QueryMethodDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + fullQueryPath: 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.base.reflection.v2alpha1.QueryMethodDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor; + return proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFullQueryPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.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.base.reflection.v2alpha1.QueryMethodDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFullQueryPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string full_query_path = 2; + * @return {string} + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.getFullQueryPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor} returns this + */ +proto.cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.prototype.setFullQueryPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.reflection.v2alpha1); diff --git a/src/types/proto-types/cosmos/base/store/v1beta1/listening_pb.js b/src/types/proto-types/cosmos/base/store/v1beta1/listening_pb.js new file mode 100644 index 00000000..adf28579 --- /dev/null +++ b/src/types/proto-types/cosmos/base/store/v1beta1/listening_pb.js @@ -0,0 +1,305 @@ +// source: cosmos/base/store/v1beta1/listening.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cosmos.base.store.v1beta1.StoreKVPair', 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.base.store.v1beta1.StoreKVPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.StoreKVPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.StoreKVPair.displayName = 'proto.cosmos.base.store.v1beta1.StoreKVPair'; +} + + + +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_, 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.base.store.v1beta1.StoreKVPair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.StoreKVPair.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.base.store.v1beta1.StoreKVPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.toObject = function(includeInstance, msg) { + var f, obj = { + storeKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + pb_delete: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + key: msg.getKey_asB64(), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.StoreKVPair; + return proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.store.v1beta1.StoreKVPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.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.setStoreKey(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDelete(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.StoreKVPair.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.base.store.v1beta1.StoreKVPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDelete(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string store_key = 1; + * @return {string} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getStoreKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setStoreKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool delete = 2; + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getDelete = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setDelete = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes key = 3; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes key = 3; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes value = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes value = 4; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js b/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js index 8e21cb19..f3b5e83b 100644 --- a/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js +++ b/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js @@ -2626,7 +2626,8 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.toObject = function(includeInst buildTags: jspb.Message.getFieldWithDefault(msg, 5, ""), goVersion: jspb.Message.getFieldWithDefault(msg, 6, ""), buildDepsList: jspb.Message.toObjectList(msg.getBuildDepsList(), - proto.cosmos.base.tendermint.v1beta1.Module.toObject, includeInstance) + proto.cosmos.base.tendermint.v1beta1.Module.toObject, includeInstance), + cosmosSdkVersion: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -2692,6 +2693,10 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.deserializeBinaryFromReader = f reader.readMessage(value,proto.cosmos.base.tendermint.v1beta1.Module.deserializeBinaryFromReader); msg.addBuildDeps(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCosmosSdkVersion(value); + break; default: reader.skipField(); break; @@ -2771,6 +2776,13 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.serializeBinaryToWriter = funct proto.cosmos.base.tendermint.v1beta1.Module.serializeBinaryToWriter ); } + f = message.getCosmosSdkVersion(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -2920,6 +2932,24 @@ proto.cosmos.base.tendermint.v1beta1.VersionInfo.prototype.clearBuildDepsList = }; +/** + * optional string cosmos_sdk_version = 8; + * @return {string} + */ +proto.cosmos.base.tendermint.v1beta1.VersionInfo.prototype.getCosmosSdkVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint.v1beta1.VersionInfo.prototype.setCosmosSdkVersion = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + diff --git a/src/types/proto-types/cosmos/crypto/secp256r1/keys_pb.js b/src/types/proto-types/cosmos/crypto/secp256r1/keys_pb.js new file mode 100644 index 00000000..c510af73 --- /dev/null +++ b/src/types/proto-types/cosmos/crypto/secp256r1/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/secp256r1/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.cosmos.crypto.secp256r1.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.secp256r1.PubKey', 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.crypto.secp256r1.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256r1.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256r1.PubKey.displayName = 'proto.cosmos.crypto.secp256r1.PubKey'; +} +/** + * 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.crypto.secp256r1.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256r1.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256r1.PrivKey.displayName = 'proto.cosmos.crypto.secp256r1.PrivKey'; +} + + + +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_, 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.crypto.secp256r1.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256r1.PubKey.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.crypto.secp256r1.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.crypto.secp256r1.PubKey} + */ +proto.cosmos.crypto.secp256r1.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256r1.PubKey; + return proto.cosmos.crypto.secp256r1.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256r1.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256r1.PubKey} + */ +proto.cosmos.crypto.secp256r1.PubKey.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.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256r1.PubKey.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.crypto.secp256r1.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256r1.PubKey} returns this + */ +proto.cosmos.crypto.secp256r1.PubKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.crypto.secp256r1.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256r1.PrivKey.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.crypto.secp256r1.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + secret: msg.getSecret_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.crypto.secp256r1.PrivKey} + */ +proto.cosmos.crypto.secp256r1.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256r1.PrivKey; + return proto.cosmos.crypto.secp256r1.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256r1.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256r1.PrivKey} + */ +proto.cosmos.crypto.secp256r1.PrivKey.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.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256r1.PrivKey.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.crypto.secp256r1.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256r1.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecret_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes secret = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.getSecret = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes secret = 1; + * This is a type-conversion wrapper around `getSecret()` + * @return {string} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.getSecret_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecret())); +}; + + +/** + * optional bytes secret = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecret()` + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.getSecret_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecret())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256r1.PrivKey} returns this + */ +proto.cosmos.crypto.secp256r1.PrivKey.prototype.setSecret = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.secp256r1); diff --git a/src/types/proto-types/cosmos/feegrant/v1beta1/feegrant_pb.js b/src/types/proto-types/cosmos/feegrant/v1beta1/feegrant_pb.js new file mode 100644 index 00000000..8cffe290 --- /dev/null +++ b/src/types/proto-types/cosmos/feegrant/v1beta1/feegrant_pb.js @@ -0,0 +1,1110 @@ +// source: cosmos/feegrant/v1beta1/feegrant.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +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_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.BasicAllowance', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.Grant', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.PeriodicAllowance', 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.BasicAllowance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.BasicAllowance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.BasicAllowance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.BasicAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.BasicAllowance'; +} +/** + * 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.PeriodicAllowance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.PeriodicAllowance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.PeriodicAllowance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.PeriodicAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.PeriodicAllowance'; +} +/** + * 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.AllowedMsgAllowance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance'; +} +/** + * 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.Grant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.Grant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.Grant.displayName = 'proto.cosmos.feegrant.v1beta1.Grant'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.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_, 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.BasicAllowance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.BasicAllowance.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.BasicAllowance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.toObject = function(includeInstance, msg) { + var f, obj = { + spendLimitList: jspb.Message.toObjectList(msg.getSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + expiration: (f = msg.getExpiration()) && google_protobuf_timestamp_pb.Timestamp.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.BasicAllowance} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.BasicAllowance; + return proto.cosmos.feegrant.v1beta1.BasicAllowance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.BasicAllowance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.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.addSpendLimit(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.BasicAllowance.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.BasicAllowance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getExpiration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin spend_limit = 1; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.getSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.setSpendLimitList = 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.cosmos.feegrant.v1beta1.BasicAllowance.prototype.addSpendLimit = 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.cosmos.feegrant.v1beta1.BasicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.clearSpendLimitList = function() { + return this.setSpendLimitList([]); +}; + + +/** + * optional google.protobuf.Timestamp expiration = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.getExpiration = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.setExpiration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.BasicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.clearExpiration = function() { + return this.setExpiration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.BasicAllowance.prototype.hasExpiration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.repeatedFields_ = [3,4]; + + + +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_, 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.PeriodicAllowance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.PeriodicAllowance.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.PeriodicAllowance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.toObject = function(includeInstance, msg) { + var f, obj = { + basic: (f = msg.getBasic()) && proto.cosmos.feegrant.v1beta1.BasicAllowance.toObject(includeInstance, f), + period: (f = msg.getPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + periodSpendLimitList: jspb.Message.toObjectList(msg.getPeriodSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + periodCanSpendList: jspb.Message.toObjectList(msg.getPeriodCanSpendList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + periodReset: (f = msg.getPeriodReset()) && google_protobuf_timestamp_pb.Timestamp.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.PeriodicAllowance} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.PeriodicAllowance; + return proto.cosmos.feegrant.v1beta1.PeriodicAllowance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.feegrant.v1beta1.BasicAllowance; + reader.readMessage(value,proto.cosmos.feegrant.v1beta1.BasicAllowance.deserializeBinaryFromReader); + msg.setBasic(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setPeriod(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPeriodSpendLimit(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPeriodCanSpend(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setPeriodReset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.PeriodicAllowance.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.PeriodicAllowance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBasic(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.feegrant.v1beta1.BasicAllowance.serializeBinaryToWriter + ); + } + f = message.getPeriod(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getPeriodSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPeriodCanSpendList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPeriodReset(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BasicAllowance basic = 1; + * @return {?proto.cosmos.feegrant.v1beta1.BasicAllowance} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getBasic = function() { + return /** @type{?proto.cosmos.feegrant.v1beta1.BasicAllowance} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.feegrant.v1beta1.BasicAllowance, 1)); +}; + + +/** + * @param {?proto.cosmos.feegrant.v1beta1.BasicAllowance|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setBasic = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearBasic = function() { + return this.setBasic(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.hasBasic = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Duration period = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriod = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriod = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriod = function() { + return this.setPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.hasPeriod = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin period_spend_limit = 3; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriodSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriodSpendLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.addPeriodSpendLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriodSpendLimitList = function() { + return this.setPeriodSpendLimitList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin period_can_spend = 4; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriodCanSpendList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriodCanSpendList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.addPeriodCanSpend = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriodCanSpendList = function() { + return this.setPeriodCanSpendList([]); +}; + + +/** + * optional google.protobuf.Timestamp period_reset = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.getPeriodReset = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.setPeriodReset = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.PeriodicAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.clearPeriodReset = function() { + return this.setPeriodReset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.PeriodicAllowance.prototype.hasPeriodReset = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.repeatedFields_ = [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_, 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.AllowedMsgAllowance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.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.AllowedMsgAllowance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.toObject = function(includeInstance, msg) { + var f, obj = { + allowance: (f = msg.getAllowance()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + allowedMessagesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.AllowedMsgAllowance} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance; + return proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setAllowance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowedMessages(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.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.AllowedMsgAllowance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowance(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getAllowedMessagesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional google.protobuf.Any allowance = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.getAllowance = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this +*/ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.setAllowance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.clearAllowance = function() { + return this.setAllowance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.hasAllowance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string allowed_messages = 2; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.getAllowedMessagesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.setAllowedMessagesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.addAllowedMessages = 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.feegrant.v1beta1.AllowedMsgAllowance} returns this + */ +proto.cosmos.feegrant.v1beta1.AllowedMsgAllowance.prototype.clearAllowedMessagesList = function() { + return this.setAllowedMessagesList([]); +}; + + + + + +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_, 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.Grant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.Grant.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.Grant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant} + */ +proto.cosmos.feegrant.v1beta1.Grant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.Grant; + return proto.cosmos.feegrant.v1beta1.Grant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.Grant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.Grant.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.Grant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.Grant} returns this + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.Grant} returns this + */ +proto.cosmos.feegrant.v1beta1.Grant.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.Grant.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.Grant} returns this +*/ +proto.cosmos.feegrant.v1beta1.Grant.prototype.setAllowance = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.Grant} returns this + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.clearAllowance = function() { + return this.setAllowance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.Grant.prototype.hasAllowance = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/src/types/proto-types/cosmos/feegrant/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/feegrant/v1beta1/genesis_pb.js new file mode 100644 index 00000000..2aac50a1 --- /dev/null +++ b/src/types/proto-types/cosmos/feegrant/v1beta1/genesis_pb.js @@ -0,0 +1,201 @@ +// source: cosmos/feegrant/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_feegrant_v1beta1_feegrant_pb = require('../../../cosmos/feegrant/v1beta1/feegrant_pb.js'); +goog.object.extend(proto, cosmos_feegrant_v1beta1_feegrant_pb); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.GenesisState', 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.GenesisState.displayName = 'proto.cosmos.feegrant.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.GenesisState.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_, 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.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.GenesisState.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.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + allowancesList: jspb.Message.toObjectList(msg.getAllowancesList(), + cosmos_feegrant_v1beta1_feegrant_pb.Grant.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.feegrant.v1beta1.GenesisState} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.GenesisState; + return proto.cosmos.feegrant.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.GenesisState} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_feegrant_v1beta1_feegrant_pb.Grant; + reader.readMessage(value,cosmos_feegrant_v1beta1_feegrant_pb.Grant.deserializeBinaryFromReader); + msg.addAllowances(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.GenesisState.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.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_feegrant_v1beta1_feegrant_pb.Grant.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Grant allowances = 1; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.getAllowancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_feegrant_v1beta1_feegrant_pb.Grant, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.GenesisState} returns this +*/ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.setAllowancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.Grant=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.addAllowances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.feegrant.v1beta1.Grant, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.GenesisState} returns this + */ +proto.cosmos.feegrant.v1beta1.GenesisState.prototype.clearAllowancesList = function() { + return this.setAllowancesList([]); +}; + + +goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/src/types/proto-types/cosmos/feegrant/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/feegrant/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..6f23bdff --- /dev/null +++ b/src/types/proto-types/cosmos/feegrant/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,242 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.feegrant.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_feegrant_v1beta1_feegrant_pb = require('../../../cosmos/feegrant/v1beta1/feegrant_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.feegrant = {}; +proto.cosmos.feegrant.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse>} + */ +const methodDescriptor_Query_Allowance = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Query/Allowance', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse>} + */ +const methodInfo_Query_Allowance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.QueryClient.prototype.allowance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowance', + request, + metadata || {}, + methodDescriptor_Query_Allowance, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.QueryPromiseClient.prototype.allowance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowance', + request, + metadata || {}, + methodDescriptor_Query_Allowance); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse>} + */ +const methodDescriptor_Query_Allowances = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Query/Allowances', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, + * !proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse>} + */ +const methodInfo_Query_Allowances = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.QueryClient.prototype.allowances = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowances', + request, + metadata || {}, + methodDescriptor_Query_Allowances, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.QueryPromiseClient.prototype.allowances = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Query/Allowances', + request, + metadata || {}, + methodDescriptor_Query_Allowances); +}; + + +module.exports = proto.cosmos.feegrant.v1beta1; + diff --git a/src/types/proto-types/cosmos/feegrant/v1beta1/query_pb.js b/src/types/proto-types/cosmos/feegrant/v1beta1/query_pb.js new file mode 100644 index 00000000..ccf79505 --- /dev/null +++ b/src/types/proto-types/cosmos/feegrant/v1beta1/query_pb.js @@ -0,0 +1,812 @@ +// source: cosmos/feegrant/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_feegrant_v1beta1_feegrant_pb = require('../../../cosmos/feegrant/v1beta1/feegrant_pb.js'); +goog.object.extend(proto, cosmos_feegrant_v1beta1_feegrant_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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse', 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.QueryAllowanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest'; +} +/** + * 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.QueryAllowanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse'; +} +/** + * 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.QueryAllowancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest'; +} +/** + * 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.QueryAllowancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.displayName = 'proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse'; +} + + + +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_, 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.QueryAllowanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest; + return proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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.QueryAllowanceRequest.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceRequest.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_, 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.QueryAllowanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.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.QueryAllowanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + allowance: (f = msg.getAllowance()) && cosmos_feegrant_v1beta1_feegrant_pb.Grant.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.QueryAllowanceResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse; + return proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_feegrant_v1beta1_feegrant_pb.Grant; + reader.readMessage(value,cosmos_feegrant_v1beta1_feegrant_pb.Grant.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.QueryAllowanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.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.QueryAllowanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_feegrant_v1beta1_feegrant_pb.Grant.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Grant allowance = 1; + * @return {?proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.getAllowance = function() { + return /** @type{?proto.cosmos.feegrant.v1beta1.Grant} */ ( + jspb.Message.getWrapperField(this, cosmos_feegrant_v1beta1_feegrant_pb.Grant, 1)); +}; + + +/** + * @param {?proto.cosmos.feegrant.v1beta1.Grant|undefined} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.setAllowance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.clearAllowance = function() { + return this.setAllowance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowanceResponse.prototype.hasAllowance = 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_, 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.QueryAllowancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.QueryAllowancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest; + return proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.QueryAllowancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest.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.feegrant.v1beta1.QueryAllowancesRequest} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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_, 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.QueryAllowancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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.QueryAllowancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + allowancesList: jspb.Message.toObjectList(msg.getAllowancesList(), + cosmos_feegrant_v1beta1_feegrant_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.feegrant.v1beta1.QueryAllowancesResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse; + return proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_feegrant_v1beta1_feegrant_pb.Grant; + reader.readMessage(value,cosmos_feegrant_v1beta1_feegrant_pb.Grant.deserializeBinaryFromReader); + msg.addAllowances(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.feegrant.v1beta1.QueryAllowancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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.QueryAllowancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_feegrant_v1beta1_feegrant_pb.Grant.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Grant allowances = 1; + * @return {!Array} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.getAllowancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_feegrant_v1beta1_feegrant_pb.Grant, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.setAllowancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.Grant=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.feegrant.v1beta1.Grant} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.addAllowances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.feegrant.v1beta1.Grant, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.clearAllowancesList = function() { + return this.setAllowancesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.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.feegrant.v1beta1.QueryAllowancesResponse} returns this +*/ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse} returns this + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.feegrant.v1beta1.QueryAllowancesResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/src/types/proto-types/cosmos/feegrant/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/feegrant/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..b8664b45 --- /dev/null +++ b/src/types/proto-types/cosmos/feegrant/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,242 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.feegrant.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.feegrant = {}; +proto.cosmos.feegrant.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.feegrant.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse>} + */ +const methodDescriptor_Msg_GrantAllowance = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Msg/GrantAllowance', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse>} + */ +const methodInfo_Msg_GrantAllowance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.MsgClient.prototype.grantAllowance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/GrantAllowance', + request, + metadata || {}, + methodDescriptor_Msg_GrantAllowance, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.MsgPromiseClient.prototype.grantAllowance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/GrantAllowance', + request, + metadata || {}, + methodDescriptor_Msg_GrantAllowance); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse>} + */ +const methodDescriptor_Msg_RevokeAllowance = new grpc.web.MethodDescriptor( + '/cosmos.feegrant.v1beta1.Msg/RevokeAllowance', + grpc.web.MethodType.UNARY, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, + * !proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse>} + */ +const methodInfo_Msg_RevokeAllowance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse, + /** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.feegrant.v1beta1.MsgClient.prototype.revokeAllowance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/RevokeAllowance', + request, + metadata || {}, + methodDescriptor_Msg_RevokeAllowance, + callback); +}; + + +/** + * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.feegrant.v1beta1.MsgPromiseClient.prototype.revokeAllowance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.feegrant.v1beta1.Msg/RevokeAllowance', + request, + metadata || {}, + methodDescriptor_Msg_RevokeAllowance); +}; + + +module.exports = proto.cosmos.feegrant.v1beta1; + diff --git a/src/types/proto-types/cosmos/feegrant/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/feegrant/v1beta1/tx_pb.js new file mode 100644 index 00000000..2e2fa44d --- /dev/null +++ b/src/types/proto-types/cosmos/feegrant/v1beta1/tx_pb.js @@ -0,0 +1,682 @@ +// source: cosmos/feegrant/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +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); +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_, 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_, 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_, 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_, 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); diff --git a/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js index d2fc0985..56d8bdea 100644 --- a/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js +++ b/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js @@ -34,6 +34,28 @@ goog.exportSymbol('proto.cosmos.gov.v1beta1.TextProposal', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.Vote', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.VoteOption', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.VotingParams', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.WeightedVoteOption', 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.gov.v1beta1.WeightedVoteOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.WeightedVoteOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.WeightedVoteOption.displayName = 'proto.cosmos.gov.v1beta1.WeightedVoteOption'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -129,7 +151,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.cosmos.gov.v1beta1.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.Vote.repeatedFields_, null); }; goog.inherits(proto.cosmos.gov.v1beta1.Vote, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -205,6 +227,166 @@ if (goog.DEBUG && !COMPILED) { +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_, 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.gov.v1beta1.WeightedVoteOption.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.WeightedVoteOption.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.gov.v1beta1.WeightedVoteOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.toObject = function(includeInstance, msg) { + var f, obj = { + option: jspb.Message.getFieldWithDefault(msg, 1, 0), + weight: 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.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.WeightedVoteOption; + return proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.WeightedVoteOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); + msg.setOption(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.WeightedVoteOption.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.gov.v1beta1.WeightedVoteOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOption(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getWeight(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional VoteOption option = 1; + * @return {!proto.cosmos.gov.v1beta1.VoteOption} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.getOption = function() { + return /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.VoteOption} value + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} returns this + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.setOption = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string weight = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.getWeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} returns this + */ +proto.cosmos.gov.v1beta1.WeightedVoteOption.prototype.setWeight = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -1329,6 +1511,13 @@ proto.cosmos.gov.v1beta1.TallyResult.prototype.setNoWithVeto = function(value) { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.Vote.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1362,7 +1551,9 @@ proto.cosmos.gov.v1beta1.Vote.toObject = function(includeInstance, msg) { var f, obj = { proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), voter: jspb.Message.getFieldWithDefault(msg, 2, ""), - option: jspb.Message.getFieldWithDefault(msg, 3, 0) + option: jspb.Message.getFieldWithDefault(msg, 3, 0), + optionsList: jspb.Message.toObjectList(msg.getOptionsList(), + proto.cosmos.gov.v1beta1.WeightedVoteOption.toObject, includeInstance) }; if (includeInstance) { @@ -1411,6 +1602,11 @@ proto.cosmos.gov.v1beta1.Vote.deserializeBinaryFromReader = function(msg, reader var value = /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); msg.setOption(value); break; + case 4: + var value = new proto.cosmos.gov.v1beta1.WeightedVoteOption; + reader.readMessage(value,proto.cosmos.gov.v1beta1.WeightedVoteOption.deserializeBinaryFromReader); + msg.addOptions(value); + break; default: reader.skipField(); break; @@ -1461,6 +1657,14 @@ proto.cosmos.gov.v1beta1.Vote.serializeBinaryToWriter = function(message, writer f ); } + f = message.getOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cosmos.gov.v1beta1.WeightedVoteOption.serializeBinaryToWriter + ); + } }; @@ -1518,6 +1722,44 @@ proto.cosmos.gov.v1beta1.Vote.prototype.setOption = function(value) { }; +/** + * repeated WeightedVoteOption options = 4; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.gov.v1beta1.WeightedVoteOption, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this +*/ +proto.cosmos.gov.v1beta1.Vote.prototype.setOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.WeightedVoteOption=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.addOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.gov.v1beta1.WeightedVoteOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.clearOptionsList = function() { + return this.setOptionsList([]); +}; + + /** * List of repeated fields within this message type. diff --git a/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js index bfa7e873..c3dcf758 100644 --- a/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js +++ b/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js @@ -242,6 +242,86 @@ proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.vote = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgVoteWeighted, + * !proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse>} + */ +const methodDescriptor_Msg_VoteWeighted = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/VoteWeighted', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgVoteWeighted, + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgVoteWeighted, + * !proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse>} + */ +const methodInfo_Msg_VoteWeighted = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.voteWeighted = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/VoteWeighted', + request, + metadata || {}, + methodDescriptor_Msg_VoteWeighted, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.voteWeighted = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/VoteWeighted', + request, + metadata || {}, + methodDescriptor_Msg_VoteWeighted); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js index f76f101c..3a760745 100644 --- a/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js +++ b/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js @@ -28,6 +28,8 @@ goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposal', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVote', null, global); goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteWeighted', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -112,6 +114,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.gov.v1beta1.MsgVoteResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteResponse'; } +/** + * 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.gov.v1beta1.MsgVoteWeighted = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.MsgVoteWeighted.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVoteWeighted, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVoteWeighted.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteWeighted'; +} +/** + * 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.gov.v1beta1.MsgVoteWeightedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -817,6 +861,327 @@ proto.cosmos.gov.v1beta1.MsgVoteResponse.serializeBinaryToWriter = function(mess +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.repeatedFields_ = [3]; + + + +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_, 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.gov.v1beta1.MsgVoteWeighted.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVoteWeighted.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.gov.v1beta1.MsgVoteWeighted} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: jspb.Message.getFieldWithDefault(msg, 2, ""), + optionsList: jspb.Message.toObjectList(msg.getOptionsList(), + cosmos_gov_v1beta1_gov_pb.WeightedVoteOption.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.gov.v1beta1.MsgVoteWeighted} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVoteWeighted; + return proto.cosmos.gov.v1beta1.MsgVoteWeighted.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProposalId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVoter(value); + break; + case 3: + var value = new cosmos_gov_v1beta1_gov_pb.WeightedVoteOption; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.WeightedVoteOption.deserializeBinaryFromReader); + msg.addOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVoteWeighted.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.gov.v1beta1.MsgVoteWeighted} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getVoter(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_gov_v1beta1_gov_pb.WeightedVoteOption.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated WeightedVoteOption options = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.getOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.WeightedVoteOption, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this +*/ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.setOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.WeightedVoteOption=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.WeightedVoteOption} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.addOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.gov.v1beta1.WeightedVoteOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeighted} returns this + */ +proto.cosmos.gov.v1beta1.MsgVoteWeighted.prototype.clearOptionsList = function() { + return this.setOptionsList([]); +}; + + + + + +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_, 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.gov.v1beta1.MsgVoteWeightedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse; + return proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.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.gov.v1beta1.MsgVoteWeightedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteWeightedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + /** * List of repeated fields within this message type. * @private {!Array} diff --git a/src/types/proto-types/cosmos/staking/v1beta1/authz_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/authz_pb.js new file mode 100644 index 00000000..4d3d8d9f --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/authz_pb.js @@ -0,0 +1,542 @@ +// source: cosmos/staking/v1beta1/authz.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.AuthorizationType', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.StakeAuthorization', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.StakeAuthorization.Validators', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase', 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.staking.v1beta1.StakeAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_); +}; +goog.inherits(proto.cosmos.staking.v1beta1.StakeAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.StakeAuthorization.displayName = 'proto.cosmos.staking.v1beta1.StakeAuthorization'; +} +/** + * 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.staking.v1beta1.StakeAuthorization.Validators = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.StakeAuthorization.Validators, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.displayName = 'proto.cosmos.staking.v1beta1.StakeAuthorization.Validators'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase = { + VALIDATORS_NOT_SET: 0, + ALLOW_LIST: 2, + DENY_LIST: 3 +}; + +/** + * @return {proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getValidatorsCase = function() { + return /** @type {proto.cosmos.staking.v1beta1.StakeAuthorization.ValidatorsCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_[0])); +}; + + + +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_, 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.staking.v1beta1.StakeAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.StakeAuthorization.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.staking.v1beta1.StakeAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + maxTokens: (f = msg.getMaxTokens()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + allowList: (f = msg.getAllowList()) && proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.toObject(includeInstance, f), + denyList: (f = msg.getDenyList()) && proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.toObject(includeInstance, f), + authorizationType: jspb.Message.getFieldWithDefault(msg, 4, 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.cosmos.staking.v1beta1.StakeAuthorization} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.StakeAuthorization; + return proto.cosmos.staking.v1beta1.StakeAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.StakeAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.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.setMaxTokens(value); + break; + case 2: + var value = new proto.cosmos.staking.v1beta1.StakeAuthorization.Validators; + reader.readMessage(value,proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinaryFromReader); + msg.setAllowList(value); + break; + case 3: + var value = new proto.cosmos.staking.v1beta1.StakeAuthorization.Validators; + reader.readMessage(value,proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinaryFromReader); + msg.setDenyList(value); + break; + case 4: + var value = /** @type {!proto.cosmos.staking.v1beta1.AuthorizationType} */ (reader.readEnum()); + msg.setAuthorizationType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.StakeAuthorization.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.staking.v1beta1.StakeAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxTokens(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getAllowList(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.serializeBinaryToWriter + ); + } + f = message.getDenyList(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.serializeBinaryToWriter + ); + } + f = message.getAuthorizationType(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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_, 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.staking.v1beta1.StakeAuthorization.Validators.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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.staking.v1beta1.StakeAuthorization.Validators} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.toObject = function(includeInstance, msg) { + var f, obj = { + addressList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.StakeAuthorization.Validators; + return proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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.addAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.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.staking.v1beta1.StakeAuthorization.Validators} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string address = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.getAddressList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.setAddressList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.addAddress = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.Validators.prototype.clearAddressList = function() { + return this.setAddressList([]); +}; + + +/** + * optional cosmos.base.v1beta1.Coin max_tokens = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getMaxTokens = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this +*/ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setMaxTokens = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.clearMaxTokens = function() { + return this.setMaxTokens(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.hasMaxTokens = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Validators allow_list = 2; + * @return {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getAllowList = function() { + return /** @type{?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.StakeAuthorization.Validators, 2)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators|undefined} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this +*/ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setAllowList = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.clearAllowList = function() { + return this.setAllowList(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.hasAllowList = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Validators deny_list = 3; + * @return {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getDenyList = function() { + return /** @type{?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.StakeAuthorization.Validators, 3)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.StakeAuthorization.Validators|undefined} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this +*/ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setDenyList = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.cosmos.staking.v1beta1.StakeAuthorization.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.clearDenyList = function() { + return this.setDenyList(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.hasDenyList = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional AuthorizationType authorization_type = 4; + * @return {!proto.cosmos.staking.v1beta1.AuthorizationType} + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.getAuthorizationType = function() { + return /** @type {!proto.cosmos.staking.v1beta1.AuthorizationType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.AuthorizationType} value + * @return {!proto.cosmos.staking.v1beta1.StakeAuthorization} returns this + */ +proto.cosmos.staking.v1beta1.StakeAuthorization.prototype.setAuthorizationType = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.staking.v1beta1.AuthorizationType = { + AUTHORIZATION_TYPE_UNSPECIFIED: 0, + AUTHORIZATION_TYPE_DELEGATE: 1, + AUTHORIZATION_TYPE_UNDELEGATE: 2, + AUTHORIZATION_TYPE_REDELEGATE: 3 +}; + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js b/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js index f73e1e86..f95f01ee 100644 --- a/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js +++ b/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js @@ -1068,7 +1068,8 @@ proto.cosmos.tx.v1beta1.SimulateRequest.prototype.toObject = function(opt_includ */ proto.cosmos.tx.v1beta1.SimulateRequest.toObject = function(includeInstance, msg) { var f, obj = { - tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.toObject(includeInstance, f) + tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.toObject(includeInstance, f), + txBytes: msg.getTxBytes_asB64() }; if (includeInstance) { @@ -1110,6 +1111,10 @@ proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinaryFromReader = function(m reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); msg.setTx(value); break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxBytes(value); + break; default: reader.skipField(); break; @@ -1147,6 +1152,13 @@ proto.cosmos.tx.v1beta1.SimulateRequest.serializeBinaryToWriter = function(messa cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter ); } + f = message.getTxBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; @@ -1187,6 +1199,48 @@ proto.cosmos.tx.v1beta1.SimulateRequest.prototype.hasTx = function() { }; +/** + * optional bytes tx_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.getTxBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes tx_bytes = 2; + * This is a type-conversion wrapper around `getTxBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.getTxBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxBytes())); +}; + + +/** + * optional bytes tx_bytes = 2; + * 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.cosmos.tx.v1beta1.SimulateRequest.prototype.getTxBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} returns this + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.setTxBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + diff --git a/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js index c90f8c53..9f0282c4 100644 --- a/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js +++ b/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js @@ -318,5 +318,85 @@ proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.upgradedConsensusState }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse>} + */ +const methodDescriptor_Query_ModuleVersions = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/ModuleVersions', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, + * !proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse>} + */ +const methodInfo_Query_ModuleVersions = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.moduleVersions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/ModuleVersions', + request, + metadata || {}, + methodDescriptor_Query_ModuleVersions, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.moduleVersions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/ModuleVersions', + request, + metadata || {}, + methodDescriptor_Query_ModuleVersions); +}; + + module.exports = proto.cosmos.upgrade.v1beta1; diff --git a/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js b/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js index afaaba2b..05653660 100644 --- a/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js +++ b/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js @@ -22,6 +22,8 @@ goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest', null, goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse', null, global); /** @@ -150,6 +152,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse'; } +/** + * 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.upgrade.v1beta1.QueryModuleVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest'; +} +/** + * 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.upgrade.v1beta1.QueryModuleVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse'; +} @@ -824,7 +868,7 @@ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.toObj */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { var f, obj = { - upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + upgradedConsensusState: msg.getUpgradedConsensusState_asB64() }; if (includeInstance) { @@ -861,9 +905,8 @@ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBina } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setUpgradedConsensusState(value); break; default: @@ -895,51 +938,345 @@ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.seria */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUpgradedConsensusState(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter + f = message.getUpgradedConsensusState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f ); } }; /** - * optional google.protobuf.Any upgraded_consensus_state = 1; - * @return {?proto.google.protobuf.Any} + * optional bytes upgraded_consensus_state = 2; + * @return {!(string|Uint8Array)} */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes upgraded_consensus_state = 2; + * This is a type-conversion wrapper around `getUpgradedConsensusState()` + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getUpgradedConsensusState())); +}; + + +/** + * optional bytes upgraded_consensus_state = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getUpgradedConsensusState()` + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getUpgradedConsensusState())); }; /** - * @param {?proto.google.protobuf.Any|undefined} value + * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this -*/ + */ proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.setUpgradedConsensusState = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this + * 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_, 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.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.clearUpgradedConsensusState = function() { - return this.setUpgradedConsensusState(undefined); +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * 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.upgrade.v1beta1.QueryModuleVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.hasUpgradedConsensusState = function() { - return jspb.Message.getField(this, 1) != null; +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + moduleName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest; + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.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.upgrade.v1beta1.QueryModuleVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModuleName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string module_name = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.getModuleName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.prototype.setModuleName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.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_, 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.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.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.upgrade.v1beta1.QueryModuleVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + moduleVersionsList: jspb.Message.toObjectList(msg.getModuleVersionsList(), + cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion.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.upgrade.v1beta1.QueryModuleVersionsResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse; + return proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion; + reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion.deserializeBinaryFromReader); + msg.addModuleVersions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.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.upgrade.v1beta1.QueryModuleVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModuleVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ModuleVersion module_versions = 1; + * @return {!Array} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.getModuleVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.ModuleVersion, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} returns this +*/ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.setModuleVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.ModuleVersion=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.addModuleVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.upgrade.v1beta1.ModuleVersion, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.prototype.clearModuleVersionsList = function() { + return this.setModuleVersionsList([]); }; diff --git a/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js b/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js index 316cd7e3..a657fd55 100644 --- a/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js +++ b/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js @@ -19,6 +19,7 @@ goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.ModuleVersion', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.Plan', null, global); goog.exportSymbol('proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', null, global); /** @@ -84,6 +85,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.displayName = 'proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal'; } +/** + * 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.upgrade.v1beta1.ModuleVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.ModuleVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.ModuleVersion.displayName = 'proto.cosmos.upgrade.v1beta1.ModuleVersion'; +} @@ -747,4 +769,164 @@ proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.setDescript }; + + + +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_, 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.upgrade.v1beta1.ModuleVersion.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.ModuleVersion.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.upgrade.v1beta1.ModuleVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, 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.cosmos.upgrade.v1beta1.ModuleVersion} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.ModuleVersion; + return proto.cosmos.upgrade.v1beta1.ModuleVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.ModuleVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.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.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.ModuleVersion.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.upgrade.v1beta1.ModuleVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} returns this + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 version = 2; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.ModuleVersion} returns this + */ +proto.cosmos.upgrade.v1beta1.ModuleVersion.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + goog.object.extend(exports, proto.cosmos.upgrade.v1beta1); diff --git a/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js b/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js index a4eb5b46..c7dff1e1 100644 --- a/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js +++ b/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js @@ -23,6 +23,7 @@ goog.exportSymbol('proto.cosmos.vesting.v1beta1.ContinuousVestingAccount', null, goog.exportSymbol('proto.cosmos.vesting.v1beta1.DelayedVestingAccount', null, global); goog.exportSymbol('proto.cosmos.vesting.v1beta1.Period', null, global); goog.exportSymbol('proto.cosmos.vesting.v1beta1.PeriodicVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.PermanentLockedAccount', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -128,6 +129,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.PeriodicVestingAccount'; } +/** + * 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.vesting.v1beta1.PermanentLockedAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.PermanentLockedAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.PermanentLockedAccount.displayName = 'proto.cosmos.vesting.v1beta1.PermanentLockedAccount'; +} /** * List of repeated fields within this message type. @@ -1238,4 +1260,155 @@ proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.clearVestingPeriod }; + + + +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_, 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.vesting.v1beta1.PermanentLockedAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.PermanentLockedAccount.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.vesting.v1beta1.PermanentLockedAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.vesting.v1beta1.PermanentLockedAccount} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.PermanentLockedAccount; + return proto.cosmos.vesting.v1beta1.PermanentLockedAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.PermanentLockedAccount.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.vesting.v1beta1.PermanentLockedAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.PermanentLockedAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.PermanentLockedAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + goog.object.extend(exports, proto.cosmos.vesting.v1beta1); diff --git a/src/types/proto-types/custom/base_pb.js b/src/types/proto-types/custom/base_pb.js new file mode 100644 index 00000000..295258b8 --- /dev/null +++ b/src/types/proto-types/custom/base_pb.js @@ -0,0 +1,167 @@ +// source: custom/base.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.custom.MsgGlobalAccountNumber', 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.custom.MsgGlobalAccountNumber = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.custom.MsgGlobalAccountNumber, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.custom.MsgGlobalAccountNumber.displayName = 'proto.custom.MsgGlobalAccountNumber'; +} + + + +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_, 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.custom.MsgGlobalAccountNumber.prototype.toObject = function(opt_includeInstance) { + return proto.custom.MsgGlobalAccountNumber.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.custom.MsgGlobalAccountNumber} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.custom.MsgGlobalAccountNumber.toObject = function(includeInstance, msg) { + var f, obj = { + globalAccountNumber: jspb.Message.getFieldWithDefault(msg, 1, 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.custom.MsgGlobalAccountNumber} + */ +proto.custom.MsgGlobalAccountNumber.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.custom.MsgGlobalAccountNumber; + return proto.custom.MsgGlobalAccountNumber.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.custom.MsgGlobalAccountNumber} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.custom.MsgGlobalAccountNumber} + */ +proto.custom.MsgGlobalAccountNumber.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGlobalAccountNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.custom.MsgGlobalAccountNumber.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.custom.MsgGlobalAccountNumber.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.custom.MsgGlobalAccountNumber} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.custom.MsgGlobalAccountNumber.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGlobalAccountNumber(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 global_account_number = 1; + * @return {number} + */ +proto.custom.MsgGlobalAccountNumber.prototype.getGlobalAccountNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.custom.MsgGlobalAccountNumber} returns this + */ +proto.custom.MsgGlobalAccountNumber.prototype.setGlobalAccountNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +goog.object.extend(exports, proto.custom); diff --git a/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js index aa9bc75d..93d1e659 100644 --- a/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js +++ b/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js @@ -12,10 +12,10 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js'); goog.object.extend(proto, ibc_applications_transfer_v1_transfer_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.ibc.applications.transfer.v1.GenesisState', null, global); /** * Generated by JsPbCodeGenerator. diff --git a/src/types/proto-types/ibc/core/client/v1/client_pb.js b/src/types/proto-types/ibc/core/client/v1/client_pb.js index cd0a29a6..176eaf45 100644 --- a/src/types/proto-types/ibc/core/client/v1/client_pb.js +++ b/src/types/proto-types/ibc/core/client/v1/client_pb.js @@ -16,12 +16,15 @@ var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); +var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../../cosmos/upgrade/v1beta1/upgrade_pb.js'); +goog.object.extend(proto, cosmos_upgrade_v1beta1_upgrade_pb); goog.exportSymbol('proto.ibc.core.client.v1.ClientConsensusStates', null, global); goog.exportSymbol('proto.ibc.core.client.v1.ClientUpdateProposal', null, global); goog.exportSymbol('proto.ibc.core.client.v1.ConsensusStateWithHeight', null, global); goog.exportSymbol('proto.ibc.core.client.v1.Height', null, global); goog.exportSymbol('proto.ibc.core.client.v1.IdentifiedClientState', null, global); goog.exportSymbol('proto.ibc.core.client.v1.Params', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.UpgradeProposal', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -106,6 +109,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.UpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.UpgradeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.UpgradeProposal.displayName = 'proto.ibc.core.client.v1.UpgradeProposal'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -755,8 +779,8 @@ proto.ibc.core.client.v1.ClientUpdateProposal.toObject = function(includeInstanc var f, obj = { title: jspb.Message.getFieldWithDefault(msg, 1, ""), description: jspb.Message.getFieldWithDefault(msg, 2, ""), - clientId: jspb.Message.getFieldWithDefault(msg, 3, ""), - header: (f = msg.getHeader()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + subjectClientId: jspb.Message.getFieldWithDefault(msg, 3, ""), + substituteClientId: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -803,12 +827,11 @@ proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader = func break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setClientId(value); + msg.setSubjectClientId(value); break; case 4: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setHeader(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSubstituteClientId(value); break; default: reader.skipField(); @@ -853,19 +876,18 @@ proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function f ); } - f = message.getClientId(); + f = message.getSubjectClientId(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getHeader(); - if (f != null) { - writer.writeMessage( + f = message.getSubstituteClientId(); + if (f.length > 0) { + writer.writeString( 4, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter + f ); } }; @@ -908,10 +930,10 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = functio /** - * optional string client_id = 3; + * optional string subject_client_id = 3; * @return {string} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getClientId = function() { +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubjectClientId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -920,16 +942,259 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getClientId = function() * @param {string} value * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setClientId = function(value) { +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubjectClientId = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional google.protobuf.Any header = 4; + * optional string substitute_client_id = 4; + * @return {string} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubstituteClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubstituteClientId = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.UpgradeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.UpgradeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.toObject(includeInstance, f), + upgradedClientState: (f = msg.getUpgradedClientState()) && 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.ibc.core.client.v1.UpgradeProposal} + */ +proto.ibc.core.client.v1.UpgradeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.UpgradeProposal; + return proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.UpgradeProposal} + */ +proto.ibc.core.client.v1.UpgradeProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new cosmos_upgrade_v1beta1_upgrade_pb.Plan; + reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.Plan.deserializeBinaryFromReader); + msg.setPlan(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.UpgradeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPlan(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter + ); + } + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.upgrade.v1beta1.Plan plan = 3; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getPlan = function() { + return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( + jspb.Message.getWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.Plan, 3)); +}; + + +/** + * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this +*/ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.hasPlan = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 4; * @return {?proto.google.protobuf.Any} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getHeader = function() { +proto.ibc.core.client.v1.UpgradeProposal.prototype.getUpgradedClientState = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); }; @@ -937,19 +1202,19 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getHeader = function() { /** * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setHeader = function(value) { +proto.ibc.core.client.v1.UpgradeProposal.prototype.setUpgradedClientState = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.clearHeader = function() { - return this.setHeader(undefined); +proto.ibc.core.client.v1.UpgradeProposal.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); }; @@ -957,7 +1222,7 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.clearHeader = function() * Returns whether this field is set. * @return {boolean} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.hasHeader = function() { +proto.ibc.core.client.v1.UpgradeProposal.prototype.hasUpgradedClientState = function() { return jspb.Message.getField(this, 4) != null; }; diff --git a/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js b/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js index ba2b29b5..e2d72aa2 100644 --- a/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js +++ b/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js @@ -403,6 +403,86 @@ proto.ibc.core.client.v1.QueryPromiseClient.prototype.consensusStates = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientStatusRequest, + * !proto.ibc.core.client.v1.QueryClientStatusResponse>} + */ +const methodDescriptor_Query_ClientStatus = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientStatus', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientStatusRequest, + proto.ibc.core.client.v1.QueryClientStatusResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientStatusRequest, + * !proto.ibc.core.client.v1.QueryClientStatusResponse>} + */ +const methodInfo_Query_ClientStatus = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientStatusResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStatus', + request, + metadata || {}, + methodDescriptor_Query_ClientStatus, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStatus', + request, + metadata || {}, + methodDescriptor_Query_ClientStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< @@ -483,5 +563,165 @@ proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientParams = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedClientStateResponse>} + */ +const methodDescriptor_Query_UpgradedClientState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/UpgradedClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedClientStateResponse>} + */ +const methodInfo_Query_UpgradedClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryUpgradedClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.upgradedClientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedClientState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.upgradedClientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedClientState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse>} + */ +const methodDescriptor_Query_UpgradedConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/UpgradedConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse>} + */ +const methodInfo_Query_UpgradedConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.upgradedConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.upgradedConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState); +}; + + module.exports = proto.ibc.core.client.v1; diff --git a/src/types/proto-types/ibc/core/client/v1/query_pb.js b/src/types/proto-types/ibc/core/client/v1/query_pb.js index 73796fba..cdbc3e1b 100644 --- a/src/types/proto-types/ibc/core/client/v1/query_pb.js +++ b/src/types/proto-types/ibc/core/client/v1/query_pb.js @@ -28,10 +28,16 @@ goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateRequest', null, glob goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatusRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatusResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedClientStateRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedClientStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -200,6 +206,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.QueryConsensusStatesResponse.displayName = 'proto.ibc.core.client.v1.QueryConsensusStatesResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryClientStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatusRequest.displayName = 'proto.ibc.core.client.v1.QueryClientStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryClientStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatusResponse.displayName = 'proto.ibc.core.client.v1.QueryClientStatusResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -242,6 +290,90 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.QueryClientParamsResponse.displayName = 'proto.ibc.core.client.v1.QueryClientParamsResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.displayName = 'proto.ibc.core.client.v1.QueryUpgradedClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.displayName = 'proto.ibc.core.client.v1.QueryUpgradedClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.displayName = 'proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.displayName = 'proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse'; +} @@ -1874,8 +2006,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatusRequest.toObject(opt_includeInstance, this); }; @@ -1884,13 +2016,13 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - + clientId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1904,29 +2036,33 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientParamsRequest; - return proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientStatusRequest; + return proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientStatusRequest.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.setClientId(value); + break; default: reader.skipField(); break; @@ -1940,9 +2076,9 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1950,12 +2086,37 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} message + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1975,8 +2136,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatusResponse.toObject(opt_includeInstance, this); }; @@ -1985,13 +2146,13 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f) + status: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2005,23 +2166,23 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientParamsResponse; - return proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientStatusResponse; + return proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2029,9 +2190,8 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new ibc_core_client_v1_client_pb.Params; - reader.readMessage(value,ibc_core_client_v1_client_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); break; default: reader.skipField(); @@ -2046,9 +2206,9 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2056,56 +2216,792 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} message + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getParams(); - if (f != null) { - writer.writeMessage( + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( 1, - f, - ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + f ); } }; /** - * optional Params params = 1; - * @return {?proto.ibc.core.client.v1.Params} + * optional string status = 1; + * @return {string} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.getParams = function() { - return /** @type{?proto.ibc.core.client.v1.Params} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 1)); +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.ibc.core.client.v1.Params|undefined} value - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this -*/ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this + * 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { - return this.setParams(undefined); +proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.hasParams = function() { +proto.ibc.core.client.v1.QueryClientParamsRequest.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.ibc.core.client.v1.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientParamsRequest; + return proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && ibc_core_client_v1_client_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.ibc.core.client.v1.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientParamsResponse; + return proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_client_v1_client_pb.Params; + reader.readMessage(value,ibc_core_client_v1_client_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.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.core.client.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Params|undefined} value + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.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.ibc.core.client.v1.QueryUpgradedClientStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateRequest; + return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.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.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedClientState: (f = msg.getUpgradedClientState()) && 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.ibc.core.client.v1.QueryUpgradedClientStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateResponse; + return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.hasUpgradedClientState = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.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.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest; + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.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.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && 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.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse; + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.setUpgradedConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.clearUpgradedConsensusState = function() { + return this.setUpgradedConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.hasUpgradedConsensusState = function() { return jspb.Message.getField(this, 1) != null; }; diff --git a/src/types/proto-types/ibc/core/connection/v1/connection_pb.js b/src/types/proto-types/ibc/core/connection/v1/connection_pb.js index ed54cebd..8b05be25 100644 --- a/src/types/proto-types/ibc/core/connection/v1/connection_pb.js +++ b/src/types/proto-types/ibc/core/connection/v1/connection_pb.js @@ -21,6 +21,7 @@ goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionEnd', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionPaths', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.Counterparty', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.IdentifiedConnection', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.Params', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.State', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.Version', null, global); /** @@ -149,6 +150,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.connection.v1.Version.displayName = 'proto.ibc.core.connection.v1.Version'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.connection.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.Params.displayName = 'proto.ibc.core.connection.v1.Params'; +} /** * List of repeated fields within this message type. @@ -1520,6 +1542,136 @@ proto.ibc.core.connection.v1.Version.prototype.clearFeaturesList = function() { }; + + + +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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.connection.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.connection.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxExpectedTimePerBlock: jspb.Message.getFieldWithDefault(msg, 1, 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.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.Params; + return proto.ibc.core.connection.v1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.connection.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxExpectedTimePerBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.connection.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxExpectedTimePerBlock(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 max_expected_time_per_block = 1; + * @return {number} + */ +proto.ibc.core.connection.v1.Params.prototype.getMaxExpectedTimePerBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.Params} returns this + */ +proto.ibc.core.connection.v1.Params.prototype.setMaxExpectedTimePerBlock = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + /** * @enum {number} */ diff --git a/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js b/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js index 64ca51f1..c0174d0e 100644 --- a/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js +++ b/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js @@ -81,7 +81,8 @@ proto.ibc.core.connection.v1.GenesisState.toObject = function(includeInstance, m ibc_core_connection_v1_connection_pb.IdentifiedConnection.toObject, includeInstance), clientConnectionPathsList: jspb.Message.toObjectList(msg.getClientConnectionPathsList(), ibc_core_connection_v1_connection_pb.ConnectionPaths.toObject, includeInstance), - nextConnectionSequence: jspb.Message.getFieldWithDefault(msg, 3, 0) + nextConnectionSequence: jspb.Message.getFieldWithDefault(msg, 3, 0), + params: (f = msg.getParams()) && ibc_core_connection_v1_connection_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -132,6 +133,11 @@ proto.ibc.core.connection.v1.GenesisState.deserializeBinaryFromReader = function var value = /** @type {number} */ (reader.readUint64()); msg.setNextConnectionSequence(value); break; + case 4: + var value = new ibc_core_connection_v1_connection_pb.Params; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; default: reader.skipField(); break; @@ -184,6 +190,14 @@ proto.ibc.core.connection.v1.GenesisState.serializeBinaryToWriter = function(mes f ); } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_connection_v1_connection_pb.Params.serializeBinaryToWriter + ); + } }; @@ -281,4 +295,41 @@ proto.ibc.core.connection.v1.GenesisState.prototype.setNextConnectionSequence = }; +/** + * optional Params params = 4; + * @return {?proto.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.core.connection.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Params, 4)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Params|undefined} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this +*/ +proto.ibc.core.connection.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 4) != null; +}; + + goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/src/types/proto-types/ibc/lightclients/solomachine/v2/solomachine_pb.js b/src/types/proto-types/ibc/lightclients/solomachine/v2/solomachine_pb.js new file mode 100644 index 00000000..54262ac6 --- /dev/null +++ b/src/types/proto-types/ibc/lightclients/solomachine/v2/solomachine_pb.js @@ -0,0 +1,3882 @@ +// source: ibc/lightclients/solomachine/v2/solomachine.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_connection_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ChannelStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ClientState', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ClientStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ConnectionStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ConsensusState', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.ConsensusStateData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.DataType', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.Header', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.HeaderData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.Misbehaviour', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.PacketCommitmentData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.SignBytes', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.SignatureAndData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ClientState.displayName = 'proto.ibc.lightclients.solomachine.v2.ClientState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ConsensusState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ConsensusState.displayName = 'proto.ibc.lightclients.solomachine.v2.ConsensusState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.Header.displayName = 'proto.ibc.lightclients.solomachine.v2.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.Misbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.Misbehaviour.displayName = 'proto.ibc.lightclients.solomachine.v2.Misbehaviour'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.SignatureAndData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.SignatureAndData.displayName = 'proto.ibc.lightclients.solomachine.v2.SignatureAndData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.displayName = 'proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.SignBytes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.SignBytes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.SignBytes.displayName = 'proto.ibc.lightclients.solomachine.v2.SignBytes'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.HeaderData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.HeaderData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.HeaderData.displayName = 'proto.ibc.lightclients.solomachine.v2.HeaderData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ClientStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ClientStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ClientStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ConsensusStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ConsensusStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ConsensusStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ConnectionStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ConnectionStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ConnectionStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.ChannelStateData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.ChannelStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ChannelStateData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.PacketCommitmentData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketCommitmentData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.displayName = 'proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData'; +} + + + +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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ClientState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientState.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + isFrozen: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + consensusState: (f = msg.getConsensusState()) && proto.ibc.lightclients.solomachine.v2.ConsensusState.toObject(includeInstance, f), + allowUpdateAfterProposal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ClientState; + return proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsFrozen(value); + break; + case 3: + var value = new proto.ibc.lightclients.solomachine.v2.ConsensusState; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowUpdateAfterProposal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ClientState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getIsFrozen(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.solomachine.v2.ConsensusState.serializeBinaryToWriter + ); + } + f = message.getAllowUpdateAfterProposal(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool is_frozen = 2; + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getIsFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setIsFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional ConsensusState consensus_state = 3; + * @return {?proto.ibc.lightclients.solomachine.v2.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getConsensusState = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v2.ConsensusState} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v2.ConsensusState, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v2.ConsensusState|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool allow_update_after_proposal = 4; + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getAllowUpdateAfterProposal = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setAllowUpdateAfterProposal = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ConsensusState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + diversifier: jspb.Message.getFieldWithDefault(msg, 2, ""), + timestamp: 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.ibc.lightclients.solomachine.v2.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ConsensusState; + return proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiversifier(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ConsensusState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getDiversifier(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getPublicKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string diversifier = 2; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 timestamp = 3; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Header.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: msg.getSignature_asB64(), + newPublicKey: (f = msg.getNewPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + newDiversifier: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.Header} + */ +proto.ibc.lightclients.solomachine.v2.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.Header; + return proto.ibc.lightclients.solomachine.v2.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.Header} + */ +proto.ibc.lightclients.solomachine.v2.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setNewPublicKey(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setNewDiversifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getNewPublicKey(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNewDiversifier(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes signature = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional google.protobuf.Any new_public_key = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getNewPublicKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this +*/ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setNewPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.clearNewPublicKey = function() { + return this.setNewPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.hasNewPublicKey = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string new_diversifier = 5; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.getNewDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this + */ +proto.ibc.lightclients.solomachine.v2.Header.prototype.setNewDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.Misbehaviour.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), + signatureOne: (f = msg.getSignatureOne()) && proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(includeInstance, f), + signatureTwo: (f = msg.getSignatureTwo()) && proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.Misbehaviour; + return proto.ibc.lightclients.solomachine.v2.Misbehaviour.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.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.setClientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 3: + var value = new proto.ibc.lightclients.solomachine.v2.SignatureAndData; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinaryFromReader); + msg.setSignatureOne(value); + break; + case 4: + var value = new proto.ibc.lightclients.solomachine.v2.SignatureAndData; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinaryFromReader); + msg.setSignatureTwo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.Misbehaviour.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSignatureOne(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter + ); + } + f = message.getSignatureTwo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 sequence = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional SignatureAndData signature_one = 3; + * @return {?proto.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSignatureOne = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v2.SignatureAndData, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v2.SignatureAndData|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this +*/ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSignatureOne = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.clearSignatureOne = function() { + return this.setSignatureOne(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.hasSignatureOne = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SignatureAndData signature_two = 4; + * @return {?proto.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSignatureTwo = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v2.SignatureAndData, 4)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v2.SignatureAndData|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this +*/ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSignatureTwo = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.clearSignatureTwo = function() { + return this.setSignatureTwo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.hasSignatureTwo = function() { + return jspb.Message.getField(this, 4) != 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject = function(includeInstance, msg) { + var f, obj = { + signature: msg.getSignature_asB64(), + dataType: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, 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.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.SignatureAndData; + return proto.ibc.lightclients.solomachine.v2.SignatureAndData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.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.setSignature(value); + break; + case 2: + var value = /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (reader.readEnum()); + msg.setDataType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDataType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional bytes signature = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signature = 1; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional DataType data_type = 2; + * @return {!proto.ibc.lightclients.solomachine.v2.DataType} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getDataType = function() { + return /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.ibc.lightclients.solomachine.v2.DataType} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setDataType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 timestamp = 4; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignatureAndData.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 4, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.toObject = function(includeInstance, msg) { + var f, obj = { + signatureData: msg.getSignatureData_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 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.ibc.lightclients.solomachine.v2.TimestampedSignatureData} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData; + return proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.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.setSignatureData(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignatureData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes signature_data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getSignatureData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signature_data = 1; + * This is a type-conversion wrapper around `getSignatureData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getSignatureData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignatureData())); +}; + + +/** + * optional bytes signature_data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignatureData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getSignatureData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignatureData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} returns this + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.setSignatureData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData} returns this + */ +proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.SignBytes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.SignBytes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), + diversifier: jspb.Message.getFieldWithDefault(msg, 3, ""), + dataType: jspb.Message.getFieldWithDefault(msg, 4, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.SignBytes; + return proto.ibc.lightclients.solomachine.v2.SignBytes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.SignBytes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDiversifier(value); + break; + case 4: + var value = /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (reader.readEnum()); + msg.setDataType(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.SignBytes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.SignBytes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDiversifier(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDataType(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string diversifier = 3; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional DataType data_type = 4; + * @return {!proto.ibc.lightclients.solomachine.v2.DataType} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getDataType = function() { + return /** @type {!proto.ibc.lightclients.solomachine.v2.DataType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.ibc.lightclients.solomachine.v2.DataType} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setDataType = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional bytes data = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes data = 5; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v2.SignBytes.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 5, 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.HeaderData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.HeaderData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.toObject = function(includeInstance, msg) { + var f, obj = { + newPubKey: (f = msg.getNewPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + newDiversifier: 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.ibc.lightclients.solomachine.v2.HeaderData} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.HeaderData; + return proto.ibc.lightclients.solomachine.v2.HeaderData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.HeaderData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setNewPubKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNewDiversifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.HeaderData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.HeaderData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNewPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNewDiversifier(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional google.protobuf.Any new_pub_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.getNewPubKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.setNewPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} returns this + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.clearNewPubKey = function() { + return this.setNewPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.hasNewPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string new_diversifier = 2; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.getNewDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v2.HeaderData} returns this + */ +proto.ibc.lightclients.solomachine.v2.HeaderData.prototype.setNewDiversifier = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ClientStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ClientStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + clientState: (f = msg.getClientState()) && 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.ibc.lightclients.solomachine.v2.ClientStateData} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ClientStateData; + return proto.ibc.lightclients.solomachine.v2.ClientStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.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.setPath(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ClientStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ClientStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.getClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ClientStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ClientStateData.prototype.hasClientState = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ConsensusStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + consensusState: (f = msg.getConsensusState()) && 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.ibc.lightclients.solomachine.v2.ConsensusStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ConsensusStateData; + return proto.ibc.lightclients.solomachine.v2.ConsensusStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.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.setPath(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ConsensusStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any consensus_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.getConsensusState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ConsensusStateData.prototype.hasConsensusState = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ConnectionStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + connection: (f = msg.getConnection()) && ibc_core_connection_v1_connection_pb.ConnectionEnd.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ConnectionStateData; + return proto.ibc.lightclients.solomachine.v2.ConnectionStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.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.setPath(value); + break; + case 2: + var value = new ibc_core_connection_v1_connection_pb.ConnectionEnd; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionEnd.deserializeBinaryFromReader); + msg.setConnection(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ConnectionStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getConnection(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.ConnectionEnd.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional ibc.core.connection.v1.ConnectionEnd connection = 2; + * @return {?proto.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.getConnection = function() { + return /** @type{?proto.ibc.core.connection.v1.ConnectionEnd} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionEnd, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.ConnectionEnd|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.setConnection = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ConnectionStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.clearConnection = function() { + return this.setConnection(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ConnectionStateData.prototype.hasConnection = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.ChannelStateData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.ChannelStateData; + return proto.ibc.lightclients.solomachine.v2.ChannelStateData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.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.setPath(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setChannel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.ChannelStateData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChannel(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional ibc.core.channel.v1.Channel channel = 2; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.getChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 2)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} returns this +*/ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v2.ChannelStateData} returns this + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.clearChannel = function() { + return this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v2.ChannelStateData.prototype.hasChannel = 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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + commitment: msg.getCommitment_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.PacketCommitmentData; + return proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.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.setPath(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCommitment(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCommitment_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes commitment = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getCommitment = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes commitment = 2; + * This is a type-conversion wrapper around `getCommitment()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getCommitment_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCommitment())); +}; + + +/** + * optional bytes commitment = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCommitment()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.getCommitment_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCommitment())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketCommitmentData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.prototype.setCommitment = function(value) { + return jspb.Message.setProto3BytesField(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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + acknowledgement: msg.getAcknowledgement_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData; + return proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.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.setPath(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAcknowledgement(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAcknowledgement_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes acknowledgement = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getAcknowledgement = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes acknowledgement = 2; + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getAcknowledgement_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAcknowledgement())); +}; + + +/** + * optional bytes acknowledgement = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.getAcknowledgement_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAcknowledgement())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.prototype.setAcknowledgement = function(value) { + return jspb.Message.setProto3BytesField(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_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData; + return proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.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.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} returns this + */ +proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.toObject = function(includeInstance, msg) { + var f, obj = { + path: msg.getPath_asB64(), + nextSeqRecv: jspb.Message.getFieldWithDefault(msg, 2, 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.ibc.lightclients.solomachine.v2.NextSequenceRecvData} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData; + return proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.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.setPath(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextSeqRecv(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNextSeqRecv(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes path = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes path = 1; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} returns this + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 next_seq_recv = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.getNextSeqRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData} returns this + */ +proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.prototype.setNextSeqRecv = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * @enum {number} + */ +proto.ibc.lightclients.solomachine.v2.DataType = { + DATA_TYPE_UNINITIALIZED_UNSPECIFIED: 0, + DATA_TYPE_CLIENT_STATE: 1, + DATA_TYPE_CONSENSUS_STATE: 2, + DATA_TYPE_CONNECTION_STATE: 3, + DATA_TYPE_CHANNEL_STATE: 4, + DATA_TYPE_PACKET_COMMITMENT: 5, + DATA_TYPE_PACKET_ACKNOWLEDGEMENT: 6, + DATA_TYPE_PACKET_RECEIPT_ABSENCE: 7, + DATA_TYPE_NEXT_SEQUENCE_RECV: 8, + DATA_TYPE_HEADER: 9 +}; + +goog.object.extend(exports, proto.ibc.lightclients.solomachine.v2); diff --git a/src/types/proto-types/irismod/coinswap/coinswap_pb.js b/src/types/proto-types/irismod/coinswap/coinswap_pb.js index eda19bcf..af4a5b04 100644 --- a/src/types/proto-types/irismod/coinswap/coinswap_pb.js +++ b/src/types/proto-types/irismod/coinswap/coinswap_pb.js @@ -19,6 +19,7 @@ goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.irismod.coinswap.Input', null, global); goog.exportSymbol('proto.irismod.coinswap.Output', null, global); goog.exportSymbol('proto.irismod.coinswap.Params', null, global); +goog.exportSymbol('proto.irismod.coinswap.Pool', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -61,6 +62,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.coinswap.Output.displayName = 'proto.irismod.coinswap.Output'; } +/** + * 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.irismod.coinswap.Pool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Pool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Pool.displayName = 'proto.irismod.coinswap.Pool'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -447,6 +469,256 @@ proto.irismod.coinswap.Output.prototype.hasCoin = function() { +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_, 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.irismod.coinswap.Pool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.Pool.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.irismod.coinswap.Pool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Pool.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + standardDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyDenom: jspb.Message.getFieldWithDefault(msg, 3, ""), + escrowAddress: jspb.Message.getFieldWithDefault(msg, 4, ""), + lptDenom: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.coinswap.Pool} + */ +proto.irismod.coinswap.Pool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Pool; + return proto.irismod.coinswap.Pool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Pool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Pool} + */ +proto.irismod.coinswap.Pool.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStandardDenom(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyDenom(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEscrowAddress(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLptDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Pool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.Pool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.Pool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Pool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStandardDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyDenom(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEscrowAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLptDenom(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string standard_denom = 2; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getStandardDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setStandardDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string counterparty_denom = 3; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getCounterpartyDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setCounterpartyDenom = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string escrow_address = 4; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getEscrowAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setEscrowAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string lpt_denom = 5; + * @return {string} + */ +proto.irismod.coinswap.Pool.prototype.getLptDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Pool} returns this + */ +proto.irismod.coinswap.Pool.prototype.setLptDenom = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -477,7 +749,8 @@ proto.irismod.coinswap.Params.prototype.toObject = function(opt_includeInstance) proto.irismod.coinswap.Params.toObject = function(includeInstance, msg) { var f, obj = { fee: (f = msg.getFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - standardDenom: jspb.Message.getFieldWithDefault(msg, 2, "") + poolCreationFee: (f = msg.getPoolCreationFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + taxRate: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -520,8 +793,13 @@ proto.irismod.coinswap.Params.deserializeBinaryFromReader = function(msg, reader msg.setFee(value); break; case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setPoolCreationFee(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); - msg.setStandardDenom(value); + msg.setTaxRate(value); break; default: reader.skipField(); @@ -560,10 +838,18 @@ proto.irismod.coinswap.Params.serializeBinaryToWriter = function(message, writer cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } - f = message.getStandardDenom(); + f = message.getPoolCreationFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTaxRate(); if (f.length > 0) { writer.writeString( - 2, + 3, f ); } @@ -608,11 +894,48 @@ proto.irismod.coinswap.Params.prototype.hasFee = function() { /** - * optional string standard_denom = 2; + * optional cosmos.base.v1beta1.Coin pool_creation_fee = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Params.prototype.getPoolCreationFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.coinswap.Params} returns this +*/ +proto.irismod.coinswap.Params.prototype.setPoolCreationFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.clearPoolCreationFee = function() { + return this.setPoolCreationFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Params.prototype.hasPoolCreationFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string tax_rate = 3; * @return {string} */ -proto.irismod.coinswap.Params.prototype.getStandardDenom = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.irismod.coinswap.Params.prototype.getTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -620,8 +943,8 @@ proto.irismod.coinswap.Params.prototype.getStandardDenom = function() { * @param {string} value * @return {!proto.irismod.coinswap.Params} returns this */ -proto.irismod.coinswap.Params.prototype.setStandardDenom = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.irismod.coinswap.Params.prototype.setTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; diff --git a/src/types/proto-types/irismod/coinswap/genesis_pb.js b/src/types/proto-types/irismod/coinswap/genesis_pb.js index b8e31866..7e86ee61 100644 --- a/src/types/proto-types/irismod/coinswap/genesis_pb.js +++ b/src/types/proto-types/irismod/coinswap/genesis_pb.js @@ -28,7 +28,7 @@ goog.exportSymbol('proto.irismod.coinswap.GenesisState', null, global); * @constructor */ proto.irismod.coinswap.GenesisState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.coinswap.GenesisState.repeatedFields_, null); }; goog.inherits(proto.irismod.coinswap.GenesisState, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -39,6 +39,13 @@ if (goog.DEBUG && !COMPILED) { proto.irismod.coinswap.GenesisState.displayName = 'proto.irismod.coinswap.GenesisState'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.coinswap.GenesisState.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -70,7 +77,11 @@ proto.irismod.coinswap.GenesisState.prototype.toObject = function(opt_includeIns */ proto.irismod.coinswap.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && irismod_coinswap_coinswap_pb.Params.toObject(includeInstance, f) + params: (f = msg.getParams()) && irismod_coinswap_coinswap_pb.Params.toObject(includeInstance, f), + standardDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), + poolList: jspb.Message.toObjectList(msg.getPoolList(), + irismod_coinswap_coinswap_pb.Pool.toObject, includeInstance), + sequence: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -112,6 +123,19 @@ proto.irismod.coinswap.GenesisState.deserializeBinaryFromReader = function(msg, reader.readMessage(value,irismod_coinswap_coinswap_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStandardDenom(value); + break; + case 3: + var value = new irismod_coinswap_coinswap_pb.Pool; + reader.readMessage(value,irismod_coinswap_coinswap_pb.Pool.deserializeBinaryFromReader); + msg.addPool(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; default: reader.skipField(); break; @@ -149,6 +173,28 @@ proto.irismod.coinswap.GenesisState.serializeBinaryToWriter = function(message, irismod_coinswap_coinswap_pb.Params.serializeBinaryToWriter ); } + f = message.getStandardDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPoolList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_coinswap_coinswap_pb.Pool.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } }; @@ -189,4 +235,78 @@ proto.irismod.coinswap.GenesisState.prototype.hasParams = function() { }; +/** + * optional string standard_denom = 2; + * @return {string} + */ +proto.irismod.coinswap.GenesisState.prototype.getStandardDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.setStandardDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Pool pool = 3; + * @return {!Array} + */ +proto.irismod.coinswap.GenesisState.prototype.getPoolList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_coinswap_coinswap_pb.Pool, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.coinswap.GenesisState} returns this +*/ +proto.irismod.coinswap.GenesisState.prototype.setPoolList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.coinswap.Pool=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.coinswap.Pool} + */ +proto.irismod.coinswap.GenesisState.prototype.addPool = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.coinswap.Pool, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.clearPoolList = function() { + return this.setPoolList([]); +}; + + +/** + * optional uint64 sequence = 4; + * @return {number} + */ +proto.irismod.coinswap.GenesisState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + goog.object.extend(exports, proto.irismod.coinswap); diff --git a/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js b/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js index d3141770..7ebca247 100644 --- a/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js +++ b/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js @@ -21,6 +21,8 @@ var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js' var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') const proto = {}; proto.irismod = {}; proto.irismod.coinswap = require('./query_pb.js'); @@ -80,80 +82,160 @@ proto.irismod.coinswap.QueryPromiseClient = /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.irismod.coinswap.QueryLiquidityRequest, - * !proto.irismod.coinswap.QueryLiquidityResponse>} + * !proto.irismod.coinswap.QueryLiquidityPoolRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolResponse>} + */ +const methodDescriptor_Query_LiquidityPool = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Query/LiquidityPool', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.QueryLiquidityPoolRequest, + proto.irismod.coinswap.QueryLiquidityPoolResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.QueryLiquidityPoolRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolResponse>} + */ +const methodInfo_Query_LiquidityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.QueryLiquidityPoolResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.QueryClient.prototype.liquidityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Query/LiquidityPool', + request, + metadata || {}, + methodDescriptor_Query_LiquidityPool, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.QueryPromiseClient.prototype.liquidityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Query/LiquidityPool', + request, + metadata || {}, + methodDescriptor_Query_LiquidityPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.QueryLiquidityPoolsRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolsResponse>} */ -const methodDescriptor_Query_Liquidity = new grpc.web.MethodDescriptor( - '/irismod.coinswap.Query/Liquidity', +const methodDescriptor_Query_LiquidityPools = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Query/LiquidityPools', grpc.web.MethodType.UNARY, - proto.irismod.coinswap.QueryLiquidityRequest, - proto.irismod.coinswap.QueryLiquidityResponse, + proto.irismod.coinswap.QueryLiquidityPoolsRequest, + proto.irismod.coinswap.QueryLiquidityPoolsResponse, /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary + proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinary ); /** * @const * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.irismod.coinswap.QueryLiquidityRequest, - * !proto.irismod.coinswap.QueryLiquidityResponse>} + * !proto.irismod.coinswap.QueryLiquidityPoolsRequest, + * !proto.irismod.coinswap.QueryLiquidityPoolsResponse>} */ -const methodInfo_Query_Liquidity = new grpc.web.AbstractClientBase.MethodInfo( - proto.irismod.coinswap.QueryLiquidityResponse, +const methodInfo_Query_LiquidityPools = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.QueryLiquidityPoolsResponse, /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary + proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinary ); /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityResponse)} + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityPoolsResponse)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.irismod.coinswap.QueryClient.prototype.liquidity = +proto.irismod.coinswap.QueryClient.prototype.liquidityPools = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/irismod.coinswap.Query/Liquidity', + '/irismod.coinswap.Query/LiquidityPools', request, metadata || {}, - methodDescriptor_Query_Liquidity, + methodDescriptor_Query_LiquidityPools, callback); }; /** - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ -proto.irismod.coinswap.QueryPromiseClient.prototype.liquidity = +proto.irismod.coinswap.QueryPromiseClient.prototype.liquidityPools = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/irismod.coinswap.Query/Liquidity', + '/irismod.coinswap.Query/LiquidityPools', request, metadata || {}, - methodDescriptor_Query_Liquidity); + methodDescriptor_Query_LiquidityPools); }; diff --git a/src/types/proto-types/irismod/coinswap/query_pb.js b/src/types/proto-types/irismod/coinswap/query_pb.js index bf9166da..fffd8b4d 100644 --- a/src/types/proto-types/irismod/coinswap/query_pb.js +++ b/src/types/proto-types/irismod/coinswap/query_pb.js @@ -18,8 +18,13 @@ 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); -goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityRequest', null, global); -goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityResponse', null, global); +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.irismod.coinswap.PoolInfo', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolRequest', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolsRequest', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityPoolsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,16 +35,16 @@ goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityResponse', null, global) * @extends {jspb.Message} * @constructor */ -proto.irismod.coinswap.QueryLiquidityRequest = function(opt_data) { +proto.irismod.coinswap.QueryLiquidityPoolRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.irismod.coinswap.QueryLiquidityRequest, jspb.Message); +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.irismod.coinswap.QueryLiquidityRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityRequest'; + proto.irismod.coinswap.QueryLiquidityPoolRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolRequest'; } /** * Generated by JsPbCodeGenerator. @@ -51,16 +56,79 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.irismod.coinswap.QueryLiquidityResponse = function(opt_data) { +proto.irismod.coinswap.QueryLiquidityPoolResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.irismod.coinswap.QueryLiquidityResponse, jspb.Message); +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.irismod.coinswap.QueryLiquidityResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityResponse'; + proto.irismod.coinswap.QueryLiquidityPoolResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolResponse'; +} +/** + * 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.irismod.coinswap.QueryLiquidityPoolsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityPoolsRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolsRequest'; +} +/** + * 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.irismod.coinswap.QueryLiquidityPoolsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.coinswap.QueryLiquidityPoolsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityPoolsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityPoolsResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityPoolsResponse'; +} +/** + * 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.irismod.coinswap.PoolInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.PoolInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.PoolInfo.displayName = 'proto.irismod.coinswap.PoolInfo'; } @@ -78,8 +146,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.irismod.coinswap.QueryLiquidityRequest.toObject(opt_includeInstance, this); +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolRequest.toObject(opt_includeInstance, this); }; @@ -88,13 +156,13 @@ proto.irismod.coinswap.QueryLiquidityRequest.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The msg instance to transform. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityRequest.toObject = function(includeInstance, msg) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") + lptDenom: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -108,23 +176,23 @@ proto.irismod.coinswap.QueryLiquidityRequest.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.irismod.coinswap.QueryLiquidityRequest} + * @return {!proto.irismod.coinswap.QueryLiquidityPoolRequest} */ -proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinary = function(bytes) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.irismod.coinswap.QueryLiquidityRequest; - return proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolRequest; + return proto.irismod.coinswap.QueryLiquidityPoolRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The message object to deserialize into. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.irismod.coinswap.QueryLiquidityRequest} + * @return {!proto.irismod.coinswap.QueryLiquidityPoolRequest} */ -proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -133,7 +201,7 @@ proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader = funct switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + msg.setLptDenom(value); break; default: reader.skipField(); @@ -148,9 +216,9 @@ proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.serializeBinary = function() { +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter(this, writer); + proto.irismod.coinswap.QueryLiquidityPoolRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -158,13 +226,13 @@ proto.irismod.coinswap.QueryLiquidityRequest.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.irismod.coinswap.QueryLiquidityRequest} message + * @param {!proto.irismod.coinswap.QueryLiquidityPoolRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter = function(message, writer) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getLptDenom(); if (f.length > 0) { writer.writeString( 1, @@ -175,19 +243,19 @@ proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter = function( /** - * optional string id = 1; + * optional string lpt_denom = 1; * @return {string} */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.getId = function() { +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.getLptDenom = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.irismod.coinswap.QueryLiquidityRequest} returns this + * @return {!proto.irismod.coinswap.QueryLiquidityPoolRequest} returns this */ -proto.irismod.coinswap.QueryLiquidityRequest.prototype.setId = function(value) { +proto.irismod.coinswap.QueryLiquidityPoolRequest.prototype.setLptDenom = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -208,8 +276,159 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.irismod.coinswap.QueryLiquidityResponse.toObject(opt_includeInstance, this); +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolResponse.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.irismod.coinswap.QueryLiquidityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pool: (f = msg.getPool()) && proto.irismod.coinswap.PoolInfo.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.irismod.coinswap.QueryLiquidityPoolResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolResponse; + return proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.coinswap.PoolInfo; + reader.readMessage(value,proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader); + msg.setPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPool(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PoolInfo pool = 1; + * @return {?proto.irismod.coinswap.PoolInfo} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.getPool = function() { + return /** @type{?proto.irismod.coinswap.PoolInfo} */ ( + jspb.Message.getWrapperField(this, proto.irismod.coinswap.PoolInfo, 1)); +}; + + +/** + * @param {?proto.irismod.coinswap.PoolInfo|undefined} value + * @return {!proto.irismod.coinswap.QueryLiquidityPoolResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.setPool = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.clearPool = function() { + return this.setPool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityPoolResponse.prototype.hasPool = 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_, 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.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolsRequest.toObject(opt_includeInstance, this); }; @@ -218,16 +437,380 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The msg instance to transform. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityResponse.toObject = function(includeInstance, msg) { +proto.irismod.coinswap.QueryLiquidityPoolsRequest.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.irismod.coinswap.QueryLiquidityPoolsRequest} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolsRequest; + return proto.irismod.coinswap.QueryLiquidityPoolsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityPoolsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsRequest} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityPoolsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.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_, 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.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityPoolsResponse.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.irismod.coinswap.QueryLiquidityPoolsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + poolsList: jspb.Message.toObjectList(msg.getPoolsList(), + proto.irismod.coinswap.PoolInfo.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.irismod.coinswap.QueryLiquidityPoolsResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityPoolsResponse; + return proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.coinswap.PoolInfo; + reader.readMessage(value,proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader); + msg.addPools(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.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityPoolsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PoolInfo pools = 1; + * @return {!Array} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.getPoolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.coinswap.PoolInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.setPoolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.coinswap.PoolInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.coinswap.PoolInfo} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.addPools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.coinswap.PoolInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.clearPoolsList = function() { + return this.setPoolsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.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.irismod.coinswap.QueryLiquidityPoolsResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityPoolsResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityPoolsResponse.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_, 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.irismod.coinswap.PoolInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.PoolInfo.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.irismod.coinswap.PoolInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.PoolInfo.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + escrowAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), standard: (f = msg.getStandard()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), token: (f = msg.getToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - liquidity: (f = msg.getLiquidity()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - fee: jspb.Message.getFieldWithDefault(msg, 4, "") + lpt: (f = msg.getLpt()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + fee: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -241,23 +824,23 @@ proto.irismod.coinswap.QueryLiquidityResponse.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} + * @return {!proto.irismod.coinswap.PoolInfo} */ -proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary = function(bytes) { +proto.irismod.coinswap.PoolInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.irismod.coinswap.QueryLiquidityResponse; - return proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.irismod.coinswap.PoolInfo; + return proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The message object to deserialize into. + * @param {!proto.irismod.coinswap.PoolInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} + * @return {!proto.irismod.coinswap.PoolInfo} */ -proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.irismod.coinswap.PoolInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -265,21 +848,29 @@ proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEscrowAddress(value); + break; + case 3: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.setStandard(value); break; - case 2: + case 4: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.setToken(value); break; - case 3: + case 5: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.setLiquidity(value); + msg.setLpt(value); break; - case 4: + case 6: var value = /** @type {string} */ (reader.readString()); msg.setFee(value); break; @@ -296,9 +887,9 @@ proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.serializeBinary = function() { +proto.irismod.coinswap.PoolInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter(this, writer); + proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -306,16 +897,30 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.irismod.coinswap.QueryLiquidityResponse} message + * @param {!proto.irismod.coinswap.PoolInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function(message, writer) { +proto.irismod.coinswap.PoolInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEscrowAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } f = message.getStandard(); if (f != null) { writer.writeMessage( - 1, + 3, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -323,15 +928,15 @@ proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function f = message.getToken(); if (f != null) { writer.writeMessage( - 2, + 4, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } - f = message.getLiquidity(); + f = message.getLpt(); if (f != null) { writer.writeMessage( - 3, + 5, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -339,7 +944,7 @@ proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function f = message.getFee(); if (f.length > 0) { writer.writeString( - 4, + 6, f ); } @@ -347,29 +952,65 @@ proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function /** - * optional cosmos.base.v1beta1.Coin standard = 1; + * optional string id = 1; + * @return {string} + */ +proto.irismod.coinswap.PoolInfo.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.PoolInfo} returns this + */ +proto.irismod.coinswap.PoolInfo.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string escrow_address = 2; + * @return {string} + */ +proto.irismod.coinswap.PoolInfo.prototype.getEscrowAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.PoolInfo} returns this + */ +proto.irismod.coinswap.PoolInfo.prototype.setEscrowAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin standard = 3; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getStandard = function() { +proto.irismod.coinswap.PoolInfo.prototype.getStandard = function() { return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setStandard = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.irismod.coinswap.PoolInfo.prototype.setStandard = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearStandard = function() { +proto.irismod.coinswap.PoolInfo.prototype.clearStandard = function() { return this.setStandard(undefined); }; @@ -378,35 +1019,35 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearStandard = function * Returns whether this field is set. * @return {boolean} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasStandard = function() { - return jspb.Message.getField(this, 1) != null; +proto.irismod.coinswap.PoolInfo.prototype.hasStandard = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional cosmos.base.v1beta1.Coin token = 2; + * optional cosmos.base.v1beta1.Coin token = 4; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getToken = function() { +proto.irismod.coinswap.PoolInfo.prototype.getToken = function() { return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setToken = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.irismod.coinswap.PoolInfo.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearToken = function() { +proto.irismod.coinswap.PoolInfo.prototype.clearToken = function() { return this.setToken(undefined); }; @@ -415,36 +1056,36 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearToken = function() * Returns whether this field is set. * @return {boolean} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasToken = function() { - return jspb.Message.getField(this, 2) != null; +proto.irismod.coinswap.PoolInfo.prototype.hasToken = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional cosmos.base.v1beta1.Coin liquidity = 3; + * optional cosmos.base.v1beta1.Coin lpt = 5; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getLiquidity = function() { +proto.irismod.coinswap.PoolInfo.prototype.getLpt = function() { return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setLiquidity = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.irismod.coinswap.PoolInfo.prototype.setLpt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearLiquidity = function() { - return this.setLiquidity(undefined); +proto.irismod.coinswap.PoolInfo.prototype.clearLpt = function() { + return this.setLpt(undefined); }; @@ -452,26 +1093,26 @@ proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearLiquidity = functio * Returns whether this field is set. * @return {boolean} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasLiquidity = function() { - return jspb.Message.getField(this, 3) != null; +proto.irismod.coinswap.PoolInfo.prototype.hasLpt = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional string fee = 4; + * optional string fee = 6; * @return {string} */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.getFee = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.irismod.coinswap.PoolInfo.prototype.getFee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value - * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + * @return {!proto.irismod.coinswap.PoolInfo} returns this */ -proto.irismod.coinswap.QueryLiquidityResponse.prototype.setFee = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.irismod.coinswap.PoolInfo.prototype.setFee = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; diff --git a/src/types/proto-types/irismod/farm/farm_pb.js b/src/types/proto-types/irismod/farm/farm_pb.js new file mode 100644 index 00000000..d0eb388d --- /dev/null +++ b/src/types/proto-types/irismod/farm/farm_pb.js @@ -0,0 +1,1942 @@ +// source: irismod/farm/farm.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.farm.CommunityPoolCreateFarmProposal', null, global); +goog.exportSymbol('proto.irismod.farm.EscrowInfo', null, global); +goog.exportSymbol('proto.irismod.farm.FarmInfo', null, global); +goog.exportSymbol('proto.irismod.farm.FarmPool', null, global); +goog.exportSymbol('proto.irismod.farm.Params', null, global); +goog.exportSymbol('proto.irismod.farm.RewardRule', 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.irismod.farm.FarmPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.FarmPool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.FarmPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.FarmPool.displayName = 'proto.irismod.farm.FarmPool'; +} +/** + * 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.irismod.farm.RewardRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.RewardRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.RewardRule.displayName = 'proto.irismod.farm.RewardRule'; +} +/** + * 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.irismod.farm.FarmInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.FarmInfo.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.FarmInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.FarmInfo.displayName = 'proto.irismod.farm.FarmInfo'; +} +/** + * 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.irismod.farm.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.Params.displayName = 'proto.irismod.farm.Params'; +} +/** + * 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.irismod.farm.EscrowInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.EscrowInfo.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.EscrowInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.EscrowInfo.displayName = 'proto.irismod.farm.EscrowInfo'; +} +/** + * 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.irismod.farm.CommunityPoolCreateFarmProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.CommunityPoolCreateFarmProposal.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.CommunityPoolCreateFarmProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.CommunityPoolCreateFarmProposal.displayName = 'proto.irismod.farm.CommunityPoolCreateFarmProposal'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.FarmPool.repeatedFields_ = [9]; + + + +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_, 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.irismod.farm.FarmPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.FarmPool.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.irismod.farm.FarmPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPool.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + creator: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + lastHeightDistrRewards: jspb.Message.getFieldWithDefault(msg, 6, 0), + editable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + totalLptLocked: (f = msg.getTotalLptLocked()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.irismod.farm.RewardRule.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.irismod.farm.FarmPool} + */ +proto.irismod.farm.FarmPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.FarmPool; + return proto.irismod.farm.FarmPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.FarmPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.FarmPool} + */ +proto.irismod.farm.FarmPool.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastHeightDistrRewards(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEditable(value); + break; + case 8: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setTotalLptLocked(value); + break; + case 9: + var value = new proto.irismod.farm.RewardRule; + reader.readMessage(value,proto.irismod.farm.RewardRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.FarmPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.FarmPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.FarmPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getEndHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLastHeightDistrRewards(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getEditable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getTotalLptLocked(); + if (f != null) { + writer.writeMessage( + 8, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.irismod.farm.RewardRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.farm.FarmPool.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.farm.FarmPool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.irismod.farm.FarmPool.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 start_height = 4; + * @return {number} + */ +proto.irismod.farm.FarmPool.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 end_height = 5; + * @return {number} + */ +proto.irismod.farm.FarmPool.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setEndHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 last_height_distr_rewards = 6; + * @return {number} + */ +proto.irismod.farm.FarmPool.prototype.getLastHeightDistrRewards = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setLastHeightDistrRewards = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool editable = 7; + * @return {boolean} + */ +proto.irismod.farm.FarmPool.prototype.getEditable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.setEditable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin total_lpt_locked = 8; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPool.prototype.getTotalLptLocked = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 8)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.FarmPool} returns this +*/ +proto.irismod.farm.FarmPool.prototype.setTotalLptLocked = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.clearTotalLptLocked = function() { + return this.setTotalLptLocked(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.FarmPool.prototype.hasTotalLptLocked = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated RewardRule rules = 9; + * @return {!Array} + */ +proto.irismod.farm.FarmPool.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.farm.RewardRule, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPool} returns this +*/ +proto.irismod.farm.FarmPool.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.irismod.farm.RewardRule=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.RewardRule} + */ +proto.irismod.farm.FarmPool.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.irismod.farm.RewardRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPool} returns this + */ +proto.irismod.farm.FarmPool.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + + + + +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_, 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.irismod.farm.RewardRule.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.RewardRule.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.irismod.farm.RewardRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.RewardRule.toObject = function(includeInstance, msg) { + var f, obj = { + reward: jspb.Message.getFieldWithDefault(msg, 1, ""), + totalReward: jspb.Message.getFieldWithDefault(msg, 2, ""), + remainingReward: jspb.Message.getFieldWithDefault(msg, 3, ""), + rewardPerBlock: jspb.Message.getFieldWithDefault(msg, 4, ""), + rewardPerShare: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.RewardRule} + */ +proto.irismod.farm.RewardRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.RewardRule; + return proto.irismod.farm.RewardRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.RewardRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.RewardRule} + */ +proto.irismod.farm.RewardRule.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.setReward(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTotalReward(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRemainingReward(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setRewardPerBlock(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRewardPerShare(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.RewardRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.RewardRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.RewardRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.RewardRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReward(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTotalReward(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRemainingReward(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRewardPerBlock(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRewardPerShare(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string reward = 1; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setReward = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string total_reward = 2; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getTotalReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setTotalReward = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string remaining_reward = 3; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getRemainingReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setRemainingReward = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string reward_per_block = 4; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getRewardPerBlock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setRewardPerBlock = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string reward_per_share = 5; + * @return {string} + */ +proto.irismod.farm.RewardRule.prototype.getRewardPerShare = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.RewardRule} returns this + */ +proto.irismod.farm.RewardRule.prototype.setRewardPerShare = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.FarmInfo.repeatedFields_ = [4]; + + + +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_, 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.irismod.farm.FarmInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.FarmInfo.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.irismod.farm.FarmInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmInfo.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + locked: jspb.Message.getFieldWithDefault(msg, 3, ""), + rewardDebtList: jspb.Message.toObjectList(msg.getRewardDebtList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.FarmInfo} + */ +proto.irismod.farm.FarmInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.FarmInfo; + return proto.irismod.farm.FarmInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.FarmInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.FarmInfo} + */ +proto.irismod.farm.FarmInfo.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.setPoolId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLocked(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardDebt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.FarmInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.FarmInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.FarmInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLocked(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRewardDebtList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.FarmInfo.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string address = 2; + * @return {string} + */ +proto.irismod.farm.FarmInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string locked = 3; + * @return {string} + */ +proto.irismod.farm.FarmInfo.prototype.getLocked = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.setLocked = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_debt = 4; + * @return {!Array} + */ +proto.irismod.farm.FarmInfo.prototype.getRewardDebtList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmInfo} returns this +*/ +proto.irismod.farm.FarmInfo.prototype.setRewardDebtList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmInfo.prototype.addRewardDebt = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmInfo} returns this + */ +proto.irismod.farm.FarmInfo.prototype.clearRewardDebtList = function() { + return this.setRewardDebtList([]); +}; + + + + + +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_, 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.irismod.farm.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.Params.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.irismod.farm.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.Params.toObject = function(includeInstance, msg) { + var f, obj = { + poolCreationFee: (f = msg.getPoolCreationFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + maxRewardCategories: jspb.Message.getFieldWithDefault(msg, 2, 0), + taxRate: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.Params} + */ +proto.irismod.farm.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.Params; + return proto.irismod.farm.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.Params} + */ +proto.irismod.farm.Params.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.setPoolCreationFee(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxRewardCategories(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTaxRate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolCreationFee(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMaxRewardCategories(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTaxRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin pool_creation_fee = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.Params.prototype.getPoolCreationFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.Params} returns this +*/ +proto.irismod.farm.Params.prototype.setPoolCreationFee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.Params} returns this + */ +proto.irismod.farm.Params.prototype.clearPoolCreationFee = function() { + return this.setPoolCreationFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.Params.prototype.hasPoolCreationFee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 max_reward_categories = 2; + * @return {number} + */ +proto.irismod.farm.Params.prototype.getMaxRewardCategories = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.Params} returns this + */ +proto.irismod.farm.Params.prototype.setMaxRewardCategories = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string tax_rate = 3; + * @return {string} + */ +proto.irismod.farm.Params.prototype.getTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.Params} returns this + */ +proto.irismod.farm.Params.prototype.setTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.EscrowInfo.repeatedFields_ = [2,3]; + + + +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_, 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.irismod.farm.EscrowInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.EscrowInfo.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.irismod.farm.EscrowInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.EscrowInfo.toObject = function(includeInstance, msg) { + var f, obj = { + proposer: jspb.Message.getFieldWithDefault(msg, 1, ""), + fundAppliedList: jspb.Message.toObjectList(msg.getFundAppliedList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + fundSelfBondList: jspb.Message.toObjectList(msg.getFundSelfBondList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + proposalId: jspb.Message.getFieldWithDefault(msg, 4, 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.irismod.farm.EscrowInfo} + */ +proto.irismod.farm.EscrowInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.EscrowInfo; + return proto.irismod.farm.EscrowInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.EscrowInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.EscrowInfo} + */ +proto.irismod.farm.EscrowInfo.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.setProposer(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundApplied(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundSelfBond(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProposalId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.EscrowInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.EscrowInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.EscrowInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.EscrowInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFundAppliedList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFundSelfBondList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string proposer = 1; + * @return {string} + */ +proto.irismod.farm.EscrowInfo.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.setProposer = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_applied = 2; + * @return {!Array} + */ +proto.irismod.farm.EscrowInfo.prototype.getFundAppliedList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.EscrowInfo} returns this +*/ +proto.irismod.farm.EscrowInfo.prototype.setFundAppliedList = 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.irismod.farm.EscrowInfo.prototype.addFundApplied = 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.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.clearFundAppliedList = function() { + return this.setFundAppliedList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_self_bond = 3; + * @return {!Array} + */ +proto.irismod.farm.EscrowInfo.prototype.getFundSelfBondList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.EscrowInfo} returns this +*/ +proto.irismod.farm.EscrowInfo.prototype.setFundSelfBondList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.EscrowInfo.prototype.addFundSelfBond = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.clearFundSelfBondList = function() { + return this.setFundSelfBondList([]); +}; + + +/** + * optional uint64 proposal_id = 4; + * @return {number} + */ +proto.irismod.farm.EscrowInfo.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.EscrowInfo} returns this + */ +proto.irismod.farm.EscrowInfo.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.repeatedFields_ = [5,6,7]; + + + +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_, 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.irismod.farm.CommunityPoolCreateFarmProposal.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.CommunityPoolCreateFarmProposal.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.irismod.farm.CommunityPoolCreateFarmProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + poolDescription: jspb.Message.getFieldWithDefault(msg, 3, ""), + lptDenom: jspb.Message.getFieldWithDefault(msg, 4, ""), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + fundAppliedList: jspb.Message.toObjectList(msg.getFundAppliedList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + fundSelfBondList: jspb.Message.toObjectList(msg.getFundSelfBondList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.CommunityPoolCreateFarmProposal} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.CommunityPoolCreateFarmProposal; + return proto.irismod.farm.CommunityPoolCreateFarmProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.CommunityPoolCreateFarmProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPoolDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLptDenom(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundApplied(value); + break; + case 7: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFundSelfBond(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.CommunityPoolCreateFarmProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.CommunityPoolCreateFarmProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPoolDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLptDenom(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFundAppliedList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFundSelfBondList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string pool_description = 3; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getPoolDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setPoolDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string lpt_denom = 4; + * @return {string} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getLptDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setLptDenom = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 5; + * @return {!Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this +*/ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_applied = 6; + * @return {!Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getFundAppliedList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this +*/ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setFundAppliedList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.addFundApplied = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.clearFundAppliedList = function() { + return this.setFundAppliedList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fund_self_bond = 7; + * @return {!Array} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.getFundSelfBondList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this +*/ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.setFundSelfBondList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.addFundSelfBond = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.CommunityPoolCreateFarmProposal} returns this + */ +proto.irismod.farm.CommunityPoolCreateFarmProposal.prototype.clearFundSelfBondList = function() { + return this.setFundSelfBondList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/src/types/proto-types/irismod/farm/genesis_pb.js b/src/types/proto-types/irismod/farm/genesis_pb.js new file mode 100644 index 00000000..e820e9bd --- /dev/null +++ b/src/types/proto-types/irismod/farm/genesis_pb.js @@ -0,0 +1,388 @@ +// source: irismod/farm/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js'); +goog.object.extend(proto, irismod_farm_farm_pb); +goog.exportSymbol('proto.irismod.farm.GenesisState', 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.irismod.farm.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.GenesisState.displayName = 'proto.irismod.farm.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.GenesisState.repeatedFields_ = [2,3,5]; + + + +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_, 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.irismod.farm.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.GenesisState.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.irismod.farm.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_farm_farm_pb.Params.toObject(includeInstance, f), + poolsList: jspb.Message.toObjectList(msg.getPoolsList(), + irismod_farm_farm_pb.FarmPool.toObject, includeInstance), + farmInfosList: jspb.Message.toObjectList(msg.getFarmInfosList(), + irismod_farm_farm_pb.FarmInfo.toObject, includeInstance), + sequence: jspb.Message.getFieldWithDefault(msg, 4, 0), + escrowList: jspb.Message.toObjectList(msg.getEscrowList(), + irismod_farm_farm_pb.EscrowInfo.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.irismod.farm.GenesisState} + */ +proto.irismod.farm.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.GenesisState; + return proto.irismod.farm.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.GenesisState} + */ +proto.irismod.farm.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_farm_farm_pb.Params; + reader.readMessage(value,irismod_farm_farm_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new irismod_farm_farm_pb.FarmPool; + reader.readMessage(value,irismod_farm_farm_pb.FarmPool.deserializeBinaryFromReader); + msg.addPools(value); + break; + case 3: + var value = new irismod_farm_farm_pb.FarmInfo; + reader.readMessage(value,irismod_farm_farm_pb.FarmInfo.deserializeBinaryFromReader); + msg.addFarmInfos(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 5: + var value = new irismod_farm_farm_pb.EscrowInfo; + reader.readMessage(value,irismod_farm_farm_pb.EscrowInfo.deserializeBinaryFromReader); + msg.addEscrow(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_farm_farm_pb.Params.serializeBinaryToWriter + ); + } + f = message.getPoolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_farm_farm_pb.FarmPool.serializeBinaryToWriter + ); + } + f = message.getFarmInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_farm_farm_pb.FarmInfo.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getEscrowList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + irismod_farm_farm_pb.EscrowInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.farm.Params} + */ +proto.irismod.farm.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.farm.Params} */ ( + jspb.Message.getWrapperField(this, irismod_farm_farm_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.farm.Params|undefined} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated FarmPool pools = 2; + * @return {!Array} + */ +proto.irismod.farm.GenesisState.prototype.getPoolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_farm_farm_pb.FarmPool, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setPoolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.farm.FarmPool=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.FarmPool} + */ +proto.irismod.farm.GenesisState.prototype.addPools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.farm.FarmPool, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearPoolsList = function() { + return this.setPoolsList([]); +}; + + +/** + * repeated FarmInfo farm_infos = 3; + * @return {!Array} + */ +proto.irismod.farm.GenesisState.prototype.getFarmInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_farm_farm_pb.FarmInfo, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setFarmInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.farm.FarmInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.FarmInfo} + */ +proto.irismod.farm.GenesisState.prototype.addFarmInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.farm.FarmInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearFarmInfosList = function() { + return this.setFarmInfosList([]); +}; + + +/** + * optional uint64 sequence = 4; + * @return {number} + */ +proto.irismod.farm.GenesisState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * repeated EscrowInfo escrow = 5; + * @return {!Array} + */ +proto.irismod.farm.GenesisState.prototype.getEscrowList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_farm_farm_pb.EscrowInfo, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.GenesisState} returns this +*/ +proto.irismod.farm.GenesisState.prototype.setEscrowList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.irismod.farm.EscrowInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.EscrowInfo} + */ +proto.irismod.farm.GenesisState.prototype.addEscrow = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.irismod.farm.EscrowInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.GenesisState} returns this + */ +proto.irismod.farm.GenesisState.prototype.clearEscrowList = function() { + return this.setEscrowList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/src/types/proto-types/irismod/farm/query_grpc_web_pb.js b/src/types/proto-types/irismod/farm/query_grpc_web_pb.js new file mode 100644 index 00000000..3ca92485 --- /dev/null +++ b/src/types/proto-types/irismod/farm/query_grpc_web_pb.js @@ -0,0 +1,405 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.farm + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.farm = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryFarmPoolsRequest, + * !proto.irismod.farm.QueryFarmPoolsResponse>} + */ +const methodDescriptor_Query_FarmPools = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/FarmPools', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryFarmPoolsRequest, + proto.irismod.farm.QueryFarmPoolsResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryFarmPoolsRequest, + * !proto.irismod.farm.QueryFarmPoolsResponse>} + */ +const methodInfo_Query_FarmPools = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryFarmPoolsResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryFarmPoolsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.farmPools = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/FarmPools', + request, + metadata || {}, + methodDescriptor_Query_FarmPools, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.farmPools = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/FarmPools', + request, + metadata || {}, + methodDescriptor_Query_FarmPools); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryFarmPoolRequest, + * !proto.irismod.farm.QueryFarmPoolResponse>} + */ +const methodDescriptor_Query_FarmPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/FarmPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryFarmPoolRequest, + proto.irismod.farm.QueryFarmPoolResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryFarmPoolRequest, + * !proto.irismod.farm.QueryFarmPoolResponse>} + */ +const methodInfo_Query_FarmPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryFarmPoolResponse, + /** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryFarmPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.farmPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/FarmPool', + request, + metadata || {}, + methodDescriptor_Query_FarmPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryFarmPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.farmPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/FarmPool', + request, + metadata || {}, + methodDescriptor_Query_FarmPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryFarmerRequest, + * !proto.irismod.farm.QueryFarmerResponse>} + */ +const methodDescriptor_Query_Farmer = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/Farmer', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryFarmerRequest, + proto.irismod.farm.QueryFarmerResponse, + /** + * @param {!proto.irismod.farm.QueryFarmerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmerResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryFarmerRequest, + * !proto.irismod.farm.QueryFarmerResponse>} + */ +const methodInfo_Query_Farmer = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryFarmerResponse, + /** + * @param {!proto.irismod.farm.QueryFarmerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryFarmerResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryFarmerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryFarmerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.farmer = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/Farmer', + request, + metadata || {}, + methodDescriptor_Query_Farmer, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryFarmerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.farmer = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/Farmer', + request, + metadata || {}, + methodDescriptor_Query_Farmer); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.QueryParamsRequest, + * !proto.irismod.farm.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/irismod.farm.Query/Params', + grpc.web.MethodType.UNARY, + proto.irismod.farm.QueryParamsRequest, + proto.irismod.farm.QueryParamsResponse, + /** + * @param {!proto.irismod.farm.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.QueryParamsRequest, + * !proto.irismod.farm.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.QueryParamsResponse, + /** + * @param {!proto.irismod.farm.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.irismod.farm.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.irismod.farm; + diff --git a/src/types/proto-types/irismod/farm/query_pb.js b/src/types/proto-types/irismod/farm/query_pb.js new file mode 100644 index 00000000..91e7eb33 --- /dev/null +++ b/src/types/proto-types/irismod/farm/query_pb.js @@ -0,0 +1,2258 @@ +// source: irismod/farm/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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); +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 irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js'); +goog.object.extend(proto, irismod_farm_farm_pb); +goog.exportSymbol('proto.irismod.farm.FarmPoolEntry', null, global); +goog.exportSymbol('proto.irismod.farm.LockedInfo', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolRequest', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolsRequest', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmPoolsResponse', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmerRequest', null, global); +goog.exportSymbol('proto.irismod.farm.QueryFarmerResponse', null, global); +goog.exportSymbol('proto.irismod.farm.QueryParamsRequest', null, global); +goog.exportSymbol('proto.irismod.farm.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.irismod.farm.QueryFarmPoolsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolsRequest.displayName = 'proto.irismod.farm.QueryFarmPoolsRequest'; +} +/** + * 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.irismod.farm.FarmPoolEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.FarmPoolEntry.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.FarmPoolEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.FarmPoolEntry.displayName = 'proto.irismod.farm.FarmPoolEntry'; +} +/** + * 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.irismod.farm.QueryFarmPoolsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.QueryFarmPoolsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolsResponse.displayName = 'proto.irismod.farm.QueryFarmPoolsResponse'; +} +/** + * 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.irismod.farm.QueryFarmPoolRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolRequest.displayName = 'proto.irismod.farm.QueryFarmPoolRequest'; +} +/** + * 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.irismod.farm.QueryFarmPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmPoolResponse.displayName = 'proto.irismod.farm.QueryFarmPoolResponse'; +} +/** + * 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.irismod.farm.QueryFarmerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmerRequest.displayName = 'proto.irismod.farm.QueryFarmerRequest'; +} +/** + * 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.irismod.farm.QueryFarmerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.QueryFarmerResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.QueryFarmerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryFarmerResponse.displayName = 'proto.irismod.farm.QueryFarmerResponse'; +} +/** + * 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.irismod.farm.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryParamsRequest.displayName = 'proto.irismod.farm.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.irismod.farm.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.QueryParamsResponse.displayName = 'proto.irismod.farm.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.irismod.farm.LockedInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.LockedInfo.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.LockedInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.LockedInfo.displayName = 'proto.irismod.farm.LockedInfo'; +} + + + +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_, 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.irismod.farm.QueryFarmPoolsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolsRequest.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.irismod.farm.QueryFarmPoolsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsRequest.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.irismod.farm.QueryFarmPoolsRequest} + */ +proto.irismod.farm.QueryFarmPoolsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolsRequest; + return proto.irismod.farm.QueryFarmPoolsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolsRequest} + */ +proto.irismod.farm.QueryFarmPoolsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + 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.irismod.farm.QueryFarmPoolsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.farm.QueryFarmPoolsRequest} returns this +*/ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryFarmPoolsRequest} returns this + */ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryFarmPoolsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.FarmPoolEntry.repeatedFields_ = [9,10,11]; + + + +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_, 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.irismod.farm.FarmPoolEntry.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.FarmPoolEntry.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.irismod.farm.FarmPoolEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPoolEntry.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + creator: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + editable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + expired: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + totalLptLocked: (f = msg.getTotalLptLocked()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + totalRewardList: jspb.Message.toObjectList(msg.getTotalRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + remainingRewardList: jspb.Message.toObjectList(msg.getRemainingRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.FarmPoolEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.FarmPoolEntry; + return proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.FarmPoolEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.FarmPoolEntry.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndHeight(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEditable(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExpired(value); + break; + case 8: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setTotalLptLocked(value); + break; + case 9: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalReward(value); + break; + case 10: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRemainingReward(value); + break; + case 11: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.FarmPoolEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getEndHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getEditable(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getExpired(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getTotalLptLocked(); + if (f != null) { + writer.writeMessage( + 8, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTotalRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRemainingRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 start_height = 4; + * @return {number} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 end_height = 5; + * @return {number} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setEndHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bool editable = 6; + * @return {boolean} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getEditable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setEditable = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool expired = 7; + * @return {boolean} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getExpired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.setExpired = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin total_lpt_locked = 8; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getTotalLptLocked = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 8)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setTotalLptLocked = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearTotalLptLocked = function() { + return this.setTotalLptLocked(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.FarmPoolEntry.prototype.hasTotalLptLocked = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_reward = 9; + * @return {!Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getTotalRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setTotalRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.addTotalReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearTotalRewardList = function() { + return this.setTotalRewardList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin remaining_reward = 10; + * @return {!Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getRemainingRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setRemainingRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.addRemainingReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearRemainingRewardList = function() { + return this.setRemainingRewardList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 11; + * @return {!Array} + */ +proto.irismod.farm.FarmPoolEntry.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.FarmPoolEntry} returns this +*/ +proto.irismod.farm.FarmPoolEntry.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.FarmPoolEntry.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.FarmPoolEntry} returns this + */ +proto.irismod.farm.FarmPoolEntry.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.QueryFarmPoolsResponse.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_, 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.irismod.farm.QueryFarmPoolsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolsResponse.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.irismod.farm.QueryFarmPoolsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + poolsList: jspb.Message.toObjectList(msg.getPoolsList(), + proto.irismod.farm.FarmPoolEntry.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.irismod.farm.QueryFarmPoolsResponse} + */ +proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolsResponse; + return proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} + */ +proto.irismod.farm.QueryFarmPoolsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.farm.FarmPoolEntry; + reader.readMessage(value,proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader); + msg.addPools(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.irismod.farm.QueryFarmPoolsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FarmPoolEntry pools = 1; + * @return {!Array} + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.getPoolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.farm.FarmPoolEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} returns this +*/ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.setPoolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.farm.FarmPoolEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.addPools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.farm.FarmPoolEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} returns this + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.clearPoolsList = function() { + return this.setPoolsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.farm.QueryFarmPoolsResponse.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.irismod.farm.QueryFarmPoolsResponse} returns this +*/ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryFarmPoolsResponse} returns this + */ +proto.irismod.farm.QueryFarmPoolsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryFarmPoolsResponse.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_, 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.irismod.farm.QueryFarmPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolRequest.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.irismod.farm.QueryFarmPoolRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.QueryFarmPoolRequest} + */ +proto.irismod.farm.QueryFarmPoolRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolRequest; + return proto.irismod.farm.QueryFarmPoolRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolRequest} + */ +proto.irismod.farm.QueryFarmPoolRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmPoolRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.farm.QueryFarmPoolRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.QueryFarmPoolRequest} returns this + */ +proto.irismod.farm.QueryFarmPoolRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.farm.QueryFarmPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmPoolResponse.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.irismod.farm.QueryFarmPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pool: (f = msg.getPool()) && proto.irismod.farm.FarmPoolEntry.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.irismod.farm.QueryFarmPoolResponse} + */ +proto.irismod.farm.QueryFarmPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmPoolResponse; + return proto.irismod.farm.QueryFarmPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmPoolResponse} + */ +proto.irismod.farm.QueryFarmPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.farm.FarmPoolEntry; + reader.readMessage(value,proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader); + msg.setPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPool(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional FarmPoolEntry pool = 1; + * @return {?proto.irismod.farm.FarmPoolEntry} + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.getPool = function() { + return /** @type{?proto.irismod.farm.FarmPoolEntry} */ ( + jspb.Message.getWrapperField(this, proto.irismod.farm.FarmPoolEntry, 1)); +}; + + +/** + * @param {?proto.irismod.farm.FarmPoolEntry|undefined} value + * @return {!proto.irismod.farm.QueryFarmPoolResponse} returns this +*/ +proto.irismod.farm.QueryFarmPoolResponse.prototype.setPool = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryFarmPoolResponse} returns this + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.clearPool = function() { + return this.setPool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryFarmPoolResponse.prototype.hasPool = 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_, 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.irismod.farm.QueryFarmerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmerRequest.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.irismod.farm.QueryFarmerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + farmer: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: 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.irismod.farm.QueryFarmerRequest} + */ +proto.irismod.farm.QueryFarmerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmerRequest; + return proto.irismod.farm.QueryFarmerRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmerRequest} + */ +proto.irismod.farm.QueryFarmerRequest.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.setFarmer(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPoolId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFarmer(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string farmer = 1; + * @return {string} + */ +proto.irismod.farm.QueryFarmerRequest.prototype.getFarmer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.QueryFarmerRequest} returns this + */ +proto.irismod.farm.QueryFarmerRequest.prototype.setFarmer = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pool_id = 2; + * @return {string} + */ +proto.irismod.farm.QueryFarmerRequest.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.QueryFarmerRequest} returns this + */ +proto.irismod.farm.QueryFarmerRequest.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.QueryFarmerResponse.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_, 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.irismod.farm.QueryFarmerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.QueryFarmerResponse.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.irismod.farm.QueryFarmerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + listList: jspb.Message.toObjectList(msg.getListList(), + proto.irismod.farm.LockedInfo.toObject, includeInstance), + height: jspb.Message.getFieldWithDefault(msg, 2, 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.irismod.farm.QueryFarmerResponse} + */ +proto.irismod.farm.QueryFarmerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryFarmerResponse; + return proto.irismod.farm.QueryFarmerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryFarmerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryFarmerResponse} + */ +proto.irismod.farm.QueryFarmerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.farm.LockedInfo; + reader.readMessage(value,proto.irismod.farm.LockedInfo.deserializeBinaryFromReader); + msg.addList(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.QueryFarmerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.QueryFarmerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryFarmerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getListList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.farm.LockedInfo.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * repeated LockedInfo list = 1; + * @return {!Array} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.getListList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.farm.LockedInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.QueryFarmerResponse} returns this +*/ +proto.irismod.farm.QueryFarmerResponse.prototype.setListList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.farm.LockedInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.farm.LockedInfo} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.addList = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.farm.LockedInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.QueryFarmerResponse} returns this + */ +proto.irismod.farm.QueryFarmerResponse.prototype.clearListList = function() { + return this.setListList([]); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.irismod.farm.QueryFarmerResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.QueryFarmerResponse} returns this + */ +proto.irismod.farm.QueryFarmerResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(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_, 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.irismod.farm.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.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.irismod.farm.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.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.irismod.farm.QueryParamsRequest} + */ +proto.irismod.farm.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryParamsRequest; + return proto.irismod.farm.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryParamsRequest} + */ +proto.irismod.farm.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.irismod.farm.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.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.irismod.farm.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.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_, 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.irismod.farm.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.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.irismod.farm.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_farm_farm_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.irismod.farm.QueryParamsResponse} + */ +proto.irismod.farm.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.QueryParamsResponse; + return proto.irismod.farm.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.QueryParamsResponse} + */ +proto.irismod.farm.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_farm_farm_pb.Params; + reader.readMessage(value,irismod_farm_farm_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.irismod.farm.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.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.irismod.farm.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_farm_farm_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.farm.Params} + */ +proto.irismod.farm.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.irismod.farm.Params} */ ( + jspb.Message.getWrapperField(this, irismod_farm_farm_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.farm.Params|undefined} value + * @return {!proto.irismod.farm.QueryParamsResponse} returns this +*/ +proto.irismod.farm.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.QueryParamsResponse} returns this + */ +proto.irismod.farm.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.LockedInfo.repeatedFields_ = [3]; + + + +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_, 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.irismod.farm.LockedInfo.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.LockedInfo.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.irismod.farm.LockedInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.LockedInfo.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + locked: (f = msg.getLocked()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + pendingRewardList: jspb.Message.toObjectList(msg.getPendingRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.LockedInfo} + */ +proto.irismod.farm.LockedInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.LockedInfo; + return proto.irismod.farm.LockedInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.LockedInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.LockedInfo} + */ +proto.irismod.farm.LockedInfo.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setLocked(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPendingReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.LockedInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.LockedInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.LockedInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.LockedInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocked(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPendingRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.LockedInfo.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.LockedInfo} returns this + */ +proto.irismod.farm.LockedInfo.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin locked = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.LockedInfo.prototype.getLocked = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.LockedInfo} returns this +*/ +proto.irismod.farm.LockedInfo.prototype.setLocked = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.LockedInfo} returns this + */ +proto.irismod.farm.LockedInfo.prototype.clearLocked = function() { + return this.setLocked(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.LockedInfo.prototype.hasLocked = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin pending_reward = 3; + * @return {!Array} + */ +proto.irismod.farm.LockedInfo.prototype.getPendingRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.LockedInfo} returns this +*/ +proto.irismod.farm.LockedInfo.prototype.setPendingRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.LockedInfo.prototype.addPendingReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.LockedInfo} returns this + */ +proto.irismod.farm.LockedInfo.prototype.clearPendingRewardList = function() { + return this.setPendingRewardList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js b/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js new file mode 100644 index 00000000..76305031 --- /dev/null +++ b/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js @@ -0,0 +1,641 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.farm + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.farm = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.farm.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgCreatePool, + * !proto.irismod.farm.MsgCreatePoolResponse>} + */ +const methodDescriptor_Msg_CreatePool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/CreatePool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgCreatePool, + proto.irismod.farm.MsgCreatePoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgCreatePool, + * !proto.irismod.farm.MsgCreatePoolResponse>} + */ +const methodInfo_Msg_CreatePool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgCreatePoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgCreatePool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgCreatePoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.createPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/CreatePool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgCreatePool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.createPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/CreatePool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgCreatePoolWithCommunityPool, + * !proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse>} + */ +const methodDescriptor_Msg_CreatePoolWithCommunityPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/CreatePoolWithCommunityPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgCreatePoolWithCommunityPool, + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgCreatePoolWithCommunityPool, + * !proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse>} + */ +const methodInfo_Msg_CreatePoolWithCommunityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse, + /** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.createPoolWithCommunityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/CreatePoolWithCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePoolWithCommunityPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.createPoolWithCommunityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/CreatePoolWithCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_CreatePoolWithCommunityPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgDestroyPool, + * !proto.irismod.farm.MsgDestroyPoolResponse>} + */ +const methodDescriptor_Msg_DestroyPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/DestroyPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgDestroyPool, + proto.irismod.farm.MsgDestroyPoolResponse, + /** + * @param {!proto.irismod.farm.MsgDestroyPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgDestroyPool, + * !proto.irismod.farm.MsgDestroyPoolResponse>} + */ +const methodInfo_Msg_DestroyPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgDestroyPoolResponse, + /** + * @param {!proto.irismod.farm.MsgDestroyPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgDestroyPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgDestroyPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.destroyPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/DestroyPool', + request, + metadata || {}, + methodDescriptor_Msg_DestroyPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgDestroyPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.destroyPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/DestroyPool', + request, + metadata || {}, + methodDescriptor_Msg_DestroyPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgAdjustPool, + * !proto.irismod.farm.MsgAdjustPoolResponse>} + */ +const methodDescriptor_Msg_AdjustPool = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/AdjustPool', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgAdjustPool, + proto.irismod.farm.MsgAdjustPoolResponse, + /** + * @param {!proto.irismod.farm.MsgAdjustPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgAdjustPool, + * !proto.irismod.farm.MsgAdjustPoolResponse>} + */ +const methodInfo_Msg_AdjustPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgAdjustPoolResponse, + /** + * @param {!proto.irismod.farm.MsgAdjustPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgAdjustPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgAdjustPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.adjustPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/AdjustPool', + request, + metadata || {}, + methodDescriptor_Msg_AdjustPool, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgAdjustPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.adjustPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/AdjustPool', + request, + metadata || {}, + methodDescriptor_Msg_AdjustPool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgStake, + * !proto.irismod.farm.MsgStakeResponse>} + */ +const methodDescriptor_Msg_Stake = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/Stake', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgStake, + proto.irismod.farm.MsgStakeResponse, + /** + * @param {!proto.irismod.farm.MsgStake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgStakeResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgStake, + * !proto.irismod.farm.MsgStakeResponse>} + */ +const methodInfo_Msg_Stake = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgStakeResponse, + /** + * @param {!proto.irismod.farm.MsgStake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgStakeResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgStake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgStakeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.stake = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/Stake', + request, + metadata || {}, + methodDescriptor_Msg_Stake, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgStake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.stake = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/Stake', + request, + metadata || {}, + methodDescriptor_Msg_Stake); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgUnstake, + * !proto.irismod.farm.MsgUnstakeResponse>} + */ +const methodDescriptor_Msg_Unstake = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/Unstake', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgUnstake, + proto.irismod.farm.MsgUnstakeResponse, + /** + * @param {!proto.irismod.farm.MsgUnstake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgUnstakeResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgUnstake, + * !proto.irismod.farm.MsgUnstakeResponse>} + */ +const methodInfo_Msg_Unstake = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgUnstakeResponse, + /** + * @param {!proto.irismod.farm.MsgUnstake} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgUnstakeResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgUnstake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgUnstakeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.unstake = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/Unstake', + request, + metadata || {}, + methodDescriptor_Msg_Unstake, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgUnstake} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.unstake = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/Unstake', + request, + metadata || {}, + methodDescriptor_Msg_Unstake); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.farm.MsgHarvest, + * !proto.irismod.farm.MsgHarvestResponse>} + */ +const methodDescriptor_Msg_Harvest = new grpc.web.MethodDescriptor( + '/irismod.farm.Msg/Harvest', + grpc.web.MethodType.UNARY, + proto.irismod.farm.MsgHarvest, + proto.irismod.farm.MsgHarvestResponse, + /** + * @param {!proto.irismod.farm.MsgHarvest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgHarvestResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.farm.MsgHarvest, + * !proto.irismod.farm.MsgHarvestResponse>} + */ +const methodInfo_Msg_Harvest = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.farm.MsgHarvestResponse, + /** + * @param {!proto.irismod.farm.MsgHarvest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.farm.MsgHarvestResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.farm.MsgHarvest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.farm.MsgHarvestResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.farm.MsgClient.prototype.harvest = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.farm.Msg/Harvest', + request, + metadata || {}, + methodDescriptor_Msg_Harvest, + callback); +}; + + +/** + * @param {!proto.irismod.farm.MsgHarvest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.farm.MsgPromiseClient.prototype.harvest = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.farm.Msg/Harvest', + request, + metadata || {}, + methodDescriptor_Msg_Harvest); +}; + + +module.exports = proto.irismod.farm; + diff --git a/src/types/proto-types/irismod/farm/tx_pb.js b/src/types/proto-types/irismod/farm/tx_pb.js new file mode 100644 index 00000000..2a4c4cc6 --- /dev/null +++ b/src/types/proto-types/irismod/farm/tx_pb.js @@ -0,0 +1,2832 @@ +// source: irismod/farm/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var irismod_farm_farm_pb = require('../../irismod/farm/farm_pb.js'); +goog.object.extend(proto, irismod_farm_farm_pb); +goog.exportSymbol('proto.irismod.farm.MsgAdjustPool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgAdjustPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePoolWithCommunityPool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgDestroyPool', null, global); +goog.exportSymbol('proto.irismod.farm.MsgDestroyPoolResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgHarvest', null, global); +goog.exportSymbol('proto.irismod.farm.MsgHarvestResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgStake', null, global); +goog.exportSymbol('proto.irismod.farm.MsgStakeResponse', null, global); +goog.exportSymbol('proto.irismod.farm.MsgUnstake', null, global); +goog.exportSymbol('proto.irismod.farm.MsgUnstakeResponse', 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.irismod.farm.MsgCreatePool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgCreatePool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePool.displayName = 'proto.irismod.farm.MsgCreatePool'; +} +/** + * 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.irismod.farm.MsgCreatePoolWithCommunityPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgCreatePoolWithCommunityPool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePoolWithCommunityPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePoolWithCommunityPool.displayName = 'proto.irismod.farm.MsgCreatePoolWithCommunityPool'; +} +/** + * 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.irismod.farm.MsgDestroyPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgDestroyPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgDestroyPool.displayName = 'proto.irismod.farm.MsgDestroyPool'; +} +/** + * 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.irismod.farm.MsgAdjustPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgAdjustPool.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgAdjustPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgAdjustPool.displayName = 'proto.irismod.farm.MsgAdjustPool'; +} +/** + * 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.irismod.farm.MsgStake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgStake, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgStake.displayName = 'proto.irismod.farm.MsgStake'; +} +/** + * 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.irismod.farm.MsgUnstake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgUnstake, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgUnstake.displayName = 'proto.irismod.farm.MsgUnstake'; +} +/** + * 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.irismod.farm.MsgHarvest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgHarvest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgHarvest.displayName = 'proto.irismod.farm.MsgHarvest'; +} +/** + * 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.irismod.farm.MsgCreatePoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePoolResponse.displayName = 'proto.irismod.farm.MsgCreatePoolResponse'; +} +/** + * 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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.displayName = 'proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse'; +} +/** + * 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.irismod.farm.MsgDestroyPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgDestroyPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgDestroyPoolResponse.displayName = 'proto.irismod.farm.MsgDestroyPoolResponse'; +} +/** + * 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.irismod.farm.MsgAdjustPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.farm.MsgAdjustPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgAdjustPoolResponse.displayName = 'proto.irismod.farm.MsgAdjustPoolResponse'; +} +/** + * 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.irismod.farm.MsgStakeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgStakeResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgStakeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgStakeResponse.displayName = 'proto.irismod.farm.MsgStakeResponse'; +} +/** + * 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.irismod.farm.MsgUnstakeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgUnstakeResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgUnstakeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgUnstakeResponse.displayName = 'proto.irismod.farm.MsgUnstakeResponse'; +} +/** + * 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.irismod.farm.MsgHarvestResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.farm.MsgHarvestResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.farm.MsgHarvestResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.farm.MsgHarvestResponse.displayName = 'proto.irismod.farm.MsgHarvestResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgCreatePool.repeatedFields_ = [4,5]; + + + +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_, 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.irismod.farm.MsgCreatePool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePool.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.irismod.farm.MsgCreatePool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePool.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + lptDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + totalRewardList: jspb.Message.toObjectList(msg.getTotalRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + editable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + creator: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgCreatePool} + */ +proto.irismod.farm.MsgCreatePool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePool; + return proto.irismod.farm.MsgCreatePool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePool} + */ +proto.irismod.farm.MsgCreatePool.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.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLptDenom(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartHeight(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalReward(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEditable(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgCreatePool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLptDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTotalRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getEditable(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.irismod.farm.MsgCreatePool.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string lpt_denom = 2; + * @return {string} + */ +proto.irismod.farm.MsgCreatePool.prototype.getLptDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setLptDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 start_height = 3; + * @return {number} + */ +proto.irismod.farm.MsgCreatePool.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 4; + * @return {!Array} + */ +proto.irismod.farm.MsgCreatePool.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this +*/ +proto.irismod.farm.MsgCreatePool.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgCreatePool.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_reward = 5; + * @return {!Array} + */ +proto.irismod.farm.MsgCreatePool.prototype.getTotalRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this +*/ +proto.irismod.farm.MsgCreatePool.prototype.setTotalRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgCreatePool.prototype.addTotalReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.clearTotalRewardList = function() { + return this.setTotalRewardList([]); +}; + + +/** + * optional bool editable = 6; + * @return {boolean} + */ +proto.irismod.farm.MsgCreatePool.prototype.getEditable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setEditable = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string creator = 7; + * @return {string} + */ +proto.irismod.farm.MsgCreatePool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePool} returns this + */ +proto.irismod.farm.MsgCreatePool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.repeatedFields_ = [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_, 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.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePoolWithCommunityPool.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.irismod.farm.MsgCreatePoolWithCommunityPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.toObject = function(includeInstance, msg) { + var f, obj = { + content: (f = msg.getContent()) && irismod_farm_farm_pb.CommunityPoolCreateFarmProposal.toObject(includeInstance, f), + initialDepositList: jspb.Message.toObjectList(msg.getInitialDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + proposer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePoolWithCommunityPool; + return proto.irismod.farm.MsgCreatePoolWithCommunityPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_farm_farm_pb.CommunityPoolCreateFarmProposal; + reader.readMessage(value,irismod_farm_farm_pb.CommunityPoolCreateFarmProposal.deserializeBinaryFromReader); + msg.setContent(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addInitialDeposit(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProposer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePoolWithCommunityPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContent(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_farm_farm_pb.CommunityPoolCreateFarmProposal.serializeBinaryToWriter + ); + } + f = message.getInitialDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional CommunityPoolCreateFarmProposal content = 1; + * @return {?proto.irismod.farm.CommunityPoolCreateFarmProposal} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.getContent = function() { + return /** @type{?proto.irismod.farm.CommunityPoolCreateFarmProposal} */ ( + jspb.Message.getWrapperField(this, irismod_farm_farm_pb.CommunityPoolCreateFarmProposal, 1)); +}; + + +/** + * @param {?proto.irismod.farm.CommunityPoolCreateFarmProposal|undefined} value + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this +*/ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.hasContent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin initial_deposit = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.getInitialDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this +*/ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.setInitialDepositList = 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.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.addInitialDeposit = 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.irismod.farm.MsgCreatePoolWithCommunityPool} returns this + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.clearInitialDepositList = function() { + return this.setInitialDepositList([]); +}; + + +/** + * optional string proposer = 3; + * @return {string} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPool} returns this + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPool.prototype.setProposer = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.farm.MsgDestroyPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgDestroyPool.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.irismod.farm.MsgDestroyPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPool.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + creator: 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.irismod.farm.MsgDestroyPool} + */ +proto.irismod.farm.MsgDestroyPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgDestroyPool; + return proto.irismod.farm.MsgDestroyPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgDestroyPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgDestroyPool} + */ +proto.irismod.farm.MsgDestroyPool.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.setPoolId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgDestroyPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgDestroyPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgDestroyPool.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgDestroyPool} returns this + */ +proto.irismod.farm.MsgDestroyPool.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.farm.MsgDestroyPool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgDestroyPool} returns this + */ +proto.irismod.farm.MsgDestroyPool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgAdjustPool.repeatedFields_ = [2,3]; + + + +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_, 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.irismod.farm.MsgAdjustPool.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgAdjustPool.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.irismod.farm.MsgAdjustPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPool.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + additionalRewardList: jspb.Message.toObjectList(msg.getAdditionalRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + rewardPerBlockList: jspb.Message.toObjectList(msg.getRewardPerBlockList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + creator: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgAdjustPool} + */ +proto.irismod.farm.MsgAdjustPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgAdjustPool; + return proto.irismod.farm.MsgAdjustPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgAdjustPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgAdjustPool} + */ +proto.irismod.farm.MsgAdjustPool.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAdditionalReward(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRewardPerBlock(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgAdjustPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgAdjustPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAdditionalRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRewardPerBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin additional_reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getAdditionalRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this +*/ +proto.irismod.farm.MsgAdjustPool.prototype.setAdditionalRewardList = 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.irismod.farm.MsgAdjustPool.prototype.addAdditionalReward = 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.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.clearAdditionalRewardList = function() { + return this.setAdditionalRewardList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward_per_block = 3; + * @return {!Array} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getRewardPerBlockList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this +*/ +proto.irismod.farm.MsgAdjustPool.prototype.setRewardPerBlockList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgAdjustPool.prototype.addRewardPerBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.clearRewardPerBlockList = function() { + return this.setRewardPerBlockList([]); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.irismod.farm.MsgAdjustPool.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgAdjustPool} returns this + */ +proto.irismod.farm.MsgAdjustPool.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.farm.MsgStake.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgStake.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.irismod.farm.MsgStake} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStake.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: (f = msg.getAmount()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgStake} + */ +proto.irismod.farm.MsgStake.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgStake; + return proto.irismod.farm.MsgStake.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgStake} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgStake} + */ +proto.irismod.farm.MsgStake.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgStake.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgStake.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgStake} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStake.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgStake.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgStake} returns this + */ +proto.irismod.farm.MsgStake.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgStake.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.MsgStake} returns this +*/ +proto.irismod.farm.MsgStake.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.MsgStake} returns this + */ +proto.irismod.farm.MsgStake.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.MsgStake.prototype.hasAmount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.farm.MsgStake.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgStake} returns this + */ +proto.irismod.farm.MsgStake.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.farm.MsgUnstake.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgUnstake.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.irismod.farm.MsgUnstake} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstake.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: (f = msg.getAmount()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.farm.MsgUnstake} + */ +proto.irismod.farm.MsgUnstake.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgUnstake; + return proto.irismod.farm.MsgUnstake.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgUnstake} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgUnstake} + */ +proto.irismod.farm.MsgUnstake.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.setPoolId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgUnstake.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgUnstake.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgUnstake} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstake.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgUnstake.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgUnstake} returns this + */ +proto.irismod.farm.MsgUnstake.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.farm.MsgUnstake.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.farm.MsgUnstake} returns this +*/ +proto.irismod.farm.MsgUnstake.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.farm.MsgUnstake} returns this + */ +proto.irismod.farm.MsgUnstake.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.farm.MsgUnstake.prototype.hasAmount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.farm.MsgUnstake.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgUnstake} returns this + */ +proto.irismod.farm.MsgUnstake.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.farm.MsgHarvest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgHarvest.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.irismod.farm.MsgHarvest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvest.toObject = function(includeInstance, msg) { + var f, obj = { + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), + sender: 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.irismod.farm.MsgHarvest} + */ +proto.irismod.farm.MsgHarvest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgHarvest; + return proto.irismod.farm.MsgHarvest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgHarvest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgHarvest} + */ +proto.irismod.farm.MsgHarvest.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.setPoolId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgHarvest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgHarvest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgHarvest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string pool_id = 1; + * @return {string} + */ +proto.irismod.farm.MsgHarvest.prototype.getPoolId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgHarvest} returns this + */ +proto.irismod.farm.MsgHarvest.prototype.setPoolId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.irismod.farm.MsgHarvest.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.farm.MsgHarvest} returns this + */ +proto.irismod.farm.MsgHarvest.prototype.setSender = 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_, 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.irismod.farm.MsgCreatePoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePoolResponse.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.irismod.farm.MsgCreatePoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolResponse.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.irismod.farm.MsgCreatePoolResponse} + */ +proto.irismod.farm.MsgCreatePoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePoolResponse; + return proto.irismod.farm.MsgCreatePoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePoolResponse} + */ +proto.irismod.farm.MsgCreatePoolResponse.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.irismod.farm.MsgCreatePoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolResponse.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_, 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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse; + return proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgCreatePoolWithCommunityPoolResponse.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_, 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.irismod.farm.MsgDestroyPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgDestroyPoolResponse.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.irismod.farm.MsgDestroyPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPoolResponse.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.irismod.farm.MsgDestroyPoolResponse} + */ +proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgDestroyPoolResponse; + return proto.irismod.farm.MsgDestroyPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgDestroyPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgDestroyPoolResponse} + */ +proto.irismod.farm.MsgDestroyPoolResponse.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.irismod.farm.MsgDestroyPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgDestroyPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgDestroyPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgDestroyPoolResponse.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_, 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.irismod.farm.MsgAdjustPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgAdjustPoolResponse.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.irismod.farm.MsgAdjustPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPoolResponse.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.irismod.farm.MsgAdjustPoolResponse} + */ +proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgAdjustPoolResponse; + return proto.irismod.farm.MsgAdjustPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgAdjustPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgAdjustPoolResponse} + */ +proto.irismod.farm.MsgAdjustPoolResponse.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.irismod.farm.MsgAdjustPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgAdjustPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgAdjustPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgAdjustPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgStakeResponse.repeatedFields_ = [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_, 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.irismod.farm.MsgStakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgStakeResponse.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.irismod.farm.MsgStakeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStakeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.MsgStakeResponse} + */ +proto.irismod.farm.MsgStakeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgStakeResponse; + return proto.irismod.farm.MsgStakeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgStakeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgStakeResponse} + */ +proto.irismod.farm.MsgStakeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgStakeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgStakeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgStakeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgStakeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgStakeResponse.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgStakeResponse} returns this +*/ +proto.irismod.farm.MsgStakeResponse.prototype.setRewardList = 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.irismod.farm.MsgStakeResponse.prototype.addReward = 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.irismod.farm.MsgStakeResponse} returns this + */ +proto.irismod.farm.MsgStakeResponse.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgUnstakeResponse.repeatedFields_ = [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_, 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.irismod.farm.MsgUnstakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgUnstakeResponse.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.irismod.farm.MsgUnstakeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstakeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.MsgUnstakeResponse} + */ +proto.irismod.farm.MsgUnstakeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgUnstakeResponse; + return proto.irismod.farm.MsgUnstakeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgUnstakeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgUnstakeResponse} + */ +proto.irismod.farm.MsgUnstakeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgUnstakeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgUnstakeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgUnstakeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgUnstakeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgUnstakeResponse.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgUnstakeResponse} returns this +*/ +proto.irismod.farm.MsgUnstakeResponse.prototype.setRewardList = 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.irismod.farm.MsgUnstakeResponse.prototype.addReward = 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.irismod.farm.MsgUnstakeResponse} returns this + */ +proto.irismod.farm.MsgUnstakeResponse.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.farm.MsgHarvestResponse.repeatedFields_ = [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_, 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.irismod.farm.MsgHarvestResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.farm.MsgHarvestResponse.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.irismod.farm.MsgHarvestResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvestResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.farm.MsgHarvestResponse} + */ +proto.irismod.farm.MsgHarvestResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.farm.MsgHarvestResponse; + return proto.irismod.farm.MsgHarvestResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.farm.MsgHarvestResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.farm.MsgHarvestResponse} + */ +proto.irismod.farm.MsgHarvestResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.farm.MsgHarvestResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.farm.MsgHarvestResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.farm.MsgHarvestResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.farm.MsgHarvestResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin reward = 2; + * @return {!Array} + */ +proto.irismod.farm.MsgHarvestResponse.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.farm.MsgHarvestResponse} returns this +*/ +proto.irismod.farm.MsgHarvestResponse.prototype.setRewardList = 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.irismod.farm.MsgHarvestResponse.prototype.addReward = 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.irismod.farm.MsgHarvestResponse} returns this + */ +proto.irismod.farm.MsgHarvestResponse.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + +goog.object.extend(exports, proto.irismod.farm); diff --git a/src/types/proto-types/irismod/mt/genesis_pb.js b/src/types/proto-types/irismod/mt/genesis_pb.js new file mode 100644 index 00000000..ffda865f --- /dev/null +++ b/src/types/proto-types/irismod/mt/genesis_pb.js @@ -0,0 +1,911 @@ +// source: irismod/mt/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var irismod_mt_mt_pb = require('../../irismod/mt/mt_pb.js'); +goog.object.extend(proto, irismod_mt_mt_pb); +goog.exportSymbol('proto.irismod.mt.Collection', null, global); +goog.exportSymbol('proto.irismod.mt.DenomBalance', null, global); +goog.exportSymbol('proto.irismod.mt.GenesisState', null, global); +goog.exportSymbol('proto.irismod.mt.Owner', 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.irismod.mt.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.GenesisState.displayName = 'proto.irismod.mt.GenesisState'; +} +/** + * 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.irismod.mt.Collection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.Collection.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.Collection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Collection.displayName = 'proto.irismod.mt.Collection'; +} +/** + * 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.irismod.mt.Owner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.Owner.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.Owner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Owner.displayName = 'proto.irismod.mt.Owner'; +} +/** + * 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.irismod.mt.DenomBalance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.DenomBalance.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.DenomBalance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.DenomBalance.displayName = 'proto.irismod.mt.DenomBalance'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.GenesisState.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_, 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.irismod.mt.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.GenesisState.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.irismod.mt.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + collectionsList: jspb.Message.toObjectList(msg.getCollectionsList(), + proto.irismod.mt.Collection.toObject, includeInstance), + ownersList: jspb.Message.toObjectList(msg.getOwnersList(), + proto.irismod.mt.Owner.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.irismod.mt.GenesisState} + */ +proto.irismod.mt.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.GenesisState; + return proto.irismod.mt.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.GenesisState} + */ +proto.irismod.mt.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.mt.Collection; + reader.readMessage(value,proto.irismod.mt.Collection.deserializeBinaryFromReader); + msg.addCollections(value); + break; + case 2: + var value = new proto.irismod.mt.Owner; + reader.readMessage(value,proto.irismod.mt.Owner.deserializeBinaryFromReader); + msg.addOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.mt.Collection.serializeBinaryToWriter + ); + } + f = message.getOwnersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.mt.Owner.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Collection collections = 1; + * @return {!Array} + */ +proto.irismod.mt.GenesisState.prototype.getCollectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.mt.Collection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.GenesisState} returns this +*/ +proto.irismod.mt.GenesisState.prototype.setCollectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.Collection=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Collection} + */ +proto.irismod.mt.GenesisState.prototype.addCollections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.Collection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.GenesisState} returns this + */ +proto.irismod.mt.GenesisState.prototype.clearCollectionsList = function() { + return this.setCollectionsList([]); +}; + + +/** + * repeated Owner owners = 2; + * @return {!Array} + */ +proto.irismod.mt.GenesisState.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.mt.Owner, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.GenesisState} returns this +*/ +proto.irismod.mt.GenesisState.prototype.setOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.Owner=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Owner} + */ +proto.irismod.mt.GenesisState.prototype.addOwners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.Owner, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.GenesisState} returns this + */ +proto.irismod.mt.GenesisState.prototype.clearOwnersList = function() { + return this.setOwnersList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.Collection.repeatedFields_ = [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_, 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.irismod.mt.Collection.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Collection.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.irismod.mt.Collection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Collection.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && irismod_mt_mt_pb.Denom.toObject(includeInstance, f), + mtsList: jspb.Message.toObjectList(msg.getMtsList(), + irismod_mt_mt_pb.MT.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.irismod.mt.Collection} + */ +proto.irismod.mt.Collection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Collection; + return proto.irismod.mt.Collection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Collection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Collection} + */ +proto.irismod.mt.Collection.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Denom; + reader.readMessage(value,irismod_mt_mt_pb.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + case 2: + var value = new irismod_mt_mt_pb.MT; + reader.readMessage(value,irismod_mt_mt_pb.MT.deserializeBinaryFromReader); + msg.addMts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Collection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Collection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Collection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Collection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_mt_mt_pb.Denom.serializeBinaryToWriter + ); + } + f = message.getMtsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_mt_mt_pb.MT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.mt.Denom} + */ +proto.irismod.mt.Collection.prototype.getDenom = function() { + return /** @type{?proto.irismod.mt.Denom} */ ( + jspb.Message.getWrapperField(this, irismod_mt_mt_pb.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.mt.Denom|undefined} value + * @return {!proto.irismod.mt.Collection} returns this +*/ +proto.irismod.mt.Collection.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.Collection} returns this + */ +proto.irismod.mt.Collection.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.Collection.prototype.hasDenom = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated MT mts = 2; + * @return {!Array} + */ +proto.irismod.mt.Collection.prototype.getMtsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.MT, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.Collection} returns this +*/ +proto.irismod.mt.Collection.prototype.setMtsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.MT=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.Collection.prototype.addMts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.MT, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.Collection} returns this + */ +proto.irismod.mt.Collection.prototype.clearMtsList = function() { + return this.setMtsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.Owner.repeatedFields_ = [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_, 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.irismod.mt.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Owner.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.irismod.mt.Owner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Owner.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomsList: jspb.Message.toObjectList(msg.getDenomsList(), + proto.irismod.mt.DenomBalance.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.irismod.mt.Owner} + */ +proto.irismod.mt.Owner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Owner; + return proto.irismod.mt.Owner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Owner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Owner} + */ +proto.irismod.mt.Owner.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.setAddress(value); + break; + case 2: + var value = new proto.irismod.mt.DenomBalance; + reader.readMessage(value,proto.irismod.mt.DenomBalance.deserializeBinaryFromReader); + msg.addDenoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Owner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Owner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Owner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Owner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.mt.DenomBalance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.mt.Owner.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Owner} returns this + */ +proto.irismod.mt.Owner.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated DenomBalance denoms = 2; + * @return {!Array} + */ +proto.irismod.mt.Owner.prototype.getDenomsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.mt.DenomBalance, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.Owner} returns this +*/ +proto.irismod.mt.Owner.prototype.setDenomsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.DenomBalance=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.DenomBalance} + */ +proto.irismod.mt.Owner.prototype.addDenoms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.DenomBalance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.Owner} returns this + */ +proto.irismod.mt.Owner.prototype.clearDenomsList = function() { + return this.setDenomsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.DenomBalance.repeatedFields_ = [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_, 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.irismod.mt.DenomBalance.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.DenomBalance.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.irismod.mt.DenomBalance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.DenomBalance.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + balancesList: jspb.Message.toObjectList(msg.getBalancesList(), + irismod_mt_mt_pb.Balance.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.irismod.mt.DenomBalance} + */ +proto.irismod.mt.DenomBalance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.DenomBalance; + return proto.irismod.mt.DenomBalance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.DenomBalance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.DenomBalance} + */ +proto.irismod.mt.DenomBalance.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.setDenomId(value); + break; + case 2: + var value = new irismod_mt_mt_pb.Balance; + reader.readMessage(value,irismod_mt_mt_pb.Balance.deserializeBinaryFromReader); + msg.addBalances(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.DenomBalance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.DenomBalance.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.DenomBalance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.DenomBalance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_mt_mt_pb.Balance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.DenomBalance.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.DenomBalance} returns this + */ +proto.irismod.mt.DenomBalance.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Balance balances = 2; + * @return {!Array} + */ +proto.irismod.mt.DenomBalance.prototype.getBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.Balance, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.DenomBalance} returns this +*/ +proto.irismod.mt.DenomBalance.prototype.setBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.mt.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Balance} + */ +proto.irismod.mt.DenomBalance.prototype.addBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.mt.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.DenomBalance} returns this + */ +proto.irismod.mt.DenomBalance.prototype.clearBalancesList = function() { + return this.setBalancesList([]); +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/src/types/proto-types/irismod/mt/mt_pb.js b/src/types/proto-types/irismod/mt/mt_pb.js new file mode 100644 index 00000000..dd248373 --- /dev/null +++ b/src/types/proto-types/irismod/mt/mt_pb.js @@ -0,0 +1,701 @@ +// source: irismod/mt/mt.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.mt.Balance', null, global); +goog.exportSymbol('proto.irismod.mt.Denom', null, global); +goog.exportSymbol('proto.irismod.mt.MT', 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.irismod.mt.Denom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.Denom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Denom.displayName = 'proto.irismod.mt.Denom'; +} +/** + * 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.irismod.mt.MT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MT.displayName = 'proto.irismod.mt.MT'; +} +/** + * 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.irismod.mt.Balance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.Balance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.Balance.displayName = 'proto.irismod.mt.Balance'; +} + + + +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_, 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.irismod.mt.Denom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Denom.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.irismod.mt.Denom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Denom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64(), + owner: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.Denom} + */ +proto.irismod.mt.Denom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Denom; + return proto.irismod.mt.Denom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Denom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Denom} + */ +proto.irismod.mt.Denom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Denom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Denom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Denom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Denom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.Denom.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.Denom.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.irismod.mt.Denom.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Denom} returns this + */ +proto.irismod.mt.Denom.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.mt.MT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MT.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.irismod.mt.MT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + supply: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.MT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MT; + return proto.irismod.mt.MT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.MT.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.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSupply(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSupply(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MT} returns this + */ +proto.irismod.mt.MT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 supply = 2; + * @return {number} + */ +proto.irismod.mt.MT.prototype.getSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MT} returns this + */ +proto.irismod.mt.MT.prototype.setSupply = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MT.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MT.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MT.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MT} returns this + */ +proto.irismod.mt.MT.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, 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_, 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.irismod.mt.Balance.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.Balance.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.irismod.mt.Balance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Balance.toObject = function(includeInstance, msg) { + var f, obj = { + mtId: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 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.irismod.mt.Balance} + */ +proto.irismod.mt.Balance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.Balance; + return proto.irismod.mt.Balance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.Balance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.Balance} + */ +proto.irismod.mt.Balance.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.setMtId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.Balance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.Balance.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.Balance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.Balance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMtId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string mt_id = 1; + * @return {string} + */ +proto.irismod.mt.Balance.prototype.getMtId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.Balance} returns this + */ +proto.irismod.mt.Balance.prototype.setMtId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.irismod.mt.Balance.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.Balance} returns this + */ +proto.irismod.mt.Balance.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/src/types/proto-types/irismod/mt/query_grpc_web_pb.js b/src/types/proto-types/irismod/mt/query_grpc_web_pb.js new file mode 100644 index 00000000..1bee991a --- /dev/null +++ b/src/types/proto-types/irismod/mt/query_grpc_web_pb.js @@ -0,0 +1,643 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.mt + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_mt_mt_pb = require('../../irismod/mt/mt_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.mt = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QuerySupplyRequest, + * !proto.irismod.mt.QuerySupplyResponse>} + */ +const methodDescriptor_Query_Supply = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Supply', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QuerySupplyRequest, + proto.irismod.mt.QuerySupplyResponse, + /** + * @param {!proto.irismod.mt.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QuerySupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QuerySupplyRequest, + * !proto.irismod.mt.QuerySupplyResponse>} + */ +const methodInfo_Query_Supply = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QuerySupplyResponse, + /** + * @param {!proto.irismod.mt.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QuerySupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QuerySupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.supply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.supply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryDenomsRequest, + * !proto.irismod.mt.QueryDenomsResponse>} + */ +const methodDescriptor_Query_Denoms = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Denoms', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryDenomsRequest, + proto.irismod.mt.QueryDenomsResponse, + /** + * @param {!proto.irismod.mt.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryDenomsRequest, + * !proto.irismod.mt.QueryDenomsResponse>} + */ +const methodInfo_Query_Denoms = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryDenomsResponse, + /** + * @param {!proto.irismod.mt.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryDenomsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.denoms = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.denoms = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryDenomRequest, + * !proto.irismod.mt.QueryDenomResponse>} + */ +const methodDescriptor_Query_Denom = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Denom', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryDenomRequest, + proto.irismod.mt.QueryDenomResponse, + /** + * @param {!proto.irismod.mt.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryDenomRequest, + * !proto.irismod.mt.QueryDenomResponse>} + */ +const methodInfo_Query_Denom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryDenomResponse, + /** + * @param {!proto.irismod.mt.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.denom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.denom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryMTSupplyRequest, + * !proto.irismod.mt.QueryMTSupplyResponse>} + */ +const methodDescriptor_Query_MTSupply = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/MTSupply', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryMTSupplyRequest, + proto.irismod.mt.QueryMTSupplyResponse, + /** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTSupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryMTSupplyRequest, + * !proto.irismod.mt.QueryMTSupplyResponse>} + */ +const methodInfo_Query_MTSupply = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryMTSupplyResponse, + /** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTSupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryMTSupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.mTSupply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/MTSupply', + request, + metadata || {}, + methodDescriptor_Query_MTSupply, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryMTSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.mTSupply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/MTSupply', + request, + metadata || {}, + methodDescriptor_Query_MTSupply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryMTsRequest, + * !proto.irismod.mt.QueryMTsResponse>} + */ +const methodDescriptor_Query_MTs = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/MTs', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryMTsRequest, + proto.irismod.mt.QueryMTsResponse, + /** + * @param {!proto.irismod.mt.QueryMTsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryMTsRequest, + * !proto.irismod.mt.QueryMTsResponse>} + */ +const methodInfo_Query_MTs = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryMTsResponse, + /** + * @param {!proto.irismod.mt.QueryMTsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryMTsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryMTsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.mTs = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/MTs', + request, + metadata || {}, + methodDescriptor_Query_MTs, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryMTsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.mTs = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/MTs', + request, + metadata || {}, + methodDescriptor_Query_MTs); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryMTRequest, + * !proto.irismod.mt.QueryMTResponse>} + */ +const methodDescriptor_Query_MT = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/MT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryMTRequest, + proto.irismod.mt.QueryMTResponse, + /** + * @param {!proto.irismod.mt.QueryMTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryMTRequest, + * !proto.irismod.mt.QueryMTResponse>} + */ +const methodInfo_Query_MT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryMTResponse, + /** + * @param {!proto.irismod.mt.QueryMTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryMTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.mT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/MT', + request, + metadata || {}, + methodDescriptor_Query_MT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryMTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.mT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/MT', + request, + metadata || {}, + methodDescriptor_Query_MT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.QueryBalancesRequest, + * !proto.irismod.mt.QueryBalancesResponse>} + */ +const methodDescriptor_Query_Balances = new grpc.web.MethodDescriptor( + '/irismod.mt.Query/Balances', + grpc.web.MethodType.UNARY, + proto.irismod.mt.QueryBalancesRequest, + proto.irismod.mt.QueryBalancesResponse, + /** + * @param {!proto.irismod.mt.QueryBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryBalancesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.QueryBalancesRequest, + * !proto.irismod.mt.QueryBalancesResponse>} + */ +const methodInfo_Query_Balances = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.QueryBalancesResponse, + /** + * @param {!proto.irismod.mt.QueryBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.QueryBalancesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.QueryBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.QueryBalancesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.QueryClient.prototype.balances = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Query/Balances', + request, + metadata || {}, + methodDescriptor_Query_Balances, + callback); +}; + + +/** + * @param {!proto.irismod.mt.QueryBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.QueryPromiseClient.prototype.balances = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Query/Balances', + request, + metadata || {}, + methodDescriptor_Query_Balances); +}; + + +module.exports = proto.irismod.mt; + diff --git a/src/types/proto-types/irismod/mt/query_pb.js b/src/types/proto-types/irismod/mt/query_pb.js new file mode 100644 index 00000000..27adbdf5 --- /dev/null +++ b/src/types/proto-types/irismod/mt/query_pb.js @@ -0,0 +1,2679 @@ +// source: irismod/mt/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 irismod_mt_mt_pb = require('../../irismod/mt/mt_pb.js'); +goog.object.extend(proto, irismod_mt_mt_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.irismod.mt.QueryBalancesRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryBalancesResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomsRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryDenomsResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTSupplyRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTSupplyResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTsRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QueryMTsResponse', null, global); +goog.exportSymbol('proto.irismod.mt.QuerySupplyRequest', null, global); +goog.exportSymbol('proto.irismod.mt.QuerySupplyResponse', 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.irismod.mt.QuerySupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QuerySupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QuerySupplyRequest.displayName = 'proto.irismod.mt.QuerySupplyRequest'; +} +/** + * 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.irismod.mt.QuerySupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QuerySupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QuerySupplyResponse.displayName = 'proto.irismod.mt.QuerySupplyResponse'; +} +/** + * 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.irismod.mt.QueryDenomsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomsRequest.displayName = 'proto.irismod.mt.QueryDenomsRequest'; +} +/** + * 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.irismod.mt.QueryDenomsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.QueryDenomsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomsResponse.displayName = 'proto.irismod.mt.QueryDenomsResponse'; +} +/** + * 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.irismod.mt.QueryDenomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomRequest.displayName = 'proto.irismod.mt.QueryDenomRequest'; +} +/** + * 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.irismod.mt.QueryDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryDenomResponse.displayName = 'proto.irismod.mt.QueryDenomResponse'; +} +/** + * 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.irismod.mt.QueryMTSupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTSupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTSupplyRequest.displayName = 'proto.irismod.mt.QueryMTSupplyRequest'; +} +/** + * 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.irismod.mt.QueryMTSupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTSupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTSupplyResponse.displayName = 'proto.irismod.mt.QueryMTSupplyResponse'; +} +/** + * 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.irismod.mt.QueryMTsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTsRequest.displayName = 'proto.irismod.mt.QueryMTsRequest'; +} +/** + * 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.irismod.mt.QueryMTsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.QueryMTsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.QueryMTsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTsResponse.displayName = 'proto.irismod.mt.QueryMTsResponse'; +} +/** + * 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.irismod.mt.QueryMTRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTRequest.displayName = 'proto.irismod.mt.QueryMTRequest'; +} +/** + * 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.irismod.mt.QueryMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryMTResponse.displayName = 'proto.irismod.mt.QueryMTResponse'; +} +/** + * 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.irismod.mt.QueryBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.QueryBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryBalancesRequest.displayName = 'proto.irismod.mt.QueryBalancesRequest'; +} +/** + * 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.irismod.mt.QueryBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.mt.QueryBalancesResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.mt.QueryBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.QueryBalancesResponse.displayName = 'proto.irismod.mt.QueryBalancesResponse'; +} + + + +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_, 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.irismod.mt.QuerySupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QuerySupplyRequest.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.irismod.mt.QuerySupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.mt.QuerySupplyRequest} + */ +proto.irismod.mt.QuerySupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QuerySupplyRequest; + return proto.irismod.mt.QuerySupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QuerySupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QuerySupplyRequest} + */ +proto.irismod.mt.QuerySupplyRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QuerySupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QuerySupplyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QuerySupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QuerySupplyRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QuerySupplyRequest} returns this + */ +proto.irismod.mt.QuerySupplyRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.mt.QuerySupplyRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QuerySupplyRequest} returns this + */ +proto.irismod.mt.QuerySupplyRequest.prototype.setOwner = 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_, 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.irismod.mt.QuerySupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QuerySupplyResponse.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.irismod.mt.QuerySupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 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.irismod.mt.QuerySupplyResponse} + */ +proto.irismod.mt.QuerySupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QuerySupplyResponse; + return proto.irismod.mt.QuerySupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QuerySupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QuerySupplyResponse} + */ +proto.irismod.mt.QuerySupplyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QuerySupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QuerySupplyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QuerySupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QuerySupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.irismod.mt.QuerySupplyResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.QuerySupplyResponse} returns this + */ +proto.irismod.mt.QuerySupplyResponse.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.mt.QueryDenomsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomsRequest.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.irismod.mt.QueryDenomsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsRequest.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.irismod.mt.QueryDenomsRequest} + */ +proto.irismod.mt.QueryDenomsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomsRequest; + return proto.irismod.mt.QueryDenomsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomsRequest} + */ +proto.irismod.mt.QueryDenomsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryDenomsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.mt.QueryDenomsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.mt.QueryDenomsRequest} returns this +*/ +proto.irismod.mt.QueryDenomsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryDenomsRequest} returns this + */ +proto.irismod.mt.QueryDenomsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryDenomsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.QueryDenomsResponse.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_, 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.irismod.mt.QueryDenomsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomsResponse.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.irismod.mt.QueryDenomsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomsList: jspb.Message.toObjectList(msg.getDenomsList(), + irismod_mt_mt_pb.Denom.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.irismod.mt.QueryDenomsResponse} + */ +proto.irismod.mt.QueryDenomsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomsResponse; + return proto.irismod.mt.QueryDenomsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomsResponse} + */ +proto.irismod.mt.QueryDenomsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Denom; + reader.readMessage(value,irismod_mt_mt_pb.Denom.deserializeBinaryFromReader); + msg.addDenoms(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.irismod.mt.QueryDenomsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_mt_mt_pb.Denom.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Denom denoms = 1; + * @return {!Array} + */ +proto.irismod.mt.QueryDenomsResponse.prototype.getDenomsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.Denom, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.QueryDenomsResponse} returns this +*/ +proto.irismod.mt.QueryDenomsResponse.prototype.setDenomsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.Denom=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Denom} + */ +proto.irismod.mt.QueryDenomsResponse.prototype.addDenoms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.Denom, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.QueryDenomsResponse} returns this + */ +proto.irismod.mt.QueryDenomsResponse.prototype.clearDenomsList = function() { + return this.setDenomsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.mt.QueryDenomsResponse.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.irismod.mt.QueryDenomsResponse} returns this +*/ +proto.irismod.mt.QueryDenomsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryDenomsResponse} returns this + */ +proto.irismod.mt.QueryDenomsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryDenomsResponse.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_, 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.irismod.mt.QueryDenomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomRequest.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.irismod.mt.QueryDenomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.QueryDenomRequest} + */ +proto.irismod.mt.QueryDenomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomRequest; + return proto.irismod.mt.QueryDenomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomRequest} + */ +proto.irismod.mt.QueryDenomRequest.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.setDenomId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryDenomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryDenomRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryDenomRequest} returns this + */ +proto.irismod.mt.QueryDenomRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.mt.QueryDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryDenomResponse.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.irismod.mt.QueryDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && irismod_mt_mt_pb.Denom.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.irismod.mt.QueryDenomResponse} + */ +proto.irismod.mt.QueryDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryDenomResponse; + return proto.irismod.mt.QueryDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryDenomResponse} + */ +proto.irismod.mt.QueryDenomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Denom; + reader.readMessage(value,irismod_mt_mt_pb.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_mt_mt_pb.Denom.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.mt.Denom} + */ +proto.irismod.mt.QueryDenomResponse.prototype.getDenom = function() { + return /** @type{?proto.irismod.mt.Denom} */ ( + jspb.Message.getWrapperField(this, irismod_mt_mt_pb.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.mt.Denom|undefined} value + * @return {!proto.irismod.mt.QueryDenomResponse} returns this +*/ +proto.irismod.mt.QueryDenomResponse.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryDenomResponse} returns this + */ +proto.irismod.mt.QueryDenomResponse.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryDenomResponse.prototype.hasDenom = 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_, 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.irismod.mt.QueryMTSupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTSupplyRequest.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.irismod.mt.QueryMTSupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + mtId: 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.irismod.mt.QueryMTSupplyRequest} + */ +proto.irismod.mt.QueryMTSupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTSupplyRequest; + return proto.irismod.mt.QueryMTSupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTSupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTSupplyRequest} + */ +proto.irismod.mt.QueryMTSupplyRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMtId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTSupplyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTSupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMtId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTSupplyRequest} returns this + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mt_id = 2; + * @return {string} + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.getMtId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTSupplyRequest} returns this + */ +proto.irismod.mt.QueryMTSupplyRequest.prototype.setMtId = 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_, 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.irismod.mt.QueryMTSupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTSupplyResponse.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.irismod.mt.QueryMTSupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 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.irismod.mt.QueryMTSupplyResponse} + */ +proto.irismod.mt.QueryMTSupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTSupplyResponse; + return proto.irismod.mt.QueryMTSupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTSupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTSupplyResponse} + */ +proto.irismod.mt.QueryMTSupplyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTSupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTSupplyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTSupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTSupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.irismod.mt.QueryMTSupplyResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.QueryMTSupplyResponse} returns this + */ +proto.irismod.mt.QueryMTSupplyResponse.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.irismod.mt.QueryMTsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTsRequest.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.irismod.mt.QueryMTsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: 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.irismod.mt.QueryMTsRequest} + */ +proto.irismod.mt.QueryMTsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTsRequest; + return proto.irismod.mt.QueryMTsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTsRequest} + */ +proto.irismod.mt.QueryMTsRequest.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.setDenomId(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.irismod.mt.QueryMTsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + 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 denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryMTsRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTsRequest} returns this + */ +proto.irismod.mt.QueryMTsRequest.prototype.setDenomId = 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.irismod.mt.QueryMTsRequest.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.irismod.mt.QueryMTsRequest} returns this +*/ +proto.irismod.mt.QueryMTsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryMTsRequest} returns this + */ +proto.irismod.mt.QueryMTsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryMTsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.QueryMTsResponse.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_, 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.irismod.mt.QueryMTsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTsResponse.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.irismod.mt.QueryMTsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mtsList: jspb.Message.toObjectList(msg.getMtsList(), + irismod_mt_mt_pb.MT.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.irismod.mt.QueryMTsResponse} + */ +proto.irismod.mt.QueryMTsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTsResponse; + return proto.irismod.mt.QueryMTsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTsResponse} + */ +proto.irismod.mt.QueryMTsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.MT; + reader.readMessage(value,irismod_mt_mt_pb.MT.deserializeBinaryFromReader); + msg.addMts(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.irismod.mt.QueryMTsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMtsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_mt_mt_pb.MT.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MT mts = 1; + * @return {!Array} + */ +proto.irismod.mt.QueryMTsResponse.prototype.getMtsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.MT, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.QueryMTsResponse} returns this +*/ +proto.irismod.mt.QueryMTsResponse.prototype.setMtsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.MT=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.MT} + */ +proto.irismod.mt.QueryMTsResponse.prototype.addMts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.MT, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.QueryMTsResponse} returns this + */ +proto.irismod.mt.QueryMTsResponse.prototype.clearMtsList = function() { + return this.setMtsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.mt.QueryMTsResponse.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.irismod.mt.QueryMTsResponse} returns this +*/ +proto.irismod.mt.QueryMTsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryMTsResponse} returns this + */ +proto.irismod.mt.QueryMTsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryMTsResponse.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_, 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.irismod.mt.QueryMTRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTRequest.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.irismod.mt.QueryMTRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + mtId: 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.irismod.mt.QueryMTRequest} + */ +proto.irismod.mt.QueryMTRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTRequest; + return proto.irismod.mt.QueryMTRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTRequest} + */ +proto.irismod.mt.QueryMTRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMtId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMtId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.mt.QueryMTRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTRequest} returns this + */ +proto.irismod.mt.QueryMTRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mt_id = 2; + * @return {string} + */ +proto.irismod.mt.QueryMTRequest.prototype.getMtId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryMTRequest} returns this + */ +proto.irismod.mt.QueryMTRequest.prototype.setMtId = 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_, 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.irismod.mt.QueryMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryMTResponse.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.irismod.mt.QueryMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mt: (f = msg.getMt()) && irismod_mt_mt_pb.MT.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.irismod.mt.QueryMTResponse} + */ +proto.irismod.mt.QueryMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryMTResponse; + return proto.irismod.mt.QueryMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryMTResponse} + */ +proto.irismod.mt.QueryMTResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.MT; + reader.readMessage(value,irismod_mt_mt_pb.MT.deserializeBinaryFromReader); + msg.setMt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.QueryMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryMTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMt(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_mt_mt_pb.MT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional MT mt = 1; + * @return {?proto.irismod.mt.MT} + */ +proto.irismod.mt.QueryMTResponse.prototype.getMt = function() { + return /** @type{?proto.irismod.mt.MT} */ ( + jspb.Message.getWrapperField(this, irismod_mt_mt_pb.MT, 1)); +}; + + +/** + * @param {?proto.irismod.mt.MT|undefined} value + * @return {!proto.irismod.mt.QueryMTResponse} returns this +*/ +proto.irismod.mt.QueryMTResponse.prototype.setMt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryMTResponse} returns this + */ +proto.irismod.mt.QueryMTResponse.prototype.clearMt = function() { + return this.setMt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryMTResponse.prototype.hasMt = 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_, 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.irismod.mt.QueryBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryBalancesRequest.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.irismod.mt.QueryBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.irismod.mt.QueryBalancesRequest} + */ +proto.irismod.mt.QueryBalancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryBalancesRequest; + return proto.irismod.mt.QueryBalancesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryBalancesRequest} + */ +proto.irismod.mt.QueryBalancesRequest.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.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + 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.irismod.mt.QueryBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryBalancesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this + */ +proto.irismod.mt.QueryBalancesRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this + */ +proto.irismod.mt.QueryBalancesRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this +*/ +proto.irismod.mt.QueryBalancesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryBalancesRequest} returns this + */ +proto.irismod.mt.QueryBalancesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryBalancesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.mt.QueryBalancesResponse.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_, 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.irismod.mt.QueryBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.QueryBalancesResponse.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.irismod.mt.QueryBalancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + balanceList: jspb.Message.toObjectList(msg.getBalanceList(), + irismod_mt_mt_pb.Balance.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.irismod.mt.QueryBalancesResponse} + */ +proto.irismod.mt.QueryBalancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.QueryBalancesResponse; + return proto.irismod.mt.QueryBalancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.QueryBalancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.QueryBalancesResponse} + */ +proto.irismod.mt.QueryBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_mt_mt_pb.Balance; + reader.readMessage(value,irismod_mt_mt_pb.Balance.deserializeBinaryFromReader); + msg.addBalance(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.irismod.mt.QueryBalancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.QueryBalancesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.QueryBalancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.QueryBalancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalanceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_mt_mt_pb.Balance.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Balance balance = 1; + * @return {!Array} + */ +proto.irismod.mt.QueryBalancesResponse.prototype.getBalanceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_mt_mt_pb.Balance, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.mt.QueryBalancesResponse} returns this +*/ +proto.irismod.mt.QueryBalancesResponse.prototype.setBalanceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.mt.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.mt.Balance} + */ +proto.irismod.mt.QueryBalancesResponse.prototype.addBalance = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.mt.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.mt.QueryBalancesResponse} returns this + */ +proto.irismod.mt.QueryBalancesResponse.prototype.clearBalanceList = function() { + return this.setBalanceList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.mt.QueryBalancesResponse.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.irismod.mt.QueryBalancesResponse} returns this +*/ +proto.irismod.mt.QueryBalancesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.mt.QueryBalancesResponse} returns this + */ +proto.irismod.mt.QueryBalancesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.mt.QueryBalancesResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/src/types/proto-types/irismod/mt/tx_grpc_web_pb.js b/src/types/proto-types/irismod/mt/tx_grpc_web_pb.js new file mode 100644 index 00000000..771a8329 --- /dev/null +++ b/src/types/proto-types/irismod/mt/tx_grpc_web_pb.js @@ -0,0 +1,557 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.mt + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.mt = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.mt.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgIssueDenom, + * !proto.irismod.mt.MsgIssueDenomResponse>} + */ +const methodDescriptor_Msg_IssueDenom = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/IssueDenom', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgIssueDenom, + proto.irismod.mt.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.mt.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgIssueDenom, + * !proto.irismod.mt.MsgIssueDenomResponse>} + */ +const methodInfo_Msg_IssueDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.mt.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgIssueDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.issueDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.issueDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgTransferDenom, + * !proto.irismod.mt.MsgTransferDenomResponse>} + */ +const methodDescriptor_Msg_TransferDenom = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/TransferDenom', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgTransferDenom, + proto.irismod.mt.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.mt.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgTransferDenom, + * !proto.irismod.mt.MsgTransferDenomResponse>} + */ +const methodInfo_Msg_TransferDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.mt.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgTransferDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.transferDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.transferDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgMintMT, + * !proto.irismod.mt.MsgMintMTResponse>} + */ +const methodDescriptor_Msg_MintMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/MintMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgMintMT, + proto.irismod.mt.MsgMintMTResponse, + /** + * @param {!proto.irismod.mt.MsgMintMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgMintMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgMintMT, + * !proto.irismod.mt.MsgMintMTResponse>} + */ +const methodInfo_Msg_MintMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgMintMTResponse, + /** + * @param {!proto.irismod.mt.MsgMintMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgMintMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgMintMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgMintMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.mintMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/MintMT', + request, + metadata || {}, + methodDescriptor_Msg_MintMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgMintMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.mintMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/MintMT', + request, + metadata || {}, + methodDescriptor_Msg_MintMT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgEditMT, + * !proto.irismod.mt.MsgEditMTResponse>} + */ +const methodDescriptor_Msg_EditMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/EditMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgEditMT, + proto.irismod.mt.MsgEditMTResponse, + /** + * @param {!proto.irismod.mt.MsgEditMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgEditMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgEditMT, + * !proto.irismod.mt.MsgEditMTResponse>} + */ +const methodInfo_Msg_EditMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgEditMTResponse, + /** + * @param {!proto.irismod.mt.MsgEditMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgEditMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgEditMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgEditMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.editMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/EditMT', + request, + metadata || {}, + methodDescriptor_Msg_EditMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgEditMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.editMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/EditMT', + request, + metadata || {}, + methodDescriptor_Msg_EditMT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgTransferMT, + * !proto.irismod.mt.MsgTransferMTResponse>} + */ +const methodDescriptor_Msg_TransferMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/TransferMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgTransferMT, + proto.irismod.mt.MsgTransferMTResponse, + /** + * @param {!proto.irismod.mt.MsgTransferMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgTransferMT, + * !proto.irismod.mt.MsgTransferMTResponse>} + */ +const methodInfo_Msg_TransferMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgTransferMTResponse, + /** + * @param {!proto.irismod.mt.MsgTransferMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgTransferMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgTransferMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgTransferMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.transferMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/TransferMT', + request, + metadata || {}, + methodDescriptor_Msg_TransferMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgTransferMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.transferMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/TransferMT', + request, + metadata || {}, + methodDescriptor_Msg_TransferMT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.mt.MsgBurnMT, + * !proto.irismod.mt.MsgBurnMTResponse>} + */ +const methodDescriptor_Msg_BurnMT = new grpc.web.MethodDescriptor( + '/irismod.mt.Msg/BurnMT', + grpc.web.MethodType.UNARY, + proto.irismod.mt.MsgBurnMT, + proto.irismod.mt.MsgBurnMTResponse, + /** + * @param {!proto.irismod.mt.MsgBurnMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgBurnMTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.mt.MsgBurnMT, + * !proto.irismod.mt.MsgBurnMTResponse>} + */ +const methodInfo_Msg_BurnMT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.mt.MsgBurnMTResponse, + /** + * @param {!proto.irismod.mt.MsgBurnMT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.mt.MsgBurnMTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.mt.MsgBurnMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.mt.MsgBurnMTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.mt.MsgClient.prototype.burnMT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.mt.Msg/BurnMT', + request, + metadata || {}, + methodDescriptor_Msg_BurnMT, + callback); +}; + + +/** + * @param {!proto.irismod.mt.MsgBurnMT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.mt.MsgPromiseClient.prototype.burnMT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.mt.Msg/BurnMT', + request, + metadata || {}, + methodDescriptor_Msg_BurnMT); +}; + + +module.exports = proto.irismod.mt; + diff --git a/src/types/proto-types/irismod/mt/tx_pb.js b/src/types/proto-types/irismod/mt/tx_pb.js new file mode 100644 index 00000000..33597694 --- /dev/null +++ b/src/types/proto-types/irismod/mt/tx_pb.js @@ -0,0 +1,2309 @@ +// source: irismod/mt/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.mt.MsgBurnMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgBurnMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgEditMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgEditMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgIssueDenom', null, global); +goog.exportSymbol('proto.irismod.mt.MsgIssueDenomResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgMintMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgMintMTResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferDenom', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferDenomResponse', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferMT', null, global); +goog.exportSymbol('proto.irismod.mt.MsgTransferMTResponse', 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.irismod.mt.MsgIssueDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgIssueDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgIssueDenom.displayName = 'proto.irismod.mt.MsgIssueDenom'; +} +/** + * 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.irismod.mt.MsgIssueDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgIssueDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgIssueDenomResponse.displayName = 'proto.irismod.mt.MsgIssueDenomResponse'; +} +/** + * 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.irismod.mt.MsgTransferDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferDenom.displayName = 'proto.irismod.mt.MsgTransferDenom'; +} +/** + * 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.irismod.mt.MsgTransferDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferDenomResponse.displayName = 'proto.irismod.mt.MsgTransferDenomResponse'; +} +/** + * 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.irismod.mt.MsgMintMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgMintMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgMintMT.displayName = 'proto.irismod.mt.MsgMintMT'; +} +/** + * 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.irismod.mt.MsgMintMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgMintMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgMintMTResponse.displayName = 'proto.irismod.mt.MsgMintMTResponse'; +} +/** + * 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.irismod.mt.MsgEditMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgEditMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgEditMT.displayName = 'proto.irismod.mt.MsgEditMT'; +} +/** + * 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.irismod.mt.MsgEditMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgEditMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgEditMTResponse.displayName = 'proto.irismod.mt.MsgEditMTResponse'; +} +/** + * 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.irismod.mt.MsgTransferMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferMT.displayName = 'proto.irismod.mt.MsgTransferMT'; +} +/** + * 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.irismod.mt.MsgTransferMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgTransferMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgTransferMTResponse.displayName = 'proto.irismod.mt.MsgTransferMTResponse'; +} +/** + * 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.irismod.mt.MsgBurnMT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgBurnMT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgBurnMT.displayName = 'proto.irismod.mt.MsgBurnMT'; +} +/** + * 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.irismod.mt.MsgBurnMTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.mt.MsgBurnMTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.mt.MsgBurnMTResponse.displayName = 'proto.irismod.mt.MsgBurnMTResponse'; +} + + + +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_, 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.irismod.mt.MsgIssueDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgIssueDenom.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.irismod.mt.MsgIssueDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenom.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgIssueDenom} + */ +proto.irismod.mt.MsgIssueDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgIssueDenom; + return proto.irismod.mt.MsgIssueDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgIssueDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgIssueDenom} + */ +proto.irismod.mt.MsgIssueDenom.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.setName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgIssueDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgIssueDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgIssueDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgIssueDenom} returns this + */ +proto.irismod.mt.MsgIssueDenom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MsgIssueDenom} returns this + */ +proto.irismod.mt.MsgIssueDenom.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.mt.MsgIssueDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgIssueDenom} returns this + */ +proto.irismod.mt.MsgIssueDenom.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.mt.MsgIssueDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgIssueDenomResponse.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.irismod.mt.MsgIssueDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenomResponse.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.irismod.mt.MsgIssueDenomResponse} + */ +proto.irismod.mt.MsgIssueDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgIssueDenomResponse; + return proto.irismod.mt.MsgIssueDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgIssueDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgIssueDenomResponse} + */ +proto.irismod.mt.MsgIssueDenomResponse.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.irismod.mt.MsgIssueDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgIssueDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgIssueDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgIssueDenomResponse.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_, 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.irismod.mt.MsgTransferDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferDenom.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.irismod.mt.MsgTransferDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + sender: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgTransferDenom} + */ +proto.irismod.mt.MsgTransferDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferDenom; + return proto.irismod.mt.MsgTransferDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferDenom} + */ +proto.irismod.mt.MsgTransferDenom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgTransferDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgTransferDenom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferDenom} returns this + */ +proto.irismod.mt.MsgTransferDenom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.irismod.mt.MsgTransferDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferDenom} returns this + */ +proto.irismod.mt.MsgTransferDenom.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.irismod.mt.MsgTransferDenom.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferDenom} returns this + */ +proto.irismod.mt.MsgTransferDenom.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.mt.MsgTransferDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferDenomResponse.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.irismod.mt.MsgTransferDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenomResponse.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.irismod.mt.MsgTransferDenomResponse} + */ +proto.irismod.mt.MsgTransferDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferDenomResponse; + return proto.irismod.mt.MsgTransferDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferDenomResponse} + */ +proto.irismod.mt.MsgTransferDenomResponse.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.irismod.mt.MsgTransferDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferDenomResponse.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_, 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.irismod.mt.MsgMintMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgMintMT.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.irismod.mt.MsgMintMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + data: msg.getData_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 5, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgMintMT} + */ +proto.irismod.mt.MsgMintMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgMintMT; + return proto.irismod.mt.MsgMintMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgMintMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgMintMT} + */ +proto.irismod.mt.MsgMintMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgMintMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgMintMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgMintMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {number} + */ +proto.irismod.mt.MsgMintMT.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes data = 4; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MsgMintMT.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes data = 4; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgMintMT.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional string sender = 5; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string recipient = 6; + * @return {string} + */ +proto.irismod.mt.MsgMintMT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgMintMT} returns this + */ +proto.irismod.mt.MsgMintMT.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 6, 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_, 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.irismod.mt.MsgMintMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgMintMTResponse.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.irismod.mt.MsgMintMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMTResponse.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.irismod.mt.MsgMintMTResponse} + */ +proto.irismod.mt.MsgMintMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgMintMTResponse; + return proto.irismod.mt.MsgMintMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgMintMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgMintMTResponse} + */ +proto.irismod.mt.MsgMintMTResponse.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.irismod.mt.MsgMintMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgMintMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgMintMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgMintMTResponse.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_, 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.irismod.mt.MsgEditMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgEditMT.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.irismod.mt.MsgEditMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgEditMT} + */ +proto.irismod.mt.MsgEditMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgEditMT; + return proto.irismod.mt.MsgEditMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgEditMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgEditMT} + */ +proto.irismod.mt.MsgEditMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgEditMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgEditMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgEditMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.irismod.mt.MsgEditMT.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgEditMT.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.mt.MsgEditMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgEditMT} returns this + */ +proto.irismod.mt.MsgEditMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.mt.MsgEditMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgEditMTResponse.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.irismod.mt.MsgEditMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMTResponse.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.irismod.mt.MsgEditMTResponse} + */ +proto.irismod.mt.MsgEditMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgEditMTResponse; + return proto.irismod.mt.MsgEditMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgEditMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgEditMTResponse} + */ +proto.irismod.mt.MsgEditMTResponse.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.irismod.mt.MsgEditMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgEditMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgEditMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgEditMTResponse.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_, 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.irismod.mt.MsgTransferMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferMT.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.irismod.mt.MsgTransferMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + sender: jspb.Message.getFieldWithDefault(msg, 4, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgTransferMT} + */ +proto.irismod.mt.MsgTransferMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferMT; + return proto.irismod.mt.MsgTransferMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferMT} + */ +proto.irismod.mt.MsgTransferMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgTransferMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {number} + */ +proto.irismod.mt.MsgTransferMT.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string recipient = 5; + * @return {string} + */ +proto.irismod.mt.MsgTransferMT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgTransferMT} returns this + */ +proto.irismod.mt.MsgTransferMT.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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_, 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.irismod.mt.MsgTransferMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgTransferMTResponse.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.irismod.mt.MsgTransferMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMTResponse.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.irismod.mt.MsgTransferMTResponse} + */ +proto.irismod.mt.MsgTransferMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgTransferMTResponse; + return proto.irismod.mt.MsgTransferMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgTransferMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgTransferMTResponse} + */ +proto.irismod.mt.MsgTransferMTResponse.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.irismod.mt.MsgTransferMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgTransferMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgTransferMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgTransferMTResponse.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_, 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.irismod.mt.MsgBurnMT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgBurnMT.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.irismod.mt.MsgBurnMT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + sender: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.mt.MsgBurnMT} + */ +proto.irismod.mt.MsgBurnMT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgBurnMT; + return proto.irismod.mt.MsgBurnMT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgBurnMT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgBurnMT} + */ +proto.irismod.mt.MsgBurnMT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.mt.MsgBurnMT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgBurnMT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgBurnMT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.mt.MsgBurnMT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.mt.MsgBurnMT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {number} + */ +proto.irismod.mt.MsgBurnMT.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.mt.MsgBurnMT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.mt.MsgBurnMT} returns this + */ +proto.irismod.mt.MsgBurnMT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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_, 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.irismod.mt.MsgBurnMTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.mt.MsgBurnMTResponse.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.irismod.mt.MsgBurnMTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMTResponse.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.irismod.mt.MsgBurnMTResponse} + */ +proto.irismod.mt.MsgBurnMTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.mt.MsgBurnMTResponse; + return proto.irismod.mt.MsgBurnMTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.mt.MsgBurnMTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.mt.MsgBurnMTResponse} + */ +proto.irismod.mt.MsgBurnMTResponse.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.irismod.mt.MsgBurnMTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.mt.MsgBurnMTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.mt.MsgBurnMTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.mt.MsgBurnMTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.mt); diff --git a/src/types/proto-types/irismod/nft/nft_pb.js b/src/types/proto-types/irismod/nft/nft_pb.js index dedb84c0..f606d8f1 100644 --- a/src/types/proto-types/irismod/nft/nft_pb.js +++ b/src/types/proto-types/irismod/nft/nft_pb.js @@ -160,7 +160,8 @@ proto.irismod.nft.BaseNFT.toObject = function(includeInstance, msg) { name: jspb.Message.getFieldWithDefault(msg, 2, ""), uri: jspb.Message.getFieldWithDefault(msg, 3, ""), data: jspb.Message.getFieldWithDefault(msg, 4, ""), - owner: jspb.Message.getFieldWithDefault(msg, 5, "") + owner: jspb.Message.getFieldWithDefault(msg, 5, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -217,6 +218,10 @@ proto.irismod.nft.BaseNFT.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setOwner(value); break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -281,6 +286,13 @@ proto.irismod.nft.BaseNFT.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } }; @@ -374,6 +386,24 @@ proto.irismod.nft.BaseNFT.prototype.setOwner = function(value) { }; +/** + * optional string uri_hash = 6; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + @@ -409,7 +439,14 @@ proto.irismod.nft.Denom.toObject = function(includeInstance, msg) { id: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), schema: jspb.Message.getFieldWithDefault(msg, 3, ""), - creator: jspb.Message.getFieldWithDefault(msg, 4, "") + creator: jspb.Message.getFieldWithDefault(msg, 4, ""), + symbol: jspb.Message.getFieldWithDefault(msg, 5, ""), + mintRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + updateRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + description: jspb.Message.getFieldWithDefault(msg, 8, ""), + uri: jspb.Message.getFieldWithDefault(msg, 9, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 10, ""), + data: jspb.Message.getFieldWithDefault(msg, 11, "") }; if (includeInstance) { @@ -462,6 +499,34 @@ proto.irismod.nft.Denom.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setCreator(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintRestricted(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUpdateRestricted(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; default: reader.skipField(); break; @@ -519,6 +584,55 @@ proto.irismod.nft.Denom.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMintRestricted(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getUpdateRestricted(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } }; @@ -594,6 +708,132 @@ proto.irismod.nft.Denom.prototype.setCreator = function(value) { }; +/** + * optional string symbol = 5; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool mint_restricted = 6; + * @return {boolean} + */ +proto.irismod.nft.Denom.prototype.getMintRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setMintRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool update_restricted = 7; + * @return {boolean} + */ +proto.irismod.nft.Denom.prototype.getUpdateRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setUpdateRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string description = 8; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string uri = 9; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string uri_hash = 10; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string data = 11; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + /** * List of repeated fields within this message type. diff --git a/src/types/proto-types/irismod/nft/query_grpc_web_pb.js b/src/types/proto-types/irismod/nft/query_grpc_web_pb.js index 9d6e6643..fc203093 100644 --- a/src/types/proto-types/irismod/nft/query_grpc_web_pb.js +++ b/src/types/proto-types/irismod/nft/query_grpc_web_pb.js @@ -21,6 +21,8 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') var google_api_annotations_pb = require('../../google/api/annotations_pb.js') var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') const proto = {}; proto.irismod = {}; proto.irismod.nft = require('./query_pb.js'); diff --git a/src/types/proto-types/irismod/nft/query_pb.js b/src/types/proto-types/irismod/nft/query_pb.js index aa45c68d..acd99cf0 100644 --- a/src/types/proto-types/irismod/nft/query_pb.js +++ b/src/types/proto-types/irismod/nft/query_pb.js @@ -18,6 +18,8 @@ var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js'); goog.object.extend(proto, irismod_nft_nft_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.irismod.nft.QueryCollectionRequest', null, global); goog.exportSymbol('proto.irismod.nft.QueryCollectionResponse', null, global); goog.exportSymbol('proto.irismod.nft.QueryDenomRequest', null, global); @@ -605,7 +607,8 @@ proto.irismod.nft.QueryOwnerRequest.prototype.toObject = function(opt_includeIns proto.irismod.nft.QueryOwnerRequest.toObject = function(includeInstance, msg) { var f, obj = { denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), - owner: jspb.Message.getFieldWithDefault(msg, 2, "") + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -650,6 +653,11 @@ proto.irismod.nft.QueryOwnerRequest.deserializeBinaryFromReader = function(msg, var value = /** @type {string} */ (reader.readString()); msg.setOwner(value); break; + case 3: + 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; @@ -693,6 +701,14 @@ proto.irismod.nft.QueryOwnerRequest.serializeBinaryToWriter = function(message, f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -732,6 +748,43 @@ proto.irismod.nft.QueryOwnerRequest.prototype.setOwner = function(value) { }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this +*/ +proto.irismod.nft.QueryOwnerRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this + */ +proto.irismod.nft.QueryOwnerRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + @@ -764,7 +817,8 @@ proto.irismod.nft.QueryOwnerResponse.prototype.toObject = function(opt_includeIn */ proto.irismod.nft.QueryOwnerResponse.toObject = function(includeInstance, msg) { var f, obj = { - owner: (f = msg.getOwner()) && irismod_nft_nft_pb.Owner.toObject(includeInstance, f) + owner: (f = msg.getOwner()) && irismod_nft_nft_pb.Owner.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -806,6 +860,11 @@ proto.irismod.nft.QueryOwnerResponse.deserializeBinaryFromReader = function(msg, reader.readMessage(value,irismod_nft_nft_pb.Owner.deserializeBinaryFromReader); msg.setOwner(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; @@ -843,6 +902,14 @@ proto.irismod.nft.QueryOwnerResponse.serializeBinaryToWriter = function(message, irismod_nft_nft_pb.Owner.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -883,6 +950,43 @@ proto.irismod.nft.QueryOwnerResponse.prototype.hasOwner = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.nft.QueryOwnerResponse.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.irismod.nft.QueryOwnerResponse} returns this +*/ +proto.irismod.nft.QueryOwnerResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryOwnerResponse} returns this + */ +proto.irismod.nft.QueryOwnerResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -915,7 +1019,8 @@ proto.irismod.nft.QueryCollectionRequest.prototype.toObject = function(opt_inclu */ proto.irismod.nft.QueryCollectionRequest.toObject = function(includeInstance, msg) { var f, obj = { - denomId: jspb.Message.getFieldWithDefault(msg, 1, "") + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -956,6 +1061,11 @@ proto.irismod.nft.QueryCollectionRequest.deserializeBinaryFromReader = function( var value = /** @type {string} */ (reader.readString()); msg.setDenomId(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; @@ -992,6 +1102,14 @@ proto.irismod.nft.QueryCollectionRequest.serializeBinaryToWriter = function(mess f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -1013,6 +1131,43 @@ proto.irismod.nft.QueryCollectionRequest.prototype.setDenomId = function(value) }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.nft.QueryCollectionRequest.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.irismod.nft.QueryCollectionRequest} returns this +*/ +proto.irismod.nft.QueryCollectionRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryCollectionRequest} returns this + */ +proto.irismod.nft.QueryCollectionRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryCollectionRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -1045,7 +1200,8 @@ proto.irismod.nft.QueryCollectionResponse.prototype.toObject = function(opt_incl */ proto.irismod.nft.QueryCollectionResponse.toObject = function(includeInstance, msg) { var f, obj = { - collection: (f = msg.getCollection()) && irismod_nft_nft_pb.Collection.toObject(includeInstance, f) + collection: (f = msg.getCollection()) && irismod_nft_nft_pb.Collection.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1087,6 +1243,11 @@ proto.irismod.nft.QueryCollectionResponse.deserializeBinaryFromReader = function reader.readMessage(value,irismod_nft_nft_pb.Collection.deserializeBinaryFromReader); msg.setCollection(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; @@ -1124,6 +1285,14 @@ proto.irismod.nft.QueryCollectionResponse.serializeBinaryToWriter = function(mes irismod_nft_nft_pb.Collection.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1164,6 +1333,43 @@ proto.irismod.nft.QueryCollectionResponse.prototype.hasCollection = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.nft.QueryCollectionResponse.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.irismod.nft.QueryCollectionResponse} returns this +*/ +proto.irismod.nft.QueryCollectionResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryCollectionResponse} returns this + */ +proto.irismod.nft.QueryCollectionResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -1477,7 +1683,7 @@ proto.irismod.nft.QueryDenomsRequest.prototype.toObject = function(opt_includeIn */ proto.irismod.nft.QueryDenomsRequest.toObject = function(includeInstance, msg) { var f, obj = { - + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -1514,6 +1720,11 @@ proto.irismod.nft.QueryDenomsRequest.deserializeBinaryFromReader = function(msg, } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -1543,6 +1754,51 @@ proto.irismod.nft.QueryDenomsRequest.prototype.serializeBinary = function() { */ proto.irismod.nft.QueryDenomsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.nft.QueryDenomsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.nft.QueryDenomsRequest} returns this +*/ +proto.irismod.nft.QueryDenomsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryDenomsRequest} returns this + */ +proto.irismod.nft.QueryDenomsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryDenomsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -1586,7 +1842,8 @@ proto.irismod.nft.QueryDenomsResponse.prototype.toObject = function(opt_includeI proto.irismod.nft.QueryDenomsResponse.toObject = function(includeInstance, msg) { var f, obj = { denomsList: jspb.Message.toObjectList(msg.getDenomsList(), - irismod_nft_nft_pb.Denom.toObject, includeInstance) + irismod_nft_nft_pb.Denom.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1628,6 +1885,11 @@ proto.irismod.nft.QueryDenomsResponse.deserializeBinaryFromReader = function(msg reader.readMessage(value,irismod_nft_nft_pb.Denom.deserializeBinaryFromReader); msg.addDenoms(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; @@ -1665,6 +1927,14 @@ proto.irismod.nft.QueryDenomsResponse.serializeBinaryToWriter = function(message irismod_nft_nft_pb.Denom.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1706,6 +1976,43 @@ proto.irismod.nft.QueryDenomsResponse.prototype.clearDenomsList = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.nft.QueryDenomsResponse.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.irismod.nft.QueryDenomsResponse} returns this +*/ +proto.irismod.nft.QueryDenomsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryDenomsResponse} returns this + */ +proto.irismod.nft.QueryDenomsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js b/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js index 06011161..a97453e9 100644 --- a/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js +++ b/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js @@ -473,5 +473,85 @@ proto.irismod.nft.MsgPromiseClient.prototype.burnNFT = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgTransferDenom, + * !proto.irismod.nft.MsgTransferDenomResponse>} + */ +const methodDescriptor_Msg_TransferDenom = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/TransferDenom', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgTransferDenom, + proto.irismod.nft.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.nft.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgTransferDenom, + * !proto.irismod.nft.MsgTransferDenomResponse>} + */ +const methodInfo_Msg_TransferDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgTransferDenomResponse, + /** + * @param {!proto.irismod.nft.MsgTransferDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgTransferDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.transferDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgTransferDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.transferDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/TransferDenom', + request, + metadata || {}, + methodDescriptor_Msg_TransferDenom); +}; + + module.exports = proto.irismod.nft; diff --git a/src/types/proto-types/irismod/nft/tx_pb.js b/src/types/proto-types/irismod/nft/tx_pb.js index 608d9eac..d0027c71 100644 --- a/src/types/proto-types/irismod/nft/tx_pb.js +++ b/src/types/proto-types/irismod/nft/tx_pb.js @@ -22,6 +22,8 @@ goog.exportSymbol('proto.irismod.nft.MsgIssueDenom', null, global); goog.exportSymbol('proto.irismod.nft.MsgIssueDenomResponse', null, global); goog.exportSymbol('proto.irismod.nft.MsgMintNFT', null, global); goog.exportSymbol('proto.irismod.nft.MsgMintNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferDenom', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferDenomResponse', null, global); goog.exportSymbol('proto.irismod.nft.MsgTransferNFT', null, global); goog.exportSymbol('proto.irismod.nft.MsgTransferNFTResponse', null, global); /** @@ -234,6 +236,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.nft.MsgBurnNFTResponse.displayName = 'proto.irismod.nft.MsgBurnNFTResponse'; } +/** + * 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.irismod.nft.MsgTransferDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferDenom.displayName = 'proto.irismod.nft.MsgTransferDenom'; +} +/** + * 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.irismod.nft.MsgTransferDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferDenomResponse.displayName = 'proto.irismod.nft.MsgTransferDenomResponse'; +} @@ -269,7 +313,14 @@ proto.irismod.nft.MsgIssueDenom.toObject = function(includeInstance, msg) { id: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), schema: jspb.Message.getFieldWithDefault(msg, 3, ""), - sender: jspb.Message.getFieldWithDefault(msg, 4, "") + sender: jspb.Message.getFieldWithDefault(msg, 4, ""), + symbol: jspb.Message.getFieldWithDefault(msg, 5, ""), + mintRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + updateRestricted: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + description: jspb.Message.getFieldWithDefault(msg, 8, ""), + uri: jspb.Message.getFieldWithDefault(msg, 9, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 10, ""), + data: jspb.Message.getFieldWithDefault(msg, 11, "") }; if (includeInstance) { @@ -322,6 +373,34 @@ proto.irismod.nft.MsgIssueDenom.deserializeBinaryFromReader = function(msg, read var value = /** @type {string} */ (reader.readString()); msg.setSender(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintRestricted(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUpdateRestricted(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; default: reader.skipField(); break; @@ -379,6 +458,55 @@ proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter = function(message, writ f ); } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMintRestricted(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getUpdateRestricted(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } }; @@ -454,6 +582,132 @@ proto.irismod.nft.MsgIssueDenom.prototype.setSender = function(value) { }; +/** + * optional string symbol = 5; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool mint_restricted = 6; + * @return {boolean} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getMintRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setMintRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool update_restricted = 7; + * @return {boolean} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getUpdateRestricted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setUpdateRestricted = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string description = 8; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string uri = 9; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string uri_hash = 10; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string data = 11; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + @@ -593,7 +847,8 @@ proto.irismod.nft.MsgTransferNFT.toObject = function(includeInstance, msg) { uri: jspb.Message.getFieldWithDefault(msg, 4, ""), data: jspb.Message.getFieldWithDefault(msg, 5, ""), sender: jspb.Message.getFieldWithDefault(msg, 6, ""), - recipient: jspb.Message.getFieldWithDefault(msg, 7, "") + recipient: jspb.Message.getFieldWithDefault(msg, 7, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -658,6 +913,10 @@ proto.irismod.nft.MsgTransferNFT.deserializeBinaryFromReader = function(msg, rea var value = /** @type {string} */ (reader.readString()); msg.setRecipient(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -736,6 +995,13 @@ proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter = function(message, wri f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -865,6 +1131,24 @@ proto.irismod.nft.MsgTransferNFT.prototype.setRecipient = function(value) { }; +/** + * optional string uri_hash = 8; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + @@ -1003,7 +1287,8 @@ proto.irismod.nft.MsgEditNFT.toObject = function(includeInstance, msg) { name: jspb.Message.getFieldWithDefault(msg, 3, ""), uri: jspb.Message.getFieldWithDefault(msg, 4, ""), data: jspb.Message.getFieldWithDefault(msg, 5, ""), - sender: jspb.Message.getFieldWithDefault(msg, 6, "") + sender: jspb.Message.getFieldWithDefault(msg, 6, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -1064,6 +1349,10 @@ proto.irismod.nft.MsgEditNFT.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setSender(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -1135,6 +1424,13 @@ proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } }; @@ -1246,6 +1542,24 @@ proto.irismod.nft.MsgEditNFT.prototype.setSender = function(value) { }; +/** + * optional string uri_hash = 7; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + @@ -1385,7 +1699,8 @@ proto.irismod.nft.MsgMintNFT.toObject = function(includeInstance, msg) { uri: jspb.Message.getFieldWithDefault(msg, 4, ""), data: jspb.Message.getFieldWithDefault(msg, 5, ""), sender: jspb.Message.getFieldWithDefault(msg, 6, ""), - recipient: jspb.Message.getFieldWithDefault(msg, 7, "") + recipient: jspb.Message.getFieldWithDefault(msg, 7, ""), + uriHash: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -1450,6 +1765,10 @@ proto.irismod.nft.MsgMintNFT.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setRecipient(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setUriHash(value); + break; default: reader.skipField(); break; @@ -1528,6 +1847,13 @@ proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -1657,6 +1983,24 @@ proto.irismod.nft.MsgMintNFT.prototype.setRecipient = function(value) { }; +/** + * optional string uri_hash = 8; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getUriHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setUriHash = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + @@ -2049,4 +2393,295 @@ proto.irismod.nft.MsgBurnNFTResponse.serializeBinaryToWriter = function(message, }; + + + +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_, 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.irismod.nft.MsgTransferDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferDenom.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.irismod.nft.MsgTransferDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + sender: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.nft.MsgTransferDenom} + */ +proto.irismod.nft.MsgTransferDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferDenom; + return proto.irismod.nft.MsgTransferDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferDenom} + */ +proto.irismod.nft.MsgTransferDenom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.MsgTransferDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgTransferDenom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferDenom} returns this + */ +proto.irismod.nft.MsgTransferDenom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.irismod.nft.MsgTransferDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferDenom} returns this + */ +proto.irismod.nft.MsgTransferDenom.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.irismod.nft.MsgTransferDenom.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferDenom} returns this + */ +proto.irismod.nft.MsgTransferDenom.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.nft.MsgTransferDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferDenomResponse.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.irismod.nft.MsgTransferDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenomResponse.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.irismod.nft.MsgTransferDenomResponse} + */ +proto.irismod.nft.MsgTransferDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferDenomResponse; + return proto.irismod.nft.MsgTransferDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferDenomResponse} + */ +proto.irismod.nft.MsgTransferDenomResponse.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.irismod.nft.MsgTransferDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.irismod.nft); diff --git a/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js b/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js index 3b1b58b5..49af5578 100644 --- a/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js +++ b/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js @@ -25,6 +25,8 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') var google_api_annotations_pb = require('../../google/api/annotations_pb.js') var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') const proto = {}; proto.irismod = {}; proto.irismod.oracle = require('./query_pb.js'); diff --git a/src/types/proto-types/irismod/oracle/query_pb.js b/src/types/proto-types/irismod/oracle/query_pb.js index 45b15ee6..4c4a09bb 100644 --- a/src/types/proto-types/irismod/oracle/query_pb.js +++ b/src/types/proto-types/irismod/oracle/query_pb.js @@ -22,6 +22,8 @@ var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_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.irismod.oracle.FeedContext', null, global); goog.exportSymbol('proto.irismod.oracle.QueryFeedRequest', null, global); goog.exportSymbol('proto.irismod.oracle.QueryFeedResponse', null, global); @@ -489,7 +491,8 @@ proto.irismod.oracle.QueryFeedsRequest.prototype.toObject = function(opt_include */ proto.irismod.oracle.QueryFeedsRequest.toObject = function(includeInstance, msg) { var f, obj = { - state: jspb.Message.getFieldWithDefault(msg, 1, "") + state: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -530,6 +533,11 @@ proto.irismod.oracle.QueryFeedsRequest.deserializeBinaryFromReader = function(ms var value = /** @type {string} */ (reader.readString()); msg.setState(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; @@ -566,6 +574,14 @@ proto.irismod.oracle.QueryFeedsRequest.serializeBinaryToWriter = function(messag f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -587,6 +603,43 @@ proto.irismod.oracle.QueryFeedsRequest.prototype.setState = function(value) { }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.oracle.QueryFeedsRequest.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.irismod.oracle.QueryFeedsRequest} returns this +*/ +proto.irismod.oracle.QueryFeedsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.QueryFeedsRequest} returns this + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + /** * List of repeated fields within this message type. @@ -627,7 +680,8 @@ proto.irismod.oracle.QueryFeedsResponse.prototype.toObject = function(opt_includ proto.irismod.oracle.QueryFeedsResponse.toObject = function(includeInstance, msg) { var f, obj = { feedsList: jspb.Message.toObjectList(msg.getFeedsList(), - proto.irismod.oracle.FeedContext.toObject, includeInstance) + proto.irismod.oracle.FeedContext.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -669,6 +723,11 @@ proto.irismod.oracle.QueryFeedsResponse.deserializeBinaryFromReader = function(m reader.readMessage(value,proto.irismod.oracle.FeedContext.deserializeBinaryFromReader); msg.addFeeds(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; @@ -706,6 +765,14 @@ proto.irismod.oracle.QueryFeedsResponse.serializeBinaryToWriter = function(messa proto.irismod.oracle.FeedContext.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -747,6 +814,43 @@ proto.irismod.oracle.QueryFeedsResponse.prototype.clearFeedsList = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.oracle.QueryFeedsResponse.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.irismod.oracle.QueryFeedsResponse} returns this +*/ +proto.irismod.oracle.QueryFeedsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.QueryFeedsResponse} returns this + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/src/types/proto-types/irismod/service/genesis_pb.js b/src/types/proto-types/irismod/service/genesis_pb.js index dc92e95d..431f869c 100644 --- a/src/types/proto-types/irismod/service/genesis_pb.js +++ b/src/types/proto-types/irismod/service/genesis_pb.js @@ -138,7 +138,7 @@ proto.irismod.service.GenesisState.deserializeBinaryFromReader = function(msg, r case 4: var value = msg.getWithdrawAddressesMap(); reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", ""); + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 5: @@ -202,7 +202,7 @@ proto.irismod.service.GenesisState.serializeBinaryToWriter = function(message, w } f = message.getWithdrawAddressesMap(true); if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes); + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getRequestContextsMap(true); if (f && f.getLength() > 0) { @@ -325,13 +325,13 @@ proto.irismod.service.GenesisState.prototype.clearBindingsList = function() { /** - * map withdraw_addresses = 4; + * map withdraw_addresses = 4; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` - * @return {!jspb.Map} + * @return {!jspb.Map} */ proto.irismod.service.GenesisState.prototype.getWithdrawAddressesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( + return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 4, opt_noLazyCreate, null)); }; diff --git a/src/types/proto-types/irismod/service/query_pb.js b/src/types/proto-types/irismod/service/query_pb.js index dde83401..9a080c26 100644 --- a/src/types/proto-types/irismod/service/query_pb.js +++ b/src/types/proto-types/irismod/service/query_pb.js @@ -1219,7 +1219,8 @@ proto.irismod.service.QueryBindingsRequest.prototype.toObject = function(opt_inc proto.irismod.service.QueryBindingsRequest.toObject = function(includeInstance, msg) { var f, obj = { serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), - owner: jspb.Message.getFieldWithDefault(msg, 2, "") + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -1264,6 +1265,11 @@ proto.irismod.service.QueryBindingsRequest.deserializeBinaryFromReader = functio var value = /** @type {string} */ (reader.readString()); msg.setOwner(value); break; + case 3: + 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; @@ -1307,6 +1313,14 @@ proto.irismod.service.QueryBindingsRequest.serializeBinaryToWriter = function(me f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -1346,6 +1360,43 @@ proto.irismod.service.QueryBindingsRequest.prototype.setOwner = function(value) }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryBindingsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryBindingsRequest} returns this +*/ +proto.irismod.service.QueryBindingsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryBindingsRequest} returns this + */ +proto.irismod.service.QueryBindingsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryBindingsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -1386,7 +1437,8 @@ proto.irismod.service.QueryBindingsResponse.prototype.toObject = function(opt_in proto.irismod.service.QueryBindingsResponse.toObject = function(includeInstance, msg) { var f, obj = { serviceBindingsList: jspb.Message.toObjectList(msg.getServiceBindingsList(), - irismod_service_service_pb.ServiceBinding.toObject, includeInstance) + irismod_service_service_pb.ServiceBinding.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1428,6 +1480,11 @@ proto.irismod.service.QueryBindingsResponse.deserializeBinaryFromReader = functi reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); msg.addServiceBindings(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; @@ -1465,6 +1522,14 @@ proto.irismod.service.QueryBindingsResponse.serializeBinaryToWriter = function(m irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -1506,6 +1571,43 @@ proto.irismod.service.QueryBindingsResponse.prototype.clearServiceBindingsList = }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryBindingsResponse.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.irismod.service.QueryBindingsResponse} returns this +*/ +proto.irismod.service.QueryBindingsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryBindingsResponse} returns this + */ +proto.irismod.service.QueryBindingsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryBindingsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -2361,7 +2463,8 @@ proto.irismod.service.QueryRequestsRequest.prototype.toObject = function(opt_inc proto.irismod.service.QueryRequestsRequest.toObject = function(includeInstance, msg) { var f, obj = { serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), - provider: jspb.Message.getFieldWithDefault(msg, 2, "") + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -2406,6 +2509,11 @@ proto.irismod.service.QueryRequestsRequest.deserializeBinaryFromReader = functio var value = /** @type {string} */ (reader.readString()); msg.setProvider(value); break; + case 3: + 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; @@ -2449,6 +2557,14 @@ proto.irismod.service.QueryRequestsRequest.serializeBinaryToWriter = function(me f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -2488,6 +2604,43 @@ proto.irismod.service.QueryRequestsRequest.prototype.setProvider = function(valu }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryRequestsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryRequestsRequest} returns this +*/ +proto.irismod.service.QueryRequestsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsRequest} returns this + */ +proto.irismod.service.QueryRequestsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -2528,7 +2681,8 @@ proto.irismod.service.QueryRequestsResponse.prototype.toObject = function(opt_in proto.irismod.service.QueryRequestsResponse.toObject = function(includeInstance, msg) { var f, obj = { requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - irismod_service_service_pb.Request.toObject, includeInstance) + irismod_service_service_pb.Request.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -2570,6 +2724,11 @@ proto.irismod.service.QueryRequestsResponse.deserializeBinaryFromReader = functi reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); msg.addRequests(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; @@ -2607,6 +2766,14 @@ proto.irismod.service.QueryRequestsResponse.serializeBinaryToWriter = function(m irismod_service_service_pb.Request.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -2648,6 +2815,43 @@ proto.irismod.service.QueryRequestsResponse.prototype.clearRequestsList = functi }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryRequestsResponse.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.irismod.service.QueryRequestsResponse} returns this +*/ +proto.irismod.service.QueryRequestsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsResponse} returns this + */ +proto.irismod.service.QueryRequestsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -2681,7 +2885,8 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.toObject = function proto.irismod.service.QueryRequestsByReqCtxRequest.toObject = function(includeInstance, msg) { var f, obj = { requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), - batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0) + batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -2726,6 +2931,11 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.deserializeBinaryFromReader = var value = /** @type {number} */ (reader.readUint64()); msg.setBatchCounter(value); break; + case 3: + 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; @@ -2769,6 +2979,14 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.serializeBinaryToWriter = fun f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -2808,6 +3026,43 @@ proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setBatchCounter = f }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this +*/ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -2848,7 +3103,8 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.toObject = functio proto.irismod.service.QueryRequestsByReqCtxResponse.toObject = function(includeInstance, msg) { var f, obj = { requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - irismod_service_service_pb.Request.toObject, includeInstance) + irismod_service_service_pb.Request.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -2890,6 +3146,11 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinaryFromReader reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); msg.addRequests(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; @@ -2927,6 +3188,14 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.serializeBinaryToWriter = fu irismod_service_service_pb.Request.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -2968,6 +3237,43 @@ proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.clearRequestsList }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.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.irismod.service.QueryRequestsByReqCtxResponse} returns this +*/ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -3282,7 +3588,8 @@ proto.irismod.service.QueryResponsesRequest.prototype.toObject = function(opt_in proto.irismod.service.QueryResponsesRequest.toObject = function(includeInstance, msg) { var f, obj = { requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), - batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0) + batchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -3327,6 +3634,11 @@ proto.irismod.service.QueryResponsesRequest.deserializeBinaryFromReader = functi var value = /** @type {number} */ (reader.readUint64()); msg.setBatchCounter(value); break; + case 3: + 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; @@ -3370,6 +3682,14 @@ proto.irismod.service.QueryResponsesRequest.serializeBinaryToWriter = function(m f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -3409,6 +3729,43 @@ proto.irismod.service.QueryResponsesRequest.prototype.setBatchCounter = function }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.service.QueryResponsesRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.irismod.service.QueryResponsesRequest} returns this +*/ +proto.irismod.service.QueryResponsesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryResponsesRequest} returns this + */ +proto.irismod.service.QueryResponsesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryResponsesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * List of repeated fields within this message type. @@ -3449,7 +3806,8 @@ proto.irismod.service.QueryResponsesResponse.prototype.toObject = function(opt_i proto.irismod.service.QueryResponsesResponse.toObject = function(includeInstance, msg) { var f, obj = { responsesList: jspb.Message.toObjectList(msg.getResponsesList(), - irismod_service_service_pb.Response.toObject, includeInstance) + irismod_service_service_pb.Response.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -3491,6 +3849,11 @@ proto.irismod.service.QueryResponsesResponse.deserializeBinaryFromReader = funct reader.readMessage(value,irismod_service_service_pb.Response.deserializeBinaryFromReader); msg.addResponses(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; @@ -3528,6 +3891,14 @@ proto.irismod.service.QueryResponsesResponse.serializeBinaryToWriter = function( irismod_service_service_pb.Response.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -3569,6 +3940,43 @@ proto.irismod.service.QueryResponsesResponse.prototype.clearResponsesList = func }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryResponsesResponse.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.irismod.service.QueryResponsesResponse} returns this +*/ +proto.irismod.service.QueryResponsesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryResponsesResponse} returns this + */ +proto.irismod.service.QueryResponsesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryResponsesResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/src/types/proto-types/irismod/service/service_pb.js b/src/types/proto-types/irismod/service/service_pb.js index a71a67f6..bfda732d 100644 --- a/src/types/proto-types/irismod/service/service_pb.js +++ b/src/types/proto-types/irismod/service/service_pb.js @@ -1016,17 +1016,16 @@ proto.irismod.service.RequestContext.toObject = function(includeInstance, msg) { cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), moduleName: jspb.Message.getFieldWithDefault(msg, 6, ""), timeout: jspb.Message.getFieldWithDefault(msg, 7, 0), - superMode: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - repeated: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatedTotal: jspb.Message.getFieldWithDefault(msg, 11, 0), - batchCounter: jspb.Message.getFieldWithDefault(msg, 12, 0), - batchRequestCount: jspb.Message.getFieldWithDefault(msg, 13, 0), - batchResponseCount: jspb.Message.getFieldWithDefault(msg, 14, 0), - batchResponseThreshold: jspb.Message.getFieldWithDefault(msg, 15, 0), - responseThreshold: jspb.Message.getFieldWithDefault(msg, 16, 0), - batchState: jspb.Message.getFieldWithDefault(msg, 17, 0), - state: jspb.Message.getFieldWithDefault(msg, 18, 0) + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 9, 0), + repeatedTotal: jspb.Message.getFieldWithDefault(msg, 10, 0), + batchCounter: jspb.Message.getFieldWithDefault(msg, 11, 0), + batchRequestCount: jspb.Message.getFieldWithDefault(msg, 12, 0), + batchResponseCount: jspb.Message.getFieldWithDefault(msg, 13, 0), + batchResponseThreshold: jspb.Message.getFieldWithDefault(msg, 14, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 15, 0), + batchState: jspb.Message.getFieldWithDefault(msg, 16, 0), + state: jspb.Message.getFieldWithDefault(msg, 17, 0) }; if (includeInstance) { @@ -1093,46 +1092,42 @@ proto.irismod.service.RequestContext.deserializeBinaryFromReader = function(msg, msg.setTimeout(value); break; case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuperMode(value); - break; - case 9: var value = /** @type {boolean} */ (reader.readBool()); msg.setRepeated(value); break; - case 10: + case 9: var value = /** @type {number} */ (reader.readUint64()); msg.setRepeatedFrequency(value); break; - case 11: + case 10: var value = /** @type {number} */ (reader.readInt64()); msg.setRepeatedTotal(value); break; - case 12: + case 11: var value = /** @type {number} */ (reader.readUint64()); msg.setBatchCounter(value); break; - case 13: + case 12: var value = /** @type {number} */ (reader.readUint32()); msg.setBatchRequestCount(value); break; - case 14: + case 13: var value = /** @type {number} */ (reader.readUint32()); msg.setBatchResponseCount(value); break; - case 15: + case 14: var value = /** @type {number} */ (reader.readUint32()); msg.setBatchResponseThreshold(value); break; - case 16: + case 15: var value = /** @type {number} */ (reader.readUint32()); msg.setResponseThreshold(value); break; - case 17: + case 16: var value = /** @type {!proto.irismod.service.RequestContextBatchState} */ (reader.readEnum()); msg.setBatchState(value); break; - case 18: + case 17: var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); msg.setState(value); break; @@ -1215,80 +1210,73 @@ proto.irismod.service.RequestContext.serializeBinaryToWriter = function(message, f ); } - f = message.getSuperMode(); - if (f) { - writer.writeBool( - 8, - f - ); - } f = message.getRepeated(); if (f) { writer.writeBool( - 9, + 8, f ); } f = message.getRepeatedFrequency(); if (f !== 0) { writer.writeUint64( - 10, + 9, f ); } f = message.getRepeatedTotal(); if (f !== 0) { writer.writeInt64( - 11, + 10, f ); } f = message.getBatchCounter(); if (f !== 0) { writer.writeUint64( - 12, + 11, f ); } f = message.getBatchRequestCount(); if (f !== 0) { writer.writeUint32( - 13, + 12, f ); } f = message.getBatchResponseCount(); if (f !== 0) { writer.writeUint32( - 14, + 13, f ); } f = message.getBatchResponseThreshold(); if (f !== 0) { writer.writeUint32( - 15, + 14, f ); } f = message.getResponseThreshold(); if (f !== 0) { writer.writeUint32( - 16, + 15, f ); } f = message.getBatchState(); if (f !== 0.0) { writer.writeEnum( - 17, + 16, f ); } f = message.getState(); if (f !== 0.0) { writer.writeEnum( - 18, + 17, f ); } @@ -1461,29 +1449,11 @@ proto.irismod.service.RequestContext.prototype.setTimeout = function(value) { /** - * optional bool super_mode = 8; - * @return {boolean} - */ -proto.irismod.service.RequestContext.prototype.getSuperMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.irismod.service.RequestContext} returns this - */ -proto.irismod.service.RequestContext.prototype.setSuperMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional bool repeated = 9; + * optional bool repeated = 8; * @return {boolean} */ proto.irismod.service.RequestContext.prototype.getRepeated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; @@ -1492,16 +1462,16 @@ proto.irismod.service.RequestContext.prototype.getRepeated = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setRepeated = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); + return jspb.Message.setProto3BooleanField(this, 8, value); }; /** - * optional uint64 repeated_frequency = 10; + * optional uint64 repeated_frequency = 9; * @return {number} */ proto.irismod.service.RequestContext.prototype.getRepeatedFrequency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; @@ -1510,16 +1480,16 @@ proto.irismod.service.RequestContext.prototype.getRepeatedFrequency = function() * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setRepeatedFrequency = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional int64 repeated_total = 11; + * optional int64 repeated_total = 10; * @return {number} */ proto.irismod.service.RequestContext.prototype.getRepeatedTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; @@ -1528,16 +1498,16 @@ proto.irismod.service.RequestContext.prototype.getRepeatedTotal = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setRepeatedTotal = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); + return jspb.Message.setProto3IntField(this, 10, value); }; /** - * optional uint64 batch_counter = 12; + * optional uint64 batch_counter = 11; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchCounter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; @@ -1546,16 +1516,16 @@ proto.irismod.service.RequestContext.prototype.getBatchCounter = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchCounter = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * optional uint32 batch_request_count = 13; + * optional uint32 batch_request_count = 12; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchRequestCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; @@ -1564,16 +1534,16 @@ proto.irismod.service.RequestContext.prototype.getBatchRequestCount = function() * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchRequestCount = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); + return jspb.Message.setProto3IntField(this, 12, value); }; /** - * optional uint32 batch_response_count = 14; + * optional uint32 batch_response_count = 13; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchResponseCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; @@ -1582,16 +1552,16 @@ proto.irismod.service.RequestContext.prototype.getBatchResponseCount = function( * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchResponseCount = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); + return jspb.Message.setProto3IntField(this, 13, value); }; /** - * optional uint32 batch_response_threshold = 15; + * optional uint32 batch_response_threshold = 14; * @return {number} */ proto.irismod.service.RequestContext.prototype.getBatchResponseThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; @@ -1600,16 +1570,16 @@ proto.irismod.service.RequestContext.prototype.getBatchResponseThreshold = funct * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchResponseThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); + return jspb.Message.setProto3IntField(this, 14, value); }; /** - * optional uint32 response_threshold = 16; + * optional uint32 response_threshold = 15; * @return {number} */ proto.irismod.service.RequestContext.prototype.getResponseThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; @@ -1618,16 +1588,16 @@ proto.irismod.service.RequestContext.prototype.getResponseThreshold = function() * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setResponseThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); + return jspb.Message.setProto3IntField(this, 15, value); }; /** - * optional RequestContextBatchState batch_state = 17; + * optional RequestContextBatchState batch_state = 16; * @return {!proto.irismod.service.RequestContextBatchState} */ proto.irismod.service.RequestContext.prototype.getBatchState = function() { - return /** @type {!proto.irismod.service.RequestContextBatchState} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); + return /** @type {!proto.irismod.service.RequestContextBatchState} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; @@ -1636,16 +1606,16 @@ proto.irismod.service.RequestContext.prototype.getBatchState = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setBatchState = function(value) { - return jspb.Message.setProto3EnumField(this, 17, value); + return jspb.Message.setProto3EnumField(this, 16, value); }; /** - * optional RequestContextState state = 18; + * optional RequestContextState state = 17; * @return {!proto.irismod.service.RequestContextState} */ proto.irismod.service.RequestContext.prototype.getState = function() { - return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); }; @@ -1654,7 +1624,7 @@ proto.irismod.service.RequestContext.prototype.getState = function() { * @return {!proto.irismod.service.RequestContext} returns this */ proto.irismod.service.RequestContext.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 18, value); + return jspb.Message.setProto3EnumField(this, 17, value); }; @@ -1704,11 +1674,10 @@ proto.irismod.service.Request.toObject = function(includeInstance, msg) { input: jspb.Message.getFieldWithDefault(msg, 5, ""), serviceFeeList: jspb.Message.toObjectList(msg.getServiceFeeList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - requestHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), - expirationHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - requestContextId: jspb.Message.getFieldWithDefault(msg, 10, ""), - requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 11, 0) + requestHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + requestContextId: jspb.Message.getFieldWithDefault(msg, 9, ""), + requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -1771,22 +1740,18 @@ proto.irismod.service.Request.deserializeBinaryFromReader = function(msg, reader msg.addServiceFee(value); break; case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuperMode(value); - break; - case 8: var value = /** @type {number} */ (reader.readInt64()); msg.setRequestHeight(value); break; - case 9: + case 8: var value = /** @type {number} */ (reader.readInt64()); msg.setExpirationHeight(value); break; - case 10: + case 9: var value = /** @type {string} */ (reader.readString()); msg.setRequestContextId(value); break; - case 11: + case 10: var value = /** @type {number} */ (reader.readUint64()); msg.setRequestContextBatchCounter(value); break; @@ -1862,38 +1827,31 @@ proto.irismod.service.Request.serializeBinaryToWriter = function(message, writer cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } - f = message.getSuperMode(); - if (f) { - writer.writeBool( - 7, - f - ); - } f = message.getRequestHeight(); if (f !== 0) { writer.writeInt64( - 8, + 7, f ); } f = message.getExpirationHeight(); if (f !== 0) { writer.writeInt64( - 9, + 8, f ); } f = message.getRequestContextId(); if (f.length > 0) { writer.writeString( - 10, + 9, f ); } f = message.getRequestContextBatchCounter(); if (f !== 0) { writer.writeUint64( - 11, + 10, f ); } @@ -2029,29 +1987,11 @@ proto.irismod.service.Request.prototype.clearServiceFeeList = function() { /** - * optional bool super_mode = 7; - * @return {boolean} - */ -proto.irismod.service.Request.prototype.getSuperMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.irismod.service.Request} returns this - */ -proto.irismod.service.Request.prototype.setSuperMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional int64 request_height = 8; + * optional int64 request_height = 7; * @return {number} */ proto.irismod.service.Request.prototype.getRequestHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; @@ -2060,16 +2000,16 @@ proto.irismod.service.Request.prototype.getRequestHeight = function() { * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setRequestHeight = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional int64 expiration_height = 9; + * optional int64 expiration_height = 8; * @return {number} */ proto.irismod.service.Request.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; @@ -2078,16 +2018,16 @@ proto.irismod.service.Request.prototype.getExpirationHeight = function() { * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setExpirationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional string request_context_id = 10; + * optional string request_context_id = 9; * @return {string} */ proto.irismod.service.Request.prototype.getRequestContextId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; @@ -2096,16 +2036,16 @@ proto.irismod.service.Request.prototype.getRequestContextId = function() { * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setRequestContextId = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); + return jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional uint64 request_context_batch_counter = 11; + * optional uint64 request_context_batch_counter = 10; * @return {number} */ proto.irismod.service.Request.prototype.getRequestContextBatchCounter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; @@ -2114,7 +2054,7 @@ proto.irismod.service.Request.prototype.getRequestContextBatchCounter = function * @return {!proto.irismod.service.Request} returns this */ proto.irismod.service.Request.prototype.setRequestContextBatchCounter = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); + return jspb.Message.setProto3IntField(this, 10, value); }; @@ -3414,7 +3354,8 @@ proto.irismod.service.Params.toObject = function(includeInstance, msg) { complaintRetrospect: (f = msg.getComplaintRetrospect()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), arbitrationTimeLimit: (f = msg.getArbitrationTimeLimit()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), txSizeLimit: jspb.Message.getFieldWithDefault(msg, 8, 0), - baseDenom: jspb.Message.getFieldWithDefault(msg, 9, "") + baseDenom: jspb.Message.getFieldWithDefault(msg, 9, ""), + restrictedServiceFeeDenom: jspb.Message.getBooleanFieldWithDefault(msg, 10, false) }; if (includeInstance) { @@ -3490,6 +3431,10 @@ proto.irismod.service.Params.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setBaseDenom(value); break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRestrictedServiceFeeDenom(value); + break; default: reader.skipField(); break; @@ -3585,6 +3530,13 @@ proto.irismod.service.Params.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getRestrictedServiceFeeDenom(); + if (f) { + writer.writeBool( + 10, + f + ); + } }; @@ -3808,6 +3760,24 @@ proto.irismod.service.Params.prototype.setBaseDenom = function(value) { }; +/** + * optional bool restricted_service_fee_denom = 10; + * @return {boolean} + */ +proto.irismod.service.Params.prototype.getRestrictedServiceFeeDenom = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setRestrictedServiceFeeDenom = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + /** * @enum {number} */ diff --git a/src/types/proto-types/irismod/service/tx_pb.js b/src/types/proto-types/irismod/service/tx_pb.js index f075c923..071b1e33 100644 --- a/src/types/proto-types/irismod/service/tx_pb.js +++ b/src/types/proto-types/irismod/service/tx_pb.js @@ -3161,10 +3161,9 @@ proto.irismod.service.MsgCallService.toObject = function(includeInstance, msg) { serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), timeout: jspb.Message.getFieldWithDefault(msg, 6, 0), - superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - repeated: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 9, 0), - repeatedTotal: jspb.Message.getFieldWithDefault(msg, 10, 0) + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 8, 0), + repeatedTotal: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -3227,18 +3226,14 @@ proto.irismod.service.MsgCallService.deserializeBinaryFromReader = function(msg, msg.setTimeout(value); break; case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuperMode(value); - break; - case 8: var value = /** @type {boolean} */ (reader.readBool()); msg.setRepeated(value); break; - case 9: + case 8: var value = /** @type {number} */ (reader.readUint64()); msg.setRepeatedFrequency(value); break; - case 10: + case 9: var value = /** @type {number} */ (reader.readInt64()); msg.setRepeatedTotal(value); break; @@ -3314,31 +3309,24 @@ proto.irismod.service.MsgCallService.serializeBinaryToWriter = function(message, f ); } - f = message.getSuperMode(); - if (f) { - writer.writeBool( - 7, - f - ); - } f = message.getRepeated(); if (f) { writer.writeBool( - 8, + 7, f ); } f = message.getRepeatedFrequency(); if (f !== 0) { writer.writeUint64( - 9, + 8, f ); } f = message.getRepeatedTotal(); if (f !== 0) { writer.writeInt64( - 10, + 9, f ); } @@ -3493,29 +3481,11 @@ proto.irismod.service.MsgCallService.prototype.setTimeout = function(value) { /** - * optional bool super_mode = 7; - * @return {boolean} - */ -proto.irismod.service.MsgCallService.prototype.getSuperMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.irismod.service.MsgCallService} returns this - */ -proto.irismod.service.MsgCallService.prototype.setSuperMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional bool repeated = 8; + * optional bool repeated = 7; * @return {boolean} */ proto.irismod.service.MsgCallService.prototype.getRepeated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; @@ -3524,16 +3494,16 @@ proto.irismod.service.MsgCallService.prototype.getRepeated = function() { * @return {!proto.irismod.service.MsgCallService} returns this */ proto.irismod.service.MsgCallService.prototype.setRepeated = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); + return jspb.Message.setProto3BooleanField(this, 7, value); }; /** - * optional uint64 repeated_frequency = 9; + * optional uint64 repeated_frequency = 8; * @return {number} */ proto.irismod.service.MsgCallService.prototype.getRepeatedFrequency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; @@ -3542,16 +3512,16 @@ proto.irismod.service.MsgCallService.prototype.getRepeatedFrequency = function() * @return {!proto.irismod.service.MsgCallService} returns this */ proto.irismod.service.MsgCallService.prototype.setRepeatedFrequency = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional int64 repeated_total = 10; + * optional int64 repeated_total = 9; * @return {number} */ proto.irismod.service.MsgCallService.prototype.getRepeatedTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; @@ -3560,7 +3530,7 @@ proto.irismod.service.MsgCallService.prototype.getRepeatedTotal = function() { * @return {!proto.irismod.service.MsgCallService} returns this */ proto.irismod.service.MsgCallService.prototype.setRepeatedTotal = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); + return jspb.Message.setProto3IntField(this, 9, value); }; diff --git a/src/types/proto-types/irismod/token/genesis_pb.js b/src/types/proto-types/irismod/token/genesis_pb.js index b10f95d7..232841f0 100644 --- a/src/types/proto-types/irismod/token/genesis_pb.js +++ b/src/types/proto-types/irismod/token/genesis_pb.js @@ -16,6 +16,8 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var irismod_token_token_pb = require('../../irismod/token/token_pb.js'); goog.object.extend(proto, irismod_token_token_pb); +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); goog.exportSymbol('proto.irismod.token.GenesisState', null, global); /** * Generated by JsPbCodeGenerator. @@ -44,7 +46,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.irismod.token.GenesisState.repeatedFields_ = [2]; +proto.irismod.token.GenesisState.repeatedFields_ = [2,3]; @@ -79,7 +81,9 @@ proto.irismod.token.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { params: (f = msg.getParams()) && irismod_token_token_pb.Params.toObject(includeInstance, f), tokensList: jspb.Message.toObjectList(msg.getTokensList(), - irismod_token_token_pb.Token.toObject, includeInstance) + irismod_token_token_pb.Token.toObject, includeInstance), + burnedCoinsList: jspb.Message.toObjectList(msg.getBurnedCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) }; if (includeInstance) { @@ -126,6 +130,11 @@ proto.irismod.token.GenesisState.deserializeBinaryFromReader = function(msg, rea reader.readMessage(value,irismod_token_token_pb.Token.deserializeBinaryFromReader); msg.addTokens(value); break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addBurnedCoins(value); + break; default: reader.skipField(); break; @@ -171,6 +180,14 @@ proto.irismod.token.GenesisState.serializeBinaryToWriter = function(message, wri irismod_token_token_pb.Token.serializeBinaryToWriter ); } + f = message.getBurnedCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } }; @@ -249,4 +266,42 @@ proto.irismod.token.GenesisState.prototype.clearTokensList = function() { }; +/** + * repeated cosmos.base.v1beta1.Coin burned_coins = 3; + * @return {!Array} + */ +proto.irismod.token.GenesisState.prototype.getBurnedCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.GenesisState} returns this +*/ +proto.irismod.token.GenesisState.prototype.setBurnedCoinsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.GenesisState.prototype.addBurnedCoins = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.token.GenesisState} returns this + */ +proto.irismod.token.GenesisState.prototype.clearBurnedCoinsList = function() { + return this.setBurnedCoinsList([]); +}; + + goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto-types/irismod/token/query_grpc_web_pb.js b/src/types/proto-types/irismod/token/query_grpc_web_pb.js index 42d1cb4f..45e5ab5a 100644 --- a/src/types/proto-types/irismod/token/query_grpc_web_pb.js +++ b/src/types/proto-types/irismod/token/query_grpc_web_pb.js @@ -405,5 +405,85 @@ proto.irismod.token.QueryPromiseClient.prototype.params = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryTotalBurnRequest, + * !proto.irismod.token.QueryTotalBurnResponse>} + */ +const methodDescriptor_Query_TotalBurn = new grpc.web.MethodDescriptor( + '/irismod.token.Query/TotalBurn', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryTotalBurnRequest, + proto.irismod.token.QueryTotalBurnResponse, + /** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTotalBurnResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryTotalBurnRequest, + * !proto.irismod.token.QueryTotalBurnResponse>} + */ +const methodInfo_Query_TotalBurn = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryTotalBurnResponse, + /** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTotalBurnResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryTotalBurnResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.totalBurn = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/TotalBurn', + request, + metadata || {}, + methodDescriptor_Query_TotalBurn, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryTotalBurnRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.totalBurn = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/TotalBurn', + request, + metadata || {}, + methodDescriptor_Query_TotalBurn); +}; + + module.exports = proto.irismod.token; diff --git a/src/types/proto-types/irismod/token/query_pb.js b/src/types/proto-types/irismod/token/query_pb.js index 08f32097..9382adc4 100644 --- a/src/types/proto-types/irismod/token/query_pb.js +++ b/src/types/proto-types/irismod/token/query_pb.js @@ -34,6 +34,8 @@ goog.exportSymbol('proto.irismod.token.QueryTokenRequest', null, global); goog.exportSymbol('proto.irismod.token.QueryTokenResponse', null, global); goog.exportSymbol('proto.irismod.token.QueryTokensRequest', null, global); goog.exportSymbol('proto.irismod.token.QueryTokensResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryTotalBurnRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryTotalBurnResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -202,6 +204,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.token.QueryParamsResponse.displayName = 'proto.irismod.token.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.irismod.token.QueryTotalBurnRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTotalBurnRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTotalBurnRequest.displayName = 'proto.irismod.token.QueryTotalBurnRequest'; +} +/** + * 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.irismod.token.QueryTotalBurnResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.token.QueryTotalBurnResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.token.QueryTotalBurnResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTotalBurnResponse.displayName = 'proto.irismod.token.QueryTotalBurnResponse'; +} @@ -515,7 +559,8 @@ proto.irismod.token.QueryTokensRequest.prototype.toObject = function(opt_include */ proto.irismod.token.QueryTokensRequest.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -556,6 +601,11 @@ proto.irismod.token.QueryTokensRequest.deserializeBinaryFromReader = function(ms var value = /** @type {string} */ (reader.readString()); msg.setOwner(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; @@ -592,6 +642,14 @@ proto.irismod.token.QueryTokensRequest.serializeBinaryToWriter = function(messag f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -613,6 +671,43 @@ proto.irismod.token.QueryTokensRequest.prototype.setOwner = function(value) { }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.irismod.token.QueryTokensRequest.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.irismod.token.QueryTokensRequest} returns this +*/ +proto.irismod.token.QueryTokensRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryTokensRequest} returns this + */ +proto.irismod.token.QueryTokensRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryTokensRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + /** * List of repeated fields within this message type. @@ -653,7 +748,8 @@ proto.irismod.token.QueryTokensResponse.prototype.toObject = function(opt_includ proto.irismod.token.QueryTokensResponse.toObject = function(includeInstance, msg) { var f, obj = { tokensList: jspb.Message.toObjectList(msg.getTokensList(), - google_protobuf_any_pb.Any.toObject, includeInstance) + google_protobuf_any_pb.Any.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -695,6 +791,11 @@ proto.irismod.token.QueryTokensResponse.deserializeBinaryFromReader = function(m reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.addTokens(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; @@ -732,6 +833,14 @@ proto.irismod.token.QueryTokensResponse.serializeBinaryToWriter = function(messa google_protobuf_any_pb.Any.serializeBinaryToWriter ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } }; @@ -773,6 +882,43 @@ proto.irismod.token.QueryTokensResponse.prototype.clearTokensList = function() { }; +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.token.QueryTokensResponse.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.irismod.token.QueryTokensResponse} returns this +*/ +proto.irismod.token.QueryTokensResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryTokensResponse} returns this + */ +proto.irismod.token.QueryTokensResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryTokensResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -1438,4 +1584,265 @@ proto.irismod.token.QueryParamsResponse.prototype.hasRes = function() { }; + + + +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_, 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.irismod.token.QueryTotalBurnRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTotalBurnRequest.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.irismod.token.QueryTotalBurnRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnRequest.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.irismod.token.QueryTotalBurnRequest} + */ +proto.irismod.token.QueryTotalBurnRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTotalBurnRequest; + return proto.irismod.token.QueryTotalBurnRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTotalBurnRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTotalBurnRequest} + */ +proto.irismod.token.QueryTotalBurnRequest.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.irismod.token.QueryTotalBurnRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTotalBurnRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTotalBurnRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.token.QueryTotalBurnResponse.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_, 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.irismod.token.QueryTotalBurnResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTotalBurnResponse.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.irismod.token.QueryTotalBurnResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnResponse.toObject = function(includeInstance, msg) { + var f, obj = { + burnedCoinsList: jspb.Message.toObjectList(msg.getBurnedCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.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.irismod.token.QueryTotalBurnResponse} + */ +proto.irismod.token.QueryTotalBurnResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTotalBurnResponse; + return proto.irismod.token.QueryTotalBurnResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTotalBurnResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTotalBurnResponse} + */ +proto.irismod.token.QueryTotalBurnResponse.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.addBurnedCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTotalBurnResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTotalBurnResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTotalBurnResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTotalBurnResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBurnedCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin burned_coins = 1; + * @return {!Array} + */ +proto.irismod.token.QueryTotalBurnResponse.prototype.getBurnedCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.QueryTotalBurnResponse} returns this +*/ +proto.irismod.token.QueryTotalBurnResponse.prototype.setBurnedCoinsList = 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.irismod.token.QueryTotalBurnResponse.prototype.addBurnedCoins = 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.irismod.token.QueryTotalBurnResponse} returns this + */ +proto.irismod.token.QueryTotalBurnResponse.prototype.clearBurnedCoinsList = function() { + return this.setBurnedCoinsList([]); +}; + + goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto-types/irismod/token/tx_grpc_web_pb.js b/src/types/proto-types/irismod/token/tx_grpc_web_pb.js index 6505dba2..45c6b8ef 100644 --- a/src/types/proto-types/irismod/token/tx_grpc_web_pb.js +++ b/src/types/proto-types/irismod/token/tx_grpc_web_pb.js @@ -313,6 +313,86 @@ proto.irismod.token.MsgPromiseClient.prototype.mintToken = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgBurnToken, + * !proto.irismod.token.MsgBurnTokenResponse>} + */ +const methodDescriptor_Msg_BurnToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/BurnToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgBurnToken, + proto.irismod.token.MsgBurnTokenResponse, + /** + * @param {!proto.irismod.token.MsgBurnToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgBurnTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgBurnToken, + * !proto.irismod.token.MsgBurnTokenResponse>} + */ +const methodInfo_Msg_BurnToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgBurnTokenResponse, + /** + * @param {!proto.irismod.token.MsgBurnToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgBurnTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgBurnToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgBurnTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.burnToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/BurnToken', + request, + metadata || {}, + methodDescriptor_Msg_BurnToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgBurnToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.burnToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/BurnToken', + request, + metadata || {}, + methodDescriptor_Msg_BurnToken); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/src/types/proto-types/irismod/token/tx_pb.js b/src/types/proto-types/irismod/token/tx_pb.js index 2de8a0ec..f2e37662 100644 --- a/src/types/proto-types/irismod/token/tx_pb.js +++ b/src/types/proto-types/irismod/token/tx_pb.js @@ -14,6 +14,8 @@ var global = Function('return this')(); var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.token.MsgBurnToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgBurnTokenResponse', null, global); goog.exportSymbol('proto.irismod.token.MsgEditToken', null, global); goog.exportSymbol('proto.irismod.token.MsgEditTokenResponse', null, global); goog.exportSymbol('proto.irismod.token.MsgIssueToken', null, global); @@ -190,6 +192,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.irismod.token.MsgMintTokenResponse.displayName = 'proto.irismod.token.MsgMintTokenResponse'; } +/** + * 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.irismod.token.MsgBurnToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgBurnToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgBurnToken.displayName = 'proto.irismod.token.MsgBurnToken'; +} +/** + * 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.irismod.token.MsgBurnTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgBurnTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgBurnTokenResponse.displayName = 'proto.irismod.token.MsgBurnTokenResponse'; +} @@ -1594,4 +1638,295 @@ proto.irismod.token.MsgMintTokenResponse.serializeBinaryToWriter = function(mess }; + + + +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_, 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.irismod.token.MsgBurnToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgBurnToken.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.irismod.token.MsgBurnToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.token.MsgBurnToken} + */ +proto.irismod.token.MsgBurnToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgBurnToken; + return proto.irismod.token.MsgBurnToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgBurnToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgBurnToken} + */ +proto.irismod.token.MsgBurnToken.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.setSymbol(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgBurnToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgBurnToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgBurnToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgBurnToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgBurnToken} returns this + */ +proto.irismod.token.MsgBurnToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.irismod.token.MsgBurnToken.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgBurnToken} returns this + */ +proto.irismod.token.MsgBurnToken.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.token.MsgBurnToken.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgBurnToken} returns this + */ +proto.irismod.token.MsgBurnToken.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.irismod.token.MsgBurnTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgBurnTokenResponse.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.irismod.token.MsgBurnTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnTokenResponse.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.irismod.token.MsgBurnTokenResponse} + */ +proto.irismod.token.MsgBurnTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgBurnTokenResponse; + return proto.irismod.token.MsgBurnTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgBurnTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgBurnTokenResponse} + */ +proto.irismod.token.MsgBurnTokenResponse.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.irismod.token.MsgBurnTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgBurnTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgBurnTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgBurnTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto.ts b/src/types/proto.ts index 61118597..3db72e3e 100644 --- a/src/types/proto.ts +++ b/src/types/proto.ts @@ -19,7 +19,8 @@ export const random_tx_pb= require( './proto-types/irismod/random/tx_pb'); export const record_tx_pb= require( './proto-types/irismod/record/tx_pb'); export const service_tx_pb= require( './proto-types/irismod/service/tx_pb'); export const token_tx_pb= require( './proto-types/irismod/token/tx_pb'); - +//farm tx +export const farm_tx_pb = require('./proto-types/irismod/farm/tx_pb') //ibc tx export const ibc_transfer_tx_pb= require( './proto-types/ibc/applications/transfer/v1/tx_pb'); @@ -46,6 +47,7 @@ export const random_query_pb = require( './proto-types/irismod/random/query_pb') export const record_query_pb = require( './proto-types/irismod/record/query_pb'); export const service_query_pb = require( './proto-types/irismod/service/query_pb'); export const token_query_pb = require( './proto-types/irismod/token/query_pb'); +export const farm_query_pb = require( './proto-types/irismod/farm/query_pb'); //ibc query export const ibc_transfer_query_pb= require( './proto-types/ibc/applications/transfer/v1/query_pb'); @@ -54,9 +56,13 @@ export const ibc_channel_query_pb= require( './proto-types/ibc/core/channel/v1/q /***************MODULES***************/ //cosmos module export const auth_auth_pb = require( './proto-types/cosmos/auth/v1beta1/auth_pb'); -export const crypto_secp256k1_keys_pb = require( './proto-types/cosmos/crypto/secp256k1/keys_pb'); +// ->keys export const crypto_ed25519_keys_pb = require( './proto-types/cosmos/crypto/ed25519/keys_pb'); +export const crypto_multisig_keys_pb = require( './proto-types/cosmos/crypto/multisig/keys_pb'); +export const crypto_secp256k1_keys_pb = require( './proto-types/cosmos/crypto/secp256k1/keys_pb'); +export const crypto_secp256r1_keys_pb = require( './proto-types/cosmos/crypto/secp256r1/keys_pb'); export const crypto_sm2_keys_pb = require( './proto-types/cosmos/crypto/sm2/keys_pb'); +// ->coin export const base_coin_pb = require('./proto-types/cosmos/base/v1beta1/coin_pb'); export const signing_signing_pb = require('./proto-types/cosmos/tx/signing/v1beta1/signing_pb'); export const gov_gov_pb = require( './proto-types/cosmos/gov/v1beta1/gov_pb'); @@ -82,3 +88,6 @@ export const token_token_pb = require( './proto-types/irismod/token/token_pb'); //any export const any_pb = require( './proto-types/google/protobuf/any_pb'); + +//custom +export const custom_base_pb = require( './proto-types/custom/base_pb.js'); diff --git a/src/types/protoTx.ts b/src/types/protoTx.ts index 962d862c..bb8b5561 100644 --- a/src/types/protoTx.ts +++ b/src/types/protoTx.ts @@ -51,7 +51,7 @@ export class ProtoTx { */ addSignature(signature:string){ if (!signature || !signature.length) { - throw new SdkError("signature is empty",CODES.NoSignatures); + throw new SdkError("signature is empty",CODES.NoSignatures); } this.signatures.push(signature); } @@ -79,10 +79,10 @@ export class ProtoTx { throw new SdkError("please set pubKey",CODES.InvalidPubkey); } if ( typeof account_number == 'undefined' && typeof this.txData.account_number == 'undefined') { - throw new SdkError("account_number is empty",CODES.IncorrectAccountSequence); + throw new SdkError("account_number is empty",CODES.IncorrectAccountSequence); } if (!chain_id && !this.txData.chain_id) { - throw new SdkError("chain_id is empty",CODES.InvalidChainId); + throw new SdkError("chain_id is empty",CODES.InvalidChainId); } let signDoc = new types.tx_tx_pb.SignDoc(); signDoc.setBodyBytes(this.body.serializeBinary()); diff --git a/src/types/types.ts b/src/types/types.ts index ba17bee0..2351f324 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -60,6 +60,10 @@ export enum TxType { MsgAddLiquidity ="irismod.coinswap.MsgAddLiquidity", MsgRemoveLiquidity ="irismod.coinswap.MsgRemoveLiquidity", MsgSwapOrder ="irismod.coinswap.MsgSwapOrder", + //farm + MsgStake = 'irismod.farm.MsgStake', + MsgUnstake= 'irismod.farm.MsgUnstake', + MsgHarvest = 'irismod.farm.MsgHarvest', //nft MsgIssueDenom ="irismod.nft.MsgIssueDenom", MsgTransferNFT ="irismod.nft.MsgTransferNFT", @@ -78,7 +82,7 @@ export enum TxType { MsgCreateHTLC = "irismod.htlc.MsgCreateHTLC", MsgClaimHTLC = "irismod.htlc.MsgClaimHTLC", //ibc - MsgTransfer = "ibc.applications.transfer.v1.MsgTransfer" + MsgTransfer = "ibc.applications.transfer.v1.MsgTransfer", } /** @@ -160,3 +164,12 @@ export interface Bech32Prefix { ConsAddr: string; ConsPub: string; } + +export interface Pagination { + page_number?: number, + page_size?: number, + count_total?: boolean, + reverse?: boolean, + key?:string +} + diff --git a/test/auth.test.ts b/test/auth.test.ts index 774ea748..591862e0 100644 --- a/test/auth.test.ts +++ b/test/auth.test.ts @@ -1,15 +1,34 @@ import { BaseTest } from './basetest'; -const timeout = 10000; +const timeout = 99999; describe('Nft Tests', () => { describe('query', () => { + test( + 'query Accounts', + async () => { + await BaseTest.getClient() + .auth.queryAccounts({ + page_number: 1, + page_size: 2, + reverse:true, + count_total: false + }) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); test( 'query Account', async () => { await BaseTest.getClient() - .auth.queryAccount('iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp') + .auth.queryAccount('iaa1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3qef7mx') .then(res => { console.log(JSON.stringify(res)); }) @@ -19,7 +38,6 @@ describe('Nft Tests', () => { }, timeout ); - test( 'query Params', async () => { diff --git a/test/bank.test.ts b/test/bank.test.ts index c8f9049a..82a3805c 100644 --- a/test/bank.test.ts +++ b/test/bank.test.ts @@ -1,7 +1,7 @@ import * as types from '../src/types'; import { BaseTest } from './basetest'; -const timeout = 10000; +const timeout = 90000; describe('Bank Tests', () => { describe('Send', () => { @@ -10,7 +10,7 @@ describe('Bank Tests', () => { async () => { const amount: types.Coin[] = [ { - denom: 'ubif', + denom: 'uiris', amount: '1', }, ]; @@ -38,7 +38,7 @@ describe('Bank Tests', () => { async () => { const amount: types.Coin[] = [ { - denom: 'ubif', + denom: 'udev', amount: '1', }, ]; @@ -65,7 +65,7 @@ describe('Bank Tests', () => { 'query Balance', async () => { await BaseTest.getClient() - .bank.queryBalance('iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw','ubif') + .bank.queryBalance('iaa174qyl02cupyqq77cqqtdl0frda6dl3rp2h9snu','udev') .then(res => { console.log(JSON.stringify(res)); }) @@ -80,7 +80,7 @@ describe('Bank Tests', () => { 'query All Balances', async () => { await BaseTest.getClient() - .bank.queryAllBalances('iaa176dd0tgn38grpc8hpxfmwl6sl8jfmkneg8mkxr') + .bank.queryAllBalances('iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw') .then(res => { console.log(JSON.stringify(res)); }) @@ -110,7 +110,11 @@ describe('Bank Tests', () => { 'query Total Supply', async () => { await BaseTest.getClient() - .bank.queryTotalSupply() + .bank.queryTotalSupply({ + page_number: 2, + page_size: 8, + count_total: false + }) .then(res => { console.log(JSON.stringify(res)); }) @@ -150,5 +154,35 @@ describe('Bank Tests', () => { }, timeout ); + + test( + 'query Denom Metadata', + async () => { + await BaseTest.getClient() + .bank.queryDenomMetadata('happy') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Denoms Metadata', + async () => { + await BaseTest.getClient() + .bank.queryDenomsMetadata() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); }); }); diff --git a/test/basetest.ts b/test/basetest.ts index c72c9b76..e8468d73 100644 --- a/test/basetest.ts +++ b/test/basetest.ts @@ -1,3 +1,4 @@ +// support cosmos-sdk v0.44.x、 irismod 1.5.2、ibc 1.1.0 import * as iris from '../src'; import { Client } from '../src/client'; @@ -31,20 +32,20 @@ export class BaseTest { static getClient(): Client { let config = { - node: 'http://192.168.150.40:26657', + node: 'http://192.168.150.33:26657', chainNetwork: iris.types.ChainNetwork.Iris, - chainId: 'bifrost-2', + chainId: 'iris', gas: '20000000', - fee: { denom: 'ubif', amount: '200' }, + fee: { denom: 'uiris', amount: '200' }, }; - let privateKey = '1E120611404C4B1B98FC899A8026A6A9823C35985DA3C5ED3FF57C170C822F60' + // let privateKey = '1E120611404C4B1B98FC899A8026A6A9823C35985DA3C5ED3FF57C170C822F60' // let config = { // node: 'http://34.80.22.255:26657', // network: iris.types.Network.Mainnet, // chainId: 'bifrost-1', // gas: '200000', - // fee: { denom: 'ubif', amount: '5000' }, + // fee: { denom: 'udev', amount: '5000' }, // }; // let privateKey = '80A69946ADD77EF0C17F43E72E759164F6F0A2A7E9D5D3E0966A3BCA8DE3D177' @@ -56,7 +57,7 @@ export class BaseTest { client.keys.recover( Consts.keyName, Consts.keyPassword, - 'next review tape teach walnut cash crater evidence ketchup sister lyrics defy pioneer wisdom property arch film damage near link avoid panda vacant suggest' + 'razor educate ostrich pave permit comic collect square believe decade scan day frozen language make winter lyrics spice dawn deliver jaguar arrest decline success' ); // client.keys.importPrivateKey( diff --git a/test/coinswap.test.ts b/test/coinswap.test.ts index f1bc52cc..908e1a5d 100644 --- a/test/coinswap.test.ts +++ b/test/coinswap.test.ts @@ -8,13 +8,15 @@ describe('Coinswap Tests', () => { test( 'add liquidity', async () => { + let deadlineTime = (new Date().getTime()/1000 + 10000).toString() + await BaseTest.getClient() .coinswap.addLiquidity( { - denom: 'kit', - amount: '500', + denom: 'ubusd', + amount: '100000000', }, "1000", "1", - 1615642486, + parseInt(deadlineTime), BaseTest.baseTx ) .then(res => { @@ -35,7 +37,7 @@ describe('Coinswap Tests', () => { await BaseTest.getClient() .coinswap.removeLiquidity( { - denom: 'swap/kit', + denom: 'lpt-1', amount: '10', }, "1", "1", 1615642486, @@ -59,13 +61,13 @@ describe('Coinswap Tests', () => { await BaseTest.getClient() .coinswap.swapOrder( { - denom: 'kit', - amount: '10', + denom: 'uiris', + amount: '10000000', }, { - denom: 'ubif', - amount: '10', + denom: 'ubusd', + amount: '100', }, false, - 1615642486, + 1646636997, BaseTest.baseTx ) .then(res => { @@ -84,7 +86,7 @@ describe('Coinswap Tests', () => { 'query Liquidity', async () => { await BaseTest.getClient() - .coinswap.queryLiquidity('kit') + .coinswap.queryLiquidity('lpt-1') .then(res => { console.log(JSON.stringify(res)); }) diff --git a/test/farm.test.ts b/test/farm.test.ts new file mode 100644 index 00000000..039cfb07 --- /dev/null +++ b/test/farm.test.ts @@ -0,0 +1,134 @@ +import {BaseTest} from './basetest'; +const timeout = 10000; + +describe('farm Tests', () => { + describe('stake lp', () => { + test( + 'stake lp', + async () => { + await BaseTest.getClient() + .farm.stakeLp( + 'farm-15', + { + denom: 'lpt-1', + amount: '1' + }, + BaseTest.baseTx + ) + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); + describe('unstake lp', () => { + test( + 'unstake lp', + async () => { + await BaseTest.getClient() + .farm.unStakeLp( + 'farm-15', + { + denom: 'lpt-1', + amount: '1' + }, + BaseTest.baseTx + ) + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); + describe('harvest reward', () => { + test( + 'harvest reward', + async () => { + await BaseTest.getClient() + .farm.harvestReward( + 'farm-15', + BaseTest.baseTx + ) + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); + describe('Query', () => { + test( + 'query Farm Pools', + async () => { + await BaseTest.getClient() + .farm.queryFarmPools({ + page_number: 1, + page_size: 5 + }) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Farm Pool', + async () => { + await BaseTest.getClient() + .farm.queryFarmPool('farm-1') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Farmer', + async () => { + await BaseTest.getClient() + .farm.queryFarmer('iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw', 'farm-62') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Params', + async () => { + await BaseTest.getClient() + .farm.queryParams() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); +}); diff --git a/test/gov.test.ts b/test/gov.test.ts index 0a1b521a..33e4088c 100644 --- a/test/gov.test.ts +++ b/test/gov.test.ts @@ -15,8 +15,10 @@ describe('Gov Tests', () => { }); test('query proposals', async () => { await BaseTest.getClient().gov - .queryProposals({ - },1,100) + .queryProposals({},{ + page_number: 1, + page_size: 100 + }) .then(res => { console.log(JSON.stringify(res)); }) @@ -88,7 +90,7 @@ describe('Gov Tests', () => { const initDeposit: types.Coin[] = [ { - denom: 'ubif', + denom: 'udev', amount: '100', }, ]; @@ -162,7 +164,7 @@ describe('Gov Tests', () => { title:'1111', description:'1111', recipient: 'iaa176dd0tgn38grpc8hpxfmwl6sl8jfmkneg8mkxr', - amount: [{denom: 'ubif',amount: '100'}] + amount: [{denom: 'udev',amount: '100'}] } }, initDeposit, diff --git a/test/ibc.test.ts b/test/ibc.test.ts index a58db6b0..6eac5e75 100644 --- a/test/ibc.test.ts +++ b/test/ibc.test.ts @@ -84,7 +84,10 @@ describe('ibc Tests', () => { 'queries all the IBC channels of a chain', async () => { await BaseTest.getClient() - .ibc.queryChannels(1,100) + .ibc.queryChannels({ + page_number: 1, + page_size: 100 + }) .then(res => { console.log(JSON.stringify(res)); }) diff --git a/test/nft.test.ts b/test/nft.test.ts index bfa77135..ca100ad6 100644 --- a/test/nft.test.ts +++ b/test/nft.test.ts @@ -27,6 +27,15 @@ describe('Nft Tests', () => { denom_id, denom_name, denom_schema, + { + symbol: '1', + mint_restricted: false, + update_restricted: false, + description: '2', + uri: '3', + uri_hash: '', + data: '5', + }, BaseTest.baseTx ) .then(res => { @@ -46,6 +55,7 @@ describe('Nft Tests', () => { denom_id, nft_name, nft_uri, + '', nft_data, '', BaseTest.baseTx @@ -57,17 +67,19 @@ describe('Nft Tests', () => { console.log(error); }); - let nft_name_e = randomStr(7);; - let nft_data_e = randomStr(7);; + let nft_name_e = randomStr(7); + let nft_data_e = randomStr(7); let nft_uri_e = `http://${randomStr(7)}`; + let nft_uri_hash_e = randomStr(7); await BaseTest.getClient() .nft.editNft( - nft_id, + nft_id, denom_id, { name:nft_name_e, data:nft_data_e, - uri:nft_uri_e + uri:nft_uri_e, + uri_hash: nft_uri_hash_e }, BaseTest.baseTx ) @@ -103,6 +115,7 @@ describe('Nft Tests', () => { denom_id, nft_name, nft_uri, + '', nft_data, '', BaseTest.baseTx @@ -166,7 +179,7 @@ describe('Nft Tests', () => { 'query Collection', async () => { await BaseTest.getClient() - .nft.queryCollection('rzfj') + .nft.queryCollection('wwid11111') .then(res => { console.log(JSON.stringify(res)); }) @@ -181,7 +194,7 @@ describe('Nft Tests', () => { 'query Denom', async () => { await BaseTest.getClient() - .nft.queryDenom('rzfj') + .nft.queryDenom('wwid11111') .then(res => { console.log(JSON.stringify(res)); }) @@ -211,7 +224,7 @@ describe('Nft Tests', () => { 'query NFT', async () => { await BaseTest.getClient() - .nft.queryNFT('rzfj','bbzrsib') + .nft.queryNFT('wwid11111','wwntest01') .then(res => { console.log(JSON.stringify(res)); }) diff --git a/test/protobuf.test.ts b/test/protobuf.test.ts index 7565c73e..fe3195fa 100644 --- a/test/protobuf.test.ts +++ b/test/protobuf.test.ts @@ -42,13 +42,22 @@ describe('protobuf Tests', () => { ); test( - 'deserialize Signing Info', + 'deserialize Tx Body', async () => { - let signingInfo_proto = 'CippY2Exd3JkNWMybjd4Y205N3l5enJrc3pjcWdhMjNzY3RseGc5NHk2dWoYxJ4FIgA'; - let signingInfo = BaseTest.getClient().protobuf.deserializeSigningInfo(signingInfo_proto); - console.log('signingInfo:',signingInfo); + let txBody_proto = 'CoUBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmUKKmlhYTF0enVhajJ4NW00M2RncWh5MGx4aDl0cnplbnBsdmVkNmh0bHA0YxIqaWFhMXpnam50N2t1bjN1d3lldHo4MmxlMzNtbjl2cTgzNGUzd3czZXM4GgsKBXVpcmlzEgIxMBIBIA=='; + let txBody = BaseTest.getClient().protobuf.deserializeTxBody(txBody_proto); + console.log('txBody:',txBody); } - ); + ); + + test( + 'deserialize Auth Info', + async () => { + let authInfo_proto = 'ClAKRgofL2Nvc21vcy5jcnlwdG8uc2VjcDI1NmsxLlB1YktleRIjCiEDJYX9wmewxEsenNX/+/FkQVXxsZZMDCnzNoCFPsWvT0ISBAoCCAEYGxIUCg4KBXVpcmlzEgU3NTAwMBCQoQ8='; + let authInfo = BaseTest.getClient().protobuf.deserializeAuthInfo(authInfo_proto); + console.log('authInfo:',authInfo); + } + ); test( 'deserialize Signing Info', diff --git a/test/staking.test.ts b/test/staking.test.ts index 7b0539f9..3297da57 100644 --- a/test/staking.test.ts +++ b/test/staking.test.ts @@ -187,9 +187,10 @@ describe('Staking Tests', () => { test('query all validators', async () => { await BaseTest.getClient() .staking.queryValidators({ - page:1, - size:100, - count_total:true, + pagination:{ + page_number: 2, + page_size: 8 + }, //status:'Bonded', }) .then(res => { @@ -206,7 +207,7 @@ describe('Staking Tests', () => { await BaseTest.getClient() .staking.delegate( 'iva1geqzj2jjeqgurpu8u9x4asq5m6rw5lm7nn22c2', - { denom: 'ubif', amount: '5' }, + { denom: 'udev', amount: '5' }, BaseTest.baseTx ) .then(res => { @@ -222,7 +223,7 @@ describe('Staking Tests', () => { await BaseTest.getClient() .staking.undelegate( 'iva1g5uv7khupczd6w03a7t066mwjdx9zkma82rnk0', - { denom: 'ubif', amount: '1' }, + { denom: 'udev', amount: '1' }, BaseTest.baseTx ) .then(res => { @@ -239,7 +240,7 @@ describe('Staking Tests', () => { .staking.redelegate( 'iva1geqzj2jjeqgurpu8u9x4asq5m6rw5lm7nn22c2', 'iva1736ypcrmwvurylfprfgmjwr625c6ycdv8uyjlp', - { denom: 'ubif', amount: '1' }, + { denom: 'udev', amount: '1' }, BaseTest.baseTx ) .then(res => { diff --git a/test/tendermint.test.ts b/test/tendermint.test.ts index 3b045a17..8d503a44 100644 --- a/test/tendermint.test.ts +++ b/test/tendermint.test.ts @@ -143,4 +143,20 @@ describe('Tendermint Tests', () => { }, timeout ); -}); + + test( + 'query Global Account Number', + async () => { + await BaseTest.getClient() + .tendermint.queryGlobalAccountNumber() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + +}); \ No newline at end of file diff --git a/test/tx.test.ts b/test/tx.test.ts index fb23561f..8752ca97 100644 --- a/test/tx.test.ts +++ b/test/tx.test.ts @@ -6,7 +6,7 @@ let timeout = 9999; describe('Tx Tests', () => { const amount: types.Coin[] = [ { - denom: 'ubif', + denom: 'udev', amount: '100', }, ]; diff --git a/yarn.lock b/yarn.lock index 0faafac5..25a72709 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,20 +3,19 @@ "@babel/cli@^7.13.14": - version "7.13.14" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.13.14.tgz#c395bc89ec4760c91f2027fa8b26f8b2bf42238f" - integrity sha512-zmEFV8WBRsW+mPQumO1/4b34QNALBVReaiHJOkxhUsdo/AvYM62c+SKSuLi2aZ42t3ocK6OI0uwUXRvrIbREZw== + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.14.8.tgz#fac73c0e2328a8af9fd3560c06b096bfa3730933" + integrity sha512-lcy6Lymft9Rpfqmrqdd4oTDdUx9ZwaAhAfywVrHG4771Pa6PPT0danJ1kDHBXYqh4HHSmIdA+nlmfxfxSDPtBg== dependencies: commander "^4.0.1" convert-source-map "^1.1.0" fs-readdir-recursive "^1.1.0" glob "^7.0.0" - lodash "^4.17.19" make-dir "^2.1.0" slash "^2.0.0" source-map "^0.5.0" optionalDependencies: - "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents" + "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.2" chokidar "^3.4.0" "@babel/code-frame@7.12.11": @@ -1410,15 +1409,15 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents": - version "2.1.8-no-fsevents" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.tgz#da7c3996b8e6e19ebd14d82eaced2313e7769f9b" - integrity sha512-+nb9vWloHNNMFHjGofEam3wopE3m1yuambrrd/fnPc+lFOMB9ROTqQlche9ByFWNkdNqfSgR/kkQtQ8DzEWt2w== +"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.2": + version "2.1.8-no-fsevents.2" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.2.tgz#e324c0a247a5567192dd7180647709d7e2faf94b" + integrity sha512-Fb8WxUFOBQVl+CX4MWet5o7eCc6Pj04rXIwVKZ6h1NnqTo45eOQW6aWyhG25NIODvWFwTDMwBsYxrQ3imxpetg== dependencies: anymatch "^2.0.0" async-each "^1.0.1" braces "^2.3.2" - glob-parent "^3.1.0" + glob-parent "^5.1.2" inherits "^2.0.3" is-binary-path "^1.0.0" is-glob "^4.0.0" @@ -1931,12 +1930,12 @@ babel-jest@^25.5.1: slash "^3.0.0" babel-loader@^8.1.0: - version "8.2.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" - integrity sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g== + version "8.2.5" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e" + integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== dependencies: find-cache-dir "^3.3.1" - loader-utils "^1.4.0" + loader-utils "^2.0.0" make-dir "^3.1.0" schema-utils "^2.6.5" @@ -3664,14 +3663,6 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - glob-parent@^5.0.0, glob-parent@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" @@ -4165,7 +4156,7 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= @@ -4185,13 +4176,6 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" @@ -4949,7 +4933,7 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -loader-utils@^1.0.2, loader-utils@^1.4.0: +loader-utils@^1.0.2: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -5606,11 +5590,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"