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-node.js';
import { AbstractCreatableProvider } from '../protocol-sdk/index-node.js';
/** Parameters for RestChainContractViewer. */
export interface RestChainContractViewerParams extends CreatableProviderParams {
    /**
     * When set, this instance represents a specific chain in the published sparse lineage
     * (`chain/contracts/<chainId>.json`) rather than the current head's chain. Used for
     * fork-ancestor traversal.
     */
    chainId?: ChainId;
    /** Base URL of the chain-state bucket. 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 sparse chain-contract objects (`chain/contracts/<chainId>.json`)
 * instead of requiring them as constructor params — unlike `SimpleChainContractViewer`, whose
 * params are the only source of that data today.
 *
 * The current chain id comes from the injected `FinalizationViewer` (head) unless this instance
 * was created for a fork ancestor with a pinned `chainId` param. Fork traversal loads sibling
 * files under the same base URL via `forkedChainContractViewer()`.
 *
 * Each manifest is immutable, so it is fetched at most once per instance and cached.
 */
export declare class RestChainContractViewer extends AbstractCreatableProvider<RestChainContractViewerParams> implements ChainContractViewer {
    /** Connection kinds supported by this provider. */
    static readonly connectionTypes: readonly ["rest"];
    /** Primary moniker used to resolve this provider. */
    static readonly defaultMoniker: "ChainContractViewer";
    /** Provider monikers that must resolve before this provider can be created. */
    static readonly dependencies: "FinalizationViewer"[];
    /** Provider monikers implemented by this provider class. */
    static readonly monikers: "ChainContractViewer"[];
    /** Read, write, or mixed capability surface exposed by the provider. */
    static readonly surface: "node";
    /** Moniker implemented by this provider instance. */
    moniker: "ChainContractViewer";
    private _finalizationViewer;
    private _forkedChainContractViewer?;
    private _manifestPromise?;
    /** Returns the contract base url result exposed by this provider. */
    get contractBaseUrl(): string;
    protected get fetchFn(): typeof globalThis.fetch;
    /** Returns the params handler result exposed by this provider. */
    static paramsHandler(params: Partial<RestChainContractViewerParams>): Promise<{
        chainId: import("@ariestools/sdk").BrandedHex | undefined;
        contractBaseUrl: string;
        fetchFn: typeof fetch | 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 chain id result exposed by this provider. */
    chainId(): Promise<ChainId>;
    /** Returns the chain id at block number result exposed by this provider. */
    chainIdAtBlockNumber(blockNumber: XL1BlockNumber | 'latest'): Promise<ChainId>;
    /** Creates the provider instance after its dependencies and configuration have resolved. */
    createHandler(): Promise<void>;
    /** Returns the forked at block number result exposed by this provider. */
    forkedAtBlockNumber(): Promise<XL1BlockNumber | null>;
    /** Returns the forked at hash result exposed by this provider. */
    forkedAtHash(): Promise<Hash | null>;
    /** Returns the forked chain contract viewer result exposed by this provider. */
    forkedChainContractViewer(): Promise<ChainContractViewer | null>;
    /** Returns the forked chain id result exposed by this provider. */
    forkedChainId(): Promise<ChainId | null>;
    /** Returns the min withdrawal blocks result exposed by this provider. */
    minWithdrawalBlocks(): Promise<number>;
    /** Returns the rewards contract result exposed by this provider. */
    rewardsContract(): Promise<XyoAddress>;
    /** Returns the staking token address result exposed by this provider. */
    stakingTokenAddress(): Promise<XyoAddress>;
    private fetchManifest;
    private manifest;
}
//# sourceMappingURL=RestChainContractViewer.d.ts.map