import { Chain } from '../../../sdk/types'; import { BaseBlockHeader, BlockHeader } from './Api/BlockHeaderApi'; import { ChaintracksClientApi, ChaintracksInfoApi, HeaderListener, ReorgListener } from './Api/ChaintracksClientApi'; export interface ChaintracksServiceClientOptions { /** Retained for compatibility with historical callers; this client does not use Authrite. */ useAuthrite?: false; fetch?: typeof fetch; /** Whole-request deadline, including response-body consumption. Default: 30 seconds. */ requestTimeoutMsecs?: number; /** Maximum JSON response size. Default: 4 MiB. */ maxResponseBytes?: number; /** Maximum JSON request size. Default: 256 KiB. */ maxRequestBytes?: number; } /** * Connects to a ChaintracksService to implement 'ChaintracksClientApi' * */ export declare class ChaintracksServiceClient implements ChaintracksClientApi { chain: Chain; /** HTTP polling client; callback event methods are legacy unsupported stubs. */ readonly supportsReorgEvents = false; private readonly fetcher; private readonly requestTimeoutMsecs; private readonly maxResponseBytes; private readonly maxRequestBytes; static createChaintracksServiceClientOptions(): ChaintracksServiceClientOptions; options: ChaintracksServiceClientOptions; constructor(chain: Chain, serviceUrl: string, options?: ChaintracksServiceClientOptions); readonly serviceUrl: string; subscribeHeaders(_listener: HeaderListener): Promise; subscribeReorgs(_listener: ReorgListener): Promise; unsubscribe(_subscriptionId: string): Promise; currentHeight(): Promise; isValidRootForHeight(root: string, height: number): Promise; getJsonOrUndefined(path: string): Promise; getJson(path: string): Promise; postJsonVoid(path: string, params: T): Promise; addHeader(header: BaseBlockHeader): Promise; startListening(): Promise; listening(): Promise; getChain(): Promise; isListening(): Promise; isSynchronized(): Promise; getPresentHeight(): Promise; getInfo(): Promise; findChainTipHeader(): Promise; findChainTipHash(): Promise; getHeaders(height: number, count: number): Promise; findHeaderForHeight(height: number): Promise; findHeaderForBlockHash(hash: string): Promise; private requestJson; private readBoundedBody; private readStreamChunk; private abortError; private parseEnvelope; private serviceError; private validateRemoteHeader; private validateHeight; private validateInfoHeight; private isPlainRecord; private normalizeServiceUrl; private positiveInteger; private normalizeChainValue; private normalizeChain; } //# sourceMappingURL=ChaintracksServiceClient.d.ts.map