Skip to main content

Class: QueryClient

@shareledgerjs/client.QueryClient

Constructors

constructor

new QueryClient(tmClient)

Parameters

NameType
tmClientTendermint34Client

Properties

tmClient

Private Readonly tmClient: Tendermint34Client

Methods

getNextHeader

Private getNextHeader(height?): Promise<Header>

Parameters

NameType
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

NameType
pathstring
requestUint8Array
desiredHeight?number

Returns

Promise<QueryAbciResponse>


queryRawProof

queryRawProof(store, queryKey, desiredHeight?): Promise<ProvenQuery>

Parameters

NameType
storestring
queryKeyUint8Array
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

NameType
storestring
queryKeyUint8Array
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

NameType
pathstring
requestUint8Array
desiredHeight?number

Returns

Promise<Uint8Array>


queryVerified

queryVerified(store, queryKey, desiredHeight?): Promise<Uint8Array>

Deprecated

use queryStoreVerified instead

Parameters

NameType
storestring
queryKeyUint8Array
desiredHeight?number

Returns

Promise<Uint8Array>