import { type Hash } from '@ariestools/sdk';
import type { XyoAddress } from '@xyo-network/sdk';
import type { ChainContractViewer, ChainId, 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 RestChainContractViewer. */
export interface RestChainContractViewerParams extends CreatableProviderParams {
    /** Base URL serving the chain-contract manifest (`chain/contract.json`). Falls back to config resolution when omitted. */
    contractBaseUrl: string;
    /** Optional fetch override (custom agents, auth headers, tests). Defaults to the global fetch. */
    fetchFn?: typeof globalThis.fetch;
}
/**
 * A ChainContractViewer that sources `rewardsContract`/`stakingTokenAddress`/`minWithdrawalBlocks`/fork
 * fields from the published chain-contract manifest (see `@xyo-network/xl1-network-model`) instead of
 * requiring them as constructor params — unlike `SimpleChainContractViewer`, whose params are the only
 * source of that data today. `chainId()` still delegates to the injected `FinalizationViewer`, avoiding
 * `SimpleFinalizationViewer`'s mutual dependency on `ChainContractViewer`.
 *
 * The manifest is static (published once), so it's fetched at most once per instance and cached.
 */
export declare class RestChainContractViewer extends AbstractCreatableProvider<RestChainContractViewerParams> implements ChainContractViewer {
    static readonly connectionTypes: readonly ["rest"];
    static readonly defaultMoniker: "ChainContractViewer";
    static readonly dependencies: "FinalizationViewer"[];
    static readonly monikers: "ChainContractViewer"[];
    static readonly surface: "node";
    moniker: "ChainContractViewer";
    private _finalizationViewer;
    private _manifestPromise?;
    get contractBaseUrl(): string;
    protected get fetchFn(): typeof globalThis.fetch;
    static paramsHandler(params: Partial<RestChainContractViewerParams>): Promise<{
        contractBaseUrl: string;
        fetchFn: typeof fetch | 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;
    }>;
    chainId(): Promise<ChainId>;
    chainIdAtBlockNumber(blockNumber: XL1BlockNumber | 'latest'): Promise<ChainId>;
    createHandler(): Promise<void>;
    forkedAtBlockNumber(): Promise<XL1BlockNumber | null>;
    forkedAtHash(): Promise<Hash | null>;
    /** Fork-chain traversal isn't supported over REST yet — the ancestor chain's own bucket isn't known here. */
    forkedChainContractViewer(): Promise<ChainContractViewer | null>;
    forkedChainId(): Promise<ChainId | null>;
    minWithdrawalBlocks(): Promise<number>;
    rewardsContract(): Promise<XyoAddress>;
    stakingTokenAddress(): Promise<XyoAddress>;
    private fetchManifest;
    private manifest;
}
//# sourceMappingURL=RestChainContractViewer.d.ts.map