From a4fa181dc391c3d719ae3a4fb38190cf46c92cfe Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 8 Nov 2023 12:44:32 -0800 Subject: [PATCH] [Supplier] Scaffold the `Claim` type (#149) Ran the following command and nothing else: ``` ignite scaffold map claim --module supplier supplier_address session_id root_hash --no-message --yes ``` --- Co-authored-by: Bryan White Co-authored-by: harry <53987565+h5law@users.noreply.github.com> Co-authored-by: Daniel Olshansky --- docs/static/openapi.yml | 1654 +++++++++++---------- proto/pocket/application/query.proto | 3 - proto/pocket/gateway/query.proto | 5 +- proto/pocket/session/query.proto | 2 - proto/pocket/supplier/claim.proto | 14 + proto/pocket/supplier/genesis.proto | 5 +- proto/pocket/supplier/query.proto | 31 +- x/supplier/client/cli/query.go | 2 + x/supplier/client/cli/query_claim.go | 84 ++ x/supplier/client/cli/query_claim_test.go | 157 ++ x/supplier/genesis.go | 6 + x/supplier/genesis_test.go | 9 + x/supplier/keeper/claim.go | 64 + x/supplier/keeper/claim_test.go | 64 + x/supplier/keeper/query_claim.go | 58 + x/supplier/keeper/query_claim_test.go | 124 ++ x/supplier/types/codec.go | 2 + x/supplier/types/genesis.go | 11 + x/supplier/types/genesis_test.go | 22 + x/supplier/types/key_claim.go | 23 + 20 files changed, 1563 insertions(+), 777 deletions(-) create mode 100644 proto/pocket/supplier/claim.proto create mode 100644 x/supplier/client/cli/query_claim.go create mode 100644 x/supplier/client/cli/query_claim_test.go create mode 100644 x/supplier/keeper/claim.go create mode 100644 x/supplier/keeper/claim_test.go create mode 100644 x/supplier/keeper/query_claim.go create mode 100644 x/supplier/keeper/query_claim_test.go create mode 100644 x/supplier/types/key_claim.go diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 8013d6531..2d5050b2f 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -1,16 +1,16 @@ -swagger: '2.0' +swagger: "2.0" info: title: HTTP API Console - name: '' - description: '' + name: "" + description: "" paths: /cosmos/auth/v1beta1/account_info/{address}: get: summary: AccountInfo queries account info which is common to all account types. - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" operationId: CosmosAuthV1Beta1AccountInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -24,7 +24,7 @@ paths: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -219,7 +219,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -410,7 +410,7 @@ paths: Since: cosmos-sdk 0.43 operationId: CosmosAuthV1Beta1Accounts responses: - '200': + "200": description: A successful response. schema: type: object @@ -420,7 +420,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -631,7 +631,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -865,7 +865,7 @@ paths: summary: Account returns account details based on address. operationId: CosmosAuthV1Beta1Account responses: - '200': + "200": description: A successful response. schema: type: object @@ -873,7 +873,7 @@ paths: account: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -1057,7 +1057,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -1238,17 +1238,17 @@ paths: /cosmos/auth/v1beta1/address_by_id/{id}: get: summary: AccountAddressByID returns account address based on account number. - description: 'Since: cosmos-sdk 0.46.2' + description: "Since: cosmos-sdk 0.46.2" operationId: CosmosAuthV1Beta1AccountAddressByID responses: - '200': + "200": description: A successful response. schema: type: object properties: account_address: type: string - description: 'Since: cosmos-sdk 0.46.2' + description: "Since: cosmos-sdk 0.46.2" title: >- QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method @@ -1267,7 +1267,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -1463,10 +1463,10 @@ paths: /cosmos/auth/v1beta1/bech32: get: summary: Bech32Prefix queries bech32Prefix - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosAuthV1Beta1Bech32Prefix responses: - '200': + "200": description: A successful response. schema: type: object @@ -1494,7 +1494,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -1669,10 +1669,10 @@ paths: /cosmos/auth/v1beta1/bech32/{address_bytes}: get: summary: AddressBytesToString converts Account Address bytes to string - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosAuthV1Beta1AddressBytesToString responses: - '200': + "200": description: A successful response. schema: type: object @@ -1700,7 +1700,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -1881,10 +1881,10 @@ paths: /cosmos/auth/v1beta1/bech32/{address_string}: get: summary: AddressStringToBytes converts Address string to bytes - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosAuthV1Beta1AddressStringToBytes responses: - '200': + "200": description: A successful response. schema: type: object @@ -1913,7 +1913,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -2093,10 +2093,10 @@ paths: /cosmos/auth/v1beta1/module_accounts: get: summary: ModuleAccounts returns all the existing module accounts. - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosAuthV1Beta1ModuleAccounts responses: - '200': + "200": description: A successful response. schema: type: object @@ -2106,7 +2106,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -2297,7 +2297,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -2474,7 +2474,7 @@ paths: summary: ModuleAccountByName returns the module account info by module name operationId: CosmosAuthV1Beta1ModuleAccountByName responses: - '200': + "200": description: A successful response. schema: type: object @@ -2482,7 +2482,7 @@ paths: account: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -2666,7 +2666,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -2848,7 +2848,7 @@ paths: summary: Params queries all parameters. operationId: CosmosAuthV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -2890,7 +2890,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -3067,7 +3067,7 @@ paths: summary: Returns list of `Authorization`, granted to the grantee by the granter. operationId: CosmosAuthzV1Beta1Grants responses: - '200': + "200": description: A successful response. schema: type: object @@ -3080,7 +3080,7 @@ paths: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -3306,7 +3306,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -3553,10 +3553,10 @@ paths: /cosmos/authz/v1beta1/grants/grantee/{grantee}: get: summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosAuthzV1Beta1GranteeGrants responses: - '200': + "200": description: A successful response. schema: type: object @@ -3573,7 +3573,7 @@ paths: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -3791,7 +3791,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -4027,10 +4027,10 @@ paths: /cosmos/authz/v1beta1/grants/granter/{granter}: get: summary: GranterGrants returns list of `GrantAuthorization`, granted by granter. - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosAuthzV1Beta1GranterGrants responses: - '200': + "200": description: A successful response. schema: type: object @@ -4047,7 +4047,7 @@ paths: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -4265,7 +4265,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -4508,7 +4508,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1AllBalances responses: - '200': + "200": description: A successful response. schema: type: object @@ -4570,7 +4570,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -4642,7 +4642,7 @@ paths: summary: Balance queries the balance of a single coin for a single account. operationId: CosmosBankV1Beta1Balance responses: - '200': + "200": description: A successful response. schema: type: object @@ -4673,7 +4673,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -4706,7 +4706,7 @@ paths: Since: cosmos-sdk 0.46 operationId: CosmosBankV1Beta1DenomOwners responses: - '200': + "200": description: A successful response. schema: type: object @@ -4782,7 +4782,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -4858,7 +4858,7 @@ paths: denominations. operationId: CosmosBankV1Beta1DenomsMetadata responses: - '200': + "200": description: A successful response. schema: type: object @@ -4921,8 +4921,8 @@ paths: displayed in clients. name: type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' + description: "Since: cosmos-sdk 0.43" + title: "name defines the name of the token (eg: Cosmos Atom)" symbol: type: string description: >- @@ -4996,7 +4996,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5063,7 +5063,7 @@ paths: summary: DenomsMetadata queries the client metadata of a given coin denomination. operationId: CosmosBankV1Beta1DenomMetadata responses: - '200': + "200": description: A successful response. schema: type: object @@ -5127,8 +5127,8 @@ paths: displayed in clients. name: type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' + description: "Since: cosmos-sdk 0.43" + title: "name defines the name of the token (eg: Cosmos Atom)" symbol: type: string description: >- @@ -5177,7 +5177,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5193,7 +5193,7 @@ paths: summary: Params queries the parameters of x/bank module. operationId: CosmosBankV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -5248,7 +5248,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -5269,7 +5269,7 @@ paths: Since: cosmos-sdk 0.47 operationId: CosmosBankV1Beta1SendEnabled responses: - '200': + "200": description: A successful response. schema: type: object @@ -5332,7 +5332,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5421,7 +5421,7 @@ paths: Since: cosmos-sdk 0.46 operationId: CosmosBankV1Beta1SpendableBalances responses: - '200': + "200": description: A successful response. schema: type: object @@ -5486,7 +5486,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5570,7 +5570,7 @@ paths: Since: cosmos-sdk 0.47 operationId: CosmosBankV1Beta1SpendableBalanceByDenom responses: - '200': + "200": description: A successful response. schema: type: object @@ -5606,7 +5606,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5632,7 +5632,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1TotalSupply responses: - '200': + "200": description: A successful response. schema: type: object @@ -5697,7 +5697,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5769,7 +5769,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1SupplyOf responses: - '200': + "200": description: A successful response. schema: type: object @@ -5800,7 +5800,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -5816,7 +5816,7 @@ paths: summary: Config queries for the operator configuration. operationId: CosmosBaseNodeV1Beta1Config responses: - '200': + "200": description: A successful response. schema: type: object @@ -5841,7 +5841,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -5856,10 +5856,10 @@ paths: contain a valid and supported path, including app, custom, p2p, and store. - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosBaseTendermintV1Beta1ABCIQuery responses: - '200': + "200": description: A successful response. schema: type: object @@ -5945,7 +5945,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -6141,7 +6141,7 @@ paths: summary: GetLatestBlock returns the latest block. operationId: CosmosBaseTendermintV1Beta1GetLatestBlock responses: - '200': + "200": description: A successful response. schema: type: object @@ -6164,7 +6164,7 @@ paths: title: PartsetHeader title: BlockID block: - title: 'Deprecated: please use `sdk_block` instead' + title: "Deprecated: please use `sdk_block` instead" type: object properties: header: @@ -6728,7 +6728,7 @@ paths: Commit contains the evidence that a block was committed by a set of validators. sdk_block: - title: 'Since: cosmos-sdk 0.47' + title: "Since: cosmos-sdk 0.47" type: object properties: header: @@ -7323,7 +7323,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -7500,7 +7500,7 @@ paths: summary: GetBlockByHeight queries block for given height. operationId: CosmosBaseTendermintV1Beta1GetBlockByHeight responses: - '200': + "200": description: A successful response. schema: type: object @@ -7523,7 +7523,7 @@ paths: title: PartsetHeader title: BlockID block: - title: 'Deprecated: please use `sdk_block` instead' + title: "Deprecated: please use `sdk_block` instead" type: object properties: header: @@ -8087,7 +8087,7 @@ paths: Commit contains the evidence that a block was committed by a set of validators. sdk_block: - title: 'Since: cosmos-sdk 0.47' + title: "Since: cosmos-sdk 0.47" type: object properties: header: @@ -8682,7 +8682,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -8865,7 +8865,7 @@ paths: summary: GetNodeInfo queries the current node info. operationId: CosmosBaseTendermintV1Beta1GetNodeInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -8937,7 +8937,7 @@ paths: title: Module is the type for VersionInfo cosmos_sdk_version: type: string - title: 'Since: cosmos-sdk 0.43' + title: "Since: cosmos-sdk 0.43" description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- GetNodeInfoResponse is the response type for the Query/GetNodeInfo @@ -8957,7 +8957,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -9134,7 +9134,7 @@ paths: summary: GetSyncing queries node syncing. operationId: CosmosBaseTendermintV1Beta1GetSyncing responses: - '200': + "200": description: A successful response. schema: type: object @@ -9159,7 +9159,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -9336,7 +9336,7 @@ paths: summary: GetLatestValidatorSet queries latest validator-set. operationId: CosmosBaseTendermintV1Beta1GetLatestValidatorSet responses: - '200': + "200": description: A successful response. schema: type: object @@ -9354,7 +9354,7 @@ paths: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -9570,7 +9570,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -9804,7 +9804,7 @@ paths: summary: GetValidatorSetByHeight queries validator-set at a given height. operationId: CosmosBaseTendermintV1Beta1GetValidatorSetByHeight responses: - '200': + "200": description: A successful response. schema: type: object @@ -9822,7 +9822,7 @@ paths: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -10038,7 +10038,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -10277,7 +10277,7 @@ paths: summary: Params queries the parameters of x/consensus_param module. operationId: CosmosConsensusV1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -10385,7 +10385,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -10395,7 +10395,7 @@ paths: summary: CommunityPool queries the community pool coins. operationId: CosmosDistributionV1Beta1CommunityPool responses: - '200': + "200": description: A successful response. schema: type: object @@ -10439,7 +10439,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -10451,7 +10451,7 @@ paths: validator. operationId: CosmosDistributionV1Beta1DelegationTotalRewards responses: - '200': + "200": description: A successful response. schema: type: object @@ -10522,7 +10522,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10538,7 +10538,7 @@ paths: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: CosmosDistributionV1Beta1DelegationRewards responses: - '200': + "200": description: A successful response. schema: type: object @@ -10580,7 +10580,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10601,7 +10601,7 @@ paths: summary: DelegatorValidators queries the validators of a delegator. operationId: CosmosDistributionV1Beta1DelegatorValidators responses: - '200': + "200": description: A successful response. schema: type: object @@ -10631,7 +10631,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10647,7 +10647,7 @@ paths: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: CosmosDistributionV1Beta1DelegatorWithdrawAddress responses: - '200': + "200": description: A successful response. schema: type: object @@ -10673,7 +10673,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10689,7 +10689,7 @@ paths: summary: Params queries params of the distribution module. operationId: CosmosDistributionV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -10734,7 +10734,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -10746,7 +10746,7 @@ paths: self-delegation rewards for validator operationId: CosmosDistributionV1Beta1ValidatorDistributionInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -10810,7 +10810,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10826,7 +10826,7 @@ paths: summary: ValidatorCommission queries accumulated commission for a validator. operationId: CosmosDistributionV1Beta1ValidatorCommission responses: - '200': + "200": description: A successful response. schema: type: object @@ -10871,7 +10871,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10887,7 +10887,7 @@ paths: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: CosmosDistributionV1Beta1ValidatorOutstandingRewards responses: - '200': + "200": description: A successful response. schema: type: object @@ -10939,7 +10939,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -10955,7 +10955,7 @@ paths: summary: ValidatorSlashes queries slash events of a validator. operationId: CosmosDistributionV1Beta1ValidatorSlashes responses: - '200': + "200": description: A successful response. schema: type: object @@ -11018,7 +11018,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -11106,7 +11106,7 @@ paths: summary: AllEvidence queries all evidence. operationId: CosmosEvidenceV1Beta1AllEvidence responses: - '200': + "200": description: A successful response. schema: type: object @@ -11116,7 +11116,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -11326,7 +11326,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -11560,7 +11560,7 @@ paths: summary: Evidence queries evidence based on evidence hash. operationId: CosmosEvidenceV1Beta1Evidence responses: - '200': + "200": description: A successful response. schema: type: object @@ -11569,7 +11569,7 @@ paths: description: evidence returns the requested evidence. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -11645,7 +11645,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -11839,7 +11839,7 @@ paths: summary: Allowance returns fee granted to the grantee by the granter. operationId: CosmosFeegrantV1Beta1Allowance responses: - '200': + "200": description: A successful response. schema: type: object @@ -11864,7 +11864,7 @@ paths: allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -11944,7 +11944,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -12136,7 +12136,7 @@ paths: summary: Allowances returns all the grants for address. operationId: CosmosFeegrantV1Beta1Allowances responses: - '200': + "200": description: A successful response. schema: type: object @@ -12162,7 +12162,7 @@ paths: allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -12262,7 +12262,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -12498,10 +12498,10 @@ paths: /cosmos/feegrant/v1beta1/issued/{granter}: get: summary: AllowancesByGranter returns all the grants given by an address - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosFeegrantV1Beta1AllowancesByGranter responses: - '200': + "200": description: A successful response. schema: type: object @@ -12527,7 +12527,7 @@ paths: allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -12630,7 +12630,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -12868,7 +12868,7 @@ paths: summary: Params queries all parameters of the gov module. operationId: CosmosGovV1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -13022,7 +13022,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -13209,7 +13209,7 @@ paths: summary: Proposals queries all proposals based on given status. operationId: CosmosGovV1Proposals responses: - '200': + "200": description: A successful response. schema: type: object @@ -13228,7 +13228,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -13485,15 +13485,15 @@ paths: proposal. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal proposer: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: Proposer is the address of the proposal sumbitter description: >- Proposal defines the core field members of a governance @@ -13538,7 +13538,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -13808,7 +13808,7 @@ paths: summary: Proposal queries proposal details based on ProposalID. operationId: CosmosGovV1Proposal responses: - '200': + "200": description: A successful response. schema: type: object @@ -13826,7 +13826,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -14082,15 +14082,15 @@ paths: proposal. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal proposer: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: Proposer is the address of the proposal sumbitter description: >- QueryProposalResponse is the response type for the Query/Proposal @@ -14110,7 +14110,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -14294,7 +14294,7 @@ paths: summary: Deposits queries all deposits of a single proposal. operationId: CosmosGovV1Deposits responses: - '200': + "200": description: A successful response. schema: type: object @@ -14375,7 +14375,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -14617,7 +14617,7 @@ paths: depositAddr. operationId: CosmosGovV1Deposit responses: - '200': + "200": description: A successful response. schema: type: object @@ -14671,7 +14671,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -14860,7 +14860,7 @@ paths: summary: TallyResult queries the tally of a proposal vote. operationId: CosmosGovV1TallyResult responses: - '200': + "200": description: A successful response. schema: type: object @@ -14903,7 +14903,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -15087,7 +15087,7 @@ paths: summary: Votes queries votes of a given proposal. operationId: CosmosGovV1Votes responses: - '200': + "200": description: A successful response. schema: type: object @@ -15178,7 +15178,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -15418,7 +15418,7 @@ paths: summary: Vote queries voted information based on proposalID, voterAddr. operationId: CosmosGovV1Vote responses: - '200': + "200": description: A successful response. schema: type: object @@ -15483,7 +15483,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -15672,7 +15672,7 @@ paths: summary: Params queries all parameters of the gov module. operationId: CosmosGovV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -15757,7 +15757,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -15944,7 +15944,7 @@ paths: summary: Proposals queries all proposals based on given status. operationId: CosmosGovV1Beta1Proposals responses: - '200': + "200": description: A successful response. schema: type: object @@ -15962,7 +15962,7 @@ paths: description: content is the proposal's content. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -16043,7 +16043,7 @@ paths: proposal's voting period has ended. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: @@ -16051,7 +16051,7 @@ paths: description: >- abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -16139,7 +16139,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -16409,7 +16409,7 @@ paths: summary: Proposal queries proposal details based on ProposalID. operationId: CosmosGovV1Beta1Proposal responses: - '200': + "200": description: A successful response. schema: type: object @@ -16425,7 +16425,7 @@ paths: description: content is the proposal's content. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -16506,13 +16506,13 @@ paths: proposal's voting period has ended. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -16577,7 +16577,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -16761,7 +16761,7 @@ paths: summary: Deposits queries all deposits of a single proposal. operationId: CosmosGovV1Beta1Deposits responses: - '200': + "200": description: A successful response. schema: type: object @@ -16842,7 +16842,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -17084,7 +17084,7 @@ paths: depositAddr. operationId: CosmosGovV1Beta1Deposit responses: - '200': + "200": description: A successful response. schema: type: object @@ -17138,7 +17138,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -17327,7 +17327,7 @@ paths: summary: TallyResult queries the tally of a proposal vote. operationId: CosmosGovV1Beta1TallyResult responses: - '200': + "200": description: A successful response. schema: type: object @@ -17336,13 +17336,13 @@ paths: description: tally defines the requested tally. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -17368,7 +17368,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -17552,7 +17552,7 @@ paths: summary: Votes queries votes of a given proposal. operationId: CosmosGovV1Beta1Votes responses: - '200': + "200": description: A successful response. schema: type: object @@ -17662,7 +17662,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -17902,7 +17902,7 @@ paths: summary: Vote queries voted information based on proposalID, voterAddr. operationId: CosmosGovV1Beta1Vote responses: - '200': + "200": description: A successful response. schema: type: object @@ -17986,7 +17986,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -18175,7 +18175,7 @@ paths: summary: GroupInfo queries group info based on group id. operationId: CosmosGroupV1GroupInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -18236,7 +18236,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -18420,7 +18420,7 @@ paths: summary: GroupMembers queries members of a group by group id. operationId: CosmosGroupV1GroupMembers responses: - '200': + "200": description: A successful response. schema: type: object @@ -18498,7 +18498,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -18738,7 +18738,7 @@ paths: summary: GroupPoliciesByAdmin queries group policies by admin address. operationId: CosmosGroupV1GroupPoliciesByAdmin responses: - '200': + "200": description: A successful response. schema: type: object @@ -18782,7 +18782,7 @@ paths: policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -18890,7 +18890,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -19129,7 +19129,7 @@ paths: summary: GroupPoliciesByGroup queries group policies by group id. operationId: CosmosGroupV1GroupPoliciesByGroup responses: - '200': + "200": description: A successful response. schema: type: object @@ -19173,7 +19173,7 @@ paths: policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -19281,7 +19281,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -19523,7 +19523,7 @@ paths: group policy. operationId: CosmosGroupV1GroupPolicyInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -19566,7 +19566,7 @@ paths: policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -19649,7 +19649,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -19830,10 +19830,10 @@ paths: /cosmos/group/v1/groups: get: summary: Groups queries all groups in state. - description: 'Since: cosmos-sdk 0.47.1' + description: "Since: cosmos-sdk 0.47.1" operationId: CosmosGroupV1Groups responses: - '200': + "200": description: A successful response. schema: type: object @@ -19882,7 +19882,7 @@ paths: description: >- GroupInfo represents the high-level on-chain information for a group. - description: '`groups` is all the groups present in state.' + description: "`groups` is all the groups present in state." pagination: description: pagination defines the pagination in the response. type: object @@ -19921,7 +19921,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -20155,7 +20155,7 @@ paths: summary: GroupsByAdmin queries groups by admin address. operationId: CosmosGroupV1GroupsByAdmin responses: - '200': + "200": description: A successful response. schema: type: object @@ -20242,7 +20242,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -20481,7 +20481,7 @@ paths: summary: GroupsByMember queries groups by member address. operationId: CosmosGroupV1GroupsByMember responses: - '200': + "200": description: A successful response. schema: type: object @@ -20568,7 +20568,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -20807,7 +20807,7 @@ paths: summary: Proposal queries a proposal based on proposal id. operationId: CosmosGroupV1Proposal responses: - '200': + "200": description: A successful response. schema: type: object @@ -20939,7 +20939,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -21116,11 +21116,11 @@ paths: the proposal passes. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal description: QueryProposalResponse is the Query/Proposal response type. default: @@ -21138,7 +21138,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -21332,7 +21332,7 @@ paths: proposal itself. operationId: CosmosGroupV1TallyResult responses: - '200': + "200": description: A successful response. schema: type: object @@ -21369,7 +21369,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -21555,7 +21555,7 @@ paths: group policy. operationId: CosmosGroupV1ProposalsByGroupPolicy responses: - '200': + "200": description: A successful response. schema: type: object @@ -21688,7 +21688,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -21865,11 +21865,11 @@ paths: if the proposal passes. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can @@ -21920,7 +21920,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -22161,7 +22161,7 @@ paths: summary: VoteByProposalVoter queries a vote by proposal id and voter. operationId: CosmosGroupV1VoteByProposalVoter responses: - '200': + "200": description: A successful response. schema: type: object @@ -22212,7 +22212,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -22401,7 +22401,7 @@ paths: summary: VotesByProposal queries a vote by proposal id. operationId: CosmosGroupV1VotesByProposal responses: - '200': + "200": description: A successful response. schema: type: object @@ -22476,7 +22476,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -22716,7 +22716,7 @@ paths: summary: VotesByVoter queries a vote by voter. operationId: CosmosGroupV1VotesByVoter responses: - '200': + "200": description: A successful response. schema: type: object @@ -22789,7 +22789,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -23028,7 +23028,7 @@ paths: summary: AnnualProvisions current minting annual provisions value. operationId: CosmosMintV1Beta1AnnualProvisions responses: - '200': + "200": description: A successful response. schema: type: object @@ -23057,7 +23057,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -23067,7 +23067,7 @@ paths: summary: Inflation returns the current minting inflation value. operationId: CosmosMintV1Beta1Inflation responses: - '200': + "200": description: A successful response. schema: type: object @@ -23096,7 +23096,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -23106,7 +23106,7 @@ paths: summary: Params returns the total set of minting parameters. operationId: CosmosMintV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -23152,7 +23152,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -23164,7 +23164,7 @@ paths: same as balanceOf in ERC721 operationId: CosmosNftV1Beta1Balance responses: - '200': + "200": description: A successful response. schema: type: object @@ -23193,7 +23193,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -23381,7 +23381,7 @@ paths: summary: Classes queries all NFT classes operationId: CosmosNftV1Beta1Classes responses: - '200': + "200": description: A successful response. schema: type: object @@ -23429,7 +23429,7 @@ paths: Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -23640,7 +23640,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -23874,7 +23874,7 @@ paths: summary: Class queries an NFT class based on its id operationId: CosmosNftV1Beta1Class responses: - '200': + "200": description: A successful response. schema: type: object @@ -23919,7 +23919,7 @@ paths: Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -24107,7 +24107,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -24294,7 +24294,7 @@ paths: ERC721Enumerable operationId: CosmosNftV1Beta1NFTs responses: - '200': + "200": description: A successful response. schema: type: object @@ -24322,7 +24322,7 @@ paths: title: data is an app specific data of the NFT. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -24533,7 +24533,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -24777,7 +24777,7 @@ paths: summary: NFT queries an NFT based on its class and id. operationId: CosmosNftV1Beta1NFT responses: - '200': + "200": description: A successful response. schema: type: object @@ -24804,7 +24804,7 @@ paths: title: data is an app specific data of the NFT. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -24991,7 +24991,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -25181,7 +25181,7 @@ paths: ownerOf in ERC721 operationId: CosmosNftV1Beta1Owner responses: - '200': + "200": description: A successful response. schema: type: object @@ -25207,7 +25207,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -25397,7 +25397,7 @@ paths: totalSupply of ERC721. operationId: CosmosNftV1Beta1Supply responses: - '200': + "200": description: A successful response. schema: type: object @@ -25424,7 +25424,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -25609,7 +25609,7 @@ paths: key. operationId: CosmosParamsV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -25642,7 +25642,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -25663,10 +25663,10 @@ paths: summary: >- Subspaces queries for all registered subspaces and all keys for a subspace. - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosParamsV1Beta1Subspaces responses: - '200': + "200": description: A successful response. schema: type: object @@ -25713,7 +25713,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -25723,7 +25723,7 @@ paths: summary: Params queries the parameters of slashing module operationId: CosmosSlashingV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -25766,7 +25766,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -25776,7 +25776,7 @@ paths: summary: SigningInfos queries signing info of all validators operationId: CosmosSlashingV1Beta1SigningInfos responses: - '200': + "200": description: A successful response. schema: type: object @@ -25882,7 +25882,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -25949,7 +25949,7 @@ paths: summary: SigningInfo queries the signing info of given cons address operationId: CosmosSlashingV1Beta1SigningInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -26027,7 +26027,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -26050,7 +26050,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1DelegatorDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -26145,7 +26145,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -26389,7 +26389,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Redelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -26573,7 +26573,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -26831,7 +26831,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1DelegatorUnbondingDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -26941,7 +26941,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -27187,7 +27187,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1DelegatorValidators responses: - '200': + "200": description: A successful response. schema: type: object @@ -27208,7 +27208,7 @@ paths: validator, as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -27447,7 +27447,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -27688,7 +27688,7 @@ paths: pair. operationId: CosmosStakingV1Beta1DelegatorValidator responses: - '200': + "200": description: A successful response. schema: type: object @@ -27708,7 +27708,7 @@ paths: validator, as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -27903,7 +27903,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -28091,7 +28091,7 @@ paths: summary: HistoricalInfo queries the historical info for given height. operationId: CosmosStakingV1Beta1HistoricalInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -28204,7 +28204,7 @@ paths: validator, as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -28426,7 +28426,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -28610,7 +28610,7 @@ paths: summary: Parameters queries the staking parameters. operationId: CosmosStakingV1Beta1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -28664,7 +28664,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -28841,7 +28841,7 @@ paths: summary: Pool queries the pool info. operationId: CosmosStakingV1Beta1Pool responses: - '200': + "200": description: A successful response. schema: type: object @@ -28870,7 +28870,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -29052,7 +29052,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Validators responses: - '200': + "200": description: A successful response. schema: type: object @@ -29073,7 +29073,7 @@ paths: validator, as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -29312,7 +29312,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -29551,7 +29551,7 @@ paths: summary: Validator queries validator info for given validator address. operationId: CosmosStakingV1Beta1Validator responses: - '200': + "200": description: A successful response. schema: type: object @@ -29571,7 +29571,7 @@ paths: validator, as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -29766,7 +29766,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -29954,7 +29954,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1ValidatorDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -30046,7 +30046,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -30285,7 +30285,7 @@ paths: summary: Delegation queries delegate info for given validator delegator pair. operationId: CosmosStakingV1Beta1Delegation responses: - '200': + "200": description: A successful response. schema: type: object @@ -30353,7 +30353,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -30543,7 +30543,7 @@ paths: pair. operationId: CosmosStakingV1Beta1UnbondingDelegation responses: - '200': + "200": description: A successful response. schema: type: object @@ -30624,7 +30624,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -30819,7 +30819,7 @@ paths: gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1ValidatorUnbondingDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -30929,7 +30929,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -31166,13 +31166,13 @@ paths: /cosmos/tx/v1beta1/decode: post: summary: TxDecode decodes the transaction. - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" operationId: CosmosTxV1Beta1TxDecode responses: - '200': + "200": description: A successful response. schema: - $ref: '#/definitions/cosmos.tx.v1beta1.TxDecodeResponse' + $ref: "#/definitions/cosmos.tx.v1beta1.TxDecodeResponse" default: description: An unexpected error response. schema: @@ -31188,7 +31188,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -31384,10 +31384,10 @@ paths: /cosmos/tx/v1beta1/decode/amino: post: summary: TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" operationId: CosmosTxV1Beta1TxDecodeAmino responses: - '200': + "200": description: A successful response. schema: type: object @@ -31417,7 +31417,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -31618,10 +31618,10 @@ paths: /cosmos/tx/v1beta1/encode: post: summary: TxEncode encodes the transaction. - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" operationId: CosmosTxV1Beta1TxEncode responses: - '200': + "200": description: A successful response. schema: type: object @@ -31650,7 +31650,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -31830,16 +31830,16 @@ paths: in: body required: true schema: - $ref: '#/definitions/cosmos.tx.v1beta1.TxEncodeRequest' + $ref: "#/definitions/cosmos.tx.v1beta1.TxEncodeRequest" tags: - Service /cosmos/tx/v1beta1/encode/amino: post: summary: TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" operationId: CosmosTxV1Beta1TxEncodeAmino responses: - '200': + "200": description: A successful response. schema: type: object @@ -31870,7 +31870,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -32072,7 +32072,7 @@ paths: summary: Simulate simulates executing a transaction for estimating gas usage. operationId: CosmosTxV1Beta1Simulate responses: - '200': + "200": description: A successful response. schema: type: object @@ -32154,7 +32154,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -32350,7 +32350,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -32528,7 +32528,7 @@ paths: in: body required: true schema: - $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' + $ref: "#/definitions/cosmos.tx.v1beta1.SimulateRequest" tags: - Service /cosmos/tx/v1beta1/txs: @@ -32536,10 +32536,10 @@ paths: summary: GetTxsEvent fetches txs by event. operationId: CosmosTxV1Beta1GetTxsEvent responses: - '200': + "200": description: A successful response. schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' + $ref: "#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse" default: description: An unexpected error response. schema: @@ -32555,7 +32555,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -32827,7 +32827,7 @@ paths: summary: BroadcastTx broadcast transaction. operationId: CosmosTxV1Beta1BroadcastTx responses: - '200': + "200": description: A successful response. schema: type: object @@ -32923,7 +32923,7 @@ paths: description: The request transaction bytes. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -33055,7 +33055,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -33271,13 +33271,13 @@ paths: /cosmos/tx/v1beta1/txs/block/{height}: get: summary: GetBlockWithTxs fetches a block with decoded txs. - description: 'Since: cosmos-sdk 0.45.2' + description: "Since: cosmos-sdk 0.45.2" operationId: CosmosTxV1Beta1GetBlockWithTxs responses: - '200': + "200": description: A successful response. schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + $ref: "#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse" default: description: An unexpected error response. schema: @@ -33293,7 +33293,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -33533,10 +33533,10 @@ paths: summary: GetTx fetches a tx by hash. operationId: CosmosTxV1Beta1GetTx responses: - '200': + "200": description: A successful response. schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' + $ref: "#/definitions/cosmos.tx.v1beta1.GetTxResponse" default: description: An unexpected error response. schema: @@ -33552,7 +33552,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -33735,7 +33735,7 @@ paths: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: CosmosUpgradeV1Beta1AppliedPlan responses: - '200': + "200": description: A successful response. schema: type: object @@ -33764,7 +33764,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -33945,17 +33945,17 @@ paths: /cosmos/upgrade/v1beta1/authority: get: summary: Returns the account with authority to conduct upgrades - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" operationId: CosmosUpgradeV1Beta1Authority responses: - '200': + "200": description: A successful response. schema: type: object properties: address: type: string - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" title: QueryAuthorityResponse is the response type for Query/Authority default: description: An unexpected error response. @@ -33972,7 +33972,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -34149,7 +34149,7 @@ paths: summary: CurrentPlan queries the current upgrade plan. operationId: CosmosUpgradeV1Beta1CurrentPlan responses: - '200': + "200": description: A successful response. schema: type: object @@ -34212,7 +34212,7 @@ paths: If this field is not empty, an error will be thrown. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -34291,7 +34291,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -34466,10 +34466,10 @@ paths: /cosmos/upgrade/v1beta1/module_versions: get: summary: ModuleVersions queries the list of module versions from state. - description: 'Since: cosmos-sdk 0.43' + description: "Since: cosmos-sdk 0.43" operationId: CosmosUpgradeV1Beta1ModuleVersions responses: - '200': + "200": description: A successful response. schema: type: object @@ -34516,7 +34516,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -34713,7 +34713,7 @@ paths: (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) operationId: CosmosUpgradeV1Beta1UpgradedConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -34721,7 +34721,7 @@ paths: upgraded_consensus_state: type: string format: byte - title: 'Since: cosmos-sdk 0.43' + title: "Since: cosmos-sdk 0.43" description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState @@ -34742,7 +34742,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -34930,7 +34930,7 @@ paths: owner address on a given connection operationId: IbcApplicationsInterchainAccountsControllerV1InterchainAccount responses: - '200': + "200": description: A successful response. schema: type: object @@ -34955,7 +34955,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -35141,7 +35141,7 @@ paths: summary: Params queries all parameters of the ICA controller submodule. operationId: IbcApplicationsInterchainAccountsControllerV1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -35173,7 +35173,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -35350,7 +35350,7 @@ paths: summary: Params queries all parameters of the ICA host submodule. operationId: IbcApplicationsInterchainAccountsHostV1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -35387,7 +35387,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -35399,7 +35399,7 @@ paths: channel id. operationId: IbcApplicationsTransferV1EscrowAddress responses: - '200': + "200": description: A successful response. schema: type: object @@ -35425,7 +35425,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -35613,7 +35613,7 @@ paths: summary: DenomHash queries a denomination hash information. operationId: IbcApplicationsTransferV1DenomHash responses: - '200': + "200": description: A successful response. schema: type: object @@ -35641,7 +35641,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -35825,7 +35825,7 @@ paths: summary: DenomTraces queries all denomination traces. operationId: IbcApplicationsTransferV1DenomTraces responses: - '200': + "200": description: A successful response. schema: type: object @@ -35890,7 +35890,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -36124,7 +36124,7 @@ paths: summary: DenomTrace queries a denomination trace information. operationId: IbcApplicationsTransferV1DenomTrace responses: - '200': + "200": description: A successful response. schema: type: object @@ -36165,7 +36165,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -36353,7 +36353,7 @@ paths: on the denom. operationId: IbcApplicationsTransferV1TotalEscrowForDenom responses: - '200': + "200": description: A successful response. schema: type: object @@ -36391,7 +36391,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -36574,7 +36574,7 @@ paths: summary: Params queries all parameters of the ibc-transfer module. operationId: IbcApplicationsTransferV1Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -36615,7 +36615,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -36792,7 +36792,7 @@ paths: summary: Channels queries all the IBC channels of a chain. operationId: IbcCoreChannelV1Channels responses: - '200': + "200": description: A successful response. schema: type: object @@ -36953,7 +36953,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -37187,7 +37187,7 @@ paths: summary: Channel queries an IBC Channel. operationId: IbcCoreChannelV1Channel responses: - '200': + "200": description: A successful response. schema: type: object @@ -37322,7 +37322,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -37514,7 +37514,7 @@ paths: with the provided channel identifiers. operationId: IbcCoreChannelV1ChannelClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -37530,7 +37530,7 @@ paths: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -37756,7 +37756,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -37946,7 +37946,7 @@ paths: associated with the provided channel identifiers. operationId: IbcCoreChannelV1ChannelConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -37955,7 +37955,7 @@ paths: title: consensus state associated with the channel type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -38175,7 +38175,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -38377,7 +38377,7 @@ paths: channel. operationId: IbcCoreChannelV1NextSequenceReceive responses: - '200': + "200": description: A successful response. schema: type: object @@ -38437,7 +38437,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -38629,7 +38629,7 @@ paths: with a channel. operationId: IbcCoreChannelV1PacketAcknowledgements responses: - '200': + "200": description: A successful response. schema: type: object @@ -38739,7 +38739,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -38992,7 +38992,7 @@ paths: summary: PacketAcknowledgement queries a stored packet acknowledgement hash. operationId: IbcCoreChannelV1PacketAcknowledgement responses: - '200': + "200": description: A successful response. schema: type: object @@ -39056,7 +39056,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -39252,7 +39252,7 @@ paths: with a channel. operationId: IbcCoreChannelV1PacketCommitments responses: - '200': + "200": description: A successful response. schema: type: object @@ -39362,7 +39362,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -39610,7 +39610,7 @@ paths: with a channel and sequences. operationId: IbcCoreChannelV1UnreceivedAcks responses: - '200': + "200": description: A successful response. schema: type: object @@ -39668,7 +39668,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -39870,7 +39870,7 @@ paths: channel and sequences. operationId: IbcCoreChannelV1UnreceivedPackets responses: - '200': + "200": description: A successful response. schema: type: object @@ -39928,7 +39928,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -40126,7 +40126,7 @@ paths: summary: PacketCommitment queries a stored packet commitment hash. operationId: IbcCoreChannelV1PacketCommitment responses: - '200': + "200": description: A successful response. schema: type: object @@ -40191,7 +40191,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -40389,7 +40389,7 @@ paths: queried chain operationId: IbcCoreChannelV1PacketReceipt responses: - '200': + "200": description: A successful response. schema: type: object @@ -40453,7 +40453,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -40649,7 +40649,7 @@ paths: end. operationId: IbcCoreChannelV1ConnectionChannels responses: - '200': + "200": description: A successful response. schema: type: object @@ -40810,7 +40810,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -41049,7 +41049,7 @@ paths: summary: ClientStates queries all the IBC light clients of a chain. operationId: IbcCoreClientV1ClientStates responses: - '200': + "200": description: A successful response. schema: type: object @@ -41066,7 +41066,7 @@ paths: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -41293,7 +41293,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -41527,7 +41527,7 @@ paths: summary: ClientState queries an IBC light client. operationId: IbcCoreClientV1ClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -41536,7 +41536,7 @@ paths: title: client state associated with the request identifier type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -41758,7 +41758,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -41941,7 +41941,7 @@ paths: summary: Status queries the status of an IBC client. operationId: IbcCoreClientV1ClientStatus responses: - '200': + "200": description: A successful response. schema: type: object @@ -41968,7 +41968,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -42153,7 +42153,7 @@ paths: client. operationId: IbcCoreClientV1ConsensusStates responses: - '200': + "200": description: A successful response. schema: type: object @@ -42196,7 +42196,7 @@ paths: title: consensus state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the @@ -42421,7 +42421,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -42662,7 +42662,7 @@ paths: associated with a given client. operationId: IbcCoreClientV1ConsensusStateHeights responses: - '200': + "200": description: A successful response. schema: type: object @@ -42752,7 +42752,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -42995,7 +42995,7 @@ paths: a given height. operationId: IbcCoreClientV1ConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -43006,7 +43006,7 @@ paths: given height type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -43225,7 +43225,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -43429,7 +43429,7 @@ paths: summary: ClientParams queries all parameters of the ibc client submodule. operationId: IbcCoreClientV1ClientParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -43471,7 +43471,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -43648,7 +43648,7 @@ paths: summary: UpgradedClientState queries an Upgraded IBC light client. operationId: IbcCoreClientV1UpgradedClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -43657,7 +43657,7 @@ paths: title: client state associated with the request identifier type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -43841,7 +43841,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -44018,7 +44018,7 @@ paths: summary: UpgradedConsensusState queries an Upgraded IBC consensus state. operationId: IbcCoreClientV1UpgradedConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -44027,7 +44027,7 @@ paths: title: Consensus state associated with the request identifier type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -44211,7 +44211,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -44390,7 +44390,7 @@ paths: state. operationId: IbcCoreConnectionV1ClientConnections responses: - '200': + "200": description: A successful response. schema: type: object @@ -44451,7 +44451,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -44634,7 +44634,7 @@ paths: summary: Connections queries all the IBC connections of a chain. operationId: IbcCoreConnectionV1Connections responses: - '200': + "200": description: A successful response. schema: type: object @@ -44804,7 +44804,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -45038,7 +45038,7 @@ paths: summary: Connection queries an IBC connection end. operationId: IbcCoreConnectionV1Connection responses: - '200': + "200": description: A successful response. schema: type: object @@ -45192,7 +45192,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -45377,7 +45377,7 @@ paths: connection. operationId: IbcCoreConnectionV1ConnectionClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -45393,7 +45393,7 @@ paths: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type @@ -45619,7 +45619,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -45804,7 +45804,7 @@ paths: connection. operationId: IbcCoreConnectionV1ConnectionConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -45813,7 +45813,7 @@ paths: title: consensus state associated with the channel type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -46033,7 +46033,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -46226,7 +46226,7 @@ paths: summary: ConnectionParams queries all parameters of the ibc connection submodule. operationId: IbcCoreConnectionV1ConnectionParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -46265,7 +46265,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -46441,7 +46441,7 @@ paths: get: operationId: PocketApplicationApplicationAll responses: - '200': + "200": description: A successful response. schema: type: object @@ -46478,17 +46478,15 @@ paths: type: object properties: service: - title: Unique and semantic identifier for the service + title: >- + The Service for which the application is + configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but - was desigtned created to enable more complex - service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -46560,7 +46558,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -46627,7 +46625,7 @@ paths: summary: Queries a list of Application items. operationId: PocketApplicationApplication responses: - '200': + "200": description: A successful response. schema: type: object @@ -46662,17 +46660,15 @@ paths: type: object properties: service: - title: Unique and semantic identifier for the service + title: >- + The Service for which the application is configured + for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -46716,7 +46712,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -46731,7 +46727,7 @@ paths: summary: Parameters queries the parameters of the module. operationId: PocketApplicationParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -46764,7 +46760,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -46773,7 +46769,7 @@ paths: get: operationId: PocketGatewayGatewayAll responses: - '200': + "200": description: A successful response. schema: type: object @@ -46845,7 +46841,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -46912,7 +46908,7 @@ paths: summary: Queries a list of Gateway items. operationId: PocketGatewayGateway responses: - '200': + "200": description: A successful response. schema: type: object @@ -46954,7 +46950,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -46969,7 +46965,7 @@ paths: summary: Parameters queries the parameters of the module. operationId: PocketGatewayParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -46995,7 +46991,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -47005,7 +47001,7 @@ paths: summary: Parameters queries the parameters of the module. operationId: PocketPocketParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -47031,7 +47027,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -47041,7 +47037,7 @@ paths: summary: Parameters queries the parameters of the module. operationId: PocketServiceParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -47067,7 +47063,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -47077,7 +47073,7 @@ paths: summary: Queries a list of GetSession items. operationId: PocketSessionGetSession responses: - '200': + "200": description: A successful response. schema: type: object @@ -47102,10 +47098,6 @@ paths: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -47129,6 +47121,12 @@ paths: NOTE: session_id can be derived from the above values using on-chain but is included in the header for convenience + session_end_block_height: + type: string + format: int64 + title: >- + The height at which this session ended, this is the + last block of the session description: >- SessionHeader is a lightweight header for a session that can be passed around. @@ -47178,17 +47176,15 @@ paths: type: object properties: service: - title: Unique and semantic identifier for the service + title: >- + The Service for which the application is + configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but - was desigtned created to enable more complex - service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -47247,17 +47243,15 @@ paths: type: object properties: service: - title: Unique and semantic identifier for the service + title: >- + The Service for which the supplier is + configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant - but was desigtned created to enable more - complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -47358,7 +47352,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -47371,9 +47365,6 @@ paths: type: string - name: service.id description: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created to - enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -47405,7 +47396,7 @@ paths: summary: Parameters queries the parameters of the module. operationId: PocketSessionParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -47431,17 +47422,200 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: - Query + /pocket/supplier/claim: + get: + operationId: PocketSupplierAllClaims + responses: + "200": + description: A successful response. + schema: + type: object + properties: + claim: + type: array + items: + type: object + properties: + index: + type: string + supplier_address: + type: string + session_id: + type: string + root_hash: + type: string + description: >- + TODO_UPNEXT(@Olshansk): The structure below is the default + (untouched) scaffolded type. Update + + and productionize it for our use case. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + "@type": + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /pocket/supplier/claim/{index}: + get: + summary: Queries a list of Claim items. + operationId: PocketSupplierClaim + responses: + "200": + description: A successful response. + schema: + type: object + properties: + claim: + type: object + properties: + index: + type: string + supplier_address: + type: string + session_id: + type: string + root_hash: + type: string + description: >- + TODO_UPNEXT(@Olshansk): The structure below is the default + (untouched) scaffolded type. Update + + and productionize it for our use case. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + "@type": + type: string + additionalProperties: {} + parameters: + - name: index + in: path + required: true + type: string + tags: + - Query /pocket/supplier/params: get: summary: Parameters queries the parameters of the module. operationId: PocketSupplierParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -47467,7 +47641,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} tags: @@ -47476,7 +47650,7 @@ paths: get: operationId: PocketSupplierSupplierAll responses: - '200': + "200": description: A successful response. schema: type: object @@ -47512,18 +47686,16 @@ paths: items: type: object properties: - service_id: - title: Unique and semantic identifier for the service + service: + title: >- + The Service for which the supplier is configured + for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but - was desigtned created to enable more complex - service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -47643,7 +47815,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -47710,7 +47882,7 @@ paths: summary: Queries a list of Supplier items. operationId: PocketSupplierSupplier responses: - '200': + "200": description: A successful response. schema: type: object @@ -47744,18 +47916,14 @@ paths: items: type: object properties: - service_id: - title: Unique and semantic identifier for the service + service: + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -47847,7 +48015,7 @@ paths: items: type: object properties: - '@type': + "@type": type: string additionalProperties: {} parameters: @@ -47889,7 +48057,7 @@ definitions: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -48097,7 +48265,7 @@ definitions: properties: account_address: type: string - description: 'Since: cosmos-sdk 0.46.2' + description: "Since: cosmos-sdk 0.46.2" title: >- QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method @@ -48113,7 +48281,7 @@ definitions: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -48289,7 +48457,7 @@ definitions: account: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -48454,7 +48622,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -48643,7 +48811,7 @@ definitions: account: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -48808,7 +48976,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -49074,7 +49242,7 @@ definitions: google.protobuf.Any: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -49237,7 +49405,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -49400,7 +49568,7 @@ definitions: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -49577,7 +49745,7 @@ definitions: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -49769,7 +49937,7 @@ definitions: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -49979,7 +50147,7 @@ definitions: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -50185,7 +50353,7 @@ definitions: authorization: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -50505,8 +50673,8 @@ definitions: displayed in clients. name: type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' + description: "Since: cosmos-sdk 0.43" + title: "name defines the name of the token (eg: Cosmos Atom)" symbol: type: string description: >- @@ -50722,8 +50890,8 @@ definitions: displayed in clients. name: type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' + description: "Since: cosmos-sdk 0.43" + title: "name defines the name of the token (eg: Cosmos Atom)" symbol: type: string description: >- @@ -50868,8 +51036,8 @@ definitions: displayed in clients. name: type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' + description: "Since: cosmos-sdk 0.43" + title: "name defines the name of the token (eg: Cosmos Atom)" symbol: type: string description: >- @@ -51807,7 +51975,7 @@ definitions: title: PartsetHeader title: BlockID block: - title: 'Deprecated: please use `sdk_block` instead' + title: "Deprecated: please use `sdk_block` instead" type: object properties: header: @@ -52360,7 +52528,7 @@ definitions: Commit contains the evidence that a block was committed by a set of validators. sdk_block: - title: 'Since: cosmos-sdk 0.47' + title: "Since: cosmos-sdk 0.47" type: object properties: header: @@ -52948,7 +53116,7 @@ definitions: title: PartsetHeader title: BlockID block: - title: 'Deprecated: please use `sdk_block` instead' + title: "Deprecated: please use `sdk_block` instead" type: object properties: header: @@ -53501,7 +53669,7 @@ definitions: Commit contains the evidence that a block was committed by a set of validators. sdk_block: - title: 'Since: cosmos-sdk 0.47' + title: "Since: cosmos-sdk 0.47" type: object properties: header: @@ -54084,7 +54252,7 @@ definitions: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -54347,7 +54515,7 @@ definitions: title: Module is the type for VersionInfo cosmos_sdk_version: type: string - title: 'Since: cosmos-sdk 0.43' + title: "Since: cosmos-sdk 0.43" description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC @@ -54376,7 +54544,7 @@ definitions: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -54742,7 +54910,7 @@ definitions: pub_key: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -54935,7 +55103,7 @@ definitions: title: Module is the type for VersionInfo cosmos_sdk_version: type: string - title: 'Since: cosmos-sdk 0.43' + title: "Since: cosmos-sdk 0.43" description: VersionInfo is the type for the GetNodeInfoResponse message. tendermint.crypto.PublicKey: type: object @@ -57719,7 +57887,7 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - title: 'Since: cosmos-sdk 0.46' + title: "Since: cosmos-sdk 0.46" description: |- MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. @@ -57740,7 +57908,7 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - title: 'Since: cosmos-sdk 0.46' + title: "Since: cosmos-sdk 0.46" description: |- MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. @@ -58115,7 +58283,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -58304,7 +58472,7 @@ definitions: description: evidence returns the requested evidence. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -58377,7 +58545,7 @@ definitions: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -58462,7 +58630,7 @@ definitions: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -58544,7 +58712,7 @@ definitions: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -58651,7 +58819,7 @@ definitions: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -58889,7 +59057,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -59117,15 +59285,15 @@ definitions: description: metadata is any arbitrary metadata attached to the proposal. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal proposer: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: Proposer is the address of the proposal sumbitter description: Proposal defines the core field members of a governance proposal. cosmos.gov.v1.ProposalStatus: @@ -59399,7 +59567,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -59640,15 +59808,15 @@ definitions: description: metadata is any arbitrary metadata attached to the proposal. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal proposer: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: Proposer is the address of the proposal sumbitter description: >- QueryProposalResponse is the response type for the Query/Proposal RPC @@ -59670,7 +59838,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -59914,15 +60082,15 @@ definitions: description: metadata is any arbitrary metadata attached to the proposal. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal proposer: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: Proposer is the address of the proposal sumbitter description: Proposal defines the core field members of a governance proposal. description: proposals defines all the requested governance proposals. @@ -60278,7 +60446,7 @@ definitions: description: content is the proposal's content. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -60349,13 +60517,13 @@ definitions: proposal's voting period has ended. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -60593,7 +60761,7 @@ definitions: description: content is the proposal's content. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -60670,13 +60838,13 @@ definitions: proposal's voting period has ended. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -60738,7 +60906,7 @@ definitions: description: content is the proposal's content. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -60818,13 +60986,13 @@ definitions: proposal's voting period has ended. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -60897,13 +61065,13 @@ definitions: description: tally defines the requested tally. type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -61081,13 +61249,13 @@ definitions: cosmos.gov.v1beta1.TallyResult: type: object properties: - 'yes': + "yes": type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. - 'no': + "no": type: string description: no is the number of no votes on a proposal. no_with_veto: @@ -61306,7 +61474,7 @@ definitions: description: decision_policy specifies the group policy's decision policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -61599,7 +61767,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -61761,11 +61929,11 @@ definitions: passes. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a @@ -61947,7 +62115,7 @@ definitions: description: decision_policy specifies the group policy's decision policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -62075,7 +62243,7 @@ definitions: description: decision_policy specifies the group policy's decision policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -62202,7 +62370,7 @@ definitions: description: decision_policy specifies the group policy's decision policy. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -62435,7 +62603,7 @@ definitions: description: >- GroupInfo represents the high-level on-chain information for a group. - description: '`groups` is all the groups present in state.' + description: "`groups` is all the groups present in state." pagination: description: pagination defines the pagination in the response. type: object @@ -62582,7 +62750,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -62751,11 +62919,11 @@ definitions: proposal passes. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal description: QueryProposalResponse is the Query/Proposal response type. cosmos.group.v1.QueryProposalsByGroupPolicyResponse: @@ -62883,7 +63051,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -63054,11 +63222,11 @@ definitions: proposal passes. title: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: title is the title of the proposal summary: type: string - description: 'Since: cosmos-sdk 0.47' + description: "Since: cosmos-sdk 0.47" title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit @@ -63426,7 +63594,7 @@ definitions: title: data is the app specific metadata of the NFT class. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -63605,7 +63773,7 @@ definitions: title: data is an app specific data of the NFT. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -63803,7 +63971,7 @@ definitions: title: data is the app specific metadata of the NFT class. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -64002,7 +64170,7 @@ definitions: title: data is the app specific metadata of the NFT class. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -64213,7 +64381,7 @@ definitions: title: data is an app specific data of the NFT. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -64401,7 +64569,7 @@ definitions: title: data is an app specific data of the NFT. Optional type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -65145,7 +65313,7 @@ definitions: as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -65353,7 +65521,7 @@ definitions: description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse: type: object - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" title: MsgCancelUnbondingDelegationResponse cosmos.staking.v1beta1.MsgCreateValidatorResponse: type: object @@ -65645,7 +65813,7 @@ definitions: a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -65831,7 +65999,7 @@ definitions: as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -66152,7 +66320,7 @@ definitions: validator, as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of @@ -66704,7 +66872,7 @@ definitions: a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -66973,7 +67141,7 @@ definitions: as a Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -67553,7 +67721,7 @@ definitions: Protobuf Any. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -67852,7 +68020,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -68121,7 +68289,7 @@ definitions: description: The request transaction bytes. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -68298,7 +68466,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' + $ref: "#/definitions/cosmos.tx.v1beta1.SignerInfo" description: >- signer_infos defines the signing modes for the required signers. The number @@ -68549,7 +68717,7 @@ definitions: description: The request transaction bytes. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -68722,7 +68890,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + $ref: "#/definitions/cosmos.tx.v1beta1.Tx" description: txs are the transactions in the block. block_id: type: object @@ -69322,7 +69490,7 @@ definitions: type: object properties: tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + $ref: "#/definitions/cosmos.tx.v1beta1.Tx" description: tx is the queried transaction. tx_response: description: tx_response is the queried TxResponses. @@ -69413,7 +69581,7 @@ definitions: description: The request transaction bytes. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -69530,7 +69698,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + $ref: "#/definitions/cosmos.tx.v1beta1.Tx" description: txs is the list of queried transactions. tx_responses: type: array @@ -69622,7 +69790,7 @@ definitions: description: The request transaction bytes. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -69844,7 +70012,7 @@ definitions: Since: cosmos-sdk 0.45.2 multi: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' + $ref: "#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi" title: multi represents a nested multisig signer description: ModeInfo describes the signing mode of a single or nested multisig signer. cosmos.tx.v1beta1.ModeInfo.Multi: @@ -69873,7 +70041,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + $ref: "#/definitions/cosmos.tx.v1beta1.ModeInfo" title: |- mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys @@ -69978,7 +70146,7 @@ definitions: signer address for this position and lookup the public key. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -70032,7 +70200,7 @@ definitions: used with implementation specific semantics. additionalProperties: {} mode_info: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + $ref: "#/definitions/cosmos.tx.v1beta1.ModeInfo" title: |- mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's @@ -70053,7 +70221,7 @@ definitions: type: object properties: tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + $ref: "#/definitions/cosmos.tx.v1beta1.Tx" description: |- tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. @@ -70147,7 +70315,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -70357,7 +70525,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -70561,7 +70729,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -70738,7 +70906,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -70912,7 +71080,7 @@ definitions: and can't be handled, they will be ignored description: TxBody is the body of a transaction that all signers sign over. auth_info: - $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' + $ref: "#/definitions/cosmos.tx.v1beta1.AuthInfo" title: |- auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee @@ -70938,7 +71106,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -71132,7 +71300,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -71301,7 +71469,7 @@ definitions: items: type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -71503,7 +71671,7 @@ definitions: type: object properties: tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + $ref: "#/definitions/cosmos.tx.v1beta1.Tx" description: tx is the decoded transaction. description: |- TxDecodeResponse is the response type for the @@ -71535,7 +71703,7 @@ definitions: type: object properties: tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + $ref: "#/definitions/cosmos.tx.v1beta1.Tx" description: tx is the transaction to encode. description: |- TxEncodeRequest is the request type for the Service.TxEncode @@ -71668,7 +71836,7 @@ definitions: If this field is not empty, an error will be thrown. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -71741,7 +71909,7 @@ definitions: properties: address: type: string - description: 'Since: cosmos-sdk 0.46' + description: "Since: cosmos-sdk 0.46" title: QueryAuthorityResponse is the response type for Query/Authority cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: type: object @@ -71803,7 +71971,7 @@ definitions: If this field is not empty, an error will be thrown. type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -71900,7 +72068,7 @@ definitions: upgraded_consensus_state: type: string format: byte - title: 'Since: cosmos-sdk 0.43' + title: "Since: cosmos-sdk 0.43" description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState @@ -72636,7 +72804,7 @@ definitions: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -72841,7 +73009,7 @@ definitions: title: consensus state associated with the channel type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -73894,7 +74062,7 @@ definitions: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -74086,7 +74254,7 @@ definitions: title: consensus state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -74307,7 +74475,7 @@ definitions: title: client state associated with the request identifier type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -74515,7 +74683,7 @@ definitions: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -74807,7 +74975,7 @@ definitions: height type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -75039,7 +75207,7 @@ definitions: title: consensus state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -75246,7 +75414,7 @@ definitions: title: client state associated with the request identifier type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -75410,7 +75578,7 @@ definitions: title: Consensus state associated with the request identifier type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -75868,7 +76036,7 @@ definitions: title: client state type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -76073,7 +76241,7 @@ definitions: title: consensus state associated with the channel type: object properties: - '@type': + "@type": type: string description: >- A URL/resource name that uniquely identifies the type of the @@ -76623,16 +76791,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the application is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned - created to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -76710,17 +76875,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the application is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -76808,17 +76969,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the application is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -76863,16 +77020,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the application is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created - to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? name: @@ -76892,9 +77046,6 @@ definitions: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created to - enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? name: @@ -77063,9 +77214,6 @@ definitions: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned - created to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77086,6 +77234,12 @@ definitions: title: >- NOTE: session_id can be derived from the above values using on-chain but is included in the header for convenience + session_end_block_height: + type: string + format: int64 + title: >- + The height at which this session ended, this is the last block + of the session description: >- SessionHeader is a lightweight header for a session that can be passed around. @@ -77134,17 +77288,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the application is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77202,17 +77352,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77322,9 +77468,6 @@ definitions: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned - created to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77345,6 +77488,12 @@ definitions: title: >- NOTE: session_id can be derived from the above values using on-chain but is included in the header for convenience + session_end_block_height: + type: string + format: int64 + title: >- + The height at which this session ended, this is the last block of + the session description: >- SessionHeader is a lightweight header for a session that can be passed around. @@ -77393,17 +77542,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the application is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77459,17 +77604,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77566,9 +77707,6 @@ definitions: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created - to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? name: @@ -77588,26 +77726,12 @@ definitions: title: >- NOTE: session_id can be derived from the above values using on-chain but is included in the header for convenience - service_id: - title: The ID of the service this session is servicing - type: object - properties: - id: - type: string - description: Unique identifier for the service - title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created - to enable more complex service identification - - For example, what if we want to request a session for a certain - service but with some additional configs that identify it? - name: - type: string - description: (Optional) Semantic human readable name for the service - title: >- - TODO_TECHDEBT: Name is currently unused but acts as a reminder - than an optional onchain representation of the service is - necessary + session_end_block_height: + type: string + format: int64 + title: >- + The height at which this session ended, this is the last block of the + session description: >- SessionHeader is a lightweight header for a session that can be passed around. @@ -77694,16 +77818,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned - created to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -77766,27 +77887,6 @@ definitions: title: Additional configuration options for the endpoint title: SupplierEndpoint message to hold service configuration details title: List of endpoints for the service - service_id: - title: Unique and semantic identifier for the service - type: object - properties: - id: - type: string - description: Unique identifier for the service - title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned - created to enable more complex service identification - - For example, what if we want to request a session for a - certain service but with some additional configs that - identify it? - name: - type: string - description: (Optional) Semantic human readable name for the service - title: >- - TODO_TECHDEBT: Name is currently unused but acts as a - reminder than an optional onchain representation of the - service is necessary title: >- SupplierServiceConfig holds the service configuration the supplier stakes for @@ -77847,16 +77947,13 @@ definitions: type: object properties: service: - title: Unique and semantic identifier for the service + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created - to enable more complex service identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? name: @@ -77918,50 +78015,25 @@ definitions: title: Additional configuration options for the endpoint title: SupplierEndpoint message to hold service configuration details title: List of endpoints for the service - service_id: - title: Unique and semantic identifier for the service - type: object - properties: - id: - type: string - description: Unique identifier for the service - title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created - to enable more complex service identification - - For example, what if we want to request a session for a certain - service but with some additional configs that identify it? - name: - type: string - description: (Optional) Semantic human readable name for the service - title: >- - TODO_TECHDEBT: Name is currently unused but acts as a reminder - than an optional onchain representation of the service is - necessary title: >- SupplierServiceConfig holds the service configuration the supplier stakes for - pocket.shared.ServiceId: + pocket.supplier.Claim: type: object properties: - id: + index: type: string - description: Unique identifier for the service - title: >- - NOTE: `ServiceId.Id` may seem redundant but was desigtned created to - enable more complex service identification - - For example, what if we want to request a session for a certain - service but with some additional configs that identify it? - name: + supplier_address: type: string - description: (Optional) Semantic human readable name for the service - title: >- - TODO_TECHDEBT: Name is currently unused but acts as a reminder than an - optional onchain representation of the service is necessary - title: >- - ServiceId message to encapsulate unique and semantic identifiers for a - service on the network + session_id: + type: string + root_hash: + type: string + description: >- + TODO_UPNEXT(@Olshansk): The structure below is the default (untouched) + scaffolded type. Update + + and productionize it for our use case. pocket.supplier.MsgCreateClaimResponse: type: object pocket.supplier.MsgStakeSupplierResponse: @@ -77973,6 +78045,53 @@ definitions: pocket.supplier.Params: type: object description: Params defines the parameters for the module. + pocket.supplier.QueryAllClaimsResponse: + type: object + properties: + claim: + type: array + items: + type: object + properties: + index: + type: string + supplier_address: + type: string + session_id: + type: string + root_hash: + type: string + description: >- + TODO_UPNEXT(@Olshansk): The structure below is the default + (untouched) scaffolded type. Update + + and productionize it for our use case. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } pocket.supplier.QueryAllSupplierResponse: type: object properties: @@ -78007,18 +78126,14 @@ definitions: items: type: object properties: - service_id: - title: Unique and semantic identifier for the service + service: + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? @@ -78119,6 +78234,25 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } + pocket.supplier.QueryGetClaimResponse: + type: object + properties: + claim: + type: object + properties: + index: + type: string + supplier_address: + type: string + session_id: + type: string + root_hash: + type: string + description: >- + TODO_UPNEXT(@Olshansk): The structure below is the default (untouched) + scaffolded type. Update + + and productionize it for our use case. pocket.supplier.QueryGetSupplierResponse: type: object properties: @@ -78151,18 +78285,14 @@ definitions: items: type: object properties: - service_id: - title: Unique and semantic identifier for the service + service: + title: The Service for which the supplier is configured for type: object properties: id: type: string description: Unique identifier for the service title: >- - NOTE: `ServiceId.Id` may seem redundant but was - desigtned created to enable more complex service - identification - For example, what if we want to request a session for a certain service but with some additional configs that identify it? diff --git a/proto/pocket/application/query.proto b/proto/pocket/application/query.proto index 28a48fb99..949ed3a07 100644 --- a/proto/pocket/application/query.proto +++ b/proto/pocket/application/query.proto @@ -16,17 +16,14 @@ service Query { // Parameters queries the parameters of the module. rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/pocket/application/params"; - } // Queries a list of Application items. rpc Application (QueryGetApplicationRequest) returns (QueryGetApplicationResponse) { option (google.api.http).get = "/pocket/application/application/{address}"; - } rpc ApplicationAll (QueryAllApplicationRequest) returns (QueryAllApplicationResponse) { option (google.api.http).get = "/pocket/application/application"; - } } // QueryParamsRequest is request type for the Query/Params RPC method. diff --git a/proto/pocket/gateway/query.proto b/proto/pocket/gateway/query.proto index 48bd62f98..91080554d 100644 --- a/proto/pocket/gateway/query.proto +++ b/proto/pocket/gateway/query.proto @@ -16,17 +16,14 @@ service Query { // Parameters queries the parameters of the module. rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/pocket/gateway/params"; - } // Queries a list of Gateway items. - rpc Gateway (QueryGetGatewayRequest) returns (QueryGetGatewayResponse) { + rpc Gateway (QueryGetGatewayRequest) returns (QueryGetGatewayResponse) { option (google.api.http).get = "/pocket/gateway/gateway/{address}"; - } rpc GatewayAll (QueryAllGatewayRequest) returns (QueryAllGatewayResponse) { option (google.api.http).get = "/pocket/gateway/gateway"; - } } // QueryParamsRequest is request type for the Query/Params RPC method. diff --git a/proto/pocket/session/query.proto b/proto/pocket/session/query.proto index 08de287eb..44538be5d 100644 --- a/proto/pocket/session/query.proto +++ b/proto/pocket/session/query.proto @@ -17,13 +17,11 @@ service Query { // Parameters queries the parameters of the module. rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/pocket/session/params"; - } // Queries a list of GetSession items. rpc GetSession (QueryGetSessionRequest) returns (QueryGetSessionResponse) { option (google.api.http).get = "/pocket/session/get_session"; - } } // QueryParamsRequest is request type for the Query/Params RPC method. diff --git a/proto/pocket/supplier/claim.proto b/proto/pocket/supplier/claim.proto new file mode 100644 index 000000000..c0c293083 --- /dev/null +++ b/proto/pocket/supplier/claim.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package pocket.supplier; + +option go_package = "github.com/pokt-network/poktroll/x/supplier/types"; + +// TODO_UPNEXT(@Olshansk): The structure below is the default (untouched) scaffolded type. Update +// and productionize it for our use case. +message Claim { + string index = 1; + string supplier_address = 2; + string session_id = 3; + string root_hash = 4; +} + diff --git a/proto/pocket/supplier/genesis.proto b/proto/pocket/supplier/genesis.proto index 81d3550d0..b8f184ef9 100644 --- a/proto/pocket/supplier/genesis.proto +++ b/proto/pocket/supplier/genesis.proto @@ -5,12 +5,15 @@ package pocket.supplier; import "gogoproto/gogo.proto"; import "pocket/supplier/params.proto"; import "pocket/shared/supplier.proto"; +import "pocket/supplier/claim.proto"; option go_package = "github.com/pokt-network/poktroll/x/supplier/types"; // GenesisState defines the supplier module's genesis state. message GenesisState { - Params params = 1 [(gogoproto.nullable) = false]; + Params params = 1 [(gogoproto.nullable) = false]; repeated pocket.shared.Supplier supplierList = 2 [(gogoproto.nullable) = false]; + // TODO_UPNEXT(@Olshansk): Delete `claimList` from the genesis state. + repeated Claim claimList = 3 [(gogoproto.nullable) = false]; } diff --git a/proto/pocket/supplier/query.proto b/proto/pocket/supplier/query.proto index 6ed7eb194..8e15e041a 100644 --- a/proto/pocket/supplier/query.proto +++ b/proto/pocket/supplier/query.proto @@ -7,6 +7,7 @@ import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "pocket/supplier/params.proto"; import "pocket/shared/supplier.proto"; +import "pocket/supplier/claim.proto"; option go_package = "github.com/pokt-network/poktroll/x/supplier/types"; @@ -16,17 +17,22 @@ service Query { // Parameters queries the parameters of the module. rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/pocket/supplier/params"; - } // Queries a list of Supplier items. - rpc Supplier (QueryGetSupplierRequest) returns (QueryGetSupplierResponse) { + rpc Supplier (QueryGetSupplierRequest) returns (QueryGetSupplierResponse) { option (google.api.http).get = "/pocket/supplier/supplier/{address}"; - } rpc SupplierAll (QueryAllSupplierRequest) returns (QueryAllSupplierResponse) { option (google.api.http).get = "/pocket/supplier/supplier"; + } + // Queries a list of Claim items. + rpc Claim (QueryGetClaimRequest) returns (QueryGetClaimResponse) { + option (google.api.http).get = "/pocket/supplier/claim/{index}"; + } + rpc AllClaims (QueryAllClaimsRequest) returns (QueryAllClaimsResponse) { + option (google.api.http).get = "/pocket/supplier/claim"; } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -34,7 +40,6 @@ message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. message QueryParamsResponse { - // params holds all the parameters of this module. Params params = 1 [(gogoproto.nullable) = false]; } @@ -52,7 +57,23 @@ message QueryAllSupplierRequest { } message QueryAllSupplierResponse { - repeated pocket.shared.Supplier supplier = 1 [(gogoproto.nullable) = false]; + repeated pocket.shared.Supplier supplier = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } +message QueryGetClaimRequest { + string index = 1; +} + +message QueryGetClaimResponse { + Claim claim = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllClaimsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllClaimsResponse { + repeated Claim claim = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} \ No newline at end of file diff --git a/x/supplier/client/cli/query.go b/x/supplier/client/cli/query.go index da1e3de17..f70e996ba 100644 --- a/x/supplier/client/cli/query.go +++ b/x/supplier/client/cli/query.go @@ -27,6 +27,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdQueryParams()) cmd.AddCommand(CmdListSupplier()) cmd.AddCommand(CmdShowSupplier()) + cmd.AddCommand(CmdListClaim()) + cmd.AddCommand(CmdShowClaim()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/supplier/client/cli/query_claim.go b/x/supplier/client/cli/query_claim.go new file mode 100644 index 000000000..a71bdd246 --- /dev/null +++ b/x/supplier/client/cli/query_claim.go @@ -0,0 +1,84 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/pokt-network/poktroll/x/supplier/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func CmdListClaim() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-claims", + Short: "list all claims", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllClaimsRequest{ + Pagination: pageReq, + } + + res, err := queryClient.AllClaims(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowClaim() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-claim ", + Short: "shows a claim", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + argIndex := args[0] + + params := &types.QueryGetClaimRequest{ + Index: argIndex, + } + + res, err := queryClient.Claim(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/supplier/client/cli/query_claim_test.go b/x/supplier/client/cli/query_claim_test.go new file mode 100644 index 000000000..3c42d23de --- /dev/null +++ b/x/supplier/client/cli/query_claim_test.go @@ -0,0 +1,157 @@ +package cli_test + +import ( + "fmt" + "strconv" + "testing" + + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/pokt-network/poktroll/testutil/network" + "github.com/pokt-network/poktroll/testutil/nullify" + "github.com/pokt-network/poktroll/x/supplier/client/cli" + "github.com/pokt-network/poktroll/x/supplier/types" +) + +func networkWithClaimObjects(t *testing.T, n int) (*network.Network, []types.Claim) { + t.Helper() + cfg := network.DefaultConfig() + state := types.GenesisState{} + for i := 0; i < n; i++ { + claim := types.Claim{ + Index: strconv.Itoa(i), + } + nullify.Fill(&claim) + state.ClaimList = append(state.ClaimList, claim) + } + buf, err := cfg.Codec.MarshalJSON(&state) + require.NoError(t, err) + cfg.GenesisState[types.ModuleName] = buf + return network.New(t, cfg), state.ClaimList +} + +func TestShowClaim(t *testing.T) { + net, objs := networkWithClaimObjects(t, 2) + + ctx := net.Validators[0].ClientCtx + common := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + tests := []struct { + desc string + idIndex string + + args []string + err error + obj types.Claim + }{ + { + desc: "found", + idIndex: objs[0].Index, + + args: common, + obj: objs[0], + }, + { + desc: "not found", + idIndex: strconv.Itoa(100000), + + args: common, + err: status.Error(codes.NotFound, "not found"), + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + args := []string{ + tc.idIndex, + } + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdShowClaim(), args) + if tc.err != nil { + stat, ok := status.FromError(tc.err) + require.True(t, ok) + require.ErrorIs(t, stat.Err(), tc.err) + } else { + require.NoError(t, err) + var resp types.QueryGetClaimResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NotNil(t, resp.Claim) + require.Equal(t, + nullify.Fill(&tc.obj), + nullify.Fill(&resp.Claim), + ) + } + }) + } +} + +func TestListClaim(t *testing.T) { + net, objs := networkWithClaimObjects(t, 5) + + ctx := net.Validators[0].ClientCtx + request := func(next []byte, offset, limit uint64, total bool) []string { + args := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + if next == nil { + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagOffset, offset)) + } else { + args = append(args, fmt.Sprintf("--%s=%s", flags.FlagPageKey, next)) + } + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagLimit, limit)) + if total { + args = append(args, fmt.Sprintf("--%s", flags.FlagCountTotal)) + } + return args + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(objs); i += step { + args := request(nil, uint64(i), uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListClaim(), args) + require.NoError(t, err) + var resp types.QueryAllClaimsResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.Claim), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.Claim), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(objs); i += step { + args := request(next, 0, uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListClaim(), args) + require.NoError(t, err) + var resp types.QueryAllClaimsResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.Claim), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.Claim), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + args := request(nil, 0, uint64(len(objs)), true) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListClaim(), args) + require.NoError(t, err) + var resp types.QueryAllClaimsResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NoError(t, err) + require.Equal(t, len(objs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(objs), + nullify.Fill(resp.Claim), + ) + }) +} diff --git a/x/supplier/genesis.go b/x/supplier/genesis.go index fb7d59806..bda688fb9 100644 --- a/x/supplier/genesis.go +++ b/x/supplier/genesis.go @@ -7,12 +7,17 @@ import ( "github.com/pokt-network/poktroll/x/supplier/types" ) +// TODO_TECHDEBT(@Olshansk): Remove existing claims from genesis. // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { // Set all the supplier for _, supplier := range genState.SupplierList { k.SetSupplier(ctx, supplier) } + // Set all the claim + for _, elem := range genState.ClaimList { + k.SetClaim(ctx, elem) + } // this line is used by starport scaffolding # genesis/module/init k.SetParams(ctx, genState.Params) } @@ -23,6 +28,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.Params = k.GetParams(ctx) genesis.SupplierList = k.GetAllSupplier(ctx) + genesis.ClaimList = k.GetAllClaims(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/supplier/genesis_test.go b/x/supplier/genesis_test.go index ba9b521f8..3afdd0a8a 100644 --- a/x/supplier/genesis_test.go +++ b/x/supplier/genesis_test.go @@ -56,6 +56,14 @@ func TestGenesis(t *testing.T) { }, }, }, + ClaimList: []types.Claim{ + { + Index: "0", + }, + { + Index: "1", + }, + }, // this line is used by starport scaffolding # genesis/test/state } @@ -68,5 +76,6 @@ func TestGenesis(t *testing.T) { nullify.Fill(got) require.ElementsMatch(t, genesisState.SupplierList, got.SupplierList) + require.ElementsMatch(t, genesisState.ClaimList, got.ClaimList) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/supplier/keeper/claim.go b/x/supplier/keeper/claim.go new file mode 100644 index 000000000..db6f627b4 --- /dev/null +++ b/x/supplier/keeper/claim.go @@ -0,0 +1,64 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pokt-network/poktroll/x/supplier/types" +) + +// SetClaim set a specific claim in the store from its index +func (k Keeper) SetClaim(ctx sdk.Context, claim types.Claim) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ClaimKeyPrefix)) + b := k.cdc.MustMarshal(&claim) + store.Set(types.ClaimKey( + claim.Index, + ), b) +} + +// GetClaim returns a claim from its index +func (k Keeper) GetClaim( + ctx sdk.Context, + index string, + +) (val types.Claim, found bool) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ClaimKeyPrefix)) + + b := store.Get(types.ClaimKey( + index, + )) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveClaim removes a claim from the store +func (k Keeper) RemoveClaim( + ctx sdk.Context, + index string, + +) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ClaimKeyPrefix)) + store.Delete(types.ClaimKey( + index, + )) +} + +// GetAllClaims returns all claim +func (k Keeper) GetAllClaims(ctx sdk.Context) (list []types.Claim) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ClaimKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.Claim + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} diff --git a/x/supplier/keeper/claim_test.go b/x/supplier/keeper/claim_test.go new file mode 100644 index 000000000..dc80a9938 --- /dev/null +++ b/x/supplier/keeper/claim_test.go @@ -0,0 +1,64 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + keepertest "github.com/pokt-network/poktroll/testutil/keeper" + "github.com/pokt-network/poktroll/testutil/nullify" + "github.com/pokt-network/poktroll/x/supplier/keeper" + "github.com/pokt-network/poktroll/x/supplier/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func createNClaims(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Claim { + items := make([]types.Claim, n) + for i := range items { + items[i].Index = strconv.Itoa(i) + + keeper.SetClaim(ctx, items[i]) + } + return items +} + +func TestClaimGet(t *testing.T) { + keeper, ctx := keepertest.SupplierKeeper(t) + items := createNClaims(keeper, ctx, 10) + for _, item := range items { + rst, found := keeper.GetClaim(ctx, + item.Index, + ) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&rst), + ) + } +} +func TestClaimRemove(t *testing.T) { + keeper, ctx := keepertest.SupplierKeeper(t) + items := createNClaims(keeper, ctx, 10) + for _, item := range items { + keeper.RemoveClaim(ctx, + item.Index, + ) + _, found := keeper.GetClaim(ctx, + item.Index, + ) + require.False(t, found) + } +} + +func TestGetAllClaims(t *testing.T) { + keeper, ctx := keepertest.SupplierKeeper(t) + items := createNClaims(keeper, ctx, 10) + require.ElementsMatch(t, + nullify.Fill(items), + nullify.Fill(keeper.GetAllClaims(ctx)), + ) +} diff --git a/x/supplier/keeper/query_claim.go b/x/supplier/keeper/query_claim.go new file mode 100644 index 000000000..6f2021f14 --- /dev/null +++ b/x/supplier/keeper/query_claim.go @@ -0,0 +1,58 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/pokt-network/poktroll/x/supplier/types" +) + +func (k Keeper) AllClaims(goCtx context.Context, req *types.QueryAllClaimsRequest) (*types.QueryAllClaimsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var claims []types.Claim + ctx := sdk.UnwrapSDKContext(goCtx) + + store := ctx.KVStore(k.storeKey) + claimStore := prefix.NewStore(store, types.KeyPrefix(types.ClaimKeyPrefix)) + + pageRes, err := query.Paginate(claimStore, req.Pagination, func(key []byte, value []byte) error { + var claim types.Claim + if err := k.cdc.Unmarshal(value, &claim); err != nil { + return err + } + + claims = append(claims, claim) + return nil + }) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAllClaimsResponse{Claim: claims, Pagination: pageRes}, nil +} + +func (k Keeper) Claim(goCtx context.Context, req *types.QueryGetClaimRequest) (*types.QueryGetClaimResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + val, found := k.GetClaim( + ctx, + req.Index, + ) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + return &types.QueryGetClaimResponse{Claim: val}, nil +} diff --git a/x/supplier/keeper/query_claim_test.go b/x/supplier/keeper/query_claim_test.go new file mode 100644 index 000000000..0d403a104 --- /dev/null +++ b/x/supplier/keeper/query_claim_test.go @@ -0,0 +1,124 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "github.com/pokt-network/poktroll/testutil/keeper" + "github.com/pokt-network/poktroll/testutil/nullify" + "github.com/pokt-network/poktroll/x/supplier/types" +) + +func TestClaimQuerySingle(t *testing.T) { + keeper, ctx := keepertest.SupplierKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNClaims(keeper, ctx, 2) + tests := []struct { + desc string + request *types.QueryGetClaimRequest + response *types.QueryGetClaimResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetClaimRequest{ + Index: msgs[0].Index, + }, + response: &types.QueryGetClaimResponse{Claim: msgs[0]}, + }, + { + desc: "Second", + request: &types.QueryGetClaimRequest{ + Index: msgs[1].Index, + }, + response: &types.QueryGetClaimResponse{Claim: msgs[1]}, + }, + { + desc: "KeyNotFound", + request: &types.QueryGetClaimRequest{ + Index: strconv.Itoa(100000), + }, + err: status.Error(codes.NotFound, "not found"), + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.Claim(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + +func TestClaimQueryPaginated(t *testing.T) { + keeper, ctx := keepertest.SupplierKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNClaims(keeper, ctx, 5) + + request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllClaimsRequest { + return &types.QueryAllClaimsRequest{ + Pagination: &query.PageRequest{ + Key: next, + Offset: offset, + Limit: limit, + CountTotal: total, + }, + } + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(msgs); i += step { + resp, err := keeper.AllClaims(wctx, request(nil, uint64(i), uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.Claim), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.Claim), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(msgs); i += step { + resp, err := keeper.AllClaims(wctx, request(next, 0, uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.Claim), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.Claim), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + resp, err := keeper.AllClaims(wctx, request(nil, 0, 0, true)) + require.NoError(t, err) + require.Equal(t, len(msgs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(msgs), + nullify.Fill(resp.Claim), + ) + }) + t.Run("InvalidRequest", func(t *testing.T) { + _, err := keeper.AllClaims(wctx, nil) + require.ErrorIs(t, err, status.Error(codes.InvalidArgument, "invalid request")) + }) +} diff --git a/x/supplier/types/codec.go b/x/supplier/types/codec.go index 3bb7fcd12..364fde198 100644 --- a/x/supplier/types/codec.go +++ b/x/supplier/types/codec.go @@ -29,6 +29,8 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/supplier/types/genesis.go b/x/supplier/types/genesis.go index b68751dcd..521bfdc0d 100644 --- a/x/supplier/types/genesis.go +++ b/x/supplier/types/genesis.go @@ -17,6 +17,7 @@ const DefaultIndex uint64 = 1 func DefaultGenesis() *GenesisState { return &GenesisState{ SupplierList: []sharedtypes.Supplier{}, + ClaimList: []Claim{}, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), } @@ -62,6 +63,16 @@ func (gs GenesisState) Validate() error { } } + // Check for duplicated index in claim + claimIndexMap := make(map[string]struct{}) + + for _, elem := range gs.ClaimList { + index := string(ClaimKey(elem.Index)) + if _, ok := claimIndexMap[index]; ok { + return fmt.Errorf("duplicated index for claim") + } + claimIndexMap[index] = struct{}{} + } // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() diff --git a/x/supplier/types/genesis_test.go b/x/supplier/types/genesis_test.go index 5625fa435..6a0c11190 100644 --- a/x/supplier/types/genesis_test.go +++ b/x/supplier/types/genesis_test.go @@ -70,6 +70,14 @@ func TestGenesisState_Validate(t *testing.T) { Services: serviceList2, }, }, + ClaimList: []types.Claim{ + { + Index: "0", + }, + { + Index: "1", + }, + }, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, @@ -298,6 +306,20 @@ func TestGenesisState_Validate(t *testing.T) { }, valid: false, }, + { + desc: "duplicated claim", + genState: &types.GenesisState{ + ClaimList: []types.Claim{ + { + Index: "0", + }, + { + Index: "0", + }, + }, + }, + valid: false, + }, // this line is used by starport scaffolding # types/genesis/testcase } for _, tc := range tests { diff --git a/x/supplier/types/key_claim.go b/x/supplier/types/key_claim.go new file mode 100644 index 000000000..e57164b57 --- /dev/null +++ b/x/supplier/types/key_claim.go @@ -0,0 +1,23 @@ +package types + +import "encoding/binary" + +var _ binary.ByteOrder + +const ( + // ClaimKeyPrefix is the prefix to retrieve all Claim + ClaimKeyPrefix = "Claim/value/" +) + +// ClaimKey returns the store key to retrieve a Claim from the index fields +func ClaimKey( + index string, +) []byte { + var key []byte + + indexBytes := []byte(index) + key = append(key, indexBytes...) + key = append(key, []byte("/")...) + + return key +}