@quarix/provider
v0.3.11
Published
Simple provider to query the EVMOS rest api.
Downloads
26
Readme
Overview
quarix and tendermint provide many interfaces for us to query information about the chain. However, unfortunately, evmosjs does not package these interfaces in the provider package. In actual business scenarios, when these interfaces are needed, they are individually encapsulated. To solve the above problem, the packages/provider/src/rest/tendermint.ts
file in quarixjs implements the related request interfaces of tendermint, and the packages/provider/src/rest/app.ts
file implements the related request interfaces of quarix.
To be able to use both in Node.js and browsers, axios is used as the underlying network library.
Usage and Examples
Below is a simple code example that demonstrates how to use the provider package in quarixjs to query information about the quarix chain.
import { App, Tendermint } from '@quarix/provider'
const main = async () => {
let data
const tdm = new Tendermint({ baseURL: 'http://127.0.0.1:26657' })
const app = new App({ baseURL: 'http://127.0.0.1:1317' })
const address = 'quarix1qqqqhe5pnaq5qq39wqkn957aydnrm45sywg476' // default qoe
{
// query block info
data = await tdm.block({ height: 1 })
console.log('block = ', data)
}
{
// query accounts
data = await app.auth.accounts({
'pagination.count_total': true,
'pagination.limit': 3,
})
console.log('accounts = ', data)
}
{
// query account balances
data = await app.bank.allBalances(address, {
'pagination.limit': 10,
})
console.log(`${address} all balances = `, data)
}
try {
// a invalid query tendminter block for error
data = await tdm.block({ height: -1 })
} catch (error) {
console.log('tdm.block error = ', error)
}
try {
// a invalid query account balances for error
data = await app.bank.allBalances(address + 'ERROR', {
'pagination.limit': 10,
})
} catch (error) {
console.log('app.bank.allBalances error = ', error)
}
try {
const errBaseUrlApp = new App({ baseURL: 'http://127.0.0.1:12345' })
await errBaseUrlApp.bank.allBalances(address, {
'pagination.limit': 10,
})
} catch (error) {
console.log('err base url app error = ', error)
}
try {
const errBaseUrlTdm = new Tendermint({ baseURL: 'http://127.0.0.1:23456' })
await errBaseUrlTdm.block({ height: 1 })
} catch (error) {
console.log('err base url tendermint error = ', error)
}
}
main()
.then()
.catch((err) => console.error('main error = ', err))
If the returned data is correct, you can directly retrieve the values from the returned Object. For example, if the data returned by bank.allBalances is as follows:
{
balances: [
{ denom: 'aqare', amount: '999966060900000354850' },
{ denom: 'aqrx', amount: '1000000000000000000000' }
],
pagination: { next_key: null, total: '0' }
}
If the returned data is an error, the quarix declares the error data as follows:
export interface GrpcGatewayRuntimeError {
error?: string
code?: number
message?: string
details?: GoogleProtobufAny[]
}
Tendermint declares the error data as follows:
export interface ErrorResponseRPC {
code?: number
message?: string
data?: string
}
API List Quick Preview
The following is the JavaScript code generated after TypeScript compilation. It is listed here solely for the purpose of quickly finding the corresponding interface names.
Tendermint
export class Tendermint extends HttpClient {
constructor() {
super(...arguments);
this.broadcastTxSync = (query, params = {}) => this.request(Object.assign({ path: `/broadcast_tx_sync`, method: 'GET', query: query, format: 'json' }, params));
this.broadcastTxAsync = (query, params = {}) => this.request(Object.assign({ path: `/broadcast_tx_async`, method: 'GET', query: query, format: 'json' }, params));
this.broadcastTxCommit = (query, params = {}) => this.request(Object.assign({ path: `/broadcast_tx_commit`, method: 'GET', query: query, format: 'json' }, params));
this.checkTx = (query, params = {}) => this.request(Object.assign({ path: `/check_tx`, method: 'GET', query: query, format: 'json' }, params));
this.subscribe = (query, params = {}) => this.request(Object.assign({ path: `/subscribe`, method: 'GET', query: query, format: 'json' }, params));
this.unsubscribe = (query, params = {}) => this.request(Object.assign({ path: `/unsubscribe`, method: 'GET', query: query, format: 'json' }, params));
this.unsubscribeAll = (params = {}) => this.request(Object.assign({ path: `/unsubscribe_all`, method: 'GET', format: 'json' }, params));
this.health = (params = {}) => this.request(Object.assign({ path: `/health`, method: 'GET', format: 'json' }, params));
this.status = (params = {}) => this.request(Object.assign({ path: `/status`, method: 'GET', format: 'json' }, params));
this.netInfo = (params = {}) => this.request(Object.assign({ path: `/net_info`, method: 'GET', format: 'json' }, params));
this.dialSeeds = (query, params = {}) => this.request(Object.assign({ path: `/dial_seeds`, method: 'GET', query: query, format: 'json' }, params));
this.dialPeers = (query, params = {}) => this.request(Object.assign({ path: `/dial_peers`, method: 'GET', query: query, format: 'json' }, params));
this.blockchain = (query, params = {}) => this.request(Object.assign({ path: `/blockchain`, method: 'GET', query: query, format: 'json' }, params));
this.block = (query, params = {}) => this.request(Object.assign({ path: `/block`, method: 'GET', query: query, format: 'json' }, params));
this.blockByHash = (query, params = {}) => this.request(Object.assign({ path: `/block_by_hash`, method: 'GET', query: query, format: 'json' }, params));
this.blockResults = (query, params = {}) => this.request(Object.assign({ path: `/block_results`, method: 'GET', query: query, format: 'json' }, params));
this.commit = (query, params = {}) => this.request(Object.assign({ path: `/commit`, method: 'GET', query: query, format: 'json' }, params));
this.validators = (query, params = {}) => this.request(Object.assign({ path: `/validators`, method: 'GET', query: query, format: 'json' }, params));
this.genesis = (params = {}) => this.request(Object.assign({ path: `/genesis`, method: 'GET', format: 'json' }, params));
this.genesisChunked = (query, params = {}) => this.request(Object.assign({ path: `/genesis_chunked`, method: 'GET', query: query, format: 'json' }, params));
this.dumpConsensusState = (params = {}) => this.request(Object.assign({ path: `/dump_consensus_state`, method: 'GET', format: 'json' }, params));
this.consensusState = (params = {}) => this.request(Object.assign({ path: `/consensus_state`, method: 'GET', format: 'json' }, params));
this.consensusParams = (query, params = {}) => this.request(Object.assign({ path: `/consensus_params`, method: 'GET', query: query, format: 'json' }, params));
this.unconfirmedTxs = (query, params = {}) => this.request(Object.assign({ path: `/unconfirmed_txs`, method: 'GET', query: query, format: 'json' }, params));
this.numUnconfirmedTxs = (params = {}) => this.request(Object.assign({ path: `/num_unconfirmed_txs`, method: 'GET', format: 'json' }, params));
this.txSearch = (query, params = {}) => this.request(Object.assign({ path: `/tx_search`, method: 'GET', query: query, format: 'json' }, params));
this.blockSearch = (query, params = {}) => this.request(Object.assign({ path: `/block_search`, method: 'GET', query: query, format: 'json' }, params));
this.tx = (query, params = {}) => this.request(Object.assign({ path: `/tx`, method: 'GET', query: query, format: 'json' }, params));
this.abciInfo = (params = {}) => this.request(Object.assign({ path: `/abci_info`, method: 'GET', format: 'json' }, params));
this.abciQuery = (query, params = {}) => this.request(Object.assign({ path: `/abci_query`, method: 'GET', query: query, format: 'json' }, params));
this.broadcastEvidence = (query, params = {}) => this.request(Object.assign({ path: `/broadcast_evidence`, method: 'GET', query: query, format: 'json' }, params));
}
}
Quarix
To solve the problem of function name conflicts, such as both auth module and bank have the params interface, we will place all query interfaces under their respective modules.
export class App extends HttpClient {
constructor() {
super(...arguments);
this.auth = {
accounts: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/accounts`, method: 'GET', query: query, format: 'json' }, params)),
account: (address, params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/accounts/${address}`, method: 'GET', format: 'json' }, params)),
accountAddressById: (id, params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/address_by_id/${id}`, method: 'GET', format: 'json' }, params)),
bech32Prefix: (params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/bech32`, method: 'GET', format: 'json' }, params)),
addressBytesToString: (addressBytes, params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/bech32/${addressBytes}`, method: 'GET', format: 'json' }, params)),
addressStringToBytes: (addressString, params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/bech32/${addressString}`, method: 'GET', format: 'json' }, params)),
moduleAccounts: (params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/module_accounts`, method: 'GET', format: 'json' }, params)),
moduleAccountByName: (name, params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/module_accounts/${name}`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/cosmos/auth/v1beta1/params`, method: 'GET', format: 'json' }, params)),
};
this.authz = {
grants: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/authz/v1beta1/grants`, method: 'GET', query: query, format: 'json' }, params)),
granteeGrants: (grantee, query, params = {}) => this.request(Object.assign({ path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, method: 'GET', query: query, format: 'json' }, params)),
granterGrants: (granter, query, params = {}) => this.request(Object.assign({ path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, method: 'GET', query: query, format: 'json' }, params)),
};
this.bank = {
allBalances: (address, query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/balances/${address}`, method: 'GET', query: query, format: 'json' }, params)),
balance: (address, query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, method: 'GET', query: query, format: 'json' }, params)),
denomOwners: (denom, query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/denom_owners/${denom}`, method: 'GET', query: query, format: 'json' }, params)),
denomsMetadata: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/denoms_metadata`, method: 'GET', query: query, format: 'json' }, params)),
denomMetadata: (denom, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/params`, method: 'GET', format: 'json' }, params)),
spendableBalances: (address, query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, method: 'GET', query: query, format: 'json' }, params)),
totalSupply: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/supply`, method: 'GET', query: query, format: 'json' }, params)),
supplyOf: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/bank/v1beta1/supply/by_denom`, method: 'GET', query: query, format: 'json' }, params)),
};
this.base = {
config: (params = {}) => this.request(Object.assign({ path: `/cosmos/base/node/v1beta1/config`, method: 'GET', format: 'json' }, params)),
abciQuery: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/abci_query`, method: 'GET', query: query, format: 'json' }, params)),
getLatestBlock: (params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/blocks/latest`, method: 'GET', format: 'json' }, params)),
getBlockByHeight: (height, params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/blocks/${height}`, method: 'GET', format: 'json' }, params)),
getNodeInfo: (params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/node_info`, method: 'GET', format: 'json' }, params)),
getSyncing: (params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/syncing`, method: 'GET', format: 'json' }, params)),
getLatestValidatorSet: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/validatorsets/latest`, method: 'GET', query: query, format: 'json' }, params)),
getValidatorSetByHeight: (height, query, params = {}) => this.request(Object.assign({ path: `/cosmos/base/tendermint/v1beta1/validatorsets/${height}`, method: 'GET', query: query, format: 'json' }, params)),
};
this.distribution = {
communityPool: (params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/community_pool`, method: 'GET', format: 'json' }, params)),
delegationTotalRewards: (delegatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, method: 'GET', format: 'json' }, params)),
delegationRewards: (delegatorAddress, validatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, method: 'GET', format: 'json' }, params)),
delegatorValidators: (delegatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, method: 'GET', format: 'json' }, params)),
delegatorWithdrawAddress: (delegatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/params`, method: 'GET', format: 'json' }, params)),
royaltyFee: (params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/royalty_fee`, method: 'GET', format: 'json' }, params)),
validatorDistributionInfo: (validatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}`, method: 'GET', format: 'json' }, params)),
validatorCommission: (validatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, method: 'GET', format: 'json' }, params)),
validatorOutstandingRewards: (validatorAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, method: 'GET', format: 'json' }, params)),
validatorSlashes: (validatorAddress, query, params = {}) => this.request(Object.assign({ path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, method: 'GET', query: query, format: 'json' }, params)),
};
this.evidence = {
allEvidence: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/evidence/v1beta1/evidence`, method: 'GET', query: query, format: 'json' }, params)),
evidence: (evidenceHash, params = {}) => this.request(Object.assign({ path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, method: 'GET', format: 'json' }, params)),
};
this.feegrant = {
allowance: (granter, grantee, params = {}) => this.request(Object.assign({ path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, method: 'GET', format: 'json' }, params)),
allowances: (grantee, query, params = {}) => this.request(Object.assign({ path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, method: 'GET', query: query, format: 'json' }, params)),
allowancesByGranter: (granter, query, params = {}) => this.request(Object.assign({ path: `/cosmos/feegrant/v1beta1/issued/${granter}`, method: 'GET', query: query, format: 'json' }, params)),
};
this.gov = {
params: (paramsType, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/params/${paramsType}`, method: 'GET', format: 'json' }, params)),
penaltyPool: (params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/penalty_pool`, method: 'GET', format: 'json' }, params)),
proposals: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals`, method: 'GET', query: query, format: 'json' }, params)),
proposal: (proposalId, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals/${proposalId}`, method: 'GET', format: 'json' }, params)),
deposits: (proposalId, query, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals/${proposalId}/deposits`, method: 'GET', query: query, format: 'json' }, params)),
deposit: (proposalId, depositor, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals/${proposalId}/deposits/${depositor}`, method: 'GET', format: 'json' }, params)),
tallyResult: (proposalId, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals/${proposalId}/tally`, method: 'GET', format: 'json' }, params)),
votes: (proposalId, query, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals/${proposalId}/votes`, method: 'GET', query: query, format: 'json' }, params)),
vote: (proposalId, voter, params = {}) => this.request(Object.assign({ path: `/cosmos/gov/v1/proposals/${proposalId}/votes/${voter}`, method: 'GET', format: 'json' }, params)),
};
this.group = {
groupInfo: (groupId, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/group_info/${groupId}`, method: 'GET', format: 'json' }, params)),
groupMembers: (groupId, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/group_members/${groupId}`, method: 'GET', query: query, format: 'json' }, params)),
groupPoliciesByAdmin: (admin, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/group_policies_by_admin/${admin}`, method: 'GET', query: query, format: 'json' }, params)),
groupPoliciesByGroup: (groupId, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/group_policies_by_group/${groupId}`, method: 'GET', query: query, format: 'json' }, params)),
groupPolicyInfo: (address, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/group_policy_info/${address}`, method: 'GET', format: 'json' }, params)),
groupsByAdmin: (admin, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/groups_by_admin/${admin}`, method: 'GET', query: query, format: 'json' }, params)),
groupsByMember: (address, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/groups_by_member/${address}`, method: 'GET', query: query, format: 'json' }, params)),
proposal: (proposalId, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/proposal/${proposalId}`, method: 'GET', format: 'json' }, params)),
tallyResult: (proposalId, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/proposals/${proposalId}/tally`, method: 'GET', format: 'json' }, params)),
proposalsByGroupPolicy: (address, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/proposals_by_group_policy/${address}`, method: 'GET', query: query, format: 'json' }, params)),
voteByProposalVoter: (proposalId, voter, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/vote_by_proposal_voter/${proposalId}/${voter}`, method: 'GET', format: 'json' }, params)),
votesByProposal: (proposalId, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/votes_by_proposal/${proposalId}`, method: 'GET', query: query, format: 'json' }, params)),
votesByVoter: (voter, query, params = {}) => this.request(Object.assign({ path: `/cosmos/group/v1/votes_by_voter/${voter}`, method: 'GET', query: query, format: 'json' }, params)),
};
this.mint = {
annualProvisions: (params = {}) => this.request(Object.assign({ path: `/cosmos/mint/v1beta1/annual_provisions`, method: 'GET', format: 'json' }, params)),
inflation: (params = {}) => this.request(Object.assign({ path: `/cosmos/mint/v1beta1/inflation`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/cosmos/mint/v1beta1/params`, method: 'GET', format: 'json' }, params)),
};
this.nft = {
balance: (owner, classId, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/balance/${owner}/${classId}`, method: 'GET', format: 'json' }, params)),
classes: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/classes`, method: 'GET', query: query, format: 'json' }, params)),
class: (classId, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/classes/${classId}`, method: 'GET', format: 'json' }, params)),
nfTs: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/nfts`, method: 'GET', query: query, format: 'json' }, params)),
nft: (classId, id, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/nfts/${classId}/${id}`, method: 'GET', format: 'json' }, params)),
owner: (classId, id, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/owner/${classId}/${id}`, method: 'GET', format: 'json' }, params)),
supply: (classId, params = {}) => this.request(Object.assign({ path: `/cosmos/nft/v1beta1/supply/${classId}`, method: 'GET', format: 'json' }, params)),
};
this.params = {
params: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/params/v1beta1/params`, method: 'GET', query: query, format: 'json' }, params)),
subspaces: (params = {}) => this.request(Object.assign({ path: `/cosmos/params/v1beta1/subspaces`, method: 'GET', format: 'json' }, params)),
};
this.slashing = {
params: (params = {}) => this.request(Object.assign({ path: `/cosmos/slashing/v1beta1/params`, method: 'GET', format: 'json' }, params)),
signingInfos: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/slashing/v1beta1/signing_infos`, method: 'GET', query: query, format: 'json' }, params)),
signingInfo: (consAddress, params = {}) => this.request(Object.assign({ path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, method: 'GET', format: 'json' }, params)),
};
this.staking = {
allocateInvestmentProgramPools: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/allocate_investment_program_pools`, method: 'GET', query: query, format: 'json' }, params)),
delegatorDelegations: (delegatorAddr, query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, method: 'GET', query: query, format: 'json' }, params)),
redelegations: (delegatorAddr, query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, method: 'GET', query: query, format: 'json' }, params)),
delegatorUnbondingDelegations: (delegatorAddr, query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, method: 'GET', query: query, format: 'json' }, params)),
delegatorValidators: (delegatorAddr, query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, method: 'GET', query: query, format: 'json' }, params)),
delegatorValidator: (delegatorAddr, validatorAddr, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, method: 'GET', format: 'json' }, params)),
historicalInfo: (height, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/historical_info/${height}`, method: 'GET', format: 'json' }, params)),
investmentProgramPools: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/investment_program_pools`, method: 'GET', query: query, format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/params`, method: 'GET', format: 'json' }, params)),
pool: (params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/pool`, method: 'GET', format: 'json' }, params)),
validators: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/validators`, method: 'GET', query: query, format: 'json' }, params)),
validator: (validatorAddr, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, method: 'GET', format: 'json' }, params)),
validatorDelegations: (validatorAddr, query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, method: 'GET', query: query, format: 'json' }, params)),
delegation: (validatorAddr, delegatorAddr, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, method: 'GET', format: 'json' }, params)),
unbondingDelegation: (validatorAddr, delegatorAddr, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, method: 'GET', format: 'json' }, params)),
validatorUnbondingDelegations: (validatorAddr, query, params = {}) => this.request(Object.assign({ path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, method: 'GET', query: query, format: 'json' }, params)),
};
this.tx = {
simulate: (body, params = {}) => this.request(Object.assign({ path: `/cosmos/tx/v1beta1/simulate`, method: 'POST', body: body, type: ContentType.Json, format: 'json' }, params)),
getTxsEvent: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/tx/v1beta1/txs`, method: 'GET', query: query, format: 'json' }, params)),
broadcastTx: (body, params = {}) => this.request(Object.assign({ path: `/cosmos/tx/v1beta1/txs`, method: 'POST', body: body, type: ContentType.Json, format: 'json' }, params)),
getBlockWithTxs: (height, query, params = {}) => this.request(Object.assign({ path: `/cosmos/tx/v1beta1/txs/block/${height}`, method: 'GET', query: query, format: 'json' }, params)),
getTx: (hash, params = {}) => this.request(Object.assign({ path: `/cosmos/tx/v1beta1/txs/${hash}`, method: 'GET', format: 'json' }, params)),
};
this.upgrade = {
appliedPlan: (name, params = {}) => this.request(Object.assign({ path: `/cosmos/upgrade/v1beta1/applied_plan/${name}`, method: 'GET', format: 'json' }, params)),
authority: (params = {}) => this.request(Object.assign({ path: `/cosmos/upgrade/v1beta1/authority`, method: 'GET', format: 'json' }, params)),
currentPlan: (params = {}) => this.request(Object.assign({ path: `/cosmos/upgrade/v1beta1/current_plan`, method: 'GET', format: 'json' }, params)),
moduleVersions: (query, params = {}) => this.request(Object.assign({ path: `/cosmos/upgrade/v1beta1/module_versions`, method: 'GET', query: query, format: 'json' }, params)),
upgradedConsensusState: (lastHeight, params = {}) => this.request(Object.assign({ path: `/cosmos/upgrade/v1beta1/upgraded_consensus_state/${lastHeight}`, method: 'GET', format: 'json' }, params)),
};
this.evm = {
account: (address, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/account/${address}`, method: 'GET', format: 'json' }, params)),
balance: (address, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/balances/${address}`, method: 'GET', format: 'json' }, params)),
baseFee: (params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/base_fee`, method: 'GET', format: 'json' }, params)),
code: (address, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/codes/${address}`, method: 'GET', format: 'json' }, params)),
cosmosAccount: (address, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/cosmos_account/${address}`, method: 'GET', format: 'json' }, params)),
estimateGas: (query, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/estimate_gas`, method: 'GET', query: query, format: 'json' }, params)),
ethCall: (query, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/eth_call`, method: 'GET', query: query, format: 'json' }, params)),
owner: (query, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/owner`, method: 'GET', query: query, format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/params`, method: 'GET', format: 'json' }, params)),
storage: (address, key, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/storage/${address}/${key}`, method: 'GET', format: 'json' }, params)),
traceBlock: (query, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/trace_block`, method: 'GET', query: query, format: 'json' }, params)),
traceTx: (query, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/trace_tx`, method: 'GET', query: query, format: 'json' }, params)),
validatorAccount: (consAddress, params = {}) => this.request(Object.assign({ path: `/evmos/evm/v1/validator_account/${consAddress}`, method: 'GET', format: 'json' }, params)),
};
this.feemarket = {
baseFee: (params = {}) => this.request(Object.assign({ path: `/evmos/feemarket/v1/base_fee`, method: 'GET', format: 'json' }, params)),
blockGas: (params = {}) => this.request(Object.assign({ path: `/evmos/feemarket/v1/block_gas`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/evmos/feemarket/v1/params`, method: 'GET', format: 'json' }, params)),
};
this.claims = {
claimsRecords: (query, params = {}) => this.request(Object.assign({ path: `/evmos/claims/v1/claims_records`, method: 'GET', query: query, format: 'json' }, params)),
claimsRecord: (address, params = {}) => this.request(Object.assign({ path: `/evmos/claims/v1/claims_records/${address}`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/evmos/claims/v1/params`, method: 'GET', format: 'json' }, params)),
totalUnclaimed: (params = {}) => this.request(Object.assign({ path: `/evmos/claims/v1/total_unclaimed`, method: 'GET', format: 'json' }, params)),
};
this.epochs = {
currentEpoch: (query, params = {}) => this.request(Object.assign({ path: `/evmos/epochs/v1/current_epoch`, method: 'GET', query: query, format: 'json' }, params)),
epochInfos: (query, params = {}) => this.request(Object.assign({ path: `/evmos/epochs/v1/epochs`, method: 'GET', query: query, format: 'json' }, params)),
};
this.erc20 = {
params: (params = {}) => this.request(Object.assign({ path: `/evmos/erc20/v1/params`, method: 'GET', format: 'json' }, params)),
tokenPairs: (query, params = {}) => this.request(Object.assign({ path: `/evmos/erc20/v1/token_pairs`, method: 'GET', query: query, format: 'json' }, params)),
tokenPair: (token, params = {}) => this.request(Object.assign({ path: `/evmos/erc20/v1/token_pairs/${token}`, method: 'GET', format: 'json' }, params)),
};
this.incentives = {
allocationMeters: (query, params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/allocation_meters`, method: 'GET', query: query, format: 'json' }, params)),
allocationMeter: (denom, params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/allocation_meters/${denom}`, method: 'GET', format: 'json' }, params)),
gasMeters: (contract, query, params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/gas_meters/${contract}`, method: 'GET', query: query, format: 'json' }, params)),
gasMeter: (contract, participant, params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/gas_meters/${contract}/${participant}`, method: 'GET', format: 'json' }, params)),
incentives: (query, params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/incentives`, method: 'GET', query: query, format: 'json' }, params)),
incentive: (contract, params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/incentives/${contract}`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/evmos/incentives/v1/params`, method: 'GET', format: 'json' }, params)),
};
this.inflation = {
circulatingSupply: (params = {}) => this.request(Object.assign({ path: `/evmos/inflation/v1/circulating_supply`, method: 'GET', format: 'json' }, params)),
epochMintProvision: (params = {}) => this.request(Object.assign({ path: `/evmos/inflation/v1/epoch_mint_provision`, method: 'GET', format: 'json' }, params)),
inflationRate: (params = {}) => this.request(Object.assign({ path: `/evmos/inflation/v1/inflation_rate`, method: 'GET', format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/evmos/inflation/v1/params`, method: 'GET', format: 'json' }, params)),
period: (params = {}) => this.request(Object.assign({ path: `/evmos/inflation/v1/period`, method: 'GET', format: 'json' }, params)),
skippedEpochs: (params = {}) => this.request(Object.assign({ path: `/evmos/inflation/v1/skipped_epochs`, method: 'GET', format: 'json' }, params)),
};
this.recovery = {
params: (params = {}) => this.request(Object.assign({ path: `/evmos/recovery/v1/params`, method: 'GET', format: 'json' }, params)),
};
this.revenue = {
params: (params = {}) => this.request(Object.assign({ path: `/evmos/revenue/v1/params`, method: 'GET', format: 'json' }, params)),
revenues: (query, params = {}) => this.request(Object.assign({ path: `/evmos/revenue/v1/revenues`, method: 'GET', query: query, format: 'json' }, params)),
revenue: (contractAddress, params = {}) => this.request(Object.assign({ path: `/evmos/revenue/v1/revenues/${contractAddress}`, method: 'GET', format: 'json' }, params)),
deployerRevenues: (deployerAddress, query, params = {}) => this.request(Object.assign({ path: `/evmos/revenue/v1/revenues/${deployerAddress}`, method: 'GET', query: query, format: 'json' }, params)),
withdrawerRevenues: (withdrawerAddress, query, params = {}) => this.request(Object.assign({ path: `/evmos/revenue/v1/revenues/${withdrawerAddress}`, method: 'GET', query: query, format: 'json' }, params)),
};
this.vesting = {
balances: (address, params = {}) => this.request(Object.assign({ path: `/evmos/vesting/v1/balances/${address}`, method: 'GET', format: 'json' }, params)),
};
this.blacklist = {
blacklists: (query, params = {}) => this.request(Object.assign({ path: `/quarix/blacklist/v1/blacklists`, method: 'GET', query: query, format: 'json' }, params)),
inBlacklist: (query, params = {}) => this.request(Object.assign({ path: `/quarix/blacklist/v1/in_blacklist`, method: 'GET', query: query, format: 'json' }, params)),
};
this.gaswaiver = {
gasWaiverApplications: (query, params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/gas_waiver_applications`, method: 'GET', query: query, format: 'json' }, params)),
normalGasWaiver: (query, params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/normal_gas_waiver`, method: 'GET', query: query, format: 'json' }, params)),
normalGasWaiverMeter: (query, params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/normal_gas_waiver_meter`, method: 'GET', query: query, format: 'json' }, params)),
normalGasWaivers: (query, params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/normal_gas_waivers`, method: 'GET', query: query, format: 'json' }, params)),
params: (params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/params`, method: 'GET', format: 'json' }, params)),
premiumGasWaiver: (query, params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/premium_gas_waiver`, method: 'GET', query: query, format: 'json' }, params)),
premiumGasWaiverMeter: (query, params = {}) => this.request(Object.assign({ path: `/quarix/gaswaiver/v1/premium_gas_waiver_meter`, method: 'GET', query: query, format: 'json' }, params)),
};
this.kybkyc = {
balanceOf: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/balance_of`, method: 'GET', query: query, format: 'json' }, params)),
expiryDateOf: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/expiry_date_of`, method: 'GET', query: query, format: 'json' }, params)),
isValid: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/is_valid`, method: 'GET', query: query, format: 'json' }, params)),
contractDetailOf: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/contract_detail_of`, method: 'GET', query: query, format: 'json' }, params)),
contractUnder: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/contract_under`, method: 'GET', query: query, format: 'json' }, params)),
detailOf: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/detail_of`, method: 'GET', query: query, format: 'json' }, params)),
getManageDirectly: (params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/get_manage_directly`, method: 'GET', format: 'json' }, params)),
kybStatus: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/kyb_status`, method: 'GET', query: query, format: 'json' }, params)),
kybStatusUnder: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/kyb_status_under`, method: 'GET', query: query, format: 'json' }, params)),
kybkycStatus: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/kybkyc_status`, method: 'GET', query: query, format: 'json' }, params)),
kybkycStatusUnder: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/kybkyc_status_under`, method: 'GET', query: query, format: 'json' }, params)),
kycStatus: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/kyc_status`, method: 'GET', query: query, format: 'json' }, params)),
kycStatusUnder: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/manage/kyc_status_under`, method: 'GET', query: query, format: 'json' }, params)),
name: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/name`, method: 'GET', query: query, format: 'json' }, params)),
ownerOf: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/owner_of`, method: 'GET', query: query, format: 'json' }, params)),
symbol: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/symbol`, method: 'GET', query: query, format: 'json' }, params)),
tokenIdOf: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/token_id_of`, method: 'GET', query: query, format: 'json' }, params)),
tokenUri: (query, params = {}) => this.request(Object.assign({ path: `/quarix/kybkyc/v1/token_uri`, method: 'GET', query: query, format: 'json' }, params)),
};
this.role = {
accountRole: (query, params = {}) => this.request(Object.assign({ path: `/quarix/role/v1/account_role`, method: 'GET', query: query, format: 'json' }, params)),
roleDetail: (query, params = {}) => this.request(Object.assign({ path: `/quarix/role/v1/role_detail`, method: 'GET', query: query, format: 'json' }, params)),
roleList: (params = {}) => this.request(Object.assign({ path: `/quarix/role/v1/role_list`, method: 'GET', format: 'json' }, params)),
};
}
}
Quarix API
auth.accounts
GET
Summary
Accounts returns all the existing accounts
Description
Since: cosmos-sdk 0.43
Parameters
| Name | Located in | Description | Required | Schema | | ---------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------- | | pagination.key | query | 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. | No | byte | | pagination.offset | query | 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. | No | string (uint64) | | pagination.limit | query | 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. | No | string (uint64) | | pagination.count_total | query | 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. | No | boolean | | pagination.reverse | query | reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 | No | boolean |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | --------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.QueryAccountsResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.account
GET
Summary
Account returns account details based on address.
Parameters
| Name | Located in | Description | Required | Schema | | ------- | ---------- | ----------------------------------------- | -------- | ------ | | address | path | address defines the address to query for. | Yes | string |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.QueryAccountResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.accountAddressByID
GET
Summary
AccountAddressByID returns account address based on account number.
Description
Since: cosmos-sdk 0.46.2
Parameters
| Name | Located in | Description | Required | Schema | | ---- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- | | id | path | id is the account number of the address to be queried. This field should have been an uint64 (like all account numbers), and will be updated to uint64 in a future version of the auth query. | Yes | string (int64) |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.QueryAccountAddressByIDResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.bech32Prefix
GET
Summary
Bech32Prefix queries bech32Prefix
Description
Since: cosmos-sdk 0.46
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.Bech32PrefixResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.addressBytesToString
GET
Summary
AddressBytesToString converts Account Address bytes to string
Description
Since: cosmos-sdk 0.46
Parameters
| Name | Located in | Description | Required | Schema | | ------------- | ---------- | ----------- | -------- | ------ | | address_bytes | path | | Yes | byte |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.AddressBytesToStringResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.addressStringToBytes
GET
Summary
AddressStringToBytes converts Address string to bytes
Description
Since: cosmos-sdk 0.46
Parameters
| Name | Located in | Description | Required | Schema | | -------------- | ---------- | ----------- | -------- | ------ | | address_string | path | | Yes | string |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.AddressStringToBytesResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.moduleAccounts
GET
Summary
ModuleAccounts returns all the existing module accounts.
Description
Since: cosmos-sdk 0.46
Responses
| Code | Description | Schema | | ------- | ----------------------------- | --------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.QueryModuleAccountsResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.moduleAccountByName
GET
Summary
ModuleAccountByName returns the module account info by module name
Parameters
| Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | | name | path | | Yes | string |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.QueryModuleAccountByNameResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
auth.params
GET
Summary
Params queries all parameters.
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ----------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.auth.v1beta1.QueryParamsResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
authz.grants
GET
Summary
Returns list of Authorization
, granted to the grantee by the granter.
Parameters
| Name | Located in | Description | Required | Schema | | ---------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------- | | granter | query | | No | string | | grantee | query | | No | string | | msg_type_url | query | Optional, msg_type_url, when set, will query only grants matching given msg type. | No | string | | pagination.key | query | 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. | No | byte | | pagination.offset | query | 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. | No | string (uint64) | | pagination.limit | query | 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. | No | string (uint64) | | pagination.count_total | query | 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. | No | boolean | | pagination.reverse | query | reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 | No | boolean |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | ------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.authz.v1beta1.QueryGrantsResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
authz.granteeGrants
GET
Summary
GranteeGrants returns a list of GrantAuthorization
by grantee.
Description
Since: cosmos-sdk 0.46
Parameters
| Name | Located in | Description | Required | Schema | | ---------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------- | | grantee | path | | Yes | string | | pagination.key | query | 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. | No | byte | | pagination.offset | query | 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. | No | string (uint64) | | pagination.limit | query | 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. | No | string (uint64) | | pagination.count_total | query | 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. | No | boolean | | pagination.reverse | query | reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 | No | boolean |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | --------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.authz.v1beta1.QueryGranteeGrantsResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
authz.granterGrants
GET
Summary
GranterGrants returns list of GrantAuthorization
, granted by granter.
Description
Since: cosmos-sdk 0.46
Parameters
| Name | Located in | Description | Required | Schema | | ---------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------- | | granter | path | | Yes | string | | pagination.key | query | 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. | No | byte | | pagination.offset | query | 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. | No | string (uint64) | | pagination.limit | query | 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. | No | string (uint64) | | pagination.count_total | query | 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. | No | boolean | | pagination.reverse | query | reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 | No | boolean |
Responses
| Code | Description | Schema | | ------- | ----------------------------- | --------------------------------------------------------------------------------------------------- | | 200 | A successful response. | cosmos.authz.v1beta1.QueryGranterGrantsResponse | | default | An unexpected error response. | grpc.gateway.runtime.Error |
bank.allBalances
GET
Summary
AllBalances queries the balance of all coins for a single account.
Parameters
| Name | Located in | Description | Required | Schema | | ---------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------- | | address | path | address is the address to query balances for. | Yes | string | | pagination.key | query | 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. | No | byte | | pagination.offset | query | 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. | No | string (uint64) | | pagination.limit | query | 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. | No | string (uint64) | | pagination.count_total | query | 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. | No | boolean | | pagination.reverse | query | reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43