Class: QueryClient
@shareledgerjs/client.QueryClient
Constructors
constructor
• new QueryClient(tmClient)
Parameters
| Name | Type |
|---|---|
tmClient | Tendermint34Client |
Properties
tmClient
• Private Readonly tmClient: Tendermint34Client
Methods
getNextHeader
▸ Private getNextHeader(height?): Promise<Header>
Parameters
| Name | Type |
|---|---|
height? | number |
Returns
Promise<Header>
queryAbci
▸ queryAbci(path, request, desiredHeight?): Promise<QueryAbciResponse>
Performs an ABCI query to Tendermint without requesting a proof.
If the desiredHeight is set, a particular height is requested. Otherwise
the latest height is requested. The response contains the actual height of
the query.
Parameters
| Name | Type |
|---|---|
path | string |
request | Uint8Array |
desiredHeight? | number |
Returns
Promise<QueryAbciResponse>
queryRawProof
▸ queryRawProof(store, queryKey, desiredHeight?): Promise<ProvenQuery>
Parameters
| Name | Type |
|---|---|
store | string |
queryKey | Uint8Array |
desiredHeight? | number |
Returns
Promise<ProvenQuery>
queryStoreVerified
▸ queryStoreVerified(store, queryKey, desiredHeight?): Promise<QueryStoreResponse>
Queries the database store with a proof, which is then verified.
Please note: the current implementation trusts block headers it gets from the PRC endpoint.
Parameters
| Name | Type |
|---|---|
store | string |
queryKey | Uint8Array |
desiredHeight? | number |
Returns
Promise<QueryStoreResponse>
queryUnverified
▸ queryUnverified(path, request, desiredHeight?): Promise<Uint8Array>
Performs an ABCI query to Tendermint without requesting a proof.
Deprecated
use queryAbci instead
Parameters
| Name | Type |
|---|---|
path | string |
request | Uint8Array |
desiredHeight? | number |
Returns
Promise<Uint8Array>
queryVerified
▸ queryVerified(store, queryKey, desiredHeight?): Promise<Uint8Array>
Deprecated
use queryStoreVerified instead
Parameters
| Name | Type |
|---|---|
store | string |
queryKey | Uint8Array |
desiredHeight? | number |
Returns
Promise<Uint8Array>