import { Stream } from "xstream"; import { HttpEndpoint, RpcClient } from "../rpcclients"; import * as requests from "./requests"; import * as responses from "./responses"; /** * A client for the CometBFT 1.x RPC API */ export declare class Comet1Client { /** * Creates a new Tendermint client for the given endpoint. * * Uses HTTP when the URL schema is http or https. Uses WebSockets otherwise. */ static connect(endpoint: string | HttpEndpoint): Promise; /** * Creates a new Comet BFT client given an RPC client. */ static create(rpcClient: RpcClient): Comet1Client; private readonly client; /** * Use `Comet1Client.connect` or `Comet1Client.create` to create an instance. */ private constructor(); disconnect(): void; abciInfo(): Promise; abciQuery(params: requests.AbciQueryParams): Promise; block(height?: number): Promise; blockResults(height?: number): Promise; /** * Search for events that are in a block. * * @see https://docs.tendermint.com/master/rpc/#/Info/block_search */ blockSearch(params: requests.BlockSearchParams): Promise; blockSearchAll(params: requests.BlockSearchParams): Promise; /** * Queries block headers filtered by minHeight <= height <= maxHeight. * * @param minHeight The minimum height to be included in the result. Defaults to 0. * @param maxHeight The maximum height to be included in the result. Defaults to infinity. */ blockchain(minHeight?: number, maxHeight?: number): Promise; /** * Broadcast transaction to mempool and wait for response * * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync */ broadcastTxSync(params: requests.BroadcastTxParams): Promise; /** * Broadcast transaction to mempool and do not wait for result * * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async */ broadcastTxAsync(params: requests.BroadcastTxParams): Promise; /** * Broadcast transaction to mempool and wait for block * * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit */ broadcastTxCommit(params: requests.BroadcastTxParams): Promise; commit(height?: number): Promise; genesis(): Promise; health(): Promise; numUnconfirmedTxs(): Promise; status(): Promise; subscribeNewBlock(): Stream; subscribeNewBlockHeader(): Stream; subscribeTx(query?: string): Stream; /** * Get a single transaction by hash * * @see https://docs.tendermint.com/master/rpc/#/Info/tx */ tx(params: requests.TxParams): Promise; /** * Search for transactions that are in a block * * @see https://docs.tendermint.com/master/rpc/#/Info/tx_search */ txSearch(params: requests.TxSearchParams): Promise; txSearchAll(params: requests.TxSearchParams): Promise; validators(params: requests.ValidatorsParams): Promise; validatorsAll(height?: number): Promise; private doCall; private subscribe; }