forked from LaconicNetwork/cosmos-explorer
37 lines
2.6 KiB
TypeScript
37 lines
2.6 KiB
TypeScript
import { Rpc } from "../../../../helpers";
|
|
import { QueryClient } from "@cosmjs/stargate";
|
|
import { GetNodeInfoRequest, GetNodeInfoResponse, GetSyncingRequest, GetSyncingResponse, GetLatestBlockRequest, GetLatestBlockResponse, GetBlockByHeightRequest, GetBlockByHeightResponse, GetLatestValidatorSetRequest, GetLatestValidatorSetResponse, GetValidatorSetByHeightRequest, GetValidatorSetByHeightResponse } from "./query";
|
|
/** Service defines the gRPC querier service for tendermint queries. */
|
|
export interface Service {
|
|
/** GetNodeInfo queries the current node info. */
|
|
getNodeInfo(request?: GetNodeInfoRequest): Promise<GetNodeInfoResponse>;
|
|
/** GetSyncing queries node syncing. */
|
|
getSyncing(request?: GetSyncingRequest): Promise<GetSyncingResponse>;
|
|
/** GetLatestBlock returns the latest block. */
|
|
getLatestBlock(request?: GetLatestBlockRequest): Promise<GetLatestBlockResponse>;
|
|
/** GetBlockByHeight queries block for given height. */
|
|
getBlockByHeight(request: GetBlockByHeightRequest): Promise<GetBlockByHeightResponse>;
|
|
/** GetLatestValidatorSet queries latest validator-set. */
|
|
getLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise<GetLatestValidatorSetResponse>;
|
|
/** GetValidatorSetByHeight queries validator-set at a given height. */
|
|
getValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise<GetValidatorSetByHeightResponse>;
|
|
}
|
|
export declare class ServiceClientImpl implements Service {
|
|
private readonly rpc;
|
|
constructor(rpc: Rpc);
|
|
getNodeInfo(request?: GetNodeInfoRequest): Promise<GetNodeInfoResponse>;
|
|
getSyncing(request?: GetSyncingRequest): Promise<GetSyncingResponse>;
|
|
getLatestBlock(request?: GetLatestBlockRequest): Promise<GetLatestBlockResponse>;
|
|
getBlockByHeight(request: GetBlockByHeightRequest): Promise<GetBlockByHeightResponse>;
|
|
getLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise<GetLatestValidatorSetResponse>;
|
|
getValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise<GetValidatorSetByHeightResponse>;
|
|
}
|
|
export declare const createRpcQueryExtension: (base: QueryClient) => {
|
|
getNodeInfo(request?: GetNodeInfoRequest): Promise<GetNodeInfoResponse>;
|
|
getSyncing(request?: GetSyncingRequest): Promise<GetSyncingResponse>;
|
|
getLatestBlock(request?: GetLatestBlockRequest): Promise<GetLatestBlockResponse>;
|
|
getBlockByHeight(request: GetBlockByHeightRequest): Promise<GetBlockByHeightResponse>;
|
|
getLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise<GetLatestValidatorSetResponse>;
|
|
getValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise<GetValidatorSetByHeightResponse>;
|
|
};
|