import { type Hash } from '@ariestools/sdk';
import type { Payload, Sequence, WithHashMeta } from '@xyo-network/sdk';
/** Public contract for Existing Items. */
export interface ExistingItems<T> {
    /** indexes configuration or state exposed by this contract. */
    indexes: number[];
    /** items configuration or state exposed by this contract. */
    items: T[];
}
/** Public contract for Validation Result Context. */
export interface ValidationResultContext<TItem, TResult> {
    /** bundle configuration or state exposed by this contract. */
    bundle: WithHashMeta<Payload>;
    /** item configuration or state exposed by this contract. */
    item: TItem;
    /** result configuration or state exposed by this contract. */
    result: TResult;
}
/** Public contract for Sequenced Bundle. */
export interface SequencedBundle extends WithHashMeta<Payload> {
    /** sequence configuration or state exposed by this contract. */
    _sequence?: Sequence;
}
/** Public contract for Apply Validation Results Params. */
export interface ApplyValidationResultsParams<TItem, TResult> {
    /** bundles configuration or state exposed by this contract. */
    bundles: WithHashMeta<Payload>[];
    /** Whether is validated. */
    isValidated: (result: TResult) => boolean;
    /** on Invalid configuration or state exposed by this contract. */
    onInvalid?: (context: ValidationResultContext<TItem, TResult>) => Promise<void> | void;
    /** remaining configuration or state exposed by this contract. */
    remaining: ExistingItems<TItem>;
    /** results configuration or state exposed by this contract. */
    results: TResult[];
    /** valid configuration or state exposed by this contract. */
    valid: boolean[];
}
/** Protocol-defined value for apply validation results. */
export declare const applyValidationResults: <TItem, TResult>({ bundles, isValidated, onInvalid, remaining, results, valid, }: ApplyValidationResultsParams<TItem, TResult>) => Promise<void>;
/** Protocol-defined value for collect existing items. */
export declare const collectExistingItems: <T>(items: (T | undefined)[]) => ExistingItems<T>;
/** Protocol-defined value for invalid bundle hashes. */
export declare const invalidBundleHashes: (bundles: WithHashMeta<Payload>[], valid: boolean[]) => Hash[];
/** Protocol-defined value for next prune cursor. */
export declare const nextPruneCursor: (batch: SequencedBundle[], pruneHashes: Hash[], cursor: Sequence | undefined) => Sequence | undefined;
//# sourceMappingURL=pruneHelpers.d.ts.map