import { type Hash } from '@ariestools/sdk';
import type { Payload, WithHashMeta } from '@xyo-network/sdk';
import type { BlockRate, BlockViewer, ChainId, Count, SignedHydratedBlockWithHashMeta, StepIndex, TimeDurations, XL1BlockNumber, XL1BlockRange } from '@xyo-network/xl1-protocol/protocol-lib';
import type { BlockViewerRpcSchemas } from '../../../types/index.js';
import type { JsonRpcViewerParams } from '../JsonRpcViewer.js';
import { JsonRpcBlockViewerMethods } from './JsonRpcBlockViewerMethods.js';
/** Parameters for JsonRpcBlockViewer. */
export interface JsonRpcBlockViewerParams extends JsonRpcViewerParams<BlockViewerRpcSchemas> {
    headPollIntervalMs?: number;
}
/** JsonRpcBlockViewer implementation. */
export declare class JsonRpcBlockViewer extends JsonRpcBlockViewerMethods<JsonRpcBlockViewerParams> implements BlockViewer {
    static readonly connectionTypes: readonly ["rpc"];
    static readonly defaultMoniker: "BlockViewer";
    static readonly dependencies: never[];
    static readonly monikers: "BlockViewer"[];
    static readonly surface: "node";
    private _headPollHash?;
    private _headPollInProgress;
    private _headPollTimer;
    protected get headPollIntervalMs(): number | undefined;
    static paramsHandler(params?: Partial<JsonRpcBlockViewerParams>): Promise<{
        headPollIntervalMs: number | undefined;
        context: import('../../../../protocol-sdk/index-node.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;
    }>;
    blockByHash(hash: Hash): Promise<SignedHydratedBlockWithHashMeta | null>;
    blockByNumber(block: XL1BlockNumber): Promise<SignedHydratedBlockWithHashMeta | null>;
    chainId(blockNumber?: XL1BlockNumber | 'latest'): Promise<ChainId>;
    currentBlockHash(): Promise<Hash>;
    currentBlockNumber(): Promise<XL1BlockNumber>;
    payloadByHash(hash: Hash): Promise<WithHashMeta<Payload> | null>;
    rate(range: XL1BlockRange, timeUnit?: keyof TimeDurations): Promise<BlockRate>;
    stepSizeRate(start: XL1BlockNumber, stepSizeIndex: StepIndex, count?: Count, timeUnit?: keyof TimeDurations): Promise<BlockRate>;
    timeDurationRate(timeConfig: Record<keyof TimeDurations, number>, startBlockNumber?: XL1BlockNumber, timeUnit?: keyof TimeDurations, toleranceMs?: number, maxAttempts?: number): Promise<BlockRate>;
    protected startHandler(): Promise<void>;
    protected stopHandler(): Promise<void>;
    private pollHead;
    private startHeadPolling;
    private stopHeadPolling;
}
//# sourceMappingURL=JsonRpcBlockViewer.d.ts.map