diff --git a/packages/provider/package.json b/packages/provider/package.json index a54ae730..87cc8068 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -13,9 +13,10 @@ }, "scripts": { "postinstall": "shx mkdir -p dist && link-module-alias", - "build": "tsc --build tsconfig.build.json && link-module-alias", + "build": "npm run build:api && tsc --build tsconfig.build.json && link-module-alias", "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", - "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", + "build:api": "npx swagger-typescript-api --axios --single-http-client --modular -p https://api.evmos.org/openapi.json -o ./src/generated", + "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", "test": "jest", "test:unit": "jest test/unit", "test:integration": "jest test/unit", @@ -27,8 +28,12 @@ }, "dependencies": { "@types/node": "^17.0.21", + "axios": "^0.27.2", "link-module-alias": "^1.2.0", "shx": "^0.3.4" }, - "gitHead": "fc2045b9357bde146e3374429453eb5d4a48a2ca" + "gitHead": "fc2045b9357bde146e3374429453eb5d4a48a2ca", + "devDependencies": { + "swagger-typescript-api": "^9.3.1" + } } diff --git a/packages/provider/src/generated/Cosmos.ts b/packages/provider/src/generated/Cosmos.ts new file mode 100644 index 00000000..5bc52a18 --- /dev/null +++ b/packages/provider/src/generated/Cosmos.ts @@ -0,0 +1,2676 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { + CosmosTxV1Beta1GetBlockWithTxsResponse, + CosmosTxV1Beta1GetTxResponse, + CosmosTxV1Beta1GetTxsEventResponse, + CosmosTxV1Beta1SimulateRequest, +} from './data-contracts' +import { ContentType, HttpClient, RequestParams } from './http-client' + +export class Cosmos { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * @description Since: cosmos-sdk 0.43 + * + * @tags Query + * @name Accounts + * @summary Accounts returns all the existing accounts + * @request GET:/cosmos/auth/v1beta1/accounts + */ + accounts = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + accounts?: { type_url?: string; value?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/accounts`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AuthAccount + * @summary Account returns account details based on address. + * @request GET:/cosmos/auth/v1beta1/accounts/{address} + */ + authAccount = (address: string, params: RequestParams = {}) => + this.http.request< + { account?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/accounts/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name AuthParams + * @summary Params queries all parameters. + * @request GET:/cosmos/auth/v1beta1/params + */ + authParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + max_memo_characters?: string + tx_sig_limit?: string + tx_size_cost_per_byte?: string + sig_verify_cost_ed25519?: string + sig_verify_cost_secp256k1?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Grants + * @summary Returns list of `Authorization`, granted to the grantee by the granter. + * @request GET:/cosmos/authz/v1beta1/grants + */ + grants = ( + query?: { + granter?: string + grantee?: string + msg_type_url?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + grants?: { + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants`, + method: 'GET', + query: query, + ...params, + }) + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Query + * @name GranteeGrants + * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. + * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} + */ + granteeGrants = ( + grantee: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, + method: 'GET', + query: query, + ...params, + }) + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Query + * @name GranterGrants + * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. + * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} + */ + granterGrants = ( + granter: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AllBalances + * @summary AllBalances queries the balance of all coins for a single account. + * @request GET:/cosmos/bank/v1beta1/balances/{address} + */ + allBalances = ( + address: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + balances?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/balances/${address}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name BankBalance + * @summary Balance queries the balance of a single coin for a single account. + * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom + */ + bankBalance = ( + address: string, + query?: { denom?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { balance?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomsMetadata + * @summary DenomsMetadata queries the client metadata for all registered coin denominations. + * @request GET:/cosmos/bank/v1beta1/denoms_metadata + */ + denomsMetadata = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + metadatas?: { + description?: string + denom_units?: { + denom?: string + exponent?: number + aliases?: string[] + }[] + base?: string + display?: string + name?: string + symbol?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/denoms_metadata`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomMetadata + * @summary DenomsMetadata queries the client metadata of a given coin denomination. + * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} + */ + denomMetadata = (denom: string, params: RequestParams = {}) => + this.http.request< + { + metadata?: { + description?: string + denom_units?: { + denom?: string + exponent?: number + aliases?: string[] + }[] + base?: string + display?: string + name?: string + symbol?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name BankParams + * @summary Params queries the parameters of x/bank module. + * @request GET:/cosmos/bank/v1beta1/params + */ + bankParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/params`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name SpendableBalances + * @summary SpendableBalances queries the spenable balance of all coins for a single +account. + * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} + */ + spendableBalances = ( + address: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + balances?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name TotalSupply + * @summary TotalSupply queries the total supply of all coins. + * @request GET:/cosmos/bank/v1beta1/supply + */ + totalSupply = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + supply?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/supply`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name SupplyOf + * @summary SupplyOf queries the supply of a single coin. + * @request GET:/cosmos/bank/v1beta1/supply/{denom} + */ + supplyOf = (denom: string, params: RequestParams = {}) => + this.http.request< + { amount?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/supply/${denom}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name CommunityPool + * @summary CommunityPool queries the community pool coins. + * @request GET:/cosmos/distribution/v1beta1/community_pool + */ + communityPool = (params: RequestParams = {}) => + this.http.request< + { pool?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/community_pool`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegationTotalRewards + * @summary DelegationTotalRewards queries the total rewards accrued by a each +validator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards + */ + delegationTotalRewards = ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { + rewards?: { + validator_address?: string + reward?: { denom?: string; amount?: string }[] + }[] + total?: { denom?: string; amount?: string }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DelegationRewards + * @summary DelegationRewards queries the total rewards accrued by a delegation. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address} + */ + delegationRewards = ( + delegatorAddress: string, + validatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { rewards?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DistDelegatorValidators + * @summary DelegatorValidators queries the validators of a delegator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators + */ + distDelegatorValidators = ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { validators?: string[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DelegatorWithdrawAddress + * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address + */ + delegatorWithdrawAddress = ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { withdraw_address?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DistributionParams + * @summary Params queries params of the distribution module. + * @request GET:/cosmos/distribution/v1beta1/params + */ + distributionParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorCommission + * @summary ValidatorCommission queries accumulated commission for a validator. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/commission + */ + validatorCommission = ( + validatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { commission?: { commission?: { denom?: string; amount?: string }[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorOutstandingRewards + * @summary ValidatorOutstandingRewards queries rewards of a validator address. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards + */ + validatorOutstandingRewards = ( + validatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { rewards?: { rewards?: { denom?: string; amount?: string }[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorSlashes + * @summary ValidatorSlashes queries slash events of a validator. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/slashes + */ + validatorSlashes = ( + validatorAddress: string, + query?: { + starting_height?: string + ending_height?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + slashes?: { validator_period?: string; fraction?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Allowance + * @summary Allowance returns fee granted to the grantee by the granter. + * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} + */ + allowance = (granter: string, grantee: string, params: RequestParams = {}) => + this.http.request< + { + allowance?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Allowances + * @summary Allowances returns all the grants for address. + * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} + */ + allowances = ( + grantee: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + allowances?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AllEvidence + * @summary AllEvidence queries all evidence. + * @request GET:/cosmos/evidence/v1beta1/evidence + */ + allEvidence = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + evidence?: { type_url?: string; value?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/evidence/v1beta1/evidence`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Evidence + * @summary Evidence queries evidence based on evidence hash. + * @request GET:/cosmos/evidence/v1beta1/evidence/{evidence_hash} + */ + evidence = (evidenceHash: string, params: RequestParams = {}) => + this.http.request< + { evidence?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name GovParams + * @summary Params queries all parameters of the gov module. + * @request GET:/cosmos/gov/v1beta1/params/{params_type} + */ + govParams = (paramsType: string, params: RequestParams = {}) => + this.http.request< + { + voting_params?: { voting_period?: string } + deposit_params?: { + min_deposit?: { denom?: string; amount?: string }[] + max_deposit_period?: string + } + tally_params?: { + quorum?: string + threshold?: string + veto_threshold?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/params/${paramsType}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Proposals + * @summary Proposals queries all proposals based on given status. + * @request GET:/cosmos/gov/v1beta1/proposals + */ + proposals = ( + query?: { + proposal_status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + voter?: string + depositor?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + proposals?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Proposal + * @summary Proposal queries proposal details based on ProposalID. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id} + */ + proposal = (proposalId: string, params: RequestParams = {}) => + this.http.request< + { + proposal?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Deposits + * @summary Deposits queries all deposits of a single proposal. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits + */ + deposits = ( + proposalId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + deposits?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Deposit + * @summary Deposit queries single deposit information based proposalID, depositAddr. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} + */ + deposit = ( + proposalId: string, + depositor: string, + params: RequestParams = {}, + ) => + this.http.request< + { + deposit?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TallyResult + * @summary TallyResult queries the tally of a proposal vote. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/tally + */ + tallyResult = (proposalId: string, params: RequestParams = {}) => + this.http.request< + { + tally?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Votes + * @summary Votes queries votes of a given proposal. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes + */ + votes = ( + proposalId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + votes?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Vote + * @summary Vote queries voted information based on proposalID, voterAddr. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} + */ + vote = (proposalId: string, voter: string, params: RequestParams = {}) => + this.http.request< + { + vote?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name SlashingParams + * @summary Params queries the parameters of slashing module + * @request GET:/cosmos/slashing/v1beta1/params + */ + slashingParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + signed_blocks_window?: string + min_signed_per_window?: string + downtime_jail_duration?: string + slash_fraction_double_sign?: string + slash_fraction_downtime?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name SigningInfos + * @summary SigningInfos queries signing info of all validators + * @request GET:/cosmos/slashing/v1beta1/signing_infos + */ + signingInfos = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/signing_infos`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name SigningInfo + * @summary SigningInfo queries the signing info of given cons address + * @request GET:/cosmos/slashing/v1beta1/signing_infos/{cons_address} + */ + signingInfo = (consAddress: string, params: RequestParams = {}) => + this.http.request< + { + val_signing_info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DelegatorDelegations + * @summary DelegatorDelegations queries all delegations of a given delegator address. + * @request GET:/cosmos/staking/v1beta1/delegations/{delegator_addr} + */ + delegatorDelegations = ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Redelegations + * @summary Redelegations queries redelegations of given address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations + */ + redelegations = ( + delegatorAddr: string, + query?: { + src_validator_addr?: string + dst_validator_addr?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + redelegation_responses?: { + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegatorUnbondingDelegations + * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given +delegator address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations + */ + delegatorUnbondingDelegations = ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegatorValidators + * @summary DelegatorValidators queries all validators info for given delegator +address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators + */ + delegatorValidators = ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegatorValidator + * @summary DelegatorValidator queries validator info for given delegator validator +pair. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr} + */ + delegatorValidator = ( + delegatorAddr: string, + validatorAddr: string, + params: RequestParams = {}, + ) => + this.http.request< + { + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name HistoricalInfo + * @summary HistoricalInfo queries the historical info for given height. + * @request GET:/cosmos/staking/v1beta1/historical_info/{height} + */ + historicalInfo = (height: string, params: RequestParams = {}) => + this.http.request< + { + hist?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/historical_info/${height}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name StakingParams + * @summary Parameters queries the staking parameters. + * @request GET:/cosmos/staking/v1beta1/params + */ + stakingParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + unbonding_time?: string + max_validators?: number + max_entries?: number + historical_entries?: number + bond_denom?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Pool + * @summary Pool queries the pool info. + * @request GET:/cosmos/staking/v1beta1/pool + */ + pool = (params: RequestParams = {}) => + this.http.request< + { pool?: { not_bonded_tokens?: string; bonded_tokens?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/pool`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Validators + * @summary Validators queries all validators that match the given status. + * @request GET:/cosmos/staking/v1beta1/validators + */ + validators = ( + query?: { + status?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Validator + * @summary Validator queries validator info for given validator address. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr} + */ + validator = (validatorAddr: string, params: RequestParams = {}) => + this.http.request< + { + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorDelegations + * @summary ValidatorDelegations queries delegate info for given validator. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations + */ + validatorDelegations = ( + validatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Delegation + * @summary Delegation queries delegate info for given validator delegator pair. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr} + */ + delegation = ( + validatorAddr: string, + delegatorAddr: string, + params: RequestParams = {}, + ) => + this.http.request< + { + delegation_response?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name UnbondingDelegation + * @summary UnbondingDelegation queries unbonding info for given validator delegator +pair. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation + */ + unbondingDelegation = ( + validatorAddr: string, + delegatorAddr: string, + params: RequestParams = {}, + ) => + this.http.request< + { + unbond?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorUnbondingDelegations + * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations + */ + validatorUnbondingDelegations = ( + validatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name Simulate + * @summary Simulate simulates executing a transaction for estimating gas usage. + * @request POST:/cosmos/tx/v1beta1/simulate + */ + simulate = ( + body: CosmosTxV1Beta1SimulateRequest, + params: RequestParams = {}, + ) => + this.http.request< + { + gas_info?: { gas_wanted?: string; gas_used?: string } + result?: { + data?: string + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/simulate`, + method: 'POST', + body: body, + type: ContentType.Json, + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetTxsEvent + * @summary GetTxsEvent fetches txs by event. + * @request GET:/cosmos/tx/v1beta1/txs + */ + getTxsEvent = ( + query?: { + events?: string[] + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + order_by?: 'ORDER_BY_UNSPECIFIED' | 'ORDER_BY_ASC' | 'ORDER_BY_DESC' + }, + params: RequestParams = {}, + ) => + this.http.request< + CosmosTxV1Beta1GetTxsEventResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name BroadcastTx + * @summary BroadcastTx broadcast transaction. + * @request POST:/cosmos/tx/v1beta1/txs + */ + broadcastTx = ( + body: { + tx_bytes?: string + mode?: + | 'BROADCAST_MODE_UNSPECIFIED' + | 'BROADCAST_MODE_BLOCK' + | 'BROADCAST_MODE_SYNC' + | 'BROADCAST_MODE_ASYNC' + }, + params: RequestParams = {}, + ) => + this.http.request< + { + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs`, + method: 'POST', + body: body, + type: ContentType.Json, + ...params, + }) + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Service + * @name GetBlockWithTxs + * @summary GetBlockWithTxs fetches a block with decoded txs. + * @request GET:/cosmos/tx/v1beta1/txs/block/{height} + */ + getBlockWithTxs = ( + height: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + CosmosTxV1Beta1GetBlockWithTxsResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs/block/${height}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetTx + * @summary GetTx fetches a tx by hash. + * @request GET:/cosmos/tx/v1beta1/txs/{hash} + */ + getTx = (hash: string, params: RequestParams = {}) => + this.http.request< + CosmosTxV1Beta1GetTxResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs/${hash}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetLatestBlock + * @summary GetLatestBlock returns the latest block. + * @request GET:/cosmos/base/tendermint/v1beta1/blocks/latest + */ + getLatestBlock = (params: RequestParams = {}) => + this.http.request< + { + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/blocks/latest`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetBlockByHeight + * @summary GetBlockByHeight queries block for given height. + * @request GET:/cosmos/base/tendermint/v1beta1/blocks/{height} + */ + getBlockByHeight = (height: string, params: RequestParams = {}) => + this.http.request< + { + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/blocks/${height}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetNodeInfo + * @summary GetNodeInfo queries the current node info. + * @request GET:/cosmos/base/tendermint/v1beta1/node_info + */ + getNodeInfo = (params: RequestParams = {}) => + this.http.request< + { + default_node_info?: { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } + } + application_version?: { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + cosmos_sdk_version?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/node_info`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetSyncing + * @summary GetSyncing queries node syncing. + * @request GET:/cosmos/base/tendermint/v1beta1/syncing + */ + getSyncing = (params: RequestParams = {}) => + this.http.request< + { syncing?: boolean }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/syncing`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetLatestValidatorSet + * @summary GetLatestValidatorSet queries latest validator-set. + * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/latest + */ + getLatestValidatorSet = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/validatorsets/latest`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetValidatorSetByHeight + * @summary GetValidatorSetByHeight queries validator-set at a given height. + * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/{height} + */ + getValidatorSetByHeight = ( + height: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/validatorsets/${height}`, + method: 'GET', + query: query, + ...params, + }) +} diff --git a/packages/provider/src/generated/Ethermint.ts b/packages/provider/src/generated/Ethermint.ts new file mode 100644 index 00000000..d514ed5d --- /dev/null +++ b/packages/provider/src/generated/Ethermint.ts @@ -0,0 +1,482 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from './http-client' + +export class Ethermint { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * No description + * + * @tags Query + * @name Account + * @summary Account queries an Ethereum account. + * @request GET:/ethermint/evm/v1/account/{address} + */ + account = (address: string, params: RequestParams = {}) => + this.http.request< + { balance?: string; code_hash?: string; nonce?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/account/${address}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name Balance + * @summary Balance queries the balance of a the EVM denomination for a single +EthAccount. + * @request GET:/ethermint/evm/v1/balances/{address} + */ + balance = (address: string, params: RequestParams = {}) => + this.http.request< + { balance?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/balances/${address}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name BaseFee + * @summary BaseFee queries the base fee of the parent block of the current block, +it's similar to feemarket module's method, but also checks london hardfork status. + * @request GET:/ethermint/evm/v1/base_fee + */ + baseFee = (params: RequestParams = {}) => + this.http.request< + { base_fee?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/base_fee`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Code + * @summary Code queries the balance of all coins for a single account. + * @request GET:/ethermint/evm/v1/codes/{address} + */ + code = (address: string, params: RequestParams = {}) => + this.http.request< + { code?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/codes/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name CosmosAccount + * @summary CosmosAccount queries an Ethereum account's Cosmos Address. + * @request GET:/ethermint/evm/v1/cosmos_account/{address} + */ + cosmosAccount = (address: string, params: RequestParams = {}) => + this.http.request< + { cosmos_address?: string; sequence?: string; account_number?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/cosmos_account/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name EstimateGas + * @summary EstimateGas implements the `eth_estimateGas` rpc api + * @request GET:/ethermint/evm/v1/estimate_gas + */ + estimateGas = ( + query?: { args?: string; gas_cap?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { gas?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/estimate_gas`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name EthCall + * @summary EthCall implements the `eth_call` rpc api + * @request GET:/ethermint/evm/v1/eth_call + */ + ethCall = ( + query?: { args?: string; gas_cap?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { + hash?: string + logs?: { + address?: string + topics?: string[] + data?: string + block_number?: string + tx_hash?: string + tx_index?: string + block_hash?: string + index?: string + removed?: boolean + }[] + ret?: string + vm_error?: string + gas_used?: string + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/eth_call`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name EvmParams + * @summary Params queries the parameters of x/evm module. + * @request GET:/ethermint/evm/v1/params + */ + evmParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + evm_denom?: string + enable_create?: boolean + enable_call?: boolean + extra_eips?: string[] + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + allow_unprotected_txs?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Storage + * @summary Storage queries the balance of all coins for a single account. + * @request GET:/ethermint/evm/v1/storage/{address}/{key} + */ + storage = (address: string, key: string, params: RequestParams = {}) => + this.http.request< + { value?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/storage/${address}/${key}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TraceBlock + * @summary TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + * @request GET:/ethermint/evm/v1/trace_block + */ + traceBlock = ( + query?: { + 'trace_config.tracer'?: string + 'trace_config.timeout'?: string + 'trace_config.reexec'?: string + 'trace_config.disable_stack'?: boolean + 'trace_config.disable_storage'?: boolean + 'trace_config.debug'?: boolean + 'trace_config.limit'?: number + 'trace_config.overrides.homestead_block'?: string + 'trace_config.overrides.dao_fork_block'?: string + 'trace_config.overrides.dao_fork_support'?: boolean + 'trace_config.overrides.eip150_block'?: string + 'trace_config.overrides.eip150_hash'?: string + 'trace_config.overrides.eip155_block'?: string + 'trace_config.overrides.eip158_block'?: string + 'trace_config.overrides.byzantium_block'?: string + 'trace_config.overrides.constantinople_block'?: string + 'trace_config.overrides.petersburg_block'?: string + 'trace_config.overrides.istanbul_block'?: string + 'trace_config.overrides.muir_glacier_block'?: string + 'trace_config.overrides.berlin_block'?: string + 'trace_config.overrides.london_block'?: string + 'trace_config.overrides.arrow_glacier_block'?: string + 'trace_config.overrides.merge_fork_block'?: string + 'trace_config.enable_memory'?: boolean + 'trace_config.enable_return_data'?: boolean + block_number?: string + block_hash?: string + block_time?: string + }, + params: RequestParams = {}, + ) => + this.http.request< + { data?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/trace_block`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name TraceTx + * @summary TraceTx implements the `debug_traceTransaction` rpc api + * @request GET:/ethermint/evm/v1/trace_tx + */ + traceTx = ( + query?: { + 'msg.data.type_url'?: string + 'msg.data.value'?: string + 'msg.size'?: number + 'msg.hash'?: string + 'msg.from'?: string + 'trace_config.tracer'?: string + 'trace_config.timeout'?: string + 'trace_config.reexec'?: string + 'trace_config.disable_stack'?: boolean + 'trace_config.disable_storage'?: boolean + 'trace_config.debug'?: boolean + 'trace_config.limit'?: number + 'trace_config.overrides.homestead_block'?: string + 'trace_config.overrides.dao_fork_block'?: string + 'trace_config.overrides.dao_fork_support'?: boolean + 'trace_config.overrides.eip150_block'?: string + 'trace_config.overrides.eip150_hash'?: string + 'trace_config.overrides.eip155_block'?: string + 'trace_config.overrides.eip158_block'?: string + 'trace_config.overrides.byzantium_block'?: string + 'trace_config.overrides.constantinople_block'?: string + 'trace_config.overrides.petersburg_block'?: string + 'trace_config.overrides.istanbul_block'?: string + 'trace_config.overrides.muir_glacier_block'?: string + 'trace_config.overrides.berlin_block'?: string + 'trace_config.overrides.london_block'?: string + 'trace_config.overrides.arrow_glacier_block'?: string + 'trace_config.overrides.merge_fork_block'?: string + 'trace_config.enable_memory'?: boolean + 'trace_config.enable_return_data'?: boolean + block_number?: string + block_hash?: string + block_time?: string + }, + params: RequestParams = {}, + ) => + this.http.request< + { data?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/trace_tx`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name ValidatorAccount + * @summary ValidatorAccount queries an Ethereum account's from a validator consensus +Address. + * @request GET:/ethermint/evm/v1/validator_account/{cons_address} + */ + validatorAccount = (consAddress: string, params: RequestParams = {}) => + this.http.request< + { account_address?: string; sequence?: string; account_number?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/validator_account/${consAddress}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name FeeMarketBaseFee + * @summary BaseFee queries the base fee of the parent block of the current block. + * @request GET:/ethermint/feemarket/v1/base_fee + */ + feeMarketBaseFee = (params: RequestParams = {}) => + this.http.request< + { base_fee?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/base_fee`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name BlockGas + * @summary BlockGas queries the gas used at a given block height + * @request GET:/ethermint/feemarket/v1/block_gas + */ + blockGas = (params: RequestParams = {}) => + this.http.request< + { gas?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/block_gas`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name FeeMarketParams + * @summary Params queries the parameters of x/feemarket module. + * @request GET:/ethermint/feemarket/v1/params + */ + feeMarketParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + no_base_fee?: boolean + base_fee_change_denominator?: number + elasticity_multiplier?: number + enable_height?: string + base_fee?: string + min_gas_price?: string + min_gas_multiplier?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/params`, + method: 'GET', + ...params, + }) +} diff --git a/packages/provider/src/generated/Evmos.ts b/packages/provider/src/generated/Evmos.ts new file mode 100644 index 00000000..55c15b7f --- /dev/null +++ b/packages/provider/src/generated/Evmos.ts @@ -0,0 +1,736 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from './http-client' + +export class Evmos { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * No description + * + * @tags Query + * @name ClaimsRecords + * @summary ClaimsRecords returns all claims records + * @request GET:/evmos/claims/v1/claims_records + */ + claimsRecords = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + claims?: { + address?: string + initial_claimable_amount?: string + actions_completed?: boolean[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/claims_records`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClaimsRecord + * @summary ClaimsRecord returns the claims record for a given address + * @request GET:/evmos/claims/v1/claims_records/{address} + */ + claimsRecord = (address: string, params: RequestParams = {}) => + this.http.request< + { + initial_claimable_amount?: string + claims?: { + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + completed?: boolean + claimable_amount?: string + }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/claims_records/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClaimsParams + * @summary Params returns the claims module parameters + * @request GET:/evmos/claims/v1/params + */ + claimsParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + enable_claims?: boolean + airdrop_start_time?: string + duration_until_decay?: string + duration_of_decay?: string + claims_denom?: string + authorized_channels?: string[] + evm_channels?: string[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TotalUnclaimed + * @summary TotalUnclaimed queries the total unclaimed tokens from the airdrop + * @request GET:/evmos/claims/v1/total_unclaimed + */ + totalUnclaimed = (params: RequestParams = {}) => + this.http.request< + { coins?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/total_unclaimed`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name CurrentEpoch + * @summary CurrentEpoch provide current epoch of specified identifier + * @request GET:/evmos/epochs/v1/current_epoch + */ + currentEpoch = ( + query?: { identifier?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { current_epoch?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/epochs/v1/current_epoch`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name EpochInfos + * @summary EpochInfos provide running epochInfos + * @request GET:/evmos/epochs/v1/epochs + */ + epochInfos = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + epochs?: { + identifier?: string + start_time?: string + duration?: string + current_epoch?: string + current_epoch_start_time?: string + epoch_counting_started?: boolean + current_epoch_start_height?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/epochs/v1/epochs`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Erc20Params + * @summary Params retrieves the erc20 module params + * @request GET:/evmos/erc20/v1/params + */ + erc20Params = (params: RequestParams = {}) => + this.http.request< + { params?: { enable_erc20?: boolean; enable_evm_hook?: boolean } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TokenPairs + * @summary TokenPairs retrieves registered token pairs + * @request GET:/evmos/erc20/v1/token_pairs + */ + tokenPairs = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + token_pairs?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: + | 'OWNER_UNSPECIFIED' + | 'OWNER_MODULE' + | 'OWNER_EXTERNAL' + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/token_pairs`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name TokenPair + * @summary TokenPair retrieves a registered token pair + * @request GET:/evmos/erc20/v1/token_pairs/{token} + */ + tokenPair = (token: string, params: RequestParams = {}) => + this.http.request< + { + token_pair?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: + | 'OWNER_UNSPECIFIED' + | 'OWNER_MODULE' + | 'OWNER_EXTERNAL' + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/token_pairs/${token}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name AllocationMeters + * @summary AllocationMeters retrieves active allocation meters for a given +denomination + * @request GET:/evmos/incentives/v1/allocation_meters + */ + allocationMeters = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + allocation_meters?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/allocation_meters`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AllocationMeter + * @summary AllocationMeter Retrieves a active gas meter + * @request GET:/evmos/incentives/v1/allocation_meters/{denom} + */ + allocationMeter = (denom: string, params: RequestParams = {}) => + this.http.request< + { allocation_meter?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/allocation_meters/${denom}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name GasMeters + * @summary GasMeters retrieves active gas meters for a given contract + * @request GET:/evmos/incentives/v1/gas_meters/{contract} + */ + gasMeters = ( + contract: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + gas_meters?: { + contract?: string + participant?: string + cumulative_gas?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/gas_meters/${contract}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name GasMeter + * @summary GasMeter Retrieves a active gas meter + * @request GET:/evmos/incentives/v1/gas_meters/{contract}/{participant} + */ + gasMeter = ( + contract: string, + participant: string, + params: RequestParams = {}, + ) => + this.http.request< + { gas_meter?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/gas_meters/${contract}/${participant}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Incentives + * @summary Incentives retrieves registered incentives + * @request GET:/evmos/incentives/v1/incentives + */ + incentives = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + incentives?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/incentives`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Incentive + * @summary Incentive retrieves a registered incentive + * @request GET:/evmos/incentives/v1/incentives/{contract} + */ + incentive = (contract: string, params: RequestParams = {}) => + this.http.request< + { + incentive?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/incentives/${contract}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name IncentivesParams + * @summary Params retrieves the incentives module params + * @request GET:/evmos/incentives/v1/params + */ + incentivesParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + enable_incentives?: boolean + allocation_limit?: string + incentives_epoch_identifier?: string + reward_scaler?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/params`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name CirculatingSupply + * @summary CirculatingSupply retrieves the total number of tokens that are in +circulation (i.e. excluding unvested tokens). + * @request GET:/evmos/inflation/v1/circulating_supply + */ + circulatingSupply = (params: RequestParams = {}) => + this.http.request< + { circulating_supply?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/circulating_supply`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name EpochMintProvision + * @summary EpochMintProvision retrieves current minting epoch provision value. + * @request GET:/evmos/inflation/v1/epoch_mint_provision + */ + epochMintProvision = (params: RequestParams = {}) => + this.http.request< + { epoch_mint_provision?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/epoch_mint_provision`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name InflationRate + * @summary InflationRate retrieves the inflation rate of the current period. + * @request GET:/evmos/inflation/v1/inflation_rate + */ + inflationRate = (params: RequestParams = {}) => + this.http.request< + { inflation_rate?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/inflation_rate`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name InflationParams + * @summary Params retrieves the total set of minting parameters. + * @request GET:/evmos/inflation/v1/params + */ + inflationParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + mint_denom?: string + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + enable_inflation?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Period + * @summary Period retrieves current period. + * @request GET:/evmos/inflation/v1/period + */ + period = (params: RequestParams = {}) => + this.http.request< + { period?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/period`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name SkippedEpochs + * @summary SkippedEpochs retrieves the total number of skipped epochs. + * @request GET:/evmos/inflation/v1/skipped_epochs + */ + skippedEpochs = (params: RequestParams = {}) => + this.http.request< + { skipped_epochs?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/skipped_epochs`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Balances + * @summary Retrieves the unvested, vested and locked tokens for a vesting account + * @request GET:/evmos/vesting/v1/balances/{address} + */ + balances = (address: string, params: RequestParams = {}) => + this.http.request< + { + locked?: { denom?: string; amount?: string }[] + unvested?: { denom?: string; amount?: string }[] + vested?: { denom?: string; amount?: string }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/vesting/v1/balances/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name RecoveryParams + * @summary Params retrieves the total set of recovery parameters. + * @request GET:/evmos/recovery/v1/params + */ + recoveryParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { enable_recovery?: boolean; packet_timeout_duration?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/recovery/v1/params`, + method: 'GET', + ...params, + }) +} diff --git a/packages/provider/src/generated/Ibc.ts b/packages/provider/src/generated/Ibc.ts new file mode 100644 index 00000000..f78faaca --- /dev/null +++ b/packages/provider/src/generated/Ibc.ts @@ -0,0 +1,1005 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from './http-client' + +export class Ibc { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * No description + * + * @tags Query + * @name DenomHash + * @summary DenomHash queries a denomination hash information. + * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} + */ + denomHash = (trace: string, params: RequestParams = {}) => + this.http.request< + { hash?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomTraces + * @summary DenomTraces queries all denomination traces. + * @request GET:/ibc/apps/transfer/v1/denom_traces + */ + denomTraces = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + denom_traces?: { path?: string; base_denom?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_traces`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomTrace + * @summary DenomTrace queries a denomination trace information. + * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} + */ + denomTrace = (hash: string, params: RequestParams = {}) => + this.http.request< + { denom_trace?: { path?: string; base_denom?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TransferParams + * @summary Params queries all parameters of the ibc-transfer module. + * @request GET:/ibc/apps/transfer/v1/params + */ + transferParams = (params: RequestParams = {}) => + this.http.request< + { params?: { send_enabled?: boolean; receive_enabled?: boolean } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientParams + * @summary ClientParams queries all parameters of the ibc client. + * @request GET:/ibc/client/v1/params + */ + clientParams = (params: RequestParams = {}) => + this.http.request< + { params?: { allowed_clients?: string[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/client/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientStates + * @summary ClientStates queries all the IBC light clients of a chain. + * @request GET:/ibc/core/client/v1/client_states + */ + clientStates = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + client_states?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_states`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientState + * @summary ClientState queries an IBC light client. + * @request GET:/ibc/core/client/v1/client_states/{client_id} + */ + clientState = (clientId: string, params: RequestParams = {}) => + this.http.request< + { + client_state?: { type_url?: string; value?: string } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_states/${clientId}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientStatus + * @summary Status queries the status of an IBC client. + * @request GET:/ibc/core/client/v1/client_status/{client_id} + */ + clientStatus = (clientId: string, params: RequestParams = {}) => + this.http.request< + { status?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_status/${clientId}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConsensusStates + * @summary ConsensusStates queries all the consensus state associated with a given +client. + * @request GET:/ibc/core/client/v1/consensus_states/{client_id} + */ + consensusStates = ( + clientId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_states?: { + height?: { revision_number?: string; revision_height?: string } + consensus_state?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/consensus_states/${clientId}`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name ConsensusState + * @summary ConsensusState queries a consensus state associated with a client state at +a given height. + * @request GET:/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height} + */ + consensusState = ( + clientId: string, + revisionNumber: string, + revisionHeight: string, + query?: { latest_height?: boolean }, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_state?: { type_url?: string; value?: string } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/consensus_states/${clientId}/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name UpgradedClientState + * @summary UpgradedClientState queries an Upgraded IBC light client. + * @request GET:/ibc/core/client/v1/upgraded_client_states + */ + upgradedClientState = (params: RequestParams = {}) => + this.http.request< + { upgraded_client_state?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/upgraded_client_states`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name UpgradedConsensusState + * @summary UpgradedConsensusState queries an Upgraded IBC consensus state. + * @request GET:/ibc/core/client/v1/upgraded_consensus_states + */ + upgradedConsensusState = (params: RequestParams = {}) => + this.http.request< + { upgraded_consensus_state?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/upgraded_consensus_states`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ClientConnections + * @summary ClientConnections queries the connection paths associated with a client +state. + * @request GET:/ibc/core/connection/v1/client_connections/{client_id} + */ + clientConnections = (clientId: string, params: RequestParams = {}) => + this.http.request< + { + connection_paths?: string[] + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/client_connections/${clientId}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Connections + * @summary Connections queries all the IBC connections of a chain. + * @request GET:/ibc/core/connection/v1/connections + */ + connections = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + connections?: { + id?: string + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Connection + * @summary Connection queries an IBC connection end. + * @request GET:/ibc/core/connection/v1/connections/{connection_id} + */ + connection = (connectionId: string, params: RequestParams = {}) => + this.http.request< + { + connection?: { + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConnectionClientState + * @summary ConnectionClientState queries the client state associated with the +connection. + * @request GET:/ibc/core/connection/v1/connections/{connection_id}/client_state + */ + connectionClientState = (connectionId: string, params: RequestParams = {}) => + this.http.request< + { + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}/client_state`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConnectionConsensusState + * @summary ConnectionConsensusState queries the consensus state associated with the +connection. + * @request GET:/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height} + */ + connectionConsensusState = ( + connectionId: string, + revisionNumber: string, + revisionHeight: string, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_state?: { type_url?: string; value?: string } + client_id?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Channels + * @summary Channels queries all the IBC channels of a chain. + * @request GET:/ibc/core/channel/v1/channels + */ + channels = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Channel + * @summary Channel queries an IBC Channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id} + */ + channel = (channelId: string, portId: string, params: RequestParams = {}) => + this.http.request< + { + channel?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ChannelClientState + * @summary ChannelClientState queries for the client state for the channel associated +with the provided channel identifiers. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state + */ + channelClientState = ( + channelId: string, + portId: string, + params: RequestParams = {}, + ) => + this.http.request< + { + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/client_state`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ChannelConsensusState + * @summary ChannelConsensusState queries for the consensus state for the channel +associated with the provided channel identifiers. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height} + */ + channelConsensusState = ( + channelId: string, + portId: string, + revisionNumber: string, + revisionHeight: string, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_state?: { type_url?: string; value?: string } + client_id?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name NextSequenceReceive + * @summary NextSequenceReceive returns the next receive sequence for a given channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence + */ + nextSequenceReceive = ( + channelId: string, + portId: string, + params: RequestParams = {}, + ) => + this.http.request< + { + next_sequence_receive?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/next_sequence`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name PacketAcknowledgements + * @summary PacketAcknowledgements returns all the packet acknowledgements associated +with a channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements + */ + packetAcknowledgements = ( + channelId: string, + portId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + packet_commitment_sequences?: string[] + }, + params: RequestParams = {}, + ) => + this.http.request< + { + acknowledgements?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acknowledgements`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name PacketAcknowledgement + * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence} + */ + packetAcknowledgement = ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.http.request< + { + acknowledgement?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acks/${sequence}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name PacketCommitments + * @summary PacketCommitments returns all the packet commitments hashes associated +with a channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments + */ + packetCommitments = ( + channelId: string, + portId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + commitments?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name UnreceivedAcks + * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated +with a channel and sequences. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks + */ + unreceivedAcks = ( + channelId: string, + portId: string, + packetAckSequences: string[], + params: RequestParams = {}, + ) => + this.http.request< + { + sequences?: string[] + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetAckSequences}/unreceived_acks`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name UnreceivedPackets + * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a +channel and sequences. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets + */ + unreceivedPackets = ( + channelId: string, + portId: string, + packetCommitmentSequences: string[], + params: RequestParams = {}, + ) => + this.http.request< + { + sequences?: string[] + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetCommitmentSequences}/unreceived_packets`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name PacketCommitment + * @summary PacketCommitment queries a stored packet commitment hash. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence} + */ + packetCommitment = ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.http.request< + { + commitment?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${sequence}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name PacketReceipt + * @summary PacketReceipt queries if a given packet sequence has been received on the +queried chain + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence} + */ + packetReceipt = ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.http.request< + { + received?: boolean + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_receipts/${sequence}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConnectionChannels + * @summary ConnectionChannels queries all the channels associated with a connection +end. + * @request GET:/ibc/core/channel/v1/connections/{connection}/channels + */ + connectionChannels = ( + connection: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/connections/${connection}/channels`, + method: 'GET', + query: query, + ...params, + }) +} diff --git a/packages/provider/src/generated/data-contracts.ts b/packages/provider/src/generated/data-contracts.ts new file mode 100644 index 00000000..10771de7 --- /dev/null +++ b/packages/provider/src/generated/data-contracts.ts @@ -0,0 +1,7125 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +/** +* message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } +*/ +export interface CosmosBaseQueryV1Beta1PageRequest { + /** + * 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. + * @format byte + */ + key?: string + + /** + * 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. + * @format uint64 + */ + offset?: string + + /** + * 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. + * @format uint64 + */ + limit?: string + + /** + * 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. + */ + count_total?: boolean + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean +} + +/** +* 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; + } +*/ +export interface CosmosBaseQueryV1Beta1PageResponse { + /** + * next_key is the key to be passed to PageRequest.key to + * query the next page most efficiently + * @format byte + */ + next_key?: string + + /** + * total is total number of results available if PageRequest.count_total + * was set, its value is undefined otherwise + * @format uint64 + */ + total?: string +} + +/** +* Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. +*/ +export interface CosmosBaseV1Beta1Coin { + denom?: string + amount?: string +} + +/** +* Action defines the list of available actions to claim the airdrop tokens. + + - ACTION_UNSPECIFIED: UNSPECIFIED defines an invalid action. + - ACTION_VOTE: VOTE defines a proposal vote. + - ACTION_DELEGATE: DELEGATE defines an staking delegation. + - ACTION_EVM: EVM defines an EVM transaction. + - ACTION_IBC_TRANSFER: IBC Transfer defines a fungible token transfer transaction via IBC. +*/ +export enum EvmosClaimsV1Action { + ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED', + ACTION_VOTE = 'ACTION_VOTE', + ACTION_DELEGATE = 'ACTION_DELEGATE', + ACTION_EVM = 'ACTION_EVM', + ACTION_IBC_TRANSFER = 'ACTION_IBC_TRANSFER', +} + +/** +* Claim defines the action, completed flag and the remaining claimable amount +for a given user. This is only used during client queries. +*/ +export interface EvmosClaimsV1Claim { + /** + * action enum + * Action defines the list of available actions to claim the airdrop tokens. + * - ACTION_UNSPECIFIED: UNSPECIFIED defines an invalid action. + * - ACTION_VOTE: VOTE defines a proposal vote. + * - ACTION_DELEGATE: DELEGATE defines an staking delegation. + * - ACTION_EVM: EVM defines an EVM transaction. + * - ACTION_IBC_TRANSFER: IBC Transfer defines a fungible token transfer transaction via IBC. + */ + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + + /** true if the action has been completed */ + completed?: boolean + + /** claimable token amount for the action. Zero if completed */ + claimable_amount?: string +} + +/** +* ClaimsRecordAddress is the claims metadata per address that is used at +Genesis. +*/ +export interface EvmosClaimsV1ClaimsRecordAddress { + /** bech32 or hex address of claim user */ + address?: string + + /** total initial claimable amount for the user */ + initial_claimable_amount?: string + + /** slice of the available actions completed */ + actions_completed?: boolean[] +} + +/** + * Params defines the claims module's parameters. + */ +export interface EvmosClaimsV1Params { + /** enable claiming process */ + enable_claims?: boolean + + /** + * timestamp of the airdrop start + * @format date-time + */ + airdrop_start_time?: string + + /** duration until decay of claimable tokens begin */ + duration_until_decay?: string + + /** duration of the token claim decay period */ + duration_of_decay?: string + + /** denom of claimable coin */ + claims_denom?: string + + /** + * list of authorized channel identifiers that can perform address + * attestations via IBC. + */ + authorized_channels?: string[] + + /** list of channel identifiers from EVM compatible chains */ + evm_channels?: string[] +} + +/** +* QueryClaimsRecordResponse is the response type for the Query/ClaimsRecord RPC +method. +*/ +export interface EvmosClaimsV1QueryClaimsRecordResponse { + /** total initial claimable amount for the user */ + initial_claimable_amount?: string + + /** the claims of the user */ + claims?: { + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + completed?: boolean + claimable_amount?: string + }[] +} + +/** +* QueryClaimsRecordsResponse is the response type for the Query/ClaimsRecords +RPC method. +*/ +export interface EvmosClaimsV1QueryClaimsRecordsResponse { + /** claims defines all claims records */ + claims?: { + address?: string + initial_claimable_amount?: string + actions_completed?: boolean[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface EvmosClaimsV1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + enable_claims?: boolean + airdrop_start_time?: string + duration_until_decay?: string + duration_of_decay?: string + claims_denom?: string + authorized_channels?: string[] + evm_channels?: string[] + } +} + +/** +* QueryTotalUnclaimedResponse is the response type for the Query/TotalUnclaimed +RPC method. +*/ +export interface EvmosClaimsV1QueryTotalUnclaimedResponse { + /** coins defines the unclaimed coins */ + coins?: { denom?: string; amount?: string }[] +} + +/** +* `Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } +*/ +export interface GoogleProtobufAny { + /** + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: + * * If no scheme is provided, `https` is assumed. + * * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + */ + type_url?: string + + /** + * Must be a valid serialized protocol buffer of the above specified type. + * @format byte + */ + value?: string +} + +export interface GrpcGatewayRuntimeError { + error?: string + + /** @format int32 */ + code?: number + message?: string + details?: { type_url?: string; value?: string }[] +} + +export interface EvmosEpochsV1EpochInfo { + identifier?: string + + /** @format date-time */ + start_time?: string + duration?: string + + /** @format int64 */ + current_epoch?: string + + /** @format date-time */ + current_epoch_start_time?: string + epoch_counting_started?: boolean + + /** @format int64 */ + current_epoch_start_height?: string +} + +export interface EvmosEpochsV1QueryCurrentEpochResponse { + /** @format int64 */ + current_epoch?: string +} + +export interface EvmosEpochsV1QueryEpochsInfoResponse { + epochs?: { + identifier?: string + start_time?: string + duration?: string + current_epoch?: string + current_epoch_start_time?: string + epoch_counting_started?: boolean + current_epoch_start_height?: string + }[] + + /** + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* Owner enumerates the ownership of a ERC20 contract. + + - OWNER_UNSPECIFIED: OWNER_UNSPECIFIED defines an invalid/undefined owner. + - OWNER_MODULE: OWNER_MODULE erc20 is owned by the erc20 module account. + - OWNER_EXTERNAL: EXTERNAL erc20 is owned by an external account. +*/ +export enum EvmosErc20V1Owner { + OWNER_UNSPECIFIED = 'OWNER_UNSPECIFIED', + OWNER_MODULE = 'OWNER_MODULE', + OWNER_EXTERNAL = 'OWNER_EXTERNAL', +} + +export interface EvmosErc20V1Params { + /** parameter to enable the conversion of Cosmos coins <--> ERC20 tokens. */ + enable_erc20?: boolean + + /** + * parameter to enable the EVM hook that converts an ERC20 token to a Cosmos + * Coin by transferring the Tokens through a MsgEthereumTx to the + * ModuleAddress Ethereum address. + */ + enable_evm_hook?: boolean +} + +/** +* QueryParamsResponse is the response type for the Query/Params RPC +method. +*/ +export interface EvmosErc20V1QueryParamsResponse { + /** Params defines the erc20 module params */ + params?: { enable_erc20?: boolean; enable_evm_hook?: boolean } +} + +/** +* QueryTokenPairResponse is the response type for the Query/TokenPair RPC +method. +*/ +export interface EvmosErc20V1QueryTokenPairResponse { + /** TokenPair defines an instance that records a pairing consisting of a native Cosmos Coin and an ERC20 token address. */ + token_pair?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: 'OWNER_UNSPECIFIED' | 'OWNER_MODULE' | 'OWNER_EXTERNAL' + } +} + +/** +* QueryTokenPairsResponse is the response type for the Query/TokenPairs RPC +method. +*/ +export interface EvmosErc20V1QueryTokenPairsResponse { + token_pairs?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: 'OWNER_UNSPECIFIED' | 'OWNER_MODULE' | 'OWNER_EXTERNAL' + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * TokenPair defines an instance that records a pairing consisting of a native Cosmos Coin and an ERC20 token address. + */ +export interface EvmosErc20V1TokenPair { + /** address of ERC20 contract token */ + erc20_address?: string + + /** cosmos base denomination to be mapped to */ + denom?: string + + /** shows token mapping enable status */ + enabled?: boolean + + /** + * ERC20 owner address ENUM (0 invalid, 1 ModuleAccount, 2 external address) + * Owner enumerates the ownership of a ERC20 contract. + * + * - OWNER_UNSPECIFIED: OWNER_UNSPECIFIED defines an invalid/undefined owner. + * - OWNER_MODULE: OWNER_MODULE erc20 is owned by the erc20 module account. + * - OWNER_EXTERNAL: EXTERNAL erc20 is owned by an external account. + */ + contract_owner?: 'OWNER_UNSPECIFIED' | 'OWNER_MODULE' | 'OWNER_EXTERNAL' +} + +/** +* DecCoin defines a token with a denomination and a decimal amount. + +NOTE: The amount field is an Dec which implements the custom method +signatures required by gogoproto. +*/ +export interface CosmosBaseV1Beta1DecCoin { + denom?: string + amount?: string +} + +export interface EvmosIncentivesV1GasMeter { + /** hex address of the incentivized contract */ + contract?: string + + /** participant address that interacts with the incentive */ + participant?: string + + /** + * cumulative gas spent during the epoch + * @format uint64 + */ + cumulative_gas?: string +} + +export interface EvmosIncentivesV1Incentive { + /** contract address */ + contract?: string + + /** denoms and percentage of rewards to be allocated */ + allocations?: { denom?: string; amount?: string }[] + + /** + * number of remaining epochs + * @format int64 + */ + epochs?: number + + /** + * distribution start time + * @format date-time + */ + start_time?: string + + /** + * cumulative gas spent by all gasmeters of the incentive during the epoch + * @format uint64 + */ + total_gas?: string +} + +export interface EvmosIncentivesV1Params { + /** parameter to enable incentives */ + enable_incentives?: boolean + + /** maximum percentage an incentive can allocate per denomination */ + allocation_limit?: string + + /** identifier for the epochs module hooks */ + incentives_epoch_identifier?: string + + /** scaling factor for capping rewards */ + reward_scaler?: string +} + +/** +* QueryAllocationMeterResponse is the response type for the +Query/AllocationMeter RPC method. +*/ +export interface EvmosIncentivesV1QueryAllocationMeterResponse { + /** + * DecCoin defines a token with a denomination and a decimal amount. + * + * NOTE: The amount field is an Dec which implements the custom method + * signatures required by gogoproto. + */ + allocation_meter?: { denom?: string; amount?: string } +} + +/** +* QueryAllocationMetersResponse is the response type for the +Query/AllocationMeters RPC method. +*/ +export interface EvmosIncentivesV1QueryAllocationMetersResponse { + allocation_meters?: { denom?: string; amount?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryGasMeterResponse is the response type for the Query/Incentive RPC +method. +*/ +export interface EvmosIncentivesV1QueryGasMeterResponse { + /** @format uint64 */ + gas_meter?: string +} + +/** +* QueryGasMetersResponse is the response type for the Query/Incentives RPC +method. +*/ +export interface EvmosIncentivesV1QueryGasMetersResponse { + gas_meters?: { + contract?: string + participant?: string + cumulative_gas?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryIncentiveResponse is the response type for the Query/Incentive RPC +method. +*/ +export interface EvmosIncentivesV1QueryIncentiveResponse { + /** + * Incentive defines an instance that organizes distribution conditions for a + * given smart contract + */ + incentive?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + } +} + +/** +* QueryIncentivesResponse is the response type for the Query/Incentives RPC +method. +*/ +export interface EvmosIncentivesV1QueryIncentivesResponse { + incentives?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryParamsResponse is the response type for the Query/Params RPC +method. +*/ +export interface EvmosIncentivesV1QueryParamsResponse { + /** Params defines the incentives module params */ + params?: { + enable_incentives?: boolean + allocation_limit?: string + incentives_epoch_identifier?: string + reward_scaler?: string + } +} + +export interface EvmosInflationV1ExponentialCalculation { + /** initial value */ + a?: string + + /** reduction factor */ + r?: string + + /** long term inflation */ + c?: string + + /** bonding target */ + bonding_target?: string + + /** max variance */ + max_variance?: string +} + +export interface EvmosInflationV1InflationDistribution { + /** + * staking_rewards defines the proportion of the minted minted_denom that is + * to be allocated as staking rewards + */ + staking_rewards?: string + + /** + * usage_incentives defines the proportion of the minted minted_denom that is + * to be allocated to the incentives module address + */ + usage_incentives?: string + + /** + * community_pool defines the proportion of the minted minted_denom that is to + * be allocated to the community pool + */ + community_pool?: string +} + +/** + * Params holds parameters for the inflation module. + */ +export interface EvmosInflationV1Params { + /** type of coin to mint */ + mint_denom?: string + + /** variables to calculate exponential inflation */ + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + + /** inflation distribution of the minted denom */ + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + + /** parameter to enable inflation and halt increasing the skipped_epochs */ + enable_inflation?: boolean +} + +/** +* QueryCirculatingSupplyResponse is the response type for the +Query/CirculatingSupply RPC method. +*/ +export interface EvmosInflationV1QueryCirculatingSupplyResponse { + /** + * total amount of coins in circulation + * DecCoin defines a token with a denomination and a decimal amount. + * + * NOTE: The amount field is an Dec which implements the custom method + * signatures required by gogoproto. + */ + circulating_supply?: { denom?: string; amount?: string } +} + +/** +* QueryEpochMintProvisionResponse is the response type for the +Query/EpochMintProvision RPC method. +*/ +export interface EvmosInflationV1QueryEpochMintProvisionResponse { + /** epoch_mint_provision is the current minting per epoch provision value. */ + epoch_mint_provision?: { denom?: string; amount?: string } +} + +/** +* QueryInflationRateResponse is the response type for the Query/InflationRate +RPC method. +*/ +export interface EvmosInflationV1QueryInflationRateResponse { + /** rate by which the total supply increases within one period */ + inflation_rate?: string +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface EvmosInflationV1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + mint_denom?: string + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + enable_inflation?: boolean + } +} + +/** + * QueryPeriodResponse is the response type for the Query/Period RPC method. + */ +export interface EvmosInflationV1QueryPeriodResponse { + /** + * period is the current minting per epoch provision value. + * @format uint64 + */ + period?: string +} + +/** +* QuerySkippedEpochsResponse is the response type for the Query/SkippedEpochs +RPC method. +*/ +export interface EvmosInflationV1QuerySkippedEpochsResponse { + /** + * number of epochs that the inflation module has been disabled. + * @format uint64 + */ + skipped_epochs?: string +} + +/** +* QueryBalancesResponse is the response type for the Query/Balances RPC +method. +*/ +export interface EvmosVestingV1QueryBalancesResponse { + /** current amount of locked tokens */ + locked?: { denom?: string; amount?: string }[] + + /** current amount of unvested tokens */ + unvested?: { denom?: string; amount?: string }[] + + /** current amount of vested tokens */ + vested?: { denom?: string; amount?: string }[] +} + +export interface EvmosRecoveryV1Params { + /** enable recovery IBC middleware */ + enable_recovery?: boolean + + /** duration added to timeout timestamp for balances recovered via IBC packets */ + packet_timeout_duration?: string +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface EvmosRecoveryV1QueryParamsResponse { + /** + * Params holds parameters for the recovery module + * params defines the parameters of the module. + */ + params?: { enable_recovery?: boolean; packet_timeout_duration?: string } +} + +/** +* ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +instead of *big.Int. +*/ +export interface EthermintEvmV1ChainConfig { + /** Homestead switch block (nil no fork, 0 = already homestead) */ + homestead_block?: string + + /** TheDAO hard-fork switch block (nil no fork) */ + dao_fork_block?: string + + /** Whether the nodes supports or opposes the DAO hard-fork */ + dao_fork_support?: boolean + + /** + * EIP150 implements the Gas price changes + * (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) + */ + eip150_block?: string + + /** EIP150 HF hash (needed for header only clients as only gas pricing changed) */ + eip150_hash?: string + + /** EIP155Block HF block */ + eip155_block?: string + + /** EIP158 HF block */ + eip158_block?: string + + /** Byzantium switch block (nil no fork, 0 = already on byzantium) */ + byzantium_block?: string + + /** Constantinople switch block (nil no fork, 0 = already activated) */ + constantinople_block?: string + + /** Petersburg switch block (nil same as Constantinople) */ + petersburg_block?: string + + /** Istanbul switch block (nil no fork, 0 = already on istanbul) */ + istanbul_block?: string + + /** Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) */ + muir_glacier_block?: string + + /** Berlin switch block (nil = no fork, 0 = already on berlin) */ + berlin_block?: string + + /** London switch block (nil = no fork, 0 = already on london) */ + london_block?: string + + /** Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) */ + arrow_glacier_block?: string + + /** EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings) */ + merge_fork_block?: string +} + +export interface EthermintEvmV1EstimateGasResponse { + /** + * the estimated gas + * @format uint64 + */ + gas?: string +} + +/** +* Log represents an protobuf compatible Ethereum Log that defines a contract +log event. These events are generated by the LOG opcode and stored/indexed by +the node. +*/ +export interface EthermintEvmV1Log { + /** address of the contract that generated the event */ + address?: string + + /** list of topics provided by the contract. */ + topics?: string[] + + /** + * supplied by the contract, usually ABI-encoded + * @format byte + */ + data?: string + + /** + * block in which the transaction was included + * @format uint64 + */ + block_number?: string + + /** hash of the transaction */ + tx_hash?: string + + /** + * index of the transaction in the block + * @format uint64 + */ + tx_index?: string + + /** hash of the block in which the transaction was included */ + block_hash?: string + + /** + * index of the log in the block + * @format uint64 + */ + index?: string + + /** + * The Removed field is true if this log was reverted due to a chain + * reorganisation. You must pay attention to this field if you receive logs + * through a filter query. + */ + removed?: boolean +} + +/** + * MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. + */ +export interface EthermintEvmV1MsgEthereumTx { + /** + * inner transaction data + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + data?: { type_url?: string; value?: string } + + /** + * encoded storage size of the transaction + * @format double + */ + size?: number + + /** transaction hash in hex format */ + hash?: string + + /** + * ethereum signer address in hex format. This address value is checked + * against the address derived from the signature (V, R, S) using the + * secp256k1 elliptic curve + */ + from?: string +} + +/** + * MsgEthereumTxResponse defines the Msg/EthereumTx response type. + */ +export interface EthermintEvmV1MsgEthereumTxResponse { + /** + * ethereum transaction hash in hex format. This hash differs from the + * Tendermint sha256 hash of the transaction bytes. See + * https://github.com/tendermint/tendermint/issues/6539 for reference + */ + hash?: string + + /** + * logs contains the transaction hash and the proto-compatible ethereum + * logs. + */ + logs?: { + address?: string + topics?: string[] + data?: string + block_number?: string + tx_hash?: string + tx_index?: string + block_hash?: string + index?: string + removed?: boolean + }[] + + /** + * returned data from evm function (result or data supplied with revert + * opcode) + * @format byte + */ + ret?: string + + /** vm error is the error returned by vm execution */ + vm_error?: string + + /** + * gas consumed by the transaction + * @format uint64 + */ + gas_used?: string +} + +export interface EthermintEvmV1Params { + /** + * evm denom represents the token denomination used to run the EVM state + * transitions. + */ + evm_denom?: string + + /** enable create toggles state transitions that use the vm.Create function */ + enable_create?: boolean + + /** enable call toggles state transitions that use the vm.Call function */ + enable_call?: boolean + + /** extra eips defines the additional EIPs for the vm.Config */ + extra_eips?: string[] + + /** + * chain config defines the EVM chain configuration parameters + * ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values + * instead of *big.Int. + */ + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + + /** + * Allow unprotected transactions defines if replay-protected (i.e non EIP155 + * signed) transactions can be executed on the state machine. + */ + allow_unprotected_txs?: boolean +} + +/** + * QueryAccountResponse is the response type for the Query/Account RPC method. + */ +export interface EthermintEvmV1QueryAccountResponse { + /** balance is the balance of the EVM denomination. */ + balance?: string + + /** code hash is the hex-formatted code bytes from the EOA. */ + code_hash?: string + + /** + * nonce is the account's sequence number. + * @format uint64 + */ + nonce?: string +} + +/** + * QueryBalanceResponse is the response type for the Query/Balance RPC method. + */ +export interface EthermintEvmV1QueryBalanceResponse { + /** balance is the balance of the EVM denomination. */ + balance?: string +} + +/** + * BaseFeeResponse returns the EIP1559 base fee. + */ +export interface EthermintEvmV1QueryBaseFeeResponse { + base_fee?: string +} + +/** +* QueryCodeResponse is the response type for the Query/Code RPC +method. +*/ +export interface EthermintEvmV1QueryCodeResponse { + /** + * code represents the code bytes from an ethereum address. + * @format byte + */ + code?: string +} + +/** +* QueryCosmosAccountResponse is the response type for the Query/CosmosAccount +RPC method. +*/ +export interface EthermintEvmV1QueryCosmosAccountResponse { + /** cosmos_address is the cosmos address of the account. */ + cosmos_address?: string + + /** + * sequence is the account's sequence number. + * @format uint64 + */ + sequence?: string + + /** + * account_number is the account numbert + * @format uint64 + */ + account_number?: string +} + +/** + * QueryParamsResponse defines the response type for querying x/evm parameters. + */ +export interface EthermintEvmV1QueryParamsResponse { + /** + * Params defines the EVM module parameters + * params define the evm module parameters. + */ + params?: { + evm_denom?: string + enable_create?: boolean + enable_call?: boolean + extra_eips?: string[] + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + allow_unprotected_txs?: boolean + } +} + +/** +* QueryStorageResponse is the response type for the Query/Storage RPC +method. +*/ +export interface EthermintEvmV1QueryStorageResponse { + /** key defines the storage state value hash associated with the given key. */ + value?: string +} + +export interface EthermintEvmV1QueryTraceBlockResponse { + /** @format byte */ + data?: string +} + +export interface EthermintEvmV1QueryTraceTxResponse { + /** + * response serialized in bytes + * @format byte + */ + data?: string +} + +/** +* QueryValidatorAccountResponse is the response type for the +Query/ValidatorAccount RPC method. +*/ +export interface EthermintEvmV1QueryValidatorAccountResponse { + /** account_address is the cosmos address of the account in bech32 format. */ + account_address?: string + + /** + * sequence is the account's sequence number. + * @format uint64 + */ + sequence?: string + + /** + * account_number is the account number + * @format uint64 + */ + account_number?: string +} + +/** + * TraceConfig holds extra parameters to trace functions. + */ +export interface EthermintEvmV1TraceConfig { + /** custom javascript tracer */ + tracer?: string + + /** + * overrides the default timeout of 5 seconds for JavaScript-based tracing + * calls + */ + timeout?: string + + /** + * number of blocks the tracer is willing to go back + * @format uint64 + */ + reexec?: string + + /** disable stack capture */ + disable_stack?: boolean + + /** disable storage capture */ + disable_storage?: boolean + + /** print output during capture end */ + debug?: boolean + + /** + * maximum length of output, but zero means unlimited + * @format int32 + */ + limit?: number + + /** + * Chain overrides, can be used to execute a trace using future fork rules + * ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values + * instead of *big.Int. + */ + overrides?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + + /** enable memory capture */ + enable_memory?: boolean + + /** enable return data capture */ + enable_return_data?: boolean +} + +export interface EthermintFeemarketV1Params { + /** no base fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) */ + no_base_fee?: boolean + + /** + * base fee change denominator bounds the amount the base fee can change + * between blocks. + * @format int64 + */ + base_fee_change_denominator?: number + + /** + * elasticity multiplier bounds the maximum gas limit an EIP-1559 block may + * have. + * @format int64 + */ + elasticity_multiplier?: number + + /** + * height at which the base fee calculation is enabled. + * @format int64 + */ + enable_height?: string + + /** base fee for EIP-1559 blocks. */ + base_fee?: string + + /** min_gas_price defines the minimum gas price value for cosmos and eth transactions */ + min_gas_price?: string + + /** + * min gas denominator bounds the minimum gasUsed to be charged + * to senders based on GasLimit + */ + min_gas_multiplier?: string +} + +/** + * BaseFeeResponse returns the EIP1559 base fee. + */ +export interface EthermintFeemarketV1QueryBaseFeeResponse { + base_fee?: string +} + +/** + * QueryBlockGasResponse returns block gas used for a given height. + */ +export interface EthermintFeemarketV1QueryBlockGasResponse { + /** @format int64 */ + gas?: string +} + +/** + * QueryParamsResponse defines the response type for querying x/evm parameters. + */ +export interface EthermintFeemarketV1QueryParamsResponse { + /** + * Params defines the EVM module parameters + * params define the evm module parameters. + */ + params?: { + no_base_fee?: boolean + base_fee_change_denominator?: number + elasticity_multiplier?: number + enable_height?: string + base_fee?: string + min_gas_price?: string + min_gas_multiplier?: string + } +} + +/** +* DenomTrace contains the base denomination for ICS20 fungible tokens and the +source tracing information path. +*/ +export interface IbcApplicationsTransferV1DenomTrace { + /** + * path defines the chain of port/channel identifiers used for tracing the + * source of the fungible token. + */ + path?: string + + /** base denomination of the relayed fungible token. */ + base_denom?: string +} + +/** +* Params defines the set of IBC transfer parameters. +NOTE: To prevent a single token from being transferred, set the +TransfersEnabled parameter to true and then set the bank module's SendEnabled +parameter for the denomination to false. +*/ +export interface IbcApplicationsTransferV1Params { + /** + * send_enabled enables or disables all cross-chain token transfers from this + * chain. + */ + send_enabled?: boolean + + /** + * receive_enabled enables or disables all cross-chain token transfers to this + * chain. + */ + receive_enabled?: boolean +} + +/** +* QueryDenomHashResponse is the response type for the Query/DenomHash RPC +method. +*/ +export interface IbcApplicationsTransferV1QueryDenomHashResponse { + /** hash (in hex format) of the denomination trace information. */ + hash?: string +} + +/** +* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +method. +*/ +export interface IbcApplicationsTransferV1QueryDenomTraceResponse { + /** denom_trace returns the requested denomination trace information. */ + denom_trace?: { path?: string; base_denom?: string } +} + +/** +* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +method. +*/ +export interface IbcApplicationsTransferV1QueryDenomTracesResponse { + /** denom_traces returns all denominations trace information. */ + denom_traces?: { path?: string; base_denom?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface IbcApplicationsTransferV1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { send_enabled?: boolean; receive_enabled?: boolean } +} + +/** +* ConsensusStateWithHeight defines a consensus state with an additional height +field. +*/ +export interface IbcCoreClientV1ConsensusStateWithHeight { + /** + * consensus state height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } + + /** + * consensus state + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } +} + +/** +* Normally the RevisionHeight is incremented at each height while keeping +RevisionNumber the same. However some consensus algorithms may choose to +reset the height in certain conditions e.g. hard forks, state-machine +breaking changes In these cases, the RevisionNumber is incremented so that +height continues to be monitonically increasing even as the RevisionHeight +gets reset +*/ +export interface IbcCoreClientV1Height { + /** + * the revision that the client is currently on + * @format uint64 + */ + revision_number?: string + + /** + * the height within the given revision + * @format uint64 + */ + revision_height?: string +} + +/** +* IdentifiedClientState defines a client state with an additional client +identifier field. +*/ +export interface IbcCoreClientV1IdentifiedClientState { + /** client identifier */ + client_id?: string + + /** + * client state + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + client_state?: { type_url?: string; value?: string } +} + +/** + * Params defines the set of IBC light client parameters. + */ +export interface IbcCoreClientV1Params { + /** allowed_clients defines the list of allowed client state types. */ + allowed_clients?: string[] +} + +/** +* QueryClientParamsResponse is the response type for the Query/ClientParams RPC +method. +*/ +export interface IbcCoreClientV1QueryClientParamsResponse { + /** params defines the parameters of the module. */ + params?: { allowed_clients?: string[] } +} + +/** +* QueryClientStateResponse is the response type for the Query/ClientState RPC +method. Besides the client state, it includes a proof and the height from +which the proof was retrieved. +*/ +export interface IbcCoreClientV1QueryClientStateResponse { + /** + * client state associated with the request identifier + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + client_state?: { type_url?: string; value?: string } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** +* QueryClientStatesResponse is the response type for the Query/ClientStates RPC +method. +*/ +export interface IbcCoreClientV1QueryClientStatesResponse { + /** list of stored ClientStates of the chain. */ + client_states?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +method. It returns the current status of the IBC client. +*/ +export interface IbcCoreClientV1QueryClientStatusResponse { + status?: string +} + +export interface IbcCoreClientV1QueryConsensusStateResponse { + /** + * consensus state associated with the client identifier at the given height + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreClientV1QueryConsensusStatesResponse { + /** consensus states associated with the identifier */ + consensus_states?: { + height?: { revision_number?: string; revision_height?: string } + consensus_state?: { type_url?: string; value?: string } + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryUpgradedClientStateResponse is the response type for the +Query/UpgradedClientState RPC method. +*/ +export interface IbcCoreClientV1QueryUpgradedClientStateResponse { + /** + * client state associated with the request identifier + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + upgraded_client_state?: { type_url?: string; value?: string } +} + +/** +* QueryUpgradedConsensusStateResponse is the response type for the +Query/UpgradedConsensusState RPC method. +*/ +export interface IbcCoreClientV1QueryUpgradedConsensusStateResponse { + /** + * Consensus state associated with the request identifier + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + upgraded_consensus_state?: { type_url?: string; value?: string } +} + +export interface IbcCoreCommitmentV1MerklePrefix { + /** @format byte */ + key_prefix?: string +} + +/** +* ConnectionEnd defines a stateful object on a chain connected to another +separate one. +NOTE: there must only be 2 defined ConnectionEnds to establish +a connection between two chains. +*/ +export interface IbcCoreConnectionV1ConnectionEnd { + /** client associated with this connection. */ + client_id?: string + + /** + * IBC version which can be utilised to determine encodings or protocols for + * channels or packets utilising this connection. + */ + versions?: { identifier?: string; features?: string[] }[] + + /** current state of the connection end. */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + + /** counterparty chain associated with this connection. */ + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + + /** + * delay period that must pass before a consensus state can be used for + * packet-verification NOTE: delay period logic is only implemented by some + * clients. + * @format uint64 + */ + delay_period?: string +} + +/** + * Counterparty defines the counterparty chain associated with a connection end. + */ +export interface IbcCoreConnectionV1Counterparty { + /** + * identifies the client on the counterparty chain associated with a given + * connection. + */ + client_id?: string + + /** + * identifies the connection end on the counterparty chain associated with a + * given connection. + */ + connection_id?: string + + /** + * MerklePrefix is merkle path prefixed to the key. + * The constructed key from the Path and the key will be append(Path.KeyPath, + * append(Path.KeyPrefix, key...)) + * commitment merkle prefix of the counterparty chain. + */ + prefix?: { key_prefix?: string } +} + +/** +* IdentifiedConnection defines a connection with additional connection +identifier field. +*/ +export interface IbcCoreConnectionV1IdentifiedConnection { + /** connection identifier. */ + id?: string + + /** client associated with this connection. */ + client_id?: string + + /** + * IBC version which can be utilised to determine encodings or protocols for + * channels or packets utilising this connection + */ + versions?: { identifier?: string; features?: string[] }[] + + /** current state of the connection end. */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + + /** counterparty chain associated with this connection. */ + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + + /** + * delay period associated with this connection. + * @format uint64 + */ + delay_period?: string +} + +export interface IbcCoreConnectionV1QueryClientConnectionsResponse { + /** slice of all the connection paths associated with a client. */ + connection_paths?: string[] + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was generated + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreConnectionV1QueryConnectionClientStateResponse { + /** + * client state associated with the channel + * IdentifiedClientState defines a client state with an additional client + * identifier field. + */ + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreConnectionV1QueryConnectionConsensusStateResponse { + /** + * consensus state associated with the channel + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } + + /** client ID associated with the consensus state */ + client_id?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** +* QueryConnectionResponse is the response type for the Query/Connection RPC +method. Besides the connection end, it includes a proof and the height from +which the proof was retrieved. +*/ +export interface IbcCoreConnectionV1QueryConnectionResponse { + /** + * connection associated with the request identifier + * ConnectionEnd defines a stateful object on a chain connected to another + * separate one. + * NOTE: there must only be 2 defined ConnectionEnds to establish + * a connection between two chains. + */ + connection?: { + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** +* QueryConnectionsResponse is the response type for the Query/Connections RPC +method. +*/ +export interface IbcCoreConnectionV1QueryConnectionsResponse { + /** list of stored connections of the chain. */ + connections?: { + id?: string + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +/** +* State defines if a connection is in one of the following states: +INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A connection end has just started the opening handshake. + - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty +chain. + - STATE_OPEN: A connection end has completed the handshake. +*/ +export enum IbcCoreConnectionV1State { + STATE_UNINITIALIZED_UNSPECIFIED = 'STATE_UNINITIALIZED_UNSPECIFIED', + STATE_INIT = 'STATE_INIT', + STATE_TRYOPEN = 'STATE_TRYOPEN', + STATE_OPEN = 'STATE_OPEN', +} + +/** +* Version defines the versioning scheme used to negotiate the IBC verison in +the connection handshake. +*/ +export interface IbcCoreConnectionV1Version { + /** unique version identifier */ + identifier?: string + + /** list of features compatible with the specified identifier */ + features?: string[] +} + +/** +* Channel defines pipeline for exactly-once packet delivery between specific +modules on separate blockchains, which has at least one end capable of +sending packets and one end capable of receiving packets. +*/ +export interface IbcCoreChannelV1Channel { + /** + * current state of the channel end + * State defines if a channel is in one of the following states: + * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + * + * - STATE_UNINITIALIZED_UNSPECIFIED: Default State + * - STATE_INIT: A channel has just started the opening handshake. + * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + * - STATE_OPEN: A channel has completed the handshake. Open channels are + * ready to send and receive packets. + * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + * packets. + */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + + /** + * whether the channel is ordered or unordered + * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + * which they were sent. + * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + */ + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + + /** counterparty channel end */ + counterparty?: { port_id?: string; channel_id?: string } + + /** + * list of connection identifiers, in order, along which packets sent on + * this channel will travel + */ + connection_hops?: string[] + + /** opaque channel version, which is agreed upon during the handshake */ + version?: string +} + +export interface IbcCoreChannelV1Counterparty { + /** port on the counterparty chain which owns the other end of the channel. */ + port_id?: string + + /** channel end on the counterparty chain */ + channel_id?: string +} + +/** +* IdentifiedChannel defines a channel with additional port and channel +identifier fields. +*/ +export interface IbcCoreChannelV1IdentifiedChannel { + /** + * current state of the channel end + * State defines if a channel is in one of the following states: + * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + * + * - STATE_UNINITIALIZED_UNSPECIFIED: Default State + * - STATE_INIT: A channel has just started the opening handshake. + * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + * - STATE_OPEN: A channel has completed the handshake. Open channels are + * ready to send and receive packets. + * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + * packets. + */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + + /** + * whether the channel is ordered or unordered + * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + * which they were sent. + * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + */ + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + + /** counterparty channel end */ + counterparty?: { port_id?: string; channel_id?: string } + + /** + * list of connection identifiers, in order, along which packets sent on + * this channel will travel + */ + connection_hops?: string[] + + /** opaque channel version, which is agreed upon during the handshake */ + version?: string + + /** port identifier */ + port_id?: string + + /** channel identifier */ + channel_id?: string +} + +/** +* - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in +which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent +*/ +export enum IbcCoreChannelV1Order { + ORDER_NONE_UNSPECIFIED = 'ORDER_NONE_UNSPECIFIED', + ORDER_UNORDERED = 'ORDER_UNORDERED', + ORDER_ORDERED = 'ORDER_ORDERED', +} + +/** +* PacketState defines the generic type necessary to retrieve and store +packet commitments, acknowledgements, and receipts. +Caller is responsible for knowing the context necessary to interpret this +state as a commitment, acknowledgement, or a receipt. +*/ +export interface IbcCoreChannelV1PacketState { + /** channel port identifier. */ + port_id?: string + + /** channel unique identifier. */ + channel_id?: string + + /** + * packet sequence. + * @format uint64 + */ + sequence?: string + + /** + * embedded data that represents packet state. + * @format byte + */ + data?: string +} + +export interface IbcCoreChannelV1QueryChannelClientStateResponse { + /** + * client state associated with the channel + * IdentifiedClientState defines a client state with an additional client + * identifier field. + */ + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryChannelConsensusStateResponse { + /** + * consensus state associated with the channel + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } + + /** client ID associated with the consensus state */ + client_id?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** +* QueryChannelResponse is the response type for the Query/Channel RPC method. +Besides the Channel end, it includes a proof and the height from which the +proof was retrieved. +*/ +export interface IbcCoreChannelV1QueryChannelResponse { + /** + * channel associated with the request identifiers + * Channel defines pipeline for exactly-once packet delivery between specific + * modules on separate blockchains, which has at least one end capable of + * sending packets and one end capable of receiving packets. + */ + channel?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** + * QueryChannelsResponse is the response type for the Query/Channels RPC method. + */ +export interface IbcCoreChannelV1QueryChannelsResponse { + /** list of stored channels of the chain. */ + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryConnectionChannelsResponse { + /** list of channels associated with a connection. */ + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryNextSequenceReceiveResponse { + /** + * next sequence receive number + * @format uint64 + */ + next_sequence_receive?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketAcknowledgementResponse { + /** + * packet associated with the request fields + * @format byte + */ + acknowledgement?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketAcknowledgementsResponse { + acknowledgements?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketCommitmentResponse { + /** + * packet associated with the request fields + * @format byte + */ + commitment?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketCommitmentsResponse { + commitments?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + + /** + * pagination response + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketReceiptResponse { + /** success flag for if receipt exists */ + received?: boolean + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryUnreceivedAcksResponse { + /** list of unreceived acknowledgement sequences */ + sequences?: string[] + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryUnreceivedPacketsResponse { + /** list of unreceived packet sequences */ + sequences?: string[] + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +/** +* State defines if a channel is in one of the following states: +CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are +ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive +packets. +*/ +export enum IbcCoreChannelV1State { + STATE_UNINITIALIZED_UNSPECIFIED = 'STATE_UNINITIALIZED_UNSPECIFIED', + STATE_INIT = 'STATE_INIT', + STATE_TRYOPEN = 'STATE_TRYOPEN', + STATE_OPEN = 'STATE_OPEN', + STATE_CLOSED = 'STATE_CLOSED', +} + +/** + * Params defines the parameters for the auth module. + */ +export interface CosmosAuthV1Beta1Params { + /** @format uint64 */ + max_memo_characters?: string + + /** @format uint64 */ + tx_sig_limit?: string + + /** @format uint64 */ + tx_size_cost_per_byte?: string + + /** @format uint64 */ + sig_verify_cost_ed25519?: string + + /** @format uint64 */ + sig_verify_cost_secp256k1?: string +} + +/** + * QueryAccountResponse is the response type for the Query/Account RPC method. + */ +export interface CosmosAuthV1Beta1QueryAccountResponse { + /** account defines the account of the corresponding address. */ + account?: { type_url?: string; value?: string } +} + +/** +* QueryAccountsResponse is the response type for the Query/Accounts RPC method. + +Since: cosmos-sdk 0.43 +*/ +export interface CosmosAuthV1Beta1QueryAccountsResponse { + /** accounts are the existing accounts */ + accounts?: { type_url?: string; value?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface CosmosAuthV1Beta1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + max_memo_characters?: string + tx_sig_limit?: string + tx_size_cost_per_byte?: string + sig_verify_cost_ed25519?: string + sig_verify_cost_secp256k1?: string + } +} + +/** +* Grant gives permissions to execute +the provide method with expiration time. +*/ +export interface CosmosAuthzV1Beta1Grant { + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + authorization?: { type_url?: string; value?: string } + + /** @format date-time */ + expiration?: string +} + +/** + * Since: cosmos-sdk 0.45.2 + */ +export interface CosmosAuthzV1Beta1GrantAuthorization { + granter?: string + grantee?: string + + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + authorization?: { type_url?: string; value?: string } + + /** @format date-time */ + expiration?: string +} + +/** + * QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. + */ +export interface CosmosAuthzV1Beta1QueryGranteeGrantsResponse { + /** grants is a list of grants granted to the grantee. */ + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. + */ +export interface CosmosAuthzV1Beta1QueryGranterGrantsResponse { + /** grants is a list of grants granted by the granter. */ + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryGrantsResponse is the response type for the Query/Authorizations RPC method. + */ +export interface CosmosAuthzV1Beta1QueryGrantsResponse { + /** authorizations is a list of grants granted for grantee by granter. */ + grants?: { + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* DenomUnit represents a struct that describes a given +denomination unit of the basic token. +*/ +export interface CosmosBankV1Beta1DenomUnit { + /** denom represents the string name of the given denom unit (e.g uatom). */ + denom?: string + + /** + * exponent represents power of 10 exponent that one must + * raise the base_denom to in order to equal the given DenomUnit's denom + * 1 denom = 1^exponent base_denom + * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + * exponent = 6, thus: 1 atom = 10^6 uatom). + * @format int64 + */ + exponent?: number + + /** aliases is a list of string aliases for the given denom */ + aliases?: string[] +} + +/** +* Metadata represents a struct that describes +a basic token. +*/ +export interface CosmosBankV1Beta1Metadata { + description?: string + + /** denom_units represents the list of DenomUnit's for a given coin */ + denom_units?: { denom?: string; exponent?: number; aliases?: string[] }[] + + /** base represents the base denom (should be the DenomUnit with exponent = 0). */ + base?: string + + /** + * display indicates the suggested denom that should be + * displayed in clients. + */ + display?: string + + /** + * name defines the name of the token (eg: Cosmos Atom) + * Since: cosmos-sdk 0.43 + */ + name?: string + + /** + * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + * be the same as the display. + * + * Since: cosmos-sdk 0.43 + */ + symbol?: string +} + +/** + * Params defines the parameters for the bank module. + */ +export interface CosmosBankV1Beta1Params { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean +} + +/** +* QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +method. +*/ +export interface CosmosBankV1Beta1QueryAllBalancesResponse { + /** balances is the balances of all the coins. */ + balances?: { denom?: string; amount?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryBalanceResponse is the response type for the Query/Balance RPC method. + */ +export interface CosmosBankV1Beta1QueryBalanceResponse { + /** balance is the balance of the coin. */ + balance?: { denom?: string; amount?: string } +} + +/** +* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC +method. +*/ +export interface CosmosBankV1Beta1QueryDenomMetadataResponse { + /** metadata describes and provides all the client information for the requested token. */ + metadata?: { + description?: string + denom_units?: { denom?: string; exponent?: number; aliases?: string[] }[] + base?: string + display?: string + name?: string + symbol?: string + } +} + +/** +* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC +method. +*/ +export interface CosmosBankV1Beta1QueryDenomsMetadataResponse { + /** metadata provides the client information for all the registered tokens. */ + metadatas?: { + description?: string + denom_units?: { denom?: string; exponent?: number; aliases?: string[] }[] + base?: string + display?: string + name?: string + symbol?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse defines the response type for querying x/bank parameters. + */ +export interface CosmosBankV1Beta1QueryParamsResponse { + /** Params defines the parameters for the bank module. */ + params?: { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean + } +} + +/** +* QuerySpendableBalancesResponse defines the gRPC response structure for querying +an account's spendable balances. +*/ +export interface CosmosBankV1Beta1QuerySpendableBalancesResponse { + /** balances is the spendable balances of all the coins. */ + balances?: { denom?: string; amount?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. + */ +export interface CosmosBankV1Beta1QuerySupplyOfResponse { + /** amount is the supply of the coin. */ + amount?: { denom?: string; amount?: string } +} + +export interface CosmosBankV1Beta1QueryTotalSupplyResponse { + /** supply is the supply of the coins */ + supply?: { denom?: string; amount?: string }[] + + /** + * pagination defines the pagination in the response. + * + * Since: cosmos-sdk 0.43 + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* SendEnabled maps coin denom to a send_enabled status (whether a denom is +sendable). +*/ +export interface CosmosBankV1Beta1SendEnabled { + denom?: string + enabled?: boolean +} + +/** +* DelegationDelegatorReward represents the properties +of a delegator's delegation reward. +*/ +export interface CosmosDistributionV1Beta1DelegationDelegatorReward { + validator_address?: string + reward?: { denom?: string; amount?: string }[] +} + +/** + * Params defines the set of params for the distribution module. + */ +export interface CosmosDistributionV1Beta1Params { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean +} + +/** +* QueryCommunityPoolResponse is the response type for the Query/CommunityPool +RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryCommunityPoolResponse { + /** pool defines community pool's coins. */ + pool?: { denom?: string; amount?: string }[] +} + +/** +* QueryDelegationRewardsResponse is the response type for the +Query/DelegationRewards RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegationRewardsResponse { + /** rewards defines the rewards accrued by a delegation. */ + rewards?: { denom?: string; amount?: string }[] +} + +/** +* QueryDelegationTotalRewardsResponse is the response type for the +Query/DelegationTotalRewards RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegationTotalRewardsResponse { + /** rewards defines all the rewards accrued by a delegator. */ + rewards?: { + validator_address?: string + reward?: { denom?: string; amount?: string }[] + }[] + + /** total defines the sum of all the rewards. */ + total?: { denom?: string; amount?: string }[] +} + +/** +* QueryDelegatorValidatorsResponse is the response type for the +Query/DelegatorValidators RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegatorValidatorsResponse { + /** validators defines the validators a delegator is delegating for. */ + validators?: string[] +} + +/** +* QueryDelegatorWithdrawAddressResponse is the response type for the +Query/DelegatorWithdrawAddress RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegatorWithdrawAddressResponse { + /** withdraw_address defines the delegator address to query for. */ + withdraw_address?: string +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface CosmosDistributionV1Beta1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean + } +} + +export interface CosmosDistributionV1Beta1QueryValidatorCommissionResponse { + /** commission defines the commision the validator received. */ + commission?: { commission?: { denom?: string; amount?: string }[] } +} + +/** +* QueryValidatorOutstandingRewardsResponse is the response type for the +Query/ValidatorOutstandingRewards RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryValidatorOutstandingRewardsResponse { + /** + * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + * for a validator inexpensive to track, allows simple sanity checks. + */ + rewards?: { rewards?: { denom?: string; amount?: string }[] } +} + +/** +* QueryValidatorSlashesResponse is the response type for the +Query/ValidatorSlashes RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryValidatorSlashesResponse { + /** slashes defines the slashes the validator received. */ + slashes?: { validator_period?: string; fraction?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* ValidatorAccumulatedCommission represents accumulated commission +for a validator kept as a running counter, can be withdrawn at any time. +*/ +export interface CosmosDistributionV1Beta1ValidatorAccumulatedCommission { + commission?: { denom?: string; amount?: string }[] +} + +/** +* ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +for a validator inexpensive to track, allows simple sanity checks. +*/ +export interface CosmosDistributionV1Beta1ValidatorOutstandingRewards { + rewards?: { denom?: string; amount?: string }[] +} + +/** +* ValidatorSlashEvent represents a validator slash event. +Height is implicit within the store key. +This is needed to calculate appropriate amount of staking tokens +for delegations which are withdrawn after a slash has occurred. +*/ +export interface CosmosDistributionV1Beta1ValidatorSlashEvent { + /** @format uint64 */ + validator_period?: string + fraction?: string +} + +export interface CosmosFeegrantV1Beta1Grant { + /** granter is the address of the user granting an allowance of their funds. */ + granter?: string + + /** grantee is the address of the user being granted an allowance of another user's funds. */ + grantee?: string + + /** allowance can be any of basic and filtered fee allowance. */ + allowance?: { type_url?: string; value?: string } +} + +/** + * QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + */ +export interface CosmosFeegrantV1Beta1QueryAllowanceResponse { + /** + * Grant is stored in the KVStore to record a grant with full context + * allowance is a allowance granted for grantee by granter. + */ + allowance?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + } +} + +/** + * QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + */ +export interface CosmosFeegrantV1Beta1QueryAllowancesResponse { + /** allowances are allowance's granted for grantee by granter. */ + allowances?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC +method. +*/ +export interface CosmosEvidenceV1Beta1QueryAllEvidenceResponse { + /** evidence returns all evidences. */ + evidence?: { type_url?: string; value?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryEvidenceResponse is the response type for the Query/Evidence RPC method. + */ +export interface CosmosEvidenceV1Beta1QueryEvidenceResponse { + /** evidence returns the requested evidence. */ + evidence?: { type_url?: string; value?: string } +} + +/** +* Deposit defines an amount deposited by an account address to an active +proposal. +*/ +export interface CosmosGovV1Beta1Deposit { + /** @format uint64 */ + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] +} + +/** + * DepositParams defines the params for deposits on governance proposals. + */ +export interface CosmosGovV1Beta1DepositParams { + /** Minimum deposit for a proposal to enter voting period. */ + min_deposit?: { denom?: string; amount?: string }[] + + /** Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. */ + max_deposit_period?: string +} + +/** + * Proposal defines the core field members of a governance proposal. + */ +export interface CosmosGovV1Beta1Proposal { + /** @format uint64 */ + proposal_id?: string + + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + content?: { type_url?: string; value?: string } + + /** + * ProposalStatus enumerates the valid statuses of a proposal. + * + * - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + * - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + * period. + * - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + * - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + * passed. + * - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + * been rejected. + * - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + * failed. + */ + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + + /** TallyResult defines a standard tally for a governance proposal. */ + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + + /** @format date-time */ + submit_time?: string + + /** @format date-time */ + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + + /** @format date-time */ + voting_start_time?: string + + /** @format date-time */ + voting_end_time?: string +} + +/** +* ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit +period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting +period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has +passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has +been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has +failed. +*/ +export enum CosmosGovV1Beta1ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 'PROPOSAL_STATUS_UNSPECIFIED', + PROPOSAL_STATUS_DEPOSIT_PERIOD = 'PROPOSAL_STATUS_DEPOSIT_PERIOD', + PROPOSAL_STATUS_VOTING_PERIOD = 'PROPOSAL_STATUS_VOTING_PERIOD', + PROPOSAL_STATUS_PASSED = 'PROPOSAL_STATUS_PASSED', + PROPOSAL_STATUS_REJECTED = 'PROPOSAL_STATUS_REJECTED', + PROPOSAL_STATUS_FAILED = 'PROPOSAL_STATUS_FAILED', +} + +/** + * QueryDepositResponse is the response type for the Query/Deposit RPC method. + */ +export interface CosmosGovV1Beta1QueryDepositResponse { + /** deposit defines the requested deposit. */ + deposit?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + } +} + +/** + * QueryDepositsResponse is the response type for the Query/Deposits RPC method. + */ +export interface CosmosGovV1Beta1QueryDepositsResponse { + deposits?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface CosmosGovV1Beta1QueryParamsResponse { + /** voting_params defines the parameters related to voting. */ + voting_params?: { voting_period?: string } + + /** deposit_params defines the parameters related to deposit. */ + deposit_params?: { + min_deposit?: { denom?: string; amount?: string }[] + max_deposit_period?: string + } + + /** tally_params defines the parameters related to tally. */ + tally_params?: { + quorum?: string + threshold?: string + veto_threshold?: string + } +} + +/** + * QueryProposalResponse is the response type for the Query/Proposal RPC method. + */ +export interface CosmosGovV1Beta1QueryProposalResponse { + /** Proposal defines the core field members of a governance proposal. */ + proposal?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + } +} + +/** +* QueryProposalsResponse is the response type for the Query/Proposals RPC +method. +*/ +export interface CosmosGovV1Beta1QueryProposalsResponse { + proposals?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryTallyResultResponse is the response type for the Query/Tally RPC method. + */ +export interface CosmosGovV1Beta1QueryTallyResultResponse { + /** tally defines the requested tally. */ + tally?: { yes?: string; abstain?: string; no?: string; no_with_veto?: string } +} + +/** + * QueryVoteResponse is the response type for the Query/Vote RPC method. + */ +export interface CosmosGovV1Beta1QueryVoteResponse { + /** vote defined the queried vote. */ + vote?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + } +} + +/** + * QueryVotesResponse is the response type for the Query/Votes RPC method. + */ +export interface CosmosGovV1Beta1QueryVotesResponse { + /** votes defined the queried votes. */ + votes?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * TallyParams defines the params for tallying votes on governance proposals. + */ +export interface CosmosGovV1Beta1TallyParams { + /** + * Minimum percentage of total stake needed to vote for a result to be + * considered valid. + * @format byte + */ + quorum?: string + + /** + * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + * @format byte + */ + threshold?: string + + /** + * Minimum value of Veto votes to Total votes ratio for proposal to be + * vetoed. Default value: 1/3. + * @format byte + */ + veto_threshold?: string +} + +/** + * TallyResult defines a standard tally for a governance proposal. + */ +export interface CosmosGovV1Beta1TallyResult { + yes?: string + abstain?: string + no?: string + no_with_veto?: string +} + +/** +* Vote defines a vote on a governance proposal. +A Vote consists of a proposal ID, the voter, and the vote option. +*/ +export interface CosmosGovV1Beta1Vote { + /** @format uint64 */ + proposal_id?: string + voter?: string + + /** + * Deprecated: Prefer to use `options` instead. This field is set in queries + * if and only if `len(options) == 1` and that option has weight 1. In all + * other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + */ + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + + /** Since: cosmos-sdk 0.43 */ + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] +} + +/** +* VoteOption enumerates the valid vote options for a given governance proposal. + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. +*/ +export enum CosmosGovV1Beta1VoteOption { + VOTE_OPTION_UNSPECIFIED = 'VOTE_OPTION_UNSPECIFIED', + VOTE_OPTION_YES = 'VOTE_OPTION_YES', + VOTE_OPTION_ABSTAIN = 'VOTE_OPTION_ABSTAIN', + VOTE_OPTION_NO = 'VOTE_OPTION_NO', + VOTE_OPTION_NO_WITH_VETO = 'VOTE_OPTION_NO_WITH_VETO', +} + +/** + * VotingParams defines the params for voting on governance proposals. + */ +export interface CosmosGovV1Beta1VotingParams { + /** Length of the voting period. */ + voting_period?: string +} + +/** +* WeightedVoteOption defines a unit of vote for vote split. + +Since: cosmos-sdk 0.43 +*/ +export interface CosmosGovV1Beta1WeightedVoteOption { + /** + * VoteOption enumerates the valid vote options for a given governance proposal. + * - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + * - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + * - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + * - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + * - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + */ + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string +} + +/** + * Params represents the parameters used for by the slashing module. + */ +export interface CosmosSlashingV1Beta1Params { + /** @format int64 */ + signed_blocks_window?: string + + /** @format byte */ + min_signed_per_window?: string + downtime_jail_duration?: string + + /** @format byte */ + slash_fraction_double_sign?: string + + /** @format byte */ + slash_fraction_downtime?: string +} + +export interface CosmosSlashingV1Beta1QueryParamsResponse { + /** Params represents the parameters used for by the slashing module. */ + params?: { + signed_blocks_window?: string + min_signed_per_window?: string + downtime_jail_duration?: string + slash_fraction_double_sign?: string + slash_fraction_downtime?: string + } +} + +export interface CosmosSlashingV1Beta1QuerySigningInfoResponse { + /** + * val_signing_info is the signing info of requested val cons address + * ValidatorSigningInfo defines a validator's signing info for monitoring their + * liveness activity. + */ + val_signing_info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + } +} + +export interface CosmosSlashingV1Beta1QuerySigningInfosResponse { + /** info is the signing info of all validators */ + info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + }[] + + /** + * 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; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* ValidatorSigningInfo defines a validator's signing info for monitoring their +liveness activity. +*/ +export interface CosmosSlashingV1Beta1ValidatorSigningInfo { + address?: string + + /** + * Height at which validator was first a candidate OR was unjailed + * @format int64 + */ + start_height?: string + + /** + * Index which is incremented each time the validator was a bonded + * in a block and may have signed a precommit or not. This in conjunction with the + * `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. + * @format int64 + */ + index_offset?: string + + /** + * Timestamp until which the validator is jailed due to liveness downtime. + * @format date-time + */ + jailed_until?: string + + /** + * Whether or not a validator has been tombstoned (killed out of validator set). It is set + * once the validator commits an equivocation or for any other configured misbehiavor. + */ + tombstoned?: boolean + + /** + * A counter kept to avoid unnecessary array reads. + * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. + * @format int64 + */ + missed_blocks_counter?: string +} + +/** +* BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. +*/ +export enum CosmosStakingV1Beta1BondStatus { + BOND_STATUS_UNSPECIFIED = 'BOND_STATUS_UNSPECIFIED', + BOND_STATUS_UNBONDED = 'BOND_STATUS_UNBONDED', + BOND_STATUS_UNBONDING = 'BOND_STATUS_UNBONDING', + BOND_STATUS_BONDED = 'BOND_STATUS_BONDED', +} + +/** + * Commission defines commission parameters for a given validator. + */ +export interface CosmosStakingV1Beta1Commission { + /** commission_rates defines the initial commission rates to be used for creating a validator. */ + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + + /** + * update_time is the last time the commission rate was changed. + * @format date-time + */ + update_time?: string +} + +/** +* CommissionRates defines the initial commission rates to be used for creating +a validator. +*/ +export interface CosmosStakingV1Beta1CommissionRates { + /** rate is the commission rate charged to delegators, as a fraction. */ + rate?: string + + /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ + max_rate?: string + + /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ + max_change_rate?: string +} + +/** +* Delegation represents the bond with tokens held by an account. It is +owned by one delegator, and is associated with the voting power of one +validator. +*/ +export interface CosmosStakingV1Beta1Delegation { + /** delegator_address is the bech32-encoded address of the delegator. */ + delegator_address?: string + + /** validator_address is the bech32-encoded address of the validator. */ + validator_address?: string + + /** shares define the delegation shares received. */ + shares?: string +} + +/** +* DelegationResponse is equivalent to Delegation except that it contains a +balance in addition to shares which is more suitable for client responses. +*/ +export interface CosmosStakingV1Beta1DelegationResponse { + /** + * Delegation represents the bond with tokens held by an account. It is + * owned by one delegator, and is associated with the voting power of one + * validator. + */ + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + + /** + * Coin defines a token with a denomination and an amount. + * + * NOTE: The amount field is an Int which implements the custom method + * signatures required by gogoproto. + */ + balance?: { denom?: string; amount?: string } +} + +/** + * Description defines a validator description. + */ +export interface CosmosStakingV1Beta1Description { + /** moniker defines a human-readable name for the validator. */ + moniker?: string + + /** identity defines an optional identity signature (ex. UPort or Keybase). */ + identity?: string + + /** website defines an optional website link. */ + website?: string + + /** security_contact defines an optional email for security contact. */ + security_contact?: string + + /** details define other optional details. */ + details?: string +} + +/** +* HistoricalInfo contains header and validator information for a given block. +It is stored as part of staking module's state, which persists the `n` most +recent HistoricalInfo +(`n` is set by the staking module's `historical_entries` parameter). +*/ +export interface CosmosStakingV1Beta1HistoricalInfo { + /** Header defines the structure of a Tendermint block header. */ + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] +} + +/** + * Params defines the parameters for the staking module. + */ +export interface CosmosStakingV1Beta1Params { + /** unbonding_time is the time duration of unbonding. */ + unbonding_time?: string + + /** + * max_validators is the maximum number of validators. + * @format int64 + */ + max_validators?: number + + /** + * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). + * @format int64 + */ + max_entries?: number + + /** + * historical_entries is the number of historical entries to persist. + * @format int64 + */ + historical_entries?: number + + /** bond_denom defines the bondable coin denomination. */ + bond_denom?: string +} + +/** +* Pool is used for tracking bonded and not-bonded token supply of the bond +denomination. +*/ +export interface CosmosStakingV1Beta1Pool { + not_bonded_tokens?: string + bonded_tokens?: string +} + +/** + * QueryDelegationResponse is response type for the Query/Delegation RPC method. + */ +export interface CosmosStakingV1Beta1QueryDelegationResponse { + /** delegation_responses defines the delegation info of a delegation. */ + delegation_response?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + } +} + +/** +* QueryDelegatorDelegationsResponse is response type for the +Query/DelegatorDelegations RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorDelegationsResponse { + /** delegation_responses defines all the delegations' info of a delegator. */ + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryUnbondingDelegatorDelegationsResponse is response type for the +Query/UnbondingDelegatorDelegations RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorUnbondingDelegationsResponse { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryDelegatorValidatorResponse response type for the +Query/DelegatorValidator RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorValidatorResponse { + /** validator defines the the validator info. */ + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } +} + +/** +* QueryDelegatorValidatorsResponse is response type for the +Query/DelegatorValidators RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorValidatorsResponse { + /** validators defines the the validators' info of a delegator. */ + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +method. +*/ +export interface CosmosStakingV1Beta1QueryHistoricalInfoResponse { + /** hist defines the historical info at the given height. */ + hist?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + } +} + +/** + * QueryParamsResponse is response type for the Query/Params RPC method. + */ +export interface CosmosStakingV1Beta1QueryParamsResponse { + /** params holds all the parameters of this module. */ + params?: { + unbonding_time?: string + max_validators?: number + max_entries?: number + historical_entries?: number + bond_denom?: string + } +} + +/** + * QueryPoolResponse is response type for the Query/Pool RPC method. + */ +export interface CosmosStakingV1Beta1QueryPoolResponse { + /** pool defines the pool info. */ + pool?: { not_bonded_tokens?: string; bonded_tokens?: string } +} + +/** +* QueryRedelegationsResponse is response type for the Query/Redelegations RPC +method. +*/ +export interface CosmosStakingV1Beta1QueryRedelegationsResponse { + redelegation_responses?: { + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryDelegationResponse is response type for the Query/UnbondingDelegation +RPC method. +*/ +export interface CosmosStakingV1Beta1QueryUnbondingDelegationResponse { + /** unbond defines the unbonding information of a delegation. */ + unbond?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + } +} + +export interface CosmosStakingV1Beta1QueryValidatorDelegationsResponse { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +export interface CosmosStakingV1Beta1QueryValidatorResponse { + /** validator defines the the validator info. */ + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } +} + +/** +* QueryValidatorUnbondingDelegationsResponse is response type for the +Query/ValidatorUnbondingDelegations RPC method. +*/ +export interface CosmosStakingV1Beta1QueryValidatorUnbondingDelegationsResponse { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +export interface CosmosStakingV1Beta1QueryValidatorsResponse { + /** validators contains all the queried validators. */ + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* Redelegation contains the list of a particular delegator's redelegating bonds +from a particular source validator to a particular destination validator. +*/ +export interface CosmosStakingV1Beta1Redelegation { + /** delegator_address is the bech32-encoded address of the delegator. */ + delegator_address?: string + + /** validator_src_address is the validator redelegation source operator address. */ + validator_src_address?: string + + /** validator_dst_address is the validator redelegation destination operator address. */ + validator_dst_address?: string + + /** entries are the redelegation entries. */ + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] +} + +/** + * RedelegationEntry defines a redelegation object with relevant metadata. + */ +export interface CosmosStakingV1Beta1RedelegationEntry { + /** + * creation_height defines the height which the redelegation took place. + * @format int64 + */ + creation_height?: string + + /** + * completion_time defines the unix time for redelegation completion. + * @format date-time + */ + completion_time?: string + + /** initial_balance defines the initial balance when redelegation started. */ + initial_balance?: string + + /** shares_dst is the amount of destination-validator shares created by redelegation. */ + shares_dst?: string +} + +/** +* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +contains a balance in addition to shares which is more suitable for client +responses. +*/ +export interface CosmosStakingV1Beta1RedelegationEntryResponse { + /** RedelegationEntry defines a redelegation object with relevant metadata. */ + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string +} + +/** +* RedelegationResponse is equivalent to a Redelegation except that its entries +contain a balance in addition to shares which is more suitable for client +responses. +*/ +export interface CosmosStakingV1Beta1RedelegationResponse { + /** + * Redelegation contains the list of a particular delegator's redelegating bonds + * from a particular source validator to a particular destination validator. + */ + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] +} + +/** +* UnbondingDelegation stores all of a single delegator's unbonding bonds +for a single validator in an time-ordered list. +*/ +export interface CosmosStakingV1Beta1UnbondingDelegation { + /** delegator_address is the bech32-encoded address of the delegator. */ + delegator_address?: string + + /** validator_address is the bech32-encoded address of the validator. */ + validator_address?: string + + /** entries are the unbonding delegation entries. */ + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] +} + +/** + * UnbondingDelegationEntry defines an unbonding object with relevant metadata. + */ +export interface CosmosStakingV1Beta1UnbondingDelegationEntry { + /** + * creation_height is the height which the unbonding took place. + * @format int64 + */ + creation_height?: string + + /** + * completion_time is the unix time for unbonding completion. + * @format date-time + */ + completion_time?: string + + /** initial_balance defines the tokens initially scheduled to receive at completion. */ + initial_balance?: string + + /** balance defines the tokens to receive at completion. */ + balance?: string +} + +/** +* Validator defines a validator, together with the total amount of the +Validator's bond shares and their exchange rate to coins. Slashing results in +a decrease in the exchange rate, allowing correct calculation of future +undelegations without iterating over delegators. When coins are delegated to +this validator, the validator is credited with a delegation whose number of +bond shares is based on the amount of coins delegated divided by the current +exchange rate. Voting power can be calculated as total bonded shares +multiplied by exchange rate. +*/ +export interface CosmosStakingV1Beta1Validator { + /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ + operator_address?: string + + /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ + consensus_pubkey?: { type_url?: string; value?: string } + + /** jailed defined whether the validator has been jailed from bonded status or not. */ + jailed?: boolean + + /** status is the validator status (bonded/unbonding/unbonded). */ + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + + /** tokens define the delegated tokens (incl. self-delegation). */ + tokens?: string + + /** delegator_shares defines total shares issued to a validator's delegators. */ + delegator_shares?: string + + /** description defines the description terms for the validator. */ + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + + /** + * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. + * @format int64 + */ + unbonding_height?: string + + /** + * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. + * @format date-time + */ + unbonding_time?: string + + /** commission defines the commission parameters. */ + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + + /** min_self_delegation is the validator's self declared minimum self delegation. */ + min_self_delegation?: string +} + +export interface TendermintTypesBlockID { + /** @format byte */ + hash?: string + + /** PartsetHeader */ + part_set_header?: { total?: number; hash?: string } +} + +/** + * Header defines the structure of a Tendermint block header. + */ +export interface TendermintTypesHeader { + /** + * basic block info + * Consensus captures the consensus rules for processing a block in the + * blockchain, including all blockchain data structures and the rules of the + * application's state transition machine. + */ + version?: { block?: string; app?: string } + chain_id?: string + + /** @format int64 */ + height?: string + + /** @format date-time */ + time?: string + + /** prev block info */ + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + + /** + * hashes of block data + * @format byte + */ + last_commit_hash?: string + + /** @format byte */ + data_hash?: string + + /** + * hashes from the app output from the prev block + * @format byte + */ + validators_hash?: string + + /** @format byte */ + next_validators_hash?: string + + /** @format byte */ + consensus_hash?: string + + /** @format byte */ + app_hash?: string + + /** @format byte */ + last_results_hash?: string + + /** + * consensus info + * @format byte + */ + evidence_hash?: string + + /** @format byte */ + proposer_address?: string +} + +export interface TendermintTypesPartSetHeader { + /** @format int64 */ + total?: number + + /** @format byte */ + hash?: string +} + +/** +* Consensus captures the consensus rules for processing a block in the +blockchain, including all blockchain data structures and the rules of the +application's state transition machine. +*/ +export interface TendermintVersionConsensus { + /** @format uint64 */ + block?: string + + /** @format uint64 */ + app?: string +} + +/** + * ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + */ +export interface CosmosBaseAbciV1Beta1ABCIMessageLog { + /** @format int64 */ + msg_index?: number + log?: string + + /** + * Events contains a slice of Event objects that were emitted during some + * execution. + */ + events?: { type?: string; attributes?: { key?: string; value?: string }[] }[] +} + +/** +* Attribute defines an attribute wrapper where the key and value are +strings instead of raw bytes. +*/ +export interface CosmosBaseAbciV1Beta1Attribute { + key?: string + value?: string +} + +/** + * GasInfo defines tx execution gas context. + */ +export interface CosmosBaseAbciV1Beta1GasInfo { + /** + * GasWanted is the maximum units of work we allow this tx to perform. + * @format uint64 + */ + gas_wanted?: string + + /** + * GasUsed is the amount of gas actually consumed. + * @format uint64 + */ + gas_used?: string +} + +/** + * Result is the union of ResponseFormat and ResponseCheckTx. + */ +export interface CosmosBaseAbciV1Beta1Result { + /** + * Data is any data returned from message or handler execution. It MUST be + * length prefixed in order to separate data from multiple message executions. + * @format byte + */ + data?: string + + /** Log contains the log information from message or handler execution. */ + log?: string + + /** + * Events contains a slice of Event objects that were emitted during message + * or handler execution. + */ + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] +} + +/** +* StringEvent defines en Event object wrapper where all the attributes +contain key/value pairs that are strings instead of raw bytes. +*/ +export interface CosmosBaseAbciV1Beta1StringEvent { + type?: string + attributes?: { key?: string; value?: string }[] +} + +/** +* TxResponse defines a structure containing relevant tx data and metadata. The +tags are stringified and the log is JSON decoded. +*/ +export interface CosmosBaseAbciV1Beta1TxResponse { + /** + * The block height + * @format int64 + */ + height?: string + + /** The transaction hash. */ + txhash?: string + + /** Namespace for the Code */ + codespace?: string + + /** + * Response code. + * @format int64 + */ + code?: number + + /** Result bytes, if any. */ + data?: string + + /** + * The output of the application's logger (raw string). May be + * non-deterministic. + */ + raw_log?: string + + /** The output of the application's logger (typed). May be non-deterministic. */ + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + + /** Additional information. May be non-deterministic. */ + info?: string + + /** + * Amount of gas requested for transaction. + * @format int64 + */ + gas_wanted?: string + + /** + * Amount of gas consumed by transaction. + * @format int64 + */ + gas_used?: string + + /** The request transaction bytes. */ + tx?: { type_url?: string; value?: string } + + /** + * Time of the previous block. For heights > 1, it's the weighted median of + * the timestamps of the valid votes in the block.LastCommit. For height == 1, + * it's genesis time. + */ + timestamp?: string + + /** + * Events defines all the events emitted by processing a transaction. Note, + * these events include those emitted by processing all the messages and those + * emitted from the ante handler. Whereas Logs contains the events, with + * additional metadata, emitted only by processing the messages. + * + * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + */ + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] +} + +/** +* CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. +*/ +export interface CosmosCryptoMultisigV1Beta1CompactBitArray { + /** @format int64 */ + extra_bits_stored?: number + + /** @format byte */ + elems?: string +} + +/** +* SignMode represents a signing mode with its own security guarantees. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be +rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is +verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some +human-readable textual representation on top of the binary representation +from SIGN_MODE_DIRECT + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses +Amino JSON and will be removed in the future + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos +SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + +Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, +but is not implemented on the SDK by default. To enable EIP-191, you need +to pass a custom `TxConfig` that has an implementation of +`SignModeHandler` for EIP-191. The SDK may decide to fully support +EIP-191 in the future. + +Since: cosmos-sdk 0.45.2 +*/ +export enum CosmosTxSigningV1Beta1SignMode { + SIGN_MODE_UNSPECIFIED = 'SIGN_MODE_UNSPECIFIED', + SIGN_MODE_DIRECT = 'SIGN_MODE_DIRECT', + SIGN_MODE_TEXTUAL = 'SIGN_MODE_TEXTUAL', + SIGN_MODE_LEGACY_AMINO_JSON = 'SIGN_MODE_LEGACY_AMINO_JSON', + SIGNMODEEIP191 = 'SIGN_MODE_EIP_191', +} + +/** +* AuthInfo describes the fee and signer modes that are used to sign a +transaction. +*/ +export interface CosmosTxV1Beta1AuthInfo { + /** + * signer_infos defines the signing modes for the required signers. The number + * and order of elements must match the required signers from TxBody's + * messages. The first element is the primary signer and the one which pays + * the fee. + */ + signer_infos?: CosmosTxV1Beta1SignerInfo[] + + /** + * Fee is the fee and gas limit for the transaction. The first signer is the + * primary signer and the one which pays the fee. The fee can be calculated + * based on the cost of evaluating the body and doing signature verification + * of the signers. This can be estimated via simulation. + */ + fee?: { + amount?: { denom?: string; amount?: string }[] + gas_limit?: string + payer?: string + granter?: string + } +} + +/** +* BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for +the tx to be committed in a block. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for +a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns +immediately. +*/ +export enum CosmosTxV1Beta1BroadcastMode { + BROADCAST_MODE_UNSPECIFIED = 'BROADCAST_MODE_UNSPECIFIED', + BROADCAST_MODE_BLOCK = 'BROADCAST_MODE_BLOCK', + BROADCAST_MODE_SYNC = 'BROADCAST_MODE_SYNC', + BROADCAST_MODE_ASYNC = 'BROADCAST_MODE_ASYNC', +} + +/** +* BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +RPC method. +*/ +export interface CosmosTxV1Beta1BroadcastTxRequest { + /** + * tx_bytes is the raw transaction. + * @format byte + */ + tx_bytes?: string + + /** + * BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. + * - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + * - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + * the tx to be committed in a block. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + * a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + * immediately. + */ + mode?: + | 'BROADCAST_MODE_UNSPECIFIED' + | 'BROADCAST_MODE_BLOCK' + | 'BROADCAST_MODE_SYNC' + | 'BROADCAST_MODE_ASYNC' +} + +/** +* BroadcastTxResponse is the response type for the +Service.BroadcastTx method. +*/ +export interface CosmosTxV1Beta1BroadcastTxResponse { + /** tx_response is the queried TxResponses. */ + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } +} + +/** +* Fee includes the amount of coins paid in fees and the maximum +gas to be used by the transaction. The ratio yields an effective "gasprice", +which must be above some miminum to be accepted into the mempool. +*/ +export interface CosmosTxV1Beta1Fee { + /** amount is the amount of coins to be paid as a fee */ + amount?: { denom?: string; amount?: string }[] + + /** + * gas_limit is the maximum gas that can be used in transaction processing + * before an out of gas error occurs + * @format uint64 + */ + gas_limit?: string + + /** + * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. + * the payer must be a tx signer (and thus have signed this field in AuthInfo). + * setting this field does *not* change the ordering of required signers for the transaction. + */ + payer?: string + + /** + * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used + * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does + * not support fee grants, this will fail + */ + granter?: string +} + +/** +* GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. + +Since: cosmos-sdk 0.45.2 +*/ +export interface CosmosTxV1Beta1GetBlockWithTxsResponse { + /** txs are the transactions in the block. */ + txs?: CosmosTxV1Beta1Tx[] + + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + + /** pagination defines a pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * GetTxResponse is the response type for the Service.GetTx method. + */ +export interface CosmosTxV1Beta1GetTxResponse { + /** tx is the queried transaction. */ + tx?: CosmosTxV1Beta1Tx + + /** tx_response is the queried TxResponses. */ + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } +} + +/** +* GetTxsEventResponse is the response type for the Service.TxsByEvents +RPC method. +*/ +export interface CosmosTxV1Beta1GetTxsEventResponse { + /** txs is the list of queried transactions. */ + txs?: CosmosTxV1Beta1Tx[] + + /** tx_responses is the list of queried TxResponses. */ + tx_responses?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + }[] + + /** pagination defines a pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * ModeInfo describes the signing mode of a single or nested multisig signer. + */ +export interface CosmosTxV1Beta1ModeInfo { + /** single represents a single signer */ + single?: { + mode?: + | 'SIGN_MODE_UNSPECIFIED' + | 'SIGN_MODE_DIRECT' + | 'SIGN_MODE_TEXTUAL' + | 'SIGN_MODE_LEGACY_AMINO_JSON' + | 'SIGN_MODE_EIP_191' + } + + /** multi represents a nested multisig signer */ + multi?: CosmosTxV1Beta1ModeInfoMulti +} + +export interface CosmosTxV1Beta1ModeInfoMulti { + /** + * bitarray specifies which keys within the multisig are signing + * CompactBitArray is an implementation of a space efficient bit array. + * This is used to ensure that the encoded data takes up a minimal amount of + * space after proto encoding. + * This is not thread safe, and is not intended for concurrent usage. + */ + bitarray?: { extra_bits_stored?: number; elems?: string } + + /** + * mode_infos is the corresponding modes of the signers of the multisig + * which could include nested multisig public keys + */ + mode_infos?: CosmosTxV1Beta1ModeInfo[] +} + +export interface CosmosTxV1Beta1ModeInfoSingle { + /** + * mode is the signing mode of the single signer + * SignMode represents a signing mode with its own security guarantees. + * - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + * rejected - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + * verified with raw bytes from Tx - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + * human-readable textual representation on top of the binary representation + * from SIGN_MODE_DIRECT - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + * Amino JSON and will be removed in the future - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + * + * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + * but is not implemented on the SDK by default. To enable EIP-191, you need + * to pass a custom `TxConfig` that has an implementation of + * `SignModeHandler` for EIP-191. The SDK may decide to fully support + * EIP-191 in the future. + * Since: cosmos-sdk 0.45.2 + */ + mode?: + | 'SIGN_MODE_UNSPECIFIED' + | 'SIGN_MODE_DIRECT' + | 'SIGN_MODE_TEXTUAL' + | 'SIGN_MODE_LEGACY_AMINO_JSON' + | 'SIGN_MODE_EIP_191' +} + +/** +* - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order +*/ +export enum CosmosTxV1Beta1OrderBy { + ORDER_BY_UNSPECIFIED = 'ORDER_BY_UNSPECIFIED', + ORDER_BY_ASC = 'ORDER_BY_ASC', + ORDER_BY_DESC = 'ORDER_BY_DESC', +} + +/** +* SignerInfo describes the public key and signing mode of a single top-level +signer. +*/ +export interface CosmosTxV1Beta1SignerInfo { + /** + * public_key is the public key of the signer. It is optional for accounts + * that already exist in state. If unset, the verifier can use the required \ + * signer address for this position and lookup the public key. + */ + public_key?: { type_url?: string; value?: string } + + /** + * mode_info describes the signing mode of the signer and is a nested + * structure to support nested multisig pubkey's + * ModeInfo describes the signing mode of a single or nested multisig signer. + */ + mode_info?: CosmosTxV1Beta1ModeInfo + + /** + * sequence is the sequence of the account, which describes the + * number of committed transactions signed by a given address. It is used to + * prevent replay attacks. + * @format uint64 + */ + sequence?: string +} + +/** +* SimulateRequest is the request type for the Service.Simulate +RPC method. +*/ +export interface CosmosTxV1Beta1SimulateRequest { + /** + * tx is the transaction to simulate. + * Deprecated. Send raw tx bytes instead. + */ + tx?: CosmosTxV1Beta1Tx + + /** + * tx_bytes is the raw transaction. + * + * Since: cosmos-sdk 0.43 + * @format byte + */ + tx_bytes?: string +} + +/** +* SimulateResponse is the response type for the +Service.SimulateRPC method. +*/ +export interface CosmosTxV1Beta1SimulateResponse { + /** gas_info is the information about gas used in the simulation. */ + gas_info?: { gas_wanted?: string; gas_used?: string } + + /** result is the result of the simulation. */ + result?: { + data?: string + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } +} + +/** + * Tx is the standard type used for broadcasting transactions. + */ +export interface CosmosTxV1Beta1Tx { + /** + * body is the processable content of the transaction + * TxBody is the body of a transaction that all signers sign over. + */ + body?: { + messages?: { type_url?: string; value?: string }[] + memo?: string + timeout_height?: string + extension_options?: { type_url?: string; value?: string }[] + non_critical_extension_options?: { type_url?: string; value?: string }[] + } + + /** + * auth_info is the authorization related content of the transaction, + * specifically signers, signer modes and fee + * AuthInfo describes the fee and signer modes that are used to sign a + * transaction. + */ + auth_info?: CosmosTxV1Beta1AuthInfo + + /** + * signatures is a list of signatures that matches the length and order of + * AuthInfo's signer_infos to allow connecting signature meta information like + * public key and signing mode by position. + */ + signatures?: string[] +} + +/** + * TxBody is the body of a transaction that all signers sign over. + */ +export interface CosmosTxV1Beta1TxBody { + /** + * messages is a list of messages to be executed. The required signers of + * those messages define the number and order of elements in AuthInfo's + * signer_infos and Tx's signatures. Each required signer address is added to + * the list only the first time it occurs. + * By convention, the first required signer (usually from the first message) + * is referred to as the primary signer and pays the fee for the whole + * transaction. + */ + messages?: { type_url?: string; value?: string }[] + + /** + * memo is any arbitrary note/comment to be added to the transaction. + * WARNING: in clients, any publicly exposed text should not be called memo, + * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). + */ + memo?: string + + /** + * timeout is the block height after which this transaction will not + * be processed by the chain + * @format uint64 + */ + timeout_height?: string + + /** + * extension_options are arbitrary options that can be added by chains + * when the default options are not sufficient. If any of these are present + * and can't be handled, the transaction will be rejected + */ + extension_options?: { type_url?: string; value?: string }[] + + /** + * extension_options are arbitrary options that can be added by chains + * when the default options are not sufficient. If any of these are present + * and can't be handled, they will be ignored + */ + non_critical_extension_options?: { type_url?: string; value?: string }[] +} + +/** +* Event allows application developers to attach additional information to +ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +Later, transactions may be queried using these events. +*/ +export interface TendermintAbciEvent { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] +} + +/** + * EventAttribute is a single key-value pair, associated with an event. + */ +export interface TendermintAbciEventAttribute { + /** @format byte */ + key?: string + + /** @format byte */ + value?: string + index?: boolean +} + +export interface TendermintCryptoPublicKey { + /** @format byte */ + ed25519?: string + + /** @format byte */ + secp256k1?: string +} + +export interface TendermintTypesBlock { + /** Header defines the structure of a Tendermint block header. */ + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + + /** Data contains the set of transactions included in the block */ + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + + /** + * Commit contains the evidence that a block was committed by a set of + * validators. + */ + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } +} + +export enum TendermintTypesBlockIDFlag { + BLOCK_ID_FLAG_UNKNOWN = 'BLOCK_ID_FLAG_UNKNOWN', + BLOCK_ID_FLAG_ABSENT = 'BLOCK_ID_FLAG_ABSENT', + BLOCK_ID_FLAG_COMMIT = 'BLOCK_ID_FLAG_COMMIT', + BLOCK_ID_FLAG_NIL = 'BLOCK_ID_FLAG_NIL', +} + +/** +* Commit contains the evidence that a block was committed by a set of +validators. +*/ +export interface TendermintTypesCommit { + /** @format int64 */ + height?: string + + /** @format int32 */ + round?: number + + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] +} + +/** + * CommitSig is a part of the Vote included in a Commit. + */ +export interface TendermintTypesCommitSig { + /** BlockIdFlag indicates which BlcokID the signature is for */ + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + + /** @format byte */ + validator_address?: string + + /** @format date-time */ + timestamp?: string + + /** @format byte */ + signature?: string +} + +export interface TendermintTypesData { + /** + * Txs that will be applied by state @ block.Height+1. + * NOTE: not all txs here are valid. We're just agreeing on the order first. + * This means that block.AppHash does not include these txs. + */ + txs?: string[] +} + +/** +* DuplicateVoteEvidence contains evidence of a validator signed two conflicting +votes. +*/ +export interface TendermintTypesDuplicateVoteEvidence { + /** + * Vote represents a prevote, precommit, or commit vote from validators for + * consensus. + */ + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + + /** + * Vote represents a prevote, precommit, or commit vote from validators for + * consensus. + */ + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + + /** @format int64 */ + total_voting_power?: string + + /** @format int64 */ + validator_power?: string + + /** @format date-time */ + timestamp?: string +} + +export interface TendermintTypesEvidence { + /** + * DuplicateVoteEvidence contains evidence of a validator signed two conflicting + * votes. + */ + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + + /** + * LightClientAttackEvidence contains evidence of a set of validators attempting + * to mislead a light client. + */ + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } +} + +export interface TendermintTypesEvidenceList { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] +} + +export interface TendermintTypesLightBlock { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } +} + +/** +* LightClientAttackEvidence contains evidence of a set of validators attempting +to mislead a light client. +*/ +export interface TendermintTypesLightClientAttackEvidence { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + + /** @format int64 */ + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + + /** @format int64 */ + total_voting_power?: string + + /** @format date-time */ + timestamp?: string +} + +export interface TendermintTypesSignedHeader { + /** Header defines the structure of a Tendermint block header. */ + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + + /** + * Commit contains the evidence that a block was committed by a set of + * validators. + */ + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } +} + +/** +* SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals +*/ +export enum TendermintTypesSignedMsgType { + SIGNED_MSG_TYPE_UNKNOWN = 'SIGNED_MSG_TYPE_UNKNOWN', + SIGNED_MSG_TYPE_PREVOTE = 'SIGNED_MSG_TYPE_PREVOTE', + SIGNED_MSG_TYPE_PRECOMMIT = 'SIGNED_MSG_TYPE_PRECOMMIT', + SIGNED_MSG_TYPE_PROPOSAL = 'SIGNED_MSG_TYPE_PROPOSAL', +} + +export interface TendermintTypesValidator { + /** @format byte */ + address?: string + + /** PublicKey defines the keys available for use with Tendermint Validators */ + pub_key?: { ed25519?: string; secp256k1?: string } + + /** @format int64 */ + voting_power?: string + + /** @format int64 */ + proposer_priority?: string +} + +export interface TendermintTypesValidatorSet { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + + /** @format int64 */ + total_voting_power?: string +} + +/** +* Vote represents a prevote, precommit, or commit vote from validators for +consensus. +*/ +export interface TendermintTypesVote { + /** + * SignedMsgType is a type of signed message in the consensus. + * + * - SIGNED_MSG_TYPE_PREVOTE: Votes + * - SIGNED_MSG_TYPE_PROPOSAL: Proposals + */ + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + + /** @format int64 */ + height?: string + + /** @format int32 */ + round?: number + + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + + /** @format date-time */ + timestamp?: string + + /** @format byte */ + validator_address?: string + + /** @format int32 */ + validator_index?: number + + /** @format byte */ + signature?: string +} + +/** + * GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetBlockByHeightResponse { + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } +} + +/** + * GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetLatestBlockResponse { + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } +} + +/** + * GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetLatestValidatorSetResponse { + /** @format int64 */ + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetNodeInfoResponse { + default_node_info?: { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } + } + + /** VersionInfo is the type for the GetNodeInfoResponse message. */ + application_version?: { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + cosmos_sdk_version?: string + } +} + +/** + * GetSyncingResponse is the response type for the Query/GetSyncing RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetSyncingResponse { + syncing?: boolean +} + +/** + * GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetValidatorSetByHeightResponse { + /** @format int64 */ + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +export interface CosmosBaseTendermintV1Beta1Module { + /** module path */ + path?: string + + /** module version */ + version?: string + + /** checksum */ + sum?: string +} + +/** + * Validator is the type for the validator-set. + */ +export interface CosmosBaseTendermintV1Beta1Validator { + address?: string + + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + pub_key?: { type_url?: string; value?: string } + + /** @format int64 */ + voting_power?: string + + /** @format int64 */ + proposer_priority?: string +} + +/** + * VersionInfo is the type for the GetNodeInfoResponse message. + */ +export interface CosmosBaseTendermintV1Beta1VersionInfo { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + + /** Since: cosmos-sdk 0.43 */ + cosmos_sdk_version?: string +} + +export interface TendermintP2PDefaultNodeInfo { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + + /** @format byte */ + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } +} + +export interface TendermintP2PDefaultNodeInfoOther { + tx_index?: string + rpc_address?: string +} + +export interface TendermintP2PProtocolVersion { + /** @format uint64 */ + p2p?: string + + /** @format uint64 */ + block?: string + + /** @format uint64 */ + app?: string +} diff --git a/packages/provider/src/generated/http-client.ts b/packages/provider/src/generated/http-client.ts new file mode 100644 index 00000000..9492169b --- /dev/null +++ b/packages/provider/src/generated/http-client.ts @@ -0,0 +1,158 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import axios, { + AxiosInstance, + AxiosRequestConfig, + AxiosResponse, + ResponseType, +} from 'axios' + +export type QueryParamsType = Record + +export interface FullRequestParams + extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean + /** request path */ + path: string + /** content type of request body */ + type?: ContentType + /** query params */ + query?: QueryParamsType + /** format of response (i.e. response.json() -> format: "json") */ + format?: ResponseType + /** request body */ + body?: unknown +} + +export type RequestParams = Omit< + FullRequestParams, + 'body' | 'method' | 'query' | 'path' +> + +export interface ApiConfig + extends Omit { + securityWorker?: ( + securityData: SecurityDataType | null, + ) => Promise | AxiosRequestConfig | void + secure?: boolean + format?: ResponseType +} + +export enum ContentType { + Json = 'application/json', + FormData = 'multipart/form-data', + UrlEncoded = 'application/x-www-form-urlencoded', +} + +export class HttpClient { + public instance: AxiosInstance + private securityData: SecurityDataType | null = null + private securityWorker?: ApiConfig['securityWorker'] + private secure?: boolean + private format?: ResponseType + + constructor({ + securityWorker, + secure, + format, + ...axiosConfig + }: ApiConfig = {}) { + this.instance = axios.create({ + ...axiosConfig, + baseURL: axiosConfig.baseURL || 'https://rest.bd.evmos.org:1317', + }) + this.secure = secure + this.format = format + this.securityWorker = securityWorker + } + + public setSecurityData = (data: SecurityDataType | null) => { + this.securityData = data + } + + private mergeRequestParams( + params1: AxiosRequestConfig, + params2?: AxiosRequestConfig, + ): AxiosRequestConfig { + return { + ...this.instance.defaults, + ...params1, + ...(params2 || {}), + headers: { + ...(this.instance.defaults.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + } + } + + private createFormData(input: Record): FormData { + return Object.keys(input || {}).reduce((formData, key) => { + const property = input[key] + formData.append( + key, + property instanceof Blob + ? property + : typeof property === 'object' && property !== null + ? JSON.stringify(property) + : `${property}`, + ) + return formData + }, new FormData()) + } + + public request = async ({ + secure, + path, + type, + query, + format, + body, + ...params + }: FullRequestParams): Promise> => { + const secureParams = + ((typeof secure === 'boolean' ? secure : this.secure) && + this.securityWorker && + (await this.securityWorker(this.securityData))) || + {} + const requestParams = this.mergeRequestParams(params, secureParams) + const responseFormat = (format && this.format) || void 0 + + if ( + type === ContentType.FormData && + body && + body !== null && + typeof body === 'object' + ) { + requestParams.headers.common = { Accept: '*/*' } + requestParams.headers.post = {} + requestParams.headers.put = {} + + body = this.createFormData(body as Record) + } + + return this.instance.request({ + ...requestParams, + headers: { + ...(type && type !== ContentType.FormData + ? { 'Content-Type': type } + : {}), + ...(requestParams.headers || {}), + }, + params: query, + responseType: responseFormat, + data: body, + url: path, + }) + } +} diff --git a/packages/provider/tsconfig.build.json b/packages/provider/tsconfig.build.json index 0dd8bd1a..c80f2a9c 100644 --- a/packages/provider/tsconfig.build.json +++ b/packages/provider/tsconfig.build.json @@ -2,11 +2,14 @@ "extends": "../../tsconfig.build.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", + "outDir": "./dist" }, "include": [ "./src/**/*.ts" ], + "exclude": [ + "./src/generated" + ], "references": [ ] } diff --git a/yarn.lock b/yarn.lock index 7fc1ec95..c17e73ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1469,6 +1469,11 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@exodus/schemasafe@^1.0.0-rc.2": + version "1.0.0-rc.7" + resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.0.0-rc.7.tgz#aded6839c2369883dafa46608a135c82b42ed76b" + integrity sha512-+1mBLsa+vvlV0lwEAP1hwgmOPkjMnoJ8hyCMfCCJga0sVDwDzrPJjnxZwdDaUmOh/vbFHQGBTk+FxsVjoI/CjQ== + "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -2917,6 +2922,11 @@ resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1" integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== +"@types/swagger-schema-official@2.0.21": + version "2.0.21" + resolved "https://registry.yarnpkg.com/@types/swagger-schema-official/-/swagger-schema-official-2.0.21.tgz#56812a86dcd57ba60e5c51705ee96a2b2dc9b374" + integrity sha512-n9BbLOjR4Hre7B4TSGGMPohOgOg8tcp00uxqsIE00uuWQC0QuX57G1bqC1csLsk2DpTGtHkd0dEb3ipsCZ9dAA== + "@types/unist@*", "@types/unist@^2.0.2": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -3249,6 +3259,21 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +axios@^0.21.4: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +axios@^0.27.2: + version "0.27.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" + integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== + dependencies: + follow-redirects "^1.14.9" + form-data "^4.0.0" + babel-jest@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" @@ -3578,6 +3603,11 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw== + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -3829,6 +3859,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + commander@^8.2.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -4425,6 +4460,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg== + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -4667,6 +4707,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eta@^1.12.1: + version "1.12.3" + resolved "https://registry.yarnpkg.com/eta/-/eta-1.12.3.tgz#2982d08adfbef39f9fa50e2fbd42d7337e7338b1" + integrity sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg== + ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" @@ -4852,6 +4897,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-safe-stringify@^2.0.7: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -4928,6 +4978,16 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +follow-redirects@^1.14.0: + version "1.14.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== + +follow-redirects@^1.14.9: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -4937,6 +4997,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -5361,6 +5430,11 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http2-client@^1.2.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/http2-client/-/http2-client-1.3.5.tgz#20c9dc909e3cc98284dd20af2432c524086df181" + integrity sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA== + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -6260,7 +6334,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -6643,7 +6717,7 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0: +make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -6992,6 +7066,11 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +nanoid@^3.1.22: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -7017,6 +7096,20 @@ node-addon-api@^3.2.1: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== +node-emoji@^1.10.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== + dependencies: + lodash "^4.17.21" + +node-fetch-h2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz#c6188325f9bd3d834020bf0f2d6dc17ced2241ac" + integrity sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg== + dependencies: + http2-client "^1.2.5" + node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -7050,6 +7143,13 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== +node-readfiles@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/node-readfiles/-/node-readfiles-0.2.0.tgz#dbbd4af12134e2e635c245ef93ffcf6f60673a5d" + integrity sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA== + dependencies: + es6-promise "^3.2.1" + node-releases@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" @@ -7231,6 +7331,52 @@ nx@14.5.10, "nx@>=14.5.4 < 16": yargs "^17.4.0" yargs-parser "21.0.1" +oas-kit-common@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/oas-kit-common/-/oas-kit-common-1.0.8.tgz#6d8cacf6e9097967a4c7ea8bcbcbd77018e1f535" + integrity sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ== + dependencies: + fast-safe-stringify "^2.0.7" + +oas-linter@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/oas-linter/-/oas-linter-3.2.2.tgz#ab6a33736313490659035ca6802dc4b35d48aa1e" + integrity sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ== + dependencies: + "@exodus/schemasafe" "^1.0.0-rc.2" + should "^13.2.1" + yaml "^1.10.0" + +oas-resolver@^2.5.6: + version "2.5.6" + resolved "https://registry.yarnpkg.com/oas-resolver/-/oas-resolver-2.5.6.tgz#10430569cb7daca56115c915e611ebc5515c561b" + integrity sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ== + dependencies: + node-fetch-h2 "^2.3.0" + oas-kit-common "^1.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + +oas-schema-walker@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz#74c3cd47b70ff8e0b19adada14455b5d3ac38a22" + integrity sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ== + +oas-validator@^5.0.8: + version "5.0.8" + resolved "https://registry.yarnpkg.com/oas-validator/-/oas-validator-5.0.8.tgz#387e90df7cafa2d3ffc83b5fb976052b87e73c28" + integrity sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw== + dependencies: + call-me-maybe "^1.0.1" + oas-kit-common "^1.0.8" + oas-linter "^3.2.2" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + reftools "^1.1.9" + should "^13.2.1" + yaml "^1.10.0" + object-inspect@^1.12.0, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" @@ -7646,7 +7792,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.4.1: +prettier@^2.2.1, prettier@^2.4.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -7890,6 +8036,11 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +reftools@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/reftools/-/reftools-1.1.9.tgz#e16e19f662ccd4648605312c06d34e5da3a2b77e" + integrity sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w== + regenerate-unicode-properties@^10.0.1: version "10.0.1" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56" @@ -8214,6 +8365,50 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" +should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + integrity sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA== + dependencies: + should-type "^1.4.0" + +should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + integrity sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q== + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + +should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + integrity sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA== + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + +should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + integrity sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ== + +should-util@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.1.tgz#fb0d71338f532a3a149213639e2d32cbea8bcb28" + integrity sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g== + +should@^13.2.1: + version "13.2.3" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.3.tgz#96d8e5acf3e97b49d89b51feaa5ae8d07ef58f10" + integrity sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ== + dependencies: + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + shx@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" @@ -8529,6 +8724,48 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +swagger-schema-official@2.0.0-bab6bed: + version "2.0.0-bab6bed" + resolved "https://registry.yarnpkg.com/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz#70070468d6d2977ca5237b2e519ca7d06a2ea3fd" + integrity sha512-rCC0NWGKr/IJhtRuPq/t37qvZHI/mH4I4sxflVM+qgVe5Z2uOCivzWaVbuioJaB61kvm5UvB7b49E+oBY0M8jA== + +swagger-typescript-api@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/swagger-typescript-api/-/swagger-typescript-api-9.3.1.tgz#07df3aa8e83a3897356a6e820e88b8348830aa6b" + integrity sha512-vtarFELmXmDKrtY2FvU2OjNvN1BqOj3kHWzz7mAresNKRgRubZpjlopECxbBekrLeX3lezAYSNcrFMVRGJAD4A== + dependencies: + "@types/swagger-schema-official" "2.0.21" + axios "^0.21.4" + commander "^6.2.1" + cosmiconfig "^7.0.0" + eta "^1.12.1" + js-yaml "^4.0.0" + lodash "^4.17.21" + make-dir "^3.1.0" + nanoid "^3.1.22" + node-emoji "^1.10.0" + prettier "^2.2.1" + swagger-schema-official "2.0.0-bab6bed" + swagger2openapi "^7.0.5" + typescript "^4.2.4" + +swagger2openapi@^7.0.5: + version "7.0.8" + resolved "https://registry.yarnpkg.com/swagger2openapi/-/swagger2openapi-7.0.8.tgz#12c88d5de776cb1cbba758994930f40ad0afac59" + integrity sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g== + dependencies: + call-me-maybe "^1.0.1" + node-fetch "^2.6.1" + node-fetch-h2 "^2.3.0" + node-readfiles "^0.2.0" + oas-kit-common "^1.0.8" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + oas-validator "^5.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -8862,7 +9099,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@^4.4.3: +typescript@^4.2.4, typescript@^4.4.3: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== @@ -9298,7 +9535,7 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.0, yargs@^17.4.0: +yargs@^17.0.0, yargs@^17.0.1, yargs@^17.4.0: version "17.5.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==