Skip to main content

Query Client

It's an encapsulation of the BlockChain API

info

In most cases, you probably don't need to use the Query Client directly.

getAuthQueryClient

example
const rpc = await client.queryClient.getAuthQueryClient();
await rpc.Account({
address: '0x0000000000000000000000000000000000000001',
});

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AccountInfo

getBankQueryClient

example
const rpc = await client.queryClient.getBankQueryClient();
await rpc.Balance({
address: '0x0000000000000000000000000000000000000001',
denom: 'BNB',
});

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AccountInfo

getBridgeQueryClient

example
const rpc = await client.queryClient.getBridgeQueryClient();
await rpc.Params();

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/BridgeParams

getChallengeQueryClient

example
const rpc = await client.queryClient.getChallengeQueryClient();
await rpc.Params();

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AttestedChallenge

getCrosschainQueryClient

example
const rpc = await client.queryClient.getCrosschainQueryClient();
await rpc.Params();

More apis: https://greenfield-chain.bnbchain.org/openapi#/Query/AttestedChallenge

getFeeGrantQueryClient

example
const rpc = await client.queryClient.getFeeGrantQueryClient();
await rpc.Params();

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/Allowance

getGashubClient

example
const rpc = await this.queryClient.getGashubClient();
await rpc.MsgGasParams(request);

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/MsgGasParams

getPaymentQueryClient

example
const rpc = await this.queryClient.getPaymentQueryClient();
await rpc.Params();

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/MsgGasParams

getSpQueryClient

example
const rpc = await this.queryClient.getSpQueryClient();
await rpc.Params();

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/QueryGlobalSpStorePriceByTime

getStorageQueryClient

example
const rpc = await client.queryClient.getStorageQueryClient();
await rpc.HeadBucketById({
bucketId: '1',
});

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/QueryGroupMembersExist

getVirtualGroupClient

example
const rpc = await client.queryClient.getVirtualGroupClient();
await rpc.Params();

More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AvailableGlobalVirtualGroupFamilies