import { TxRaw } from '@routerprotocol/chain-api/cosmos/tx/v1beta1/tx_pb'; import { HttpClient } from '../../utils/classes'; import { Wait, Block, Sync, TxSuccess, TxBroadcastResult, TxError, TxInfo, TxResult, BroadcastMode, WaitTxBroadcastResult, SyncTxBroadcastResult, BlockTxBroadcastResult, TxSearchResult } from '../../types/tx-rest-client'; import { APIParams, TxSearchOptions } from '../../types/rest-client'; export declare function isTxError>(x: T): x is T & TxBroadcastResult; export declare class TxRestClient { httpClient: HttpClient; constructor(endpoint: string); txInfo(txHash: string, params?: APIParams): Promise; txInfosByHeight(height: number | undefined): Promise; waitTxBroadcast(txHash: string, timeout?: number): Promise<{ txhash: string; raw_log: string; gas_wanted: number; gas_used: number; height: number; logs: import("../../types/tx-rest-client").TxLog[]; code: number; codespace: string; timestamp: string; }>; simulateTx(txRaw: TxRaw): Promise<{ result: { data: string; log: string; eventsList: { type: string; attributes: { key: string; value: string; }[]; }[]; }; gasInfo: { gasWanted: number; gasUsed: number; }; }>; private broadcastTx; broadcastTxn(txRaw: TxRaw, mode?: BroadcastMode): Promise; broadcast(tx: TxRaw, timeout?: number): Promise; /** * Broadcast the transaction using the "block" mode, waiting for its inclusion in the blockchain. * @param tx transaction to broadcast */ broadcastBlock(tx: TxRaw): Promise; /** * NOTE: This is not a synchronous function and is unconventionally named. This function * can be await as it returns a `Promise`. * * Broadcast the transaction using the "sync" mode, returning after CheckTx() is performed. * @param tx transaction to broadcast */ broadcastSync(tx: TxRaw): Promise; /** * Search for transactions based on event attributes. * @param options */ search(options: Partial): Promise; private postRaw; private getRaw; }