import { C as Cursor, B as Bytes, w as Client, S as StatusRequest, u as ClientCallOptions, f as StatusResponse, l as StreamDataRequest, v as StreamDataOptions, r as StreamDataResponse } from './protocol.de1adebd.mjs'; type FetchBlockRangeArgs = { startBlock: bigint; maxBlock: bigint; force: boolean; clampAllowed: boolean; filter: TFilter; }; type FetchBlockRangeResult = { startBlock: bigint; endBlock: bigint; data: FetchBlockResult[]; }; type FetchBlockResult = { block: TBlock | null; cursor: Cursor | undefined; endCursor: Cursor; }; type BlockInfo = { blockNumber: bigint; blockHash: Bytes; parentBlockHash: Bytes; }; type FetchBlockByHashArgs = { blockHash: Bytes; }; type FetchBlockByHashResult = { data: FetchBlockResult; blockInfo: BlockInfo; }; type FetchCursorRangeArgs = { startBlockNumber: bigint; endBlockNumber: bigint; }; type FetchCursorArgs = { blockTag: "latest" | "finalized"; blockNumber?: undefined; blockHash?: undefined; } | { blockTag?: undefined; blockNumber: bigint; blockHash?: undefined; } | { blockTag?: undefined; blockNumber?: undefined; blockHash: Bytes; }; type ValidateFilterResult = { valid: true; error?: undefined; } | { valid: false; error: string; }; declare abstract class RpcStreamConfig { abstract headRefreshIntervalMs(): number; abstract finalizedRefreshIntervalMs(): number; abstract fetchCursorRange(args: FetchCursorRangeArgs): Promise; abstract fetchCursor(args: FetchCursorArgs): Promise; abstract validateFilter(filter: TFilter): ValidateFilterResult; abstract fetchBlockRange(args: FetchBlockRangeArgs): Promise>; abstract fetchHeaderByHash(args: FetchBlockByHashArgs): Promise>; } declare class RpcClient implements Client { private config; constructor(config: RpcStreamConfig); status(_request?: StatusRequest, _options?: ClientCallOptions): Promise; streamData(request: StreamDataRequest, options?: StreamDataOptions): AsyncIterable>; } declare function createRpcClient(config: RpcStreamConfig): RpcClient; declare class RpcDataStream { private config; private request; private options?; private heartbeatIntervalMs; constructor(config: RpcStreamConfig, request: StreamDataRequest, options?: StreamDataOptions | undefined); [Symbol.asyncIterator](): AsyncIterator>; private initialize; } type index_BlockInfo = BlockInfo; type index_FetchBlockByHashArgs = FetchBlockByHashArgs; type index_FetchBlockByHashResult = FetchBlockByHashResult; type index_FetchBlockRangeArgs = FetchBlockRangeArgs; type index_FetchBlockRangeResult = FetchBlockRangeResult; type index_FetchBlockResult = FetchBlockResult; type index_FetchCursorArgs = FetchCursorArgs; type index_FetchCursorRangeArgs = FetchCursorRangeArgs; type index_RpcClient = RpcClient; declare const index_RpcClient: typeof RpcClient; type index_RpcDataStream = RpcDataStream; declare const index_RpcDataStream: typeof RpcDataStream; type index_RpcStreamConfig = RpcStreamConfig; declare const index_RpcStreamConfig: typeof RpcStreamConfig; type index_ValidateFilterResult = ValidateFilterResult; declare const index_createRpcClient: typeof createRpcClient; declare namespace index { export { index_RpcClient as RpcClient, index_RpcDataStream as RpcDataStream, index_RpcStreamConfig as RpcStreamConfig, index_createRpcClient as createRpcClient }; export type { index_BlockInfo as BlockInfo, index_FetchBlockByHashArgs as FetchBlockByHashArgs, index_FetchBlockByHashResult as FetchBlockByHashResult, index_FetchBlockRangeArgs as FetchBlockRangeArgs, index_FetchBlockRangeResult as FetchBlockRangeResult, index_FetchBlockResult as FetchBlockResult, index_FetchCursorArgs as FetchCursorArgs, index_FetchCursorRangeArgs as FetchCursorRangeArgs, index_ValidateFilterResult as ValidateFilterResult }; } export { RpcStreamConfig as R, RpcClient as g, createRpcClient as h, index as i, RpcDataStream as j }; export type { BlockInfo as B, FetchBlockRangeArgs as F, ValidateFilterResult as V, FetchBlockResult as a, FetchBlockRangeResult as b, FetchBlockByHashArgs as c, FetchBlockByHashResult as d, FetchCursorArgs as e, FetchCursorRangeArgs as f };