/** One recorded share-price sample for a vault. */
export interface VaultYieldSnapshot {
    /** Unix seconds when the sample was taken. */
    t: number;
    /** Raw `convertToAssets(1e18)` share price at `t`, as a string. */
    p: string;
}
/** Per-vault time series, keyed by lowercased address. */
export type VaultYieldSeries = {
    [address: string]: VaultYieldSnapshot[];
};
export interface VaultAprResult {
    /** Annualised realised return from share-price growth (e.g. 0.043 = 4.3%). */
    apr: number;
    /** Share price at the latest sample. */
    sharePriceNow: string;
    /** Share price at the lookback sample used. */
    sharePriceThen: string;
    /** Seconds between the two samples used. */
    windowSeconds: number;
    /** Number of samples in the series. */
    samples: number;
}
export interface AppendSnapshotOptions {
    /** Max ring length — oldest samples drop off. Default 90. */
    maxPoints?: number;
    /** Skip the append if the last sample is newer than this. Default 0
     *  (always append). Gates the ring to a sane cadence regardless of how
     *  often the recorder fires. */
    minIntervalSeconds?: number;
}
/**
 * Append a sample to a vault's ring buffer, dropping the oldest beyond
 * `maxPoints` and skipping samples that arrive sooner than
 * `minIntervalSeconds` after the last one. Pure — returns a new array.
 */
export declare const appendSnapshot: (points: VaultYieldSnapshot[], snap: VaultYieldSnapshot, options?: AppendSnapshotOptions) => VaultYieldSnapshot[];
export interface ComputeVaultAprOptions {
    /** Target lookback window. Default 7. The sample closest to
     *  `now − windowDays` (and strictly before `now`) is used as the base. */
    windowDays?: number;
    /** Require at least this much elapsed between the two samples, else
     *  return `undefined` (a window too short makes the annualised figure
     *  meaningless). Default 1 hour. */
    minWindowSeconds?: number;
}
/**
 * Annualise a vault's realised return from its recorded share-price
 * series:
 *
 *   apr = (priceNow / priceThen − 1) × (yearSeconds / elapsedSeconds)
 *
 * `priceNow` is the latest sample; `priceThen` is the sample closest to
 * `now − windowDays`. The ratio is computed in bigint (scaled by 1e18)
 * to preserve the small per-day growth that double precision would lose
 * on ~1e18-scale prices.
 *
 * Returns `undefined` when there aren't two usable samples or the window
 * is shorter than `minWindowSeconds`.
 */
export declare const computeVaultApr: (points: VaultYieldSnapshot[], options?: ComputeVaultAprOptions) => VaultAprResult | undefined;
//# sourceMappingURL=annualize.d.ts.map