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> {
    /** head Poll Interval Ms configuration or state exposed by this contract. */
    headPollIntervalMs?: number;
}
/** JsonRpcBlockViewer implementation. */
export declare class JsonRpcBlockViewer extends JsonRpcBlockViewerMethods<JsonRpcBlockViewerParams> implements BlockViewer {
    /** Connection kinds supported by this provider. */
    static readonly connectionTypes: readonly ["rpc"];
    /** Primary moniker used to resolve this provider. */
    static readonly defaultMoniker: "BlockViewer";
    /** 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: "BlockViewer"[];
    /** Read, write, or mixed capability surface exposed by the provider. */
    static readonly surface: "node";
    private _headPollHash?;
    private _headPollInProgress;
    private _headPollTimer;
    protected get headPollIntervalMs(): number | undefined;
    /** Returns the params handler result exposed by this provider. */
    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;
    }>;
    /** Returns the block by hash result exposed by this provider. */
    blockByHash(hash: Hash): Promise<SignedHydratedBlockWithHashMeta | null>;
    /** Returns the block by number result exposed by this provider. */
    blockByNumber(block: XL1BlockNumber): Promise<SignedHydratedBlockWithHashMeta | null>;
    /** Returns the chain id result exposed by this provider. */
    chainId(blockNumber?: XL1BlockNumber | 'latest'): Promise<ChainId>;
    /** Returns block hash. */
    currentBlockHash(): Promise<Hash>;
    /** Returns block number. */
    currentBlockNumber(): Promise<XL1BlockNumber>;
    /** Returns the payload by hash result exposed by this provider. */
    payloadByHash(hash: Hash): Promise<WithHashMeta<Payload> | null>;
    /** Returns the rate result exposed by this provider. */
    rate(range: XL1BlockRange, timeUnit?: keyof TimeDurations): Promise<BlockRate>;
    /** Returns the step size rate result exposed by this provider. */
    stepSizeRate(start: XL1BlockNumber, stepSizeIndex: StepIndex, count?: Count, timeUnit?: keyof TimeDurations): Promise<BlockRate>;
    /** Returns the time duration rate result exposed by this provider. */
    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