Gets a client used to query the Sei chain via the REST API.
Note: the EVM queries are non-functional via the REST API at the time of writing. Try using the RPC Query client instead
The endpoint of the REST node used to interact to the Sei chain.
An LCD client object that can be used to query the Sei chain.
import { getQueryClient } from '@crownfi/sei-js-core';
const queryClient = await getQueryClient(REST_URL);
// Getting the market summary from the Sei dex module
const dexMarketSummary = await queryClient.seiprotocol.seichain.dex.getMarketSummary(params);
// Query the bank balance of a given address
const balances = await queryClient.cosmos.bank.v1beta1.allBalances({ address });
// Query a specific transaction hash
const txInfo = await queryClient.cosmos.tx.v1beta1.getTx({ hash });
Deprecated
Use
getRestQueryClient
orgetRpcQueryClient
instead.