import { type CredentialSource, type EpochLeaseToken, type ReleaseScope, type SecretField, type SecretLease, type Unsealer } from "./credentials.ts";
import type { HpkeWrap, ProviderId } from "./sealed-format.ts";
export interface ReleasedItemPosition {
    readonly accountId: string;
    readonly providerId: ProviderId;
    readonly entryDigest: string;
    readonly field: SecretField;
    /** The lease this release was made under: the opener rebuilds epoch and placementId from it (r11.2 C.5). */
    readonly lease: EpochLeaseToken;
}
export interface SealedSourceDeps {
    readonly accountId: string;
    readonly unsealer: Unsealer;
    readonly lease: () => Promise<EpochLeaseToken>;
    readonly recipientPk: Uint8Array;
    readonly reloadEntryDigest: (providerId: ProviderId) => Promise<string>;
    readonly readHead: () => Promise<string>;
    /** Rejects with the signal's reason once the step aborts. */
    readonly sleep: (ms: number, signal: AbortSignal) => Promise<void>;
    /** The abort signal of the step this release serves; it bounds the churn wait (custody design L844, C.3). */
    readonly stepSignal: (scope: ReleaseScope) => AbortSignal;
    /** Called once per step when the step enters the config-churn wait (C.3), so the caller can show one notice. */
    readonly onChurnNotice: (scope: ReleaseScope) => void;
    /** Opens one released item with this instance's recipient key; its HPKE info/AAD binding is fixed by r11.1. */
    readonly openItem: (item: HpkeWrap, position: ReleasedItemPosition) => Promise<Uint8Array>;
}
/** Per egress instance (custody design 3.4): its leases live on the instance, never in module scope. */
export declare class SealedCredentialSource implements CredentialSource {
    #private;
    constructor(deps: SealedSourceDeps);
    resolve(providerId: ProviderId, entryDigest: string, fields: readonly SecretField[], scope: ReleaseScope): Promise<SecretLease>;
    /** Disposes every live lease, and voids any lease still being resolved when the bump lands. */
    bumpGeneration(): void;
}
//# sourceMappingURL=sealed-source.d.ts.map