import type { Hash } from '@ariestools/sdk';
import type { Payload } from '@xyo-network/sdk';
import type { NamedDataLake } from './NamedDataLake.js';
/** A payload paired with the name of the datalake that served it. */
export interface PayloadLocation {
    payload: Payload;
    source: string;
}
/** Parameters for PayloadLocator. */
export interface PayloadLocatorParams {
    datalakes: readonly NamedDataLake[];
}
/**
 * Stateless multi-datalake fetch orchestration.
 *
 * Given hash(es) and a list of named datalakes, finds where each hash lives.
 * Filters non-Payload datalake entries (e.g. ArrayBuffer) — use a binary-aware locator
 * if you need those.
 *
 * No caching: callers that want caching should wrap this (see BoundWitnessHydrator for
 * one example of wrapping with an LRU).
 */
export declare class PayloadLocator {
    protected readonly datalakes: readonly NamedDataLake[];
    /**
     * @throws if `params.datalakes` is empty. Required at construction to fail fast on misconfig.
     *   The only zero-datalake calls that wouldn't already throw are degenerate (no hashes input),
     *   not load-bearing enough to justify loosening the guard.
     */
    constructor(params: PayloadLocatorParams);
    /**
     * Exhaustive: queries every datalake for the hash(es). Does NOT short-circuit.
     *
     * Scalar form returns an array with one `PayloadLocation` per datalake that has the hash
     * (in registration order; empty if no datalake had it).
     * Batch form returns a Map keyed by input hash, value is the same per-hash array.
     */
    findAll(hash: Hash): Promise<PayloadLocation[]>;
    findAll(hashes: readonly Hash[]): Promise<Map<Hash, PayloadLocation[]>>;
    /**
     * First-found across datalakes in registration order. Short-circuits per hash:
     * once a hash is located in datalake N, later datalakes are not queried for it.
     *
     * Scalar form returns the single PayloadLocation (or `undefined` if no datalake had it).
     * Batch form returns a Map keyed by input hash, preserving insertion order. Missing
     * hashes are simply absent from the map.
     */
    findFirst(hash: Hash): Promise<PayloadLocation | undefined>;
    findFirst(hashes: readonly Hash[]): Promise<Map<Hash, PayloadLocation>>;
    /** Fetch a single hash from a single datalake, filtering non-Payload entries. */
    protected fetchOne(dl: NamedDataLake, hash: Hash): Promise<Payload | undefined>;
    protected findAllBatch(hashes: readonly Hash[]): Promise<Map<Hash, PayloadLocation[]>>;
    protected findFirstBatch(hashes: readonly Hash[]): Promise<Map<Hash, PayloadLocation>>;
}
//# sourceMappingURL=PayloadLocator.d.ts.map