import type { Hash } from '@ariestools/sdk';
import type { ChainStateViewer, SignedHydratedBlockWithHashMeta, XL1BlockNumber } from '@xyo-network/xl1-protocol/protocol-lib';
import type { CreatableProviderParams } from '../protocol-sdk/index.js';
import { AbstractCreatableProvider } from '../protocol-sdk/index.js';
/** Parameters for RestChainStateViewer. */
export interface RestChainStateViewerParams extends CreatableProviderParams {
    /** Base URL serving the mutable chain state (the head pointer, `chain/head.json`). */
    chainStateBaseUrl: string;
    /** Optional fetch override (custom agents, auth headers, tests). Defaults to the global fetch. */
    fetchFn?: typeof globalThis.fetch;
    /** head Poll Interval Ms configuration or state exposed by this contract. */
    headPollIntervalMs?: number;
}
/**
 * A ChainStateViewer over the statically generated REST file layout (see `@xyo-network/xl1-network-model`):
 * anonymous HTTP reads of the one mutable file, the head pointer. When configured with
 * `headPollIntervalMs`, polls the head and emits `headUpdated` as the chain advances.
 */
export declare class RestChainStateViewer extends AbstractCreatableProvider<RestChainStateViewerParams, ChainStateViewer['eventData']> implements ChainStateViewer {
    /** Connection kinds supported by this provider. */
    static readonly connectionTypes: readonly ["rest"];
    /** Primary moniker used to resolve this provider. */
    static readonly defaultMoniker: "ChainStateViewer";
    /** Provider monikers that must resolve before this provider can be created. */
    static readonly dependencies: never[];
    /** Provider monikers implemented by this provider class. */
    static readonly monikers: "ChainStateViewer"[];
    /** Read, write, or mixed capability surface exposed by the provider. */
    static readonly surface: "node";
    /** Moniker implemented by this provider instance. */
    moniker: "ChainStateViewer";
    private _headPollHash?;
    private _headPollInProgress;
    private _headPollTimer;
    /** Returns the chain state base url result exposed by this provider. */
    get chainStateBaseUrl(): string;
    protected get fetchFn(): typeof globalThis.fetch;
    protected get headPollIntervalMs(): number | undefined;
    /** Returns the params handler result exposed by this provider. */
    static paramsHandler(params: Partial<RestChainStateViewerParams>): Promise<{
        chainStateBaseUrl: string;
        fetchFn: typeof fetch | undefined;
        headPollIntervalMs: number | undefined;
        context: import('../protocol-sdk/index.js').CreatableProviderContextType;
        name?: import("@ariestools/sdk").CreatableName;
        statusReporter?: import("@ariestools/sdk").CreatableStatusReporter<void> | undefined;
        logger?: import("@ariestools/sdk").Logger;
        meterProvider?: import("@opentelemetry/api").MeterProvider;
        traceProvider?: import("@opentelemetry/api").TracerProvider;
    }>;
    /** Returns block. */
    currentBlock(): Promise<SignedHydratedBlockWithHashMeta>;
    /** Returns block hash. */
    currentBlockHash(): Promise<Hash>;
    /** Returns block number. */
    currentBlockNumber(): Promise<XL1BlockNumber>;
    /** The published head, or undefined when no head pointer has been published yet. */
    tryCurrentBlock(): Promise<SignedHydratedBlockWithHashMeta | undefined>;
    protected startHandler(): Promise<void>;
    protected stopHandler(): Promise<void>;
    private pollHead;
    private startHeadPolling;
    private stopHeadPolling;
}
//# sourceMappingURL=RestChainStateViewer.d.ts.map