UNPKG

interchainjs

Version:

InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.

98 lines (97 loc) 4.01 kB
import { buildQuery } from "../../../../helper-func-types"; import { GetNodeInfoRequest, GetNodeInfoResponse, GetSyncingRequest, GetSyncingResponse, GetLatestBlockRequest, GetLatestBlockResponse, GetBlockByHeightRequest, GetBlockByHeightResponse, GetLatestValidatorSetRequest, GetLatestValidatorSetResponse, GetValidatorSetByHeightRequest, GetValidatorSetByHeightResponse, ABCIQueryRequest, ABCIQueryResponse } from "./query"; /** * GetNodeInfo queries the current node info. * @name getGetNodeInfo * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.GetNodeInfo */ export const getGetNodeInfo = buildQuery({ encode: GetNodeInfoRequest.encode, decode: GetNodeInfoResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "GetNodeInfo", deps: [GetNodeInfoRequest, GetNodeInfoResponse] }); /** * GetSyncing queries node syncing. * @name getGetSyncing * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.GetSyncing */ export const getGetSyncing = buildQuery({ encode: GetSyncingRequest.encode, decode: GetSyncingResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "GetSyncing", deps: [GetSyncingRequest, GetSyncingResponse] }); /** * GetLatestBlock returns the latest block. * @name getGetLatestBlock * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.GetLatestBlock */ export const getGetLatestBlock = buildQuery({ encode: GetLatestBlockRequest.encode, decode: GetLatestBlockResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "GetLatestBlock", deps: [GetLatestBlockRequest, GetLatestBlockResponse] }); /** * GetBlockByHeight queries block for given height. * @name getGetBlockByHeight * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.GetBlockByHeight */ export const getGetBlockByHeight = buildQuery({ encode: GetBlockByHeightRequest.encode, decode: GetBlockByHeightResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "GetBlockByHeight", deps: [GetBlockByHeightRequest, GetBlockByHeightResponse] }); /** * GetLatestValidatorSet queries latest validator-set. * @name getGetLatestValidatorSet * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.GetLatestValidatorSet */ export const getGetLatestValidatorSet = buildQuery({ encode: GetLatestValidatorSetRequest.encode, decode: GetLatestValidatorSetResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "GetLatestValidatorSet", deps: [GetLatestValidatorSetRequest, GetLatestValidatorSetResponse] }); /** * GetValidatorSetByHeight queries validator-set at a given height. * @name getGetValidatorSetByHeight * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeight */ export const getGetValidatorSetByHeight = buildQuery({ encode: GetValidatorSetByHeightRequest.encode, decode: GetValidatorSetByHeightResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "GetValidatorSetByHeight", deps: [GetValidatorSetByHeightRequest, GetValidatorSetByHeightResponse] }); /** * ABCIQuery defines a query handler that supports ABCI queries directly to the * application, bypassing Tendermint completely. The ABCI query must contain * a valid and supported path, including app, custom, p2p, and store. * * Since: cosmos-sdk 0.46 * @name getABCIQuery * @package cosmos.base.tendermint.v1beta1 * @see proto service: cosmos.base.tendermint.v1beta1.ABCIQuery */ export const getABCIQuery = buildQuery({ encode: ABCIQueryRequest.encode, decode: ABCIQueryResponse.decode, service: "cosmos.base.tendermint.v1beta1.Service", method: "ABCIQuery", deps: [ABCIQueryRequest, ABCIQueryResponse] });