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 6961d072..85c7829f 100644 --- a/dist/package.json +++ b/dist/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", @@ -25,7 +25,7 @@ "test": "yarn run node && jest -i --config jest.config.js && sh test/scripts/clean.sh", "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", + "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 .", 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/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 index 840873f9..c9ecc729 100644 --- a/dist/src/modules/farm.d.ts +++ b/dist/src/modules/farm.d.ts @@ -29,4 +29,20 @@ export declare class Farm { * @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 index 130aac75..3d5e8a59 100644 --- a/dist/src/modules/farm.js +++ b/dist/src/modules/farm.js @@ -19,6 +19,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat 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); } @@ -159,6 +163,62 @@ var Farm = /*#__PURE__*/function () { 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; }(); 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/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 1e0fb749..e5d260e5 100644 --- a/dist/src/modules/protobuf.d.ts +++ b/dist/src/modules/protobuf.d.ts @@ -73,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} @@ -83,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 42b11d9f..94b85f6e 100644 --- a/dist/src/modules/protobuf.js +++ b/dist/src/modules/protobuf.js @@ -473,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) { @@ -487,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) { @@ -498,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 3e09236a..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(); } diff --git a/dist/src/types/abci-query.js b/dist/src/types/abci-query.js index 430afc16..9a390c31 100644 --- a/dist/src/types/abci-query.js +++ b/dist/src/types/abci-query.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file 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/block-result.js b/dist/src/types/block-result.js index 430afc16..9a390c31 100644 --- a/dist/src/types/block-result.js +++ b/dist/src/types/block-result.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/block.js b/dist/src/types/block.js index 430afc16..9a390c31 100644 --- a/dist/src/types/block.js +++ b/dist/src/types/block.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file 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.js b/dist/src/types/farm.js index ff96dcd9..99f2e3e1 100644 --- a/dist/src/types/farm.js +++ b/dist/src/types/farm.js @@ -63,7 +63,7 @@ var MsgStake = /*#__PURE__*/function (_Msg) { key: "getModel", value: function getModel() { var msg = new (this.constructor.getModelClass())(); - msg.setPoolName(this.value.pool_id); + 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; @@ -72,15 +72,15 @@ var MsgStake = /*#__PURE__*/function (_Msg) { key: "validate", value: function validate() { if (!this.value.pool_id) { - throw new _errors.SdkError("pool_id is empty"); + throw new _errors.SdkError("pool_id is empty"); } if (!this.value.amount) { - throw new _errors.SdkError("amount is empty"); + throw new _errors.SdkError("amount is empty"); } if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } } }], [{ @@ -119,7 +119,7 @@ var MsgUnstake = /*#__PURE__*/function (_Msg2) { key: "getModel", value: function getModel() { var msg = new (this.constructor.getModelClass())(); - msg.setPoolName(this.value.pool_id); + 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; @@ -128,15 +128,15 @@ var MsgUnstake = /*#__PURE__*/function (_Msg2) { key: "validate", value: function validate() { if (!this.value.pool_id) { - throw new _errors.SdkError("pool_id is empty"); + throw new _errors.SdkError("pool_id is empty"); } if (!this.value.amount) { - throw new _errors.SdkError("amount is empty"); + throw new _errors.SdkError("amount is empty"); } if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } } }], [{ @@ -174,7 +174,7 @@ var MsgHarvest = /*#__PURE__*/function (_Msg3) { key: "getModel", value: function getModel() { var msg = new (this.constructor.getModelClass())(); - msg.setPoolName(this.value.pool_id); + msg.setPoolId(this.value.pool_id); msg.setSender(this.value.sender); return msg; } @@ -182,11 +182,11 @@ var MsgHarvest = /*#__PURE__*/function (_Msg3) { key: "validate", value: function validate() { if (!this.value.pool_id) { - throw new _errors.SdkError("pool_id is empty"); + throw new _errors.SdkError("pool_id is empty"); } if (!this.value.sender) { - throw new _errors.SdkError("sender is empty"); + throw new _errors.SdkError("sender is empty"); } } }], [{ diff --git a/dist/src/types/gov.js b/dist/src/types/gov.js index b746b535..ee312fa8 100644 --- a/dist/src/types/gov.js +++ b/dist/src/types/gov.js @@ -291,10 +291,6 @@ var MsgDeposit = /*#__PURE__*/function (_Msg3) { exports.MsgDeposit = MsgDeposit; var ProposalType; -/** - * param struct for Text Proposal - */ - exports.ProposalType = ProposalType; (function (ProposalType) { 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/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/oracle.js b/dist/src/types/oracle.js index 430afc16..9a390c31 100644 --- a/dist/src/types/oracle.js +++ b/dist/src/types/oracle.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/params.js b/dist/src/types/params.js index 430afc16..9a390c31 100644 --- a/dist/src/types/params.js +++ b/dist/src/types/params.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file 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 8ae0316f..af4a5b04 100644 --- a/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js +++ b/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js @@ -748,7 +748,9 @@ 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) + fee: (f = msg.getFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + poolCreationFee: (f = msg.getPoolCreationFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + taxRate: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -790,6 +792,15 @@ proto.irismod.coinswap.Params.deserializeBinaryFromReader = function(msg, reader reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); 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.setTaxRate(value); + break; default: reader.skipField(); break; @@ -827,6 +838,21 @@ proto.irismod.coinswap.Params.serializeBinaryToWriter = function(message, writer cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } + 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( + 3, + f + ); + } }; @@ -867,4 +893,59 @@ proto.irismod.coinswap.Params.prototype.hasFee = function() { }; +/** + * 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.getTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.setTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + goog.object.extend(exports, proto.irismod.coinswap); diff --git a/dist/src/types/proto-types/irismod/farm/farm_pb.js b/dist/src/types/proto-types/irismod/farm/farm_pb.js index adb045e1..d0eb388d 100644 --- a/dist/src/types/proto-types/irismod/farm/farm_pb.js +++ b/dist/src/types/proto-types/irismod/farm/farm_pb.js @@ -16,6 +16,8 @@ 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); @@ -104,6 +106,48 @@ if (goog.DEBUG && !COMPILED) { */ 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. @@ -143,7 +187,7 @@ proto.irismod.farm.FarmPool.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.FarmPool.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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), @@ -191,7 +235,7 @@ proto.irismod.farm.FarmPool.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -256,7 +300,7 @@ proto.irismod.farm.FarmPool.prototype.serializeBinary = function() { */ proto.irismod.farm.FarmPool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -325,10 +369,10 @@ proto.irismod.farm.FarmPool.serializeBinaryToWriter = function(message, writer) /** - * optional string name = 1; + * optional string id = 1; * @return {string} */ -proto.irismod.farm.FarmPool.prototype.getName = function() { +proto.irismod.farm.FarmPool.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -337,7 +381,7 @@ proto.irismod.farm.FarmPool.prototype.getName = function() { * @param {string} value * @return {!proto.irismod.farm.FarmPool} returns this */ -proto.irismod.farm.FarmPool.prototype.setName = function(value) { +proto.irismod.farm.FarmPool.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -814,7 +858,7 @@ proto.irismod.farm.FarmInfo.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.FarmInfo.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), address: jspb.Message.getFieldWithDefault(msg, 2, ""), locked: jspb.Message.getFieldWithDefault(msg, 3, ""), rewardDebtList: jspb.Message.toObjectList(msg.getRewardDebtList(), @@ -857,7 +901,7 @@ proto.irismod.farm.FarmInfo.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -901,7 +945,7 @@ proto.irismod.farm.FarmInfo.prototype.serializeBinary = function() { */ proto.irismod.farm.FarmInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -934,10 +978,10 @@ proto.irismod.farm.FarmInfo.serializeBinaryToWriter = function(message, writer) /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.FarmInfo.prototype.getPoolName = function() { +proto.irismod.farm.FarmInfo.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -946,7 +990,7 @@ proto.irismod.farm.FarmInfo.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.FarmInfo} returns this */ -proto.irismod.farm.FarmInfo.prototype.setPoolName = function(value) { +proto.irismod.farm.FarmInfo.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1057,8 +1101,9 @@ proto.irismod.farm.Params.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.Params.toObject = function(includeInstance, msg) { var f, obj = { - createPoolFee: (f = msg.getCreatePoolFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - maxRewardCategories: jspb.Message.getFieldWithDefault(msg, 2, 0) + 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) { @@ -1098,12 +1143,16 @@ proto.irismod.farm.Params.deserializeBinaryFromReader = function(msg, reader) { case 1: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.setCreatePoolFee(value); + 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; @@ -1133,7 +1182,7 @@ proto.irismod.farm.Params.prototype.serializeBinary = function() { */ proto.irismod.farm.Params.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCreatePoolFee(); + f = message.getPoolCreationFee(); if (f != null) { writer.writeMessage( 1, @@ -1148,14 +1197,21 @@ proto.irismod.farm.Params.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getTaxRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional cosmos.base.v1beta1.Coin create_pool_fee = 1; + * optional cosmos.base.v1beta1.Coin pool_creation_fee = 1; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.farm.Params.prototype.getCreatePoolFee = function() { +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)); }; @@ -1165,7 +1221,7 @@ proto.irismod.farm.Params.prototype.getCreatePoolFee = function() { * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value * @return {!proto.irismod.farm.Params} returns this */ -proto.irismod.farm.Params.prototype.setCreatePoolFee = function(value) { +proto.irismod.farm.Params.prototype.setPoolCreationFee = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; @@ -1174,8 +1230,8 @@ proto.irismod.farm.Params.prototype.setCreatePoolFee = function(value) { * Clears the message field making it undefined. * @return {!proto.irismod.farm.Params} returns this */ -proto.irismod.farm.Params.prototype.clearCreatePoolFee = function() { - return this.setCreatePoolFee(undefined); +proto.irismod.farm.Params.prototype.clearPoolCreationFee = function() { + return this.setPoolCreationFee(undefined); }; @@ -1183,7 +1239,7 @@ proto.irismod.farm.Params.prototype.clearCreatePoolFee = function() { * Returns whether this field is set. * @return {boolean} */ -proto.irismod.farm.Params.prototype.hasCreatePoolFee = function() { +proto.irismod.farm.Params.prototype.hasPoolCreationFee = function() { return jspb.Message.getField(this, 1) != null; }; @@ -1206,4 +1262,681 @@ proto.irismod.farm.Params.prototype.setMaxRewardCategories = function(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 index cf4e6054..e820e9bd 100644 --- a/dist/src/types/proto-types/irismod/farm/genesis_pb.js +++ b/dist/src/types/proto-types/irismod/farm/genesis_pb.js @@ -44,7 +44,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.irismod.farm.GenesisState.repeatedFields_ = [2,3]; +proto.irismod.farm.GenesisState.repeatedFields_ = [2,3,5]; @@ -81,7 +81,10 @@ proto.irismod.farm.GenesisState.toObject = function(includeInstance, msg) { 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) + 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) { @@ -133,6 +136,15 @@ proto.irismod.farm.GenesisState.deserializeBinaryFromReader = function(msg, read 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; @@ -186,6 +198,21 @@ proto.irismod.farm.GenesisState.serializeBinaryToWriter = function(message, writ 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 + ); + } }; @@ -302,4 +329,60 @@ proto.irismod.farm.GenesisState.prototype.clearFarmInfosList = function() { }; +/** + * 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_pb.js b/dist/src/types/proto-types/irismod/farm/query_pb.js index ea5c262a..91e7eb33 100644 --- a/dist/src/types/proto-types/irismod/farm/query_pb.js +++ b/dist/src/types/proto-types/irismod/farm/query_pb.js @@ -432,7 +432,7 @@ proto.irismod.farm.FarmPoolEntry.prototype.toObject = function(opt_includeInstan */ proto.irismod.farm.FarmPoolEntry.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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), @@ -484,7 +484,7 @@ proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -559,7 +559,7 @@ proto.irismod.farm.FarmPoolEntry.prototype.serializeBinary = function() { */ proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -644,10 +644,10 @@ proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter = function(message, wri /** - * optional string name = 1; + * optional string id = 1; * @return {string} */ -proto.irismod.farm.FarmPoolEntry.prototype.getName = function() { +proto.irismod.farm.FarmPoolEntry.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -656,7 +656,7 @@ proto.irismod.farm.FarmPoolEntry.prototype.getName = function() { * @param {string} value * @return {!proto.irismod.farm.FarmPoolEntry} returns this */ -proto.irismod.farm.FarmPoolEntry.prototype.setName = function(value) { +proto.irismod.farm.FarmPoolEntry.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1163,7 +1163,7 @@ proto.irismod.farm.QueryFarmPoolRequest.prototype.toObject = function(opt_includ */ proto.irismod.farm.QueryFarmPoolRequest.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1202,7 +1202,7 @@ proto.irismod.farm.QueryFarmPoolRequest.deserializeBinaryFromReader = function(m switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setId(value); break; default: reader.skipField(); @@ -1233,7 +1233,7 @@ proto.irismod.farm.QueryFarmPoolRequest.prototype.serializeBinary = function() { */ proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -1244,10 +1244,10 @@ proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter = function(messa /** - * optional string name = 1; + * optional string id = 1; * @return {string} */ -proto.irismod.farm.QueryFarmPoolRequest.prototype.getName = function() { +proto.irismod.farm.QueryFarmPoolRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1256,7 +1256,7 @@ proto.irismod.farm.QueryFarmPoolRequest.prototype.getName = function() { * @param {string} value * @return {!proto.irismod.farm.QueryFarmPoolRequest} returns this */ -proto.irismod.farm.QueryFarmPoolRequest.prototype.setName = function(value) { +proto.irismod.farm.QueryFarmPoolRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1445,7 +1445,7 @@ proto.irismod.farm.QueryFarmerRequest.prototype.toObject = function(opt_includeI proto.irismod.farm.QueryFarmerRequest.toObject = function(includeInstance, msg) { var f, obj = { farmer: jspb.Message.getFieldWithDefault(msg, 1, ""), - poolName: jspb.Message.getFieldWithDefault(msg, 2, "") + poolId: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -1488,7 +1488,7 @@ proto.irismod.farm.QueryFarmerRequest.deserializeBinaryFromReader = function(msg break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; default: reader.skipField(); @@ -1526,7 +1526,7 @@ proto.irismod.farm.QueryFarmerRequest.serializeBinaryToWriter = function(message f ); } - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 2, @@ -1555,10 +1555,10 @@ proto.irismod.farm.QueryFarmerRequest.prototype.setFarmer = function(value) { /** - * optional string pool_name = 2; + * optional string pool_id = 2; * @return {string} */ -proto.irismod.farm.QueryFarmerRequest.prototype.getPoolName = function() { +proto.irismod.farm.QueryFarmerRequest.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -1567,7 +1567,7 @@ proto.irismod.farm.QueryFarmerRequest.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.QueryFarmerRequest} returns this */ -proto.irismod.farm.QueryFarmerRequest.prototype.setPoolName = function(value) { +proto.irismod.farm.QueryFarmerRequest.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2053,7 +2053,7 @@ proto.irismod.farm.LockedInfo.prototype.toObject = function(opt_includeInstance) */ proto.irismod.farm.LockedInfo.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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) @@ -2095,7 +2095,7 @@ proto.irismod.farm.LockedInfo.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -2136,7 +2136,7 @@ proto.irismod.farm.LockedInfo.prototype.serializeBinary = function() { */ proto.irismod.farm.LockedInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -2163,10 +2163,10 @@ proto.irismod.farm.LockedInfo.serializeBinaryToWriter = function(message, writer /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.LockedInfo.prototype.getPoolName = function() { +proto.irismod.farm.LockedInfo.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -2175,7 +2175,7 @@ proto.irismod.farm.LockedInfo.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.LockedInfo} returns this */ -proto.irismod.farm.LockedInfo.prototype.setPoolName = function(value) { +proto.irismod.farm.LockedInfo.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; 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 index c29bd98f..76305031 100644 --- 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 @@ -19,6 +19,8 @@ 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'); @@ -155,6 +157,86 @@ proto.irismod.farm.MsgPromiseClient.prototype.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< diff --git a/dist/src/types/proto-types/irismod/farm/tx_pb.js b/dist/src/types/proto-types/irismod/farm/tx_pb.js index a6b01ef7..2a4c4cc6 100644 --- a/dist/src/types/proto-types/irismod/farm/tx_pb.js +++ b/dist/src/types/proto-types/irismod/farm/tx_pb.js @@ -16,10 +16,14 @@ 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); @@ -49,6 +53,27 @@ if (goog.DEBUG && !COMPILED) { */ 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 @@ -175,6 +200,27 @@ if (goog.DEBUG && !COMPILED) { */ 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 @@ -286,7 +332,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.irismod.farm.MsgCreatePool.repeatedFields_ = [5,6]; +proto.irismod.farm.MsgCreatePool.repeatedFields_ = [4,5]; @@ -319,16 +365,15 @@ proto.irismod.farm.MsgCreatePool.prototype.toObject = function(opt_includeInstan */ proto.irismod.farm.MsgCreatePool.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - description: jspb.Message.getFieldWithDefault(msg, 2, ""), - lptDenom: jspb.Message.getFieldWithDefault(msg, 3, ""), - startHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + 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, 7, false), - creator: jspb.Message.getFieldWithDefault(msg, 8, "") + editable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + creator: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -366,36 +411,32 @@ proto.irismod.farm.MsgCreatePool.deserializeBinaryFromReader = function(msg, rea 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.setDescription(value); break; - case 3: + case 2: var value = /** @type {string} */ (reader.readString()); msg.setLptDenom(value); break; - case 4: + case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setStartHeight(value); break; - case 5: + 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 6: + 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 7: + case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setEditable(value); break; - case 8: + case 7: var value = /** @type {string} */ (reader.readString()); msg.setCreator(value); break; @@ -428,38 +469,31 @@ proto.irismod.farm.MsgCreatePool.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } f = message.getDescription(); if (f.length > 0) { writer.writeString( - 2, + 1, f ); } f = message.getLptDenom(); if (f.length > 0) { writer.writeString( - 3, + 2, f ); } f = message.getStartHeight(); if (f !== 0) { writer.writeInt64( - 4, + 3, f ); } f = message.getRewardPerBlockList(); if (f.length > 0) { writer.writeRepeatedMessage( - 5, + 4, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -467,7 +501,7 @@ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, wri f = message.getTotalRewardList(); if (f.length > 0) { writer.writeRepeatedMessage( - 6, + 5, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -475,14 +509,14 @@ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, wri f = message.getEditable(); if (f) { writer.writeBool( - 7, + 6, f ); } f = message.getCreator(); if (f.length > 0) { writer.writeString( - 8, + 7, f ); } @@ -490,29 +524,11 @@ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, wri /** - * optional string name = 1; - * @return {string} - */ -proto.irismod.farm.MsgCreatePool.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.irismod.farm.MsgCreatePool} returns this - */ -proto.irismod.farm.MsgCreatePool.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string description = 2; + * optional string description = 1; * @return {string} */ proto.irismod.farm.MsgCreatePool.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -521,16 +537,16 @@ proto.irismod.farm.MsgCreatePool.prototype.getDescription = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string lpt_denom = 3; + * optional string lpt_denom = 2; * @return {string} */ proto.irismod.farm.MsgCreatePool.prototype.getLptDenom = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -539,16 +555,16 @@ proto.irismod.farm.MsgCreatePool.prototype.getLptDenom = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setLptDenom = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 start_height = 4; + * optional int64 start_height = 3; * @return {number} */ proto.irismod.farm.MsgCreatePool.prototype.getStartHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; @@ -557,17 +573,17 @@ proto.irismod.farm.MsgCreatePool.prototype.getStartHeight = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setStartHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * repeated cosmos.base.v1beta1.Coin reward_per_block = 5; + * 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, 5)); + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); }; @@ -576,7 +592,7 @@ proto.irismod.farm.MsgCreatePool.prototype.getRewardPerBlockList = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setRewardPerBlockList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -586,7 +602,7 @@ proto.irismod.farm.MsgCreatePool.prototype.setRewardPerBlockList = function(valu * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.irismod.farm.MsgCreatePool.prototype.addRewardPerBlock = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; @@ -600,12 +616,12 @@ proto.irismod.farm.MsgCreatePool.prototype.clearRewardPerBlockList = function() /** - * repeated cosmos.base.v1beta1.Coin total_reward = 6; + * 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, 6)); + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); }; @@ -614,7 +630,7 @@ proto.irismod.farm.MsgCreatePool.prototype.getTotalRewardList = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setTotalRewardList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -624,7 +640,7 @@ proto.irismod.farm.MsgCreatePool.prototype.setTotalRewardList = function(value) * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.irismod.farm.MsgCreatePool.prototype.addTotalReward = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; @@ -638,11 +654,11 @@ proto.irismod.farm.MsgCreatePool.prototype.clearTotalRewardList = function() { /** - * optional bool editable = 7; + * optional bool editable = 6; * @return {boolean} */ proto.irismod.farm.MsgCreatePool.prototype.getEditable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; @@ -651,16 +667,16 @@ proto.irismod.farm.MsgCreatePool.prototype.getEditable = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setEditable = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional string creator = 8; + * optional string creator = 7; * @return {string} */ proto.irismod.farm.MsgCreatePool.prototype.getCreator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -669,7 +685,248 @@ proto.irismod.farm.MsgCreatePool.prototype.getCreator = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setCreator = function(value) { - return jspb.Message.setProto3StringField(this, 8, 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); }; @@ -705,7 +962,7 @@ proto.irismod.farm.MsgDestroyPool.prototype.toObject = function(opt_includeInsta */ proto.irismod.farm.MsgDestroyPool.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), creator: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -745,7 +1002,7 @@ proto.irismod.farm.MsgDestroyPool.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -780,7 +1037,7 @@ proto.irismod.farm.MsgDestroyPool.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -798,10 +1055,10 @@ proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter = function(message, wr /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgDestroyPool.prototype.getPoolName = function() { +proto.irismod.farm.MsgDestroyPool.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -810,7 +1067,7 @@ proto.irismod.farm.MsgDestroyPool.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgDestroyPool} returns this */ -proto.irismod.farm.MsgDestroyPool.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgDestroyPool.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -872,7 +1129,7 @@ proto.irismod.farm.MsgAdjustPool.prototype.toObject = function(opt_includeInstan */ proto.irismod.farm.MsgAdjustPool.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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(), @@ -916,7 +1173,7 @@ proto.irismod.farm.MsgAdjustPool.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -961,7 +1218,7 @@ proto.irismod.farm.MsgAdjustPool.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -995,10 +1252,10 @@ proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter = function(message, wri /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgAdjustPool.prototype.getPoolName = function() { +proto.irismod.farm.MsgAdjustPool.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1007,7 +1264,7 @@ proto.irismod.farm.MsgAdjustPool.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgAdjustPool} returns this */ -proto.irismod.farm.MsgAdjustPool.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgAdjustPool.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1138,7 +1395,7 @@ proto.irismod.farm.MsgStake.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.MsgStake.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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, "") }; @@ -1179,7 +1436,7 @@ proto.irismod.farm.MsgStake.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -1219,7 +1476,7 @@ proto.irismod.farm.MsgStake.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgStake.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -1245,10 +1502,10 @@ proto.irismod.farm.MsgStake.serializeBinaryToWriter = function(message, writer) /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgStake.prototype.getPoolName = function() { +proto.irismod.farm.MsgStake.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1257,7 +1514,7 @@ proto.irismod.farm.MsgStake.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgStake} returns this */ -proto.irismod.farm.MsgStake.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgStake.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1349,7 +1606,7 @@ proto.irismod.farm.MsgUnstake.prototype.toObject = function(opt_includeInstance) */ proto.irismod.farm.MsgUnstake.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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, "") }; @@ -1390,7 +1647,7 @@ proto.irismod.farm.MsgUnstake.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -1430,7 +1687,7 @@ proto.irismod.farm.MsgUnstake.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgUnstake.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -1456,10 +1713,10 @@ proto.irismod.farm.MsgUnstake.serializeBinaryToWriter = function(message, writer /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgUnstake.prototype.getPoolName = function() { +proto.irismod.farm.MsgUnstake.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1468,7 +1725,7 @@ proto.irismod.farm.MsgUnstake.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgUnstake} returns this */ -proto.irismod.farm.MsgUnstake.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgUnstake.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1560,7 +1817,7 @@ proto.irismod.farm.MsgHarvest.prototype.toObject = function(opt_includeInstance) */ proto.irismod.farm.MsgHarvest.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), sender: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -1600,7 +1857,7 @@ proto.irismod.farm.MsgHarvest.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -1635,7 +1892,7 @@ proto.irismod.farm.MsgHarvest.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgHarvest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -1653,10 +1910,10 @@ proto.irismod.farm.MsgHarvest.serializeBinaryToWriter = function(message, writer /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgHarvest.prototype.getPoolName = function() { +proto.irismod.farm.MsgHarvest.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1665,7 +1922,7 @@ proto.irismod.farm.MsgHarvest.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgHarvest} returns this */ -proto.irismod.farm.MsgHarvest.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgHarvest.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1792,6 +2049,107 @@ proto.irismod.farm.MsgCreatePoolResponse.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.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. 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 6ab674f3..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); +}; + + @@ -412,7 +442,11 @@ proto.irismod.nft.Denom.toObject = function(includeInstance, msg) { 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) + 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) { @@ -477,6 +511,22 @@ proto.irismod.nft.Denom.deserializeBinaryFromReader = function(msg, reader) { 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; @@ -555,6 +605,34 @@ proto.irismod.nft.Denom.serializeBinaryToWriter = function(message, writer) { 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 + ); + } }; @@ -684,6 +762,78 @@ proto.irismod.nft.Denom.prototype.setUpdateRestricted = function(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/tx_pb.js b/dist/src/types/proto-types/irismod/nft/tx_pb.js index 5102d01a..d0027c71 100644 --- a/dist/src/types/proto-types/irismod/nft/tx_pb.js +++ b/dist/src/types/proto-types/irismod/nft/tx_pb.js @@ -316,7 +316,11 @@ proto.irismod.nft.MsgIssueDenom.toObject = function(includeInstance, msg) { 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) + 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) { @@ -381,6 +385,22 @@ proto.irismod.nft.MsgIssueDenom.deserializeBinaryFromReader = function(msg, read 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; @@ -459,6 +479,34 @@ proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter = function(message, writ 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 + ); + } }; @@ -588,6 +636,78 @@ proto.irismod.nft.MsgIssueDenom.prototype.setUpdateRestricted = function(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); +}; + + @@ -727,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) { @@ -792,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; @@ -870,6 +995,13 @@ proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter = function(message, wri f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -999,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); +}; + + @@ -1137,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) { @@ -1198,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; @@ -1269,6 +1424,13 @@ proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } }; @@ -1380,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); +}; + + @@ -1519,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) { @@ -1584,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; @@ -1662,6 +1847,13 @@ proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -1791,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); +}; + + diff --git a/dist/src/types/proto.d.ts b/dist/src/types/proto.d.ts index 99a0099a..08d49494 100644 --- a/dist/src/types/proto.d.ts +++ b/dist/src/types/proto.d.ts @@ -38,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; @@ -57,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 b70be42e..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.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; +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 @@ -162,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; @@ -178,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; @@ -246,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/tx.js b/dist/src/types/tx.js index 430afc16..9a390c31 100644 --- a/dist/src/types/tx.js +++ b/dist/src/types/tx.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/types.d.ts b/dist/src/types/types.d.ts index f95fd8d5..04d7157d 100644 --- a/dist/src/types/types.d.ts +++ b/dist/src/types/types.d.ts @@ -120,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/validator.js b/dist/src/types/validator.js index 430afc16..9a390c31 100644 --- a/dist/src/types/validator.js +++ b/dist/src/types/validator.js @@ -1,5 +1 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/package.json b/package.json index a17011a2..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", 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 b4e5c493..76768630 100644 --- a/proto/irismod/coinswap/coinswap.proto +++ b/proto/irismod/coinswap/coinswap.proto @@ -40,4 +40,13 @@ message Params { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; + + cosmos.base.v1beta1.Coin pool_creation_fee = 2 [ + (gogoproto.nullable) = false + ]; + + string tax_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/proto/irismod/farm/farm.proto b/proto/irismod/farm/farm.proto index df3305f5..2c5e9052 100644 --- a/proto/irismod/farm/farm.proto +++ b/proto/irismod/farm/farm.proto @@ -10,7 +10,7 @@ option (gogoproto.goproto_getters_all) = false; message FarmPool { option (gogoproto.equal) = true; - string name = 1; + string id = 1; string creator = 2; string description = 3; int64 start_height = 4; @@ -49,7 +49,7 @@ message RewardRule { message FarmInfo { option (gogoproto.equal) = true; - string pool_name = 1; + string pool_id = 1; string address = 2; string locked = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", @@ -62,9 +62,37 @@ message FarmInfo { } message Params { - cosmos.base.v1beta1.Coin create_pool_fee = 1 [ + 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 index d14b0316..656b0a9f 100644 --- a/proto/irismod/farm/genesis.proto +++ b/proto/irismod/farm/genesis.proto @@ -10,4 +10,6 @@ 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 index f095fafd..0c871fa2 100644 --- a/proto/irismod/farm/query.proto +++ b/proto/irismod/farm/query.proto @@ -15,7 +15,7 @@ service Query { } rpc FarmPool(QueryFarmPoolRequest) returns (QueryFarmPoolResponse) { - option (google.api.http).get = "/irismod/farm/pool/{name}"; + option (google.api.http).get = "/irismod/farm/pool/{id}"; } rpc Farmer(QueryFarmerRequest) returns (QueryFarmerResponse) { @@ -33,7 +33,7 @@ message QueryFarmPoolsRequest { } message FarmPoolEntry { - string name = 1; + string id = 1; string creator = 2; string description = 3; int64 start_height = 4; @@ -63,12 +63,12 @@ message QueryFarmPoolsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryFarmPoolRequest { string name = 1; } +message QueryFarmPoolRequest { string id = 1; } message QueryFarmPoolResponse { FarmPoolEntry pool = 1; } message QueryFarmerRequest { string farmer = 1; - string pool_name = 2; + string pool_id = 2; } message QueryFarmerResponse { @@ -83,7 +83,7 @@ message QueryParamsResponse { } message LockedInfo { - string pool_name = 1; + string pool_id = 1; cosmos.base.v1beta1.Coin locked = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.nullable) = false diff --git a/proto/irismod/farm/tx.proto b/proto/irismod/farm/tx.proto index 65b0ccb8..c106cd54 100644 --- a/proto/irismod/farm/tx.proto +++ b/proto/irismod/farm/tx.proto @@ -3,6 +3,7 @@ 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; @@ -12,6 +13,9 @@ 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); @@ -32,33 +36,44 @@ service Msg { message MsgCreatePool { option (gogoproto.equal) = true; - string name = 1; - string description = 2; - string lpt_denom = 3; - int64 start_height = 4; - repeated cosmos.base.v1beta1.Coin reward_per_block = 5 [ + 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 = 6 [ + repeated cosmos.base.v1beta1.Coin total_reward = 5 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false ]; - bool editable = 7; - string creator = 8; + 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_name = 1; + string pool_id = 1; string creator = 2; } message MsgAdjustPool { option (gogoproto.equal) = true; - string pool_name = 1; + string pool_id = 1; repeated cosmos.base.v1beta1.Coin additional_reward = 2 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false @@ -73,7 +88,7 @@ message MsgAdjustPool { message MsgStake { option (gogoproto.equal) = true; - string pool_name = 1; + string pool_id = 1; cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.nullable) = false @@ -84,7 +99,7 @@ message MsgStake { message MsgUnstake { option (gogoproto.equal) = true; - string pool_name = 1; + string pool_id = 1; cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.nullable) = false @@ -95,11 +110,12 @@ message MsgUnstake { message MsgHarvest { option (gogoproto.equal) = true; - string pool_name = 1; + string pool_id = 1; string sender = 2; } message MsgCreatePoolResponse {} +message MsgCreatePoolWithCommunityPoolResponse {} message MsgDestroyPoolResponse {} message MsgAdjustPoolResponse {} message MsgStakeResponse { 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/nft.proto b/proto/irismod/nft/nft.proto index d16f0e51..982900cf 100644 --- a/proto/irismod/nft/nft.proto +++ b/proto/irismod/nft/nft.proto @@ -15,6 +15,7 @@ message BaseNFT { string uri = 3 [ (gogoproto.customname) = "URI" ]; string data = 4; string owner = 5; + string uri_hash = 6; } // Denom defines a type of NFT @@ -28,6 +29,10 @@ message Denom { 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 diff --git a/proto/irismod/nft/tx.proto b/proto/irismod/nft/tx.proto index b6d3364c..d2d8f5b5 100644 --- a/proto/irismod/nft/tx.proto +++ b/proto/irismod/nft/tx.proto @@ -38,6 +38,10 @@ message MsgIssueDenom { 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. @@ -54,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. @@ -69,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. @@ -85,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. 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/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/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 index bbb38195..6271e62b 100644 --- a/src/modules/farm.ts +++ b/src/modules/farm.ts @@ -1,4 +1,6 @@ import {Client} from "../client"; +import { SdkError } from "../errors"; +import { ModelCreator } from "../helper"; import * as types from '../types'; import {BaseTx} from "../types"; @@ -82,4 +84,68 @@ export class Farm { ] 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/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 c094a13e..31611218 100644 --- a/src/modules/protobuf.ts +++ b/src/modules/protobuf.ts @@ -332,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} @@ -347,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 2eebd8d8..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()) { 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 index 1abffc7e..ee678faa 100644 --- a/src/types/farm.ts +++ b/src/types/farm.ts @@ -32,7 +32,7 @@ export class MsgStake extends Msg { getModel(): any { let msg = new ((this.constructor as any).getModelClass())(); - msg.setPoolName(this.value.pool_id); + 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; @@ -40,13 +40,13 @@ export class MsgStake extends Msg { validate() { if (!this.value.pool_id) { - throw new SdkError("pool_id is empty"); + throw new SdkError("pool_id is empty"); } if (!this.value.amount) { - throw new SdkError("amount is empty"); + throw new SdkError("amount is empty"); } if (!this.value.sender) { - throw new SdkError("sender is empty"); + throw new SdkError("sender is empty"); } } } @@ -71,7 +71,7 @@ export class MsgUnstake extends Msg { getModel(): any { let msg = new ((this.constructor as any).getModelClass())(); - msg.setPoolName(this.value.pool_id); + 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; @@ -79,13 +79,13 @@ export class MsgUnstake extends Msg { validate() { if (!this.value.pool_id) { - throw new SdkError("pool_id is empty"); + throw new SdkError("pool_id is empty"); } if (!this.value.amount) { - throw new SdkError("amount is empty"); + throw new SdkError("amount is empty"); } if (!this.value.sender) { - throw new SdkError("sender is empty"); + throw new SdkError("sender is empty"); } } } @@ -115,17 +115,17 @@ export class MsgHarvest extends Msg { getModel(): any { let msg = new ((this.constructor as any).getModelClass())(); - msg.setPoolName(this.value.pool_id); + 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"); + throw new SdkError("pool_id is empty"); } if (!this.value.sender) { - throw new SdkError("sender is empty"); + 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/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 8ae0316f..af4a5b04 100644 --- a/src/types/proto-types/irismod/coinswap/coinswap_pb.js +++ b/src/types/proto-types/irismod/coinswap/coinswap_pb.js @@ -748,7 +748,9 @@ 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) + fee: (f = msg.getFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + poolCreationFee: (f = msg.getPoolCreationFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + taxRate: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -790,6 +792,15 @@ proto.irismod.coinswap.Params.deserializeBinaryFromReader = function(msg, reader reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); 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.setTaxRate(value); + break; default: reader.skipField(); break; @@ -827,6 +838,21 @@ proto.irismod.coinswap.Params.serializeBinaryToWriter = function(message, writer cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } + 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( + 3, + f + ); + } }; @@ -867,4 +893,59 @@ proto.irismod.coinswap.Params.prototype.hasFee = function() { }; +/** + * 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.getTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.setTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + goog.object.extend(exports, proto.irismod.coinswap); diff --git a/src/types/proto-types/irismod/farm/farm_pb.js b/src/types/proto-types/irismod/farm/farm_pb.js index adb045e1..d0eb388d 100644 --- a/src/types/proto-types/irismod/farm/farm_pb.js +++ b/src/types/proto-types/irismod/farm/farm_pb.js @@ -16,6 +16,8 @@ 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); @@ -104,6 +106,48 @@ if (goog.DEBUG && !COMPILED) { */ 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. @@ -143,7 +187,7 @@ proto.irismod.farm.FarmPool.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.FarmPool.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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), @@ -191,7 +235,7 @@ proto.irismod.farm.FarmPool.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -256,7 +300,7 @@ proto.irismod.farm.FarmPool.prototype.serializeBinary = function() { */ proto.irismod.farm.FarmPool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -325,10 +369,10 @@ proto.irismod.farm.FarmPool.serializeBinaryToWriter = function(message, writer) /** - * optional string name = 1; + * optional string id = 1; * @return {string} */ -proto.irismod.farm.FarmPool.prototype.getName = function() { +proto.irismod.farm.FarmPool.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -337,7 +381,7 @@ proto.irismod.farm.FarmPool.prototype.getName = function() { * @param {string} value * @return {!proto.irismod.farm.FarmPool} returns this */ -proto.irismod.farm.FarmPool.prototype.setName = function(value) { +proto.irismod.farm.FarmPool.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -814,7 +858,7 @@ proto.irismod.farm.FarmInfo.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.FarmInfo.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), address: jspb.Message.getFieldWithDefault(msg, 2, ""), locked: jspb.Message.getFieldWithDefault(msg, 3, ""), rewardDebtList: jspb.Message.toObjectList(msg.getRewardDebtList(), @@ -857,7 +901,7 @@ proto.irismod.farm.FarmInfo.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -901,7 +945,7 @@ proto.irismod.farm.FarmInfo.prototype.serializeBinary = function() { */ proto.irismod.farm.FarmInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -934,10 +978,10 @@ proto.irismod.farm.FarmInfo.serializeBinaryToWriter = function(message, writer) /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.FarmInfo.prototype.getPoolName = function() { +proto.irismod.farm.FarmInfo.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -946,7 +990,7 @@ proto.irismod.farm.FarmInfo.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.FarmInfo} returns this */ -proto.irismod.farm.FarmInfo.prototype.setPoolName = function(value) { +proto.irismod.farm.FarmInfo.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1057,8 +1101,9 @@ proto.irismod.farm.Params.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.Params.toObject = function(includeInstance, msg) { var f, obj = { - createPoolFee: (f = msg.getCreatePoolFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), - maxRewardCategories: jspb.Message.getFieldWithDefault(msg, 2, 0) + 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) { @@ -1098,12 +1143,16 @@ proto.irismod.farm.Params.deserializeBinaryFromReader = function(msg, reader) { case 1: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.setCreatePoolFee(value); + 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; @@ -1133,7 +1182,7 @@ proto.irismod.farm.Params.prototype.serializeBinary = function() { */ proto.irismod.farm.Params.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCreatePoolFee(); + f = message.getPoolCreationFee(); if (f != null) { writer.writeMessage( 1, @@ -1148,14 +1197,21 @@ proto.irismod.farm.Params.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getTaxRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional cosmos.base.v1beta1.Coin create_pool_fee = 1; + * optional cosmos.base.v1beta1.Coin pool_creation_fee = 1; * @return {?proto.cosmos.base.v1beta1.Coin} */ -proto.irismod.farm.Params.prototype.getCreatePoolFee = function() { +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)); }; @@ -1165,7 +1221,7 @@ proto.irismod.farm.Params.prototype.getCreatePoolFee = function() { * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value * @return {!proto.irismod.farm.Params} returns this */ -proto.irismod.farm.Params.prototype.setCreatePoolFee = function(value) { +proto.irismod.farm.Params.prototype.setPoolCreationFee = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; @@ -1174,8 +1230,8 @@ proto.irismod.farm.Params.prototype.setCreatePoolFee = function(value) { * Clears the message field making it undefined. * @return {!proto.irismod.farm.Params} returns this */ -proto.irismod.farm.Params.prototype.clearCreatePoolFee = function() { - return this.setCreatePoolFee(undefined); +proto.irismod.farm.Params.prototype.clearPoolCreationFee = function() { + return this.setPoolCreationFee(undefined); }; @@ -1183,7 +1239,7 @@ proto.irismod.farm.Params.prototype.clearCreatePoolFee = function() { * Returns whether this field is set. * @return {boolean} */ -proto.irismod.farm.Params.prototype.hasCreatePoolFee = function() { +proto.irismod.farm.Params.prototype.hasPoolCreationFee = function() { return jspb.Message.getField(this, 1) != null; }; @@ -1206,4 +1262,681 @@ proto.irismod.farm.Params.prototype.setMaxRewardCategories = function(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 index cf4e6054..e820e9bd 100644 --- a/src/types/proto-types/irismod/farm/genesis_pb.js +++ b/src/types/proto-types/irismod/farm/genesis_pb.js @@ -44,7 +44,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.irismod.farm.GenesisState.repeatedFields_ = [2,3]; +proto.irismod.farm.GenesisState.repeatedFields_ = [2,3,5]; @@ -81,7 +81,10 @@ proto.irismod.farm.GenesisState.toObject = function(includeInstance, msg) { 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) + 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) { @@ -133,6 +136,15 @@ proto.irismod.farm.GenesisState.deserializeBinaryFromReader = function(msg, read 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; @@ -186,6 +198,21 @@ proto.irismod.farm.GenesisState.serializeBinaryToWriter = function(message, writ 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 + ); + } }; @@ -302,4 +329,60 @@ proto.irismod.farm.GenesisState.prototype.clearFarmInfosList = function() { }; +/** + * 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_pb.js b/src/types/proto-types/irismod/farm/query_pb.js index ea5c262a..91e7eb33 100644 --- a/src/types/proto-types/irismod/farm/query_pb.js +++ b/src/types/proto-types/irismod/farm/query_pb.js @@ -432,7 +432,7 @@ proto.irismod.farm.FarmPoolEntry.prototype.toObject = function(opt_includeInstan */ proto.irismod.farm.FarmPoolEntry.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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), @@ -484,7 +484,7 @@ proto.irismod.farm.FarmPoolEntry.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -559,7 +559,7 @@ proto.irismod.farm.FarmPoolEntry.prototype.serializeBinary = function() { */ proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -644,10 +644,10 @@ proto.irismod.farm.FarmPoolEntry.serializeBinaryToWriter = function(message, wri /** - * optional string name = 1; + * optional string id = 1; * @return {string} */ -proto.irismod.farm.FarmPoolEntry.prototype.getName = function() { +proto.irismod.farm.FarmPoolEntry.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -656,7 +656,7 @@ proto.irismod.farm.FarmPoolEntry.prototype.getName = function() { * @param {string} value * @return {!proto.irismod.farm.FarmPoolEntry} returns this */ -proto.irismod.farm.FarmPoolEntry.prototype.setName = function(value) { +proto.irismod.farm.FarmPoolEntry.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1163,7 +1163,7 @@ proto.irismod.farm.QueryFarmPoolRequest.prototype.toObject = function(opt_includ */ proto.irismod.farm.QueryFarmPoolRequest.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1202,7 +1202,7 @@ proto.irismod.farm.QueryFarmPoolRequest.deserializeBinaryFromReader = function(m switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setId(value); break; default: reader.skipField(); @@ -1233,7 +1233,7 @@ proto.irismod.farm.QueryFarmPoolRequest.prototype.serializeBinary = function() { */ proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -1244,10 +1244,10 @@ proto.irismod.farm.QueryFarmPoolRequest.serializeBinaryToWriter = function(messa /** - * optional string name = 1; + * optional string id = 1; * @return {string} */ -proto.irismod.farm.QueryFarmPoolRequest.prototype.getName = function() { +proto.irismod.farm.QueryFarmPoolRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1256,7 +1256,7 @@ proto.irismod.farm.QueryFarmPoolRequest.prototype.getName = function() { * @param {string} value * @return {!proto.irismod.farm.QueryFarmPoolRequest} returns this */ -proto.irismod.farm.QueryFarmPoolRequest.prototype.setName = function(value) { +proto.irismod.farm.QueryFarmPoolRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1445,7 +1445,7 @@ proto.irismod.farm.QueryFarmerRequest.prototype.toObject = function(opt_includeI proto.irismod.farm.QueryFarmerRequest.toObject = function(includeInstance, msg) { var f, obj = { farmer: jspb.Message.getFieldWithDefault(msg, 1, ""), - poolName: jspb.Message.getFieldWithDefault(msg, 2, "") + poolId: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -1488,7 +1488,7 @@ proto.irismod.farm.QueryFarmerRequest.deserializeBinaryFromReader = function(msg break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; default: reader.skipField(); @@ -1526,7 +1526,7 @@ proto.irismod.farm.QueryFarmerRequest.serializeBinaryToWriter = function(message f ); } - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 2, @@ -1555,10 +1555,10 @@ proto.irismod.farm.QueryFarmerRequest.prototype.setFarmer = function(value) { /** - * optional string pool_name = 2; + * optional string pool_id = 2; * @return {string} */ -proto.irismod.farm.QueryFarmerRequest.prototype.getPoolName = function() { +proto.irismod.farm.QueryFarmerRequest.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -1567,7 +1567,7 @@ proto.irismod.farm.QueryFarmerRequest.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.QueryFarmerRequest} returns this */ -proto.irismod.farm.QueryFarmerRequest.prototype.setPoolName = function(value) { +proto.irismod.farm.QueryFarmerRequest.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2053,7 +2053,7 @@ proto.irismod.farm.LockedInfo.prototype.toObject = function(opt_includeInstance) */ proto.irismod.farm.LockedInfo.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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) @@ -2095,7 +2095,7 @@ proto.irismod.farm.LockedInfo.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -2136,7 +2136,7 @@ proto.irismod.farm.LockedInfo.prototype.serializeBinary = function() { */ proto.irismod.farm.LockedInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -2163,10 +2163,10 @@ proto.irismod.farm.LockedInfo.serializeBinaryToWriter = function(message, writer /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.LockedInfo.prototype.getPoolName = function() { +proto.irismod.farm.LockedInfo.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -2175,7 +2175,7 @@ proto.irismod.farm.LockedInfo.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.LockedInfo} returns this */ -proto.irismod.farm.LockedInfo.prototype.setPoolName = function(value) { +proto.irismod.farm.LockedInfo.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; 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 index c29bd98f..76305031 100644 --- a/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js +++ b/src/types/proto-types/irismod/farm/tx_grpc_web_pb.js @@ -19,6 +19,8 @@ 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'); @@ -155,6 +157,86 @@ proto.irismod.farm.MsgPromiseClient.prototype.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< diff --git a/src/types/proto-types/irismod/farm/tx_pb.js b/src/types/proto-types/irismod/farm/tx_pb.js index a6b01ef7..2a4c4cc6 100644 --- a/src/types/proto-types/irismod/farm/tx_pb.js +++ b/src/types/proto-types/irismod/farm/tx_pb.js @@ -16,10 +16,14 @@ 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); @@ -49,6 +53,27 @@ if (goog.DEBUG && !COMPILED) { */ 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 @@ -175,6 +200,27 @@ if (goog.DEBUG && !COMPILED) { */ 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 @@ -286,7 +332,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.irismod.farm.MsgCreatePool.repeatedFields_ = [5,6]; +proto.irismod.farm.MsgCreatePool.repeatedFields_ = [4,5]; @@ -319,16 +365,15 @@ proto.irismod.farm.MsgCreatePool.prototype.toObject = function(opt_includeInstan */ proto.irismod.farm.MsgCreatePool.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - description: jspb.Message.getFieldWithDefault(msg, 2, ""), - lptDenom: jspb.Message.getFieldWithDefault(msg, 3, ""), - startHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + 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, 7, false), - creator: jspb.Message.getFieldWithDefault(msg, 8, "") + editable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + creator: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -366,36 +411,32 @@ proto.irismod.farm.MsgCreatePool.deserializeBinaryFromReader = function(msg, rea 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.setDescription(value); break; - case 3: + case 2: var value = /** @type {string} */ (reader.readString()); msg.setLptDenom(value); break; - case 4: + case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setStartHeight(value); break; - case 5: + 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 6: + 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 7: + case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setEditable(value); break; - case 8: + case 7: var value = /** @type {string} */ (reader.readString()); msg.setCreator(value); break; @@ -428,38 +469,31 @@ proto.irismod.farm.MsgCreatePool.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } f = message.getDescription(); if (f.length > 0) { writer.writeString( - 2, + 1, f ); } f = message.getLptDenom(); if (f.length > 0) { writer.writeString( - 3, + 2, f ); } f = message.getStartHeight(); if (f !== 0) { writer.writeInt64( - 4, + 3, f ); } f = message.getRewardPerBlockList(); if (f.length > 0) { writer.writeRepeatedMessage( - 5, + 4, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -467,7 +501,7 @@ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, wri f = message.getTotalRewardList(); if (f.length > 0) { writer.writeRepeatedMessage( - 6, + 5, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); @@ -475,14 +509,14 @@ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, wri f = message.getEditable(); if (f) { writer.writeBool( - 7, + 6, f ); } f = message.getCreator(); if (f.length > 0) { writer.writeString( - 8, + 7, f ); } @@ -490,29 +524,11 @@ proto.irismod.farm.MsgCreatePool.serializeBinaryToWriter = function(message, wri /** - * optional string name = 1; - * @return {string} - */ -proto.irismod.farm.MsgCreatePool.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.irismod.farm.MsgCreatePool} returns this - */ -proto.irismod.farm.MsgCreatePool.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string description = 2; + * optional string description = 1; * @return {string} */ proto.irismod.farm.MsgCreatePool.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -521,16 +537,16 @@ proto.irismod.farm.MsgCreatePool.prototype.getDescription = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string lpt_denom = 3; + * optional string lpt_denom = 2; * @return {string} */ proto.irismod.farm.MsgCreatePool.prototype.getLptDenom = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -539,16 +555,16 @@ proto.irismod.farm.MsgCreatePool.prototype.getLptDenom = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setLptDenom = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 start_height = 4; + * optional int64 start_height = 3; * @return {number} */ proto.irismod.farm.MsgCreatePool.prototype.getStartHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; @@ -557,17 +573,17 @@ proto.irismod.farm.MsgCreatePool.prototype.getStartHeight = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setStartHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * repeated cosmos.base.v1beta1.Coin reward_per_block = 5; + * 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, 5)); + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); }; @@ -576,7 +592,7 @@ proto.irismod.farm.MsgCreatePool.prototype.getRewardPerBlockList = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setRewardPerBlockList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -586,7 +602,7 @@ proto.irismod.farm.MsgCreatePool.prototype.setRewardPerBlockList = function(valu * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.irismod.farm.MsgCreatePool.prototype.addRewardPerBlock = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; @@ -600,12 +616,12 @@ proto.irismod.farm.MsgCreatePool.prototype.clearRewardPerBlockList = function() /** - * repeated cosmos.base.v1beta1.Coin total_reward = 6; + * 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, 6)); + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); }; @@ -614,7 +630,7 @@ proto.irismod.farm.MsgCreatePool.prototype.getTotalRewardList = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setTotalRewardList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -624,7 +640,7 @@ proto.irismod.farm.MsgCreatePool.prototype.setTotalRewardList = function(value) * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.irismod.farm.MsgCreatePool.prototype.addTotalReward = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; @@ -638,11 +654,11 @@ proto.irismod.farm.MsgCreatePool.prototype.clearTotalRewardList = function() { /** - * optional bool editable = 7; + * optional bool editable = 6; * @return {boolean} */ proto.irismod.farm.MsgCreatePool.prototype.getEditable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; @@ -651,16 +667,16 @@ proto.irismod.farm.MsgCreatePool.prototype.getEditable = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setEditable = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional string creator = 8; + * optional string creator = 7; * @return {string} */ proto.irismod.farm.MsgCreatePool.prototype.getCreator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -669,7 +685,248 @@ proto.irismod.farm.MsgCreatePool.prototype.getCreator = function() { * @return {!proto.irismod.farm.MsgCreatePool} returns this */ proto.irismod.farm.MsgCreatePool.prototype.setCreator = function(value) { - return jspb.Message.setProto3StringField(this, 8, 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); }; @@ -705,7 +962,7 @@ proto.irismod.farm.MsgDestroyPool.prototype.toObject = function(opt_includeInsta */ proto.irismod.farm.MsgDestroyPool.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), creator: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -745,7 +1002,7 @@ proto.irismod.farm.MsgDestroyPool.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -780,7 +1037,7 @@ proto.irismod.farm.MsgDestroyPool.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -798,10 +1055,10 @@ proto.irismod.farm.MsgDestroyPool.serializeBinaryToWriter = function(message, wr /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgDestroyPool.prototype.getPoolName = function() { +proto.irismod.farm.MsgDestroyPool.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -810,7 +1067,7 @@ proto.irismod.farm.MsgDestroyPool.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgDestroyPool} returns this */ -proto.irismod.farm.MsgDestroyPool.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgDestroyPool.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -872,7 +1129,7 @@ proto.irismod.farm.MsgAdjustPool.prototype.toObject = function(opt_includeInstan */ proto.irismod.farm.MsgAdjustPool.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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(), @@ -916,7 +1173,7 @@ proto.irismod.farm.MsgAdjustPool.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -961,7 +1218,7 @@ proto.irismod.farm.MsgAdjustPool.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -995,10 +1252,10 @@ proto.irismod.farm.MsgAdjustPool.serializeBinaryToWriter = function(message, wri /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgAdjustPool.prototype.getPoolName = function() { +proto.irismod.farm.MsgAdjustPool.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1007,7 +1264,7 @@ proto.irismod.farm.MsgAdjustPool.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgAdjustPool} returns this */ -proto.irismod.farm.MsgAdjustPool.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgAdjustPool.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1138,7 +1395,7 @@ proto.irismod.farm.MsgStake.prototype.toObject = function(opt_includeInstance) { */ proto.irismod.farm.MsgStake.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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, "") }; @@ -1179,7 +1436,7 @@ proto.irismod.farm.MsgStake.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -1219,7 +1476,7 @@ proto.irismod.farm.MsgStake.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgStake.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -1245,10 +1502,10 @@ proto.irismod.farm.MsgStake.serializeBinaryToWriter = function(message, writer) /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgStake.prototype.getPoolName = function() { +proto.irismod.farm.MsgStake.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1257,7 +1514,7 @@ proto.irismod.farm.MsgStake.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgStake} returns this */ -proto.irismod.farm.MsgStake.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgStake.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1349,7 +1606,7 @@ proto.irismod.farm.MsgUnstake.prototype.toObject = function(opt_includeInstance) */ proto.irismod.farm.MsgUnstake.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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, "") }; @@ -1390,7 +1647,7 @@ proto.irismod.farm.MsgUnstake.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin; @@ -1430,7 +1687,7 @@ proto.irismod.farm.MsgUnstake.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgUnstake.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -1456,10 +1713,10 @@ proto.irismod.farm.MsgUnstake.serializeBinaryToWriter = function(message, writer /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgUnstake.prototype.getPoolName = function() { +proto.irismod.farm.MsgUnstake.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1468,7 +1725,7 @@ proto.irismod.farm.MsgUnstake.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgUnstake} returns this */ -proto.irismod.farm.MsgUnstake.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgUnstake.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1560,7 +1817,7 @@ proto.irismod.farm.MsgHarvest.prototype.toObject = function(opt_includeInstance) */ proto.irismod.farm.MsgHarvest.toObject = function(includeInstance, msg) { var f, obj = { - poolName: jspb.Message.getFieldWithDefault(msg, 1, ""), + poolId: jspb.Message.getFieldWithDefault(msg, 1, ""), sender: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -1600,7 +1857,7 @@ proto.irismod.farm.MsgHarvest.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPoolName(value); + msg.setPoolId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -1635,7 +1892,7 @@ proto.irismod.farm.MsgHarvest.prototype.serializeBinary = function() { */ proto.irismod.farm.MsgHarvest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPoolName(); + f = message.getPoolId(); if (f.length > 0) { writer.writeString( 1, @@ -1653,10 +1910,10 @@ proto.irismod.farm.MsgHarvest.serializeBinaryToWriter = function(message, writer /** - * optional string pool_name = 1; + * optional string pool_id = 1; * @return {string} */ -proto.irismod.farm.MsgHarvest.prototype.getPoolName = function() { +proto.irismod.farm.MsgHarvest.prototype.getPoolId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1665,7 +1922,7 @@ proto.irismod.farm.MsgHarvest.prototype.getPoolName = function() { * @param {string} value * @return {!proto.irismod.farm.MsgHarvest} returns this */ -proto.irismod.farm.MsgHarvest.prototype.setPoolName = function(value) { +proto.irismod.farm.MsgHarvest.prototype.setPoolId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1792,6 +2049,107 @@ proto.irismod.farm.MsgCreatePoolResponse.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.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. 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 6ab674f3..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); +}; + + @@ -412,7 +442,11 @@ proto.irismod.nft.Denom.toObject = function(includeInstance, msg) { 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) + 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) { @@ -477,6 +511,22 @@ proto.irismod.nft.Denom.deserializeBinaryFromReader = function(msg, reader) { 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; @@ -555,6 +605,34 @@ proto.irismod.nft.Denom.serializeBinaryToWriter = function(message, writer) { 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 + ); + } }; @@ -684,6 +762,78 @@ proto.irismod.nft.Denom.prototype.setUpdateRestricted = function(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/tx_pb.js b/src/types/proto-types/irismod/nft/tx_pb.js index 5102d01a..d0027c71 100644 --- a/src/types/proto-types/irismod/nft/tx_pb.js +++ b/src/types/proto-types/irismod/nft/tx_pb.js @@ -316,7 +316,11 @@ proto.irismod.nft.MsgIssueDenom.toObject = function(includeInstance, msg) { 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) + 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) { @@ -381,6 +385,22 @@ proto.irismod.nft.MsgIssueDenom.deserializeBinaryFromReader = function(msg, read 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; @@ -459,6 +479,34 @@ proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter = function(message, writ 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 + ); + } }; @@ -588,6 +636,78 @@ proto.irismod.nft.MsgIssueDenom.prototype.setUpdateRestricted = function(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); +}; + + @@ -727,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) { @@ -792,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; @@ -870,6 +995,13 @@ proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter = function(message, wri f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -999,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); +}; + + @@ -1137,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) { @@ -1198,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; @@ -1269,6 +1424,13 @@ proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } }; @@ -1380,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); +}; + + @@ -1519,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) { @@ -1584,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; @@ -1662,6 +1847,13 @@ proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getUriHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -1791,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); +}; + + diff --git a/src/types/proto.ts b/src/types/proto.ts index f5b8f5f1..3db72e3e 100644 --- a/src/types/proto.ts +++ b/src/types/proto.ts @@ -47,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'); @@ -55,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'); @@ -83,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 a7d9b125..2351f324 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -164,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 92b7b274..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: 'udev', + denom: 'uiris', amount: '1', }, ]; @@ -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 e46103b7..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'; diff --git a/test/farm.test.ts b/test/farm.test.ts index 455efc33..039cfb07 100644 --- a/test/farm.test.ts +++ b/test/farm.test.ts @@ -8,10 +8,10 @@ describe('farm Tests', () => { async () => { await BaseTest.getClient() .farm.stakeLp( - 'farm-1', + 'farm-15', { denom: 'lpt-1', - amount: '100' + amount: '1' }, BaseTest.baseTx ) @@ -31,10 +31,10 @@ describe('farm Tests', () => { async () => { await BaseTest.getClient() .farm.unStakeLp( - 'farm-1', + 'farm-15', { denom: 'lpt-1', - amount: '10' + amount: '1' }, BaseTest.baseTx ) @@ -54,7 +54,7 @@ describe('farm Tests', () => { async () => { await BaseTest.getClient() .farm.harvestReward( - 'farm-1', + 'farm-15', BaseTest.baseTx ) .then(res => { @@ -67,4 +67,68 @@ describe('farm Tests', () => { 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 ba28b09e..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)); }) 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/staking.test.ts b/test/staking.test.ts index f9fa835d..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 => { 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/yarn.lock b/yarn.lock index 98e5d783..25a72709 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1929,14 +1929,15 @@ babel-jest@^25.5.1: graceful-fs "^4.2.4" slash "^3.0.0" -babel-loader@^7.1.5: - version "7.1.5" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.5.tgz#e3ee0cd7394aa557e013b02d3e492bfd07aa6d68" - integrity sha512-iCHfbieL5d1LfOQeeVJEUyD9rTwBcP/fcEbRCfempxTDuqrKpu0AZjLAQHEQa3Yqyj9ORKe2iHfoj4rHLf7xpw== +babel-loader@^8.1.0: + 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 "^1.0.0" - loader-utils "^1.0.2" - mkdirp "^0.5.1" + find-cache-dir "^3.3.1" + loader-utils "^2.0.0" + make-dir "^3.1.0" + schema-utils "^2.6.5" babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" @@ -3483,15 +3484,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= - dependencies: - commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" @@ -3501,13 +3493,6 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -4966,14 +4951,6 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -5057,13 +5034,6 @@ lunr@^2.3.9: resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -5072,7 +5042,7 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0, make-dir@^3.0.2: +make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -5553,13 +5523,6 @@ p-finally@^2.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -5567,13 +5530,6 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -5581,11 +5537,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -5639,11 +5590,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -5695,11 +5641,6 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -5712,13 +5653,6 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"