UNPKG

@bsv/overlay-express

Version:
29 lines 1.06 kB
import { ChainTracker } from '@bsv/sdk'; export interface ChaintracksProviderConfig { apiPrefix?: string; fetch?: typeof fetch; } export interface ChaintracksHeader { height: number; hash: string; merkleRoot: string; } /** * Minimal go-chaintracks HTTP client for Overlay Express. * * It intentionally implements the SDK ChainTracker surface plus header lookup, * which is enough for proof validation, BASM headers, and reorg stream URL * construction without depending on wallet-toolbox client export timing. */ export declare class ChaintracksProvider implements ChainTracker { private readonly baseUrl; private readonly fetcher; constructor(url: string, config?: ChaintracksProviderConfig); currentHeight(): Promise<number>; isValidRootForHeight(root: string, height: number): Promise<boolean>; findHeaderForHeight(height: number): Promise<ChaintracksHeader | undefined>; reorgStreamUrl(): string; private getJson; private getJsonOrUndefined; } //# sourceMappingURL=ChaintracksProvider.d.ts.map