/** * Withdrawal Date Utilities * * Mirrors TimelockedVault.sol's DateUtils logic for computing claimable dates. * All operations are in UTC to match contract behavior. */ export interface ClaimableDate { year: number; month: number; day: number; epoch: number; } /** * Compute the claimable date for a withdrawal request. * Replicates TimelockedVault.requestRedeem() logic exactly. * * The contract does: * (year, month, day) = DateUtils.timestampToDate(block.timestamp + 300 + lagDuration) * * @param requestTimestamp - Block timestamp of the request (in seconds, UTC) * @param lagDuration - Lag duration in seconds (e.g., 86400 for 1 day) * @returns The date when the withdrawal becomes claimable (UTC) */ export declare function computeClaimableDate(requestTimestamp: number, lagDuration: number): ClaimableDate; /** * Check if a withdrawal request is ready to claim. * The contract allows claiming when: block.timestamp + 300 >= claimableEpoch * * @param claimableEpoch - The epoch when this request became claimable * @param currentEpoch - Current timestamp (usually block.timestamp or now) * @returns true if claimable now */ export declare function isClaimableNow(claimableEpoch: number, currentEpoch: number): boolean; /** * Format date for use as a lookup key (e.g., "2024-03-16") * Ensures consistent formatting across the codebase. */ export declare function formatDateKey(year: number, month: number, day: number): string; /** * Verify that computed date matches expected format. * Used for debugging and validation. */ export declare function isValidClaimableDate(date: ClaimableDate): boolean; /** * Get the number of days in a given month. * @param year - Year (4-digit) * @param month - Month (1-12) * @returns Number of days in that month */ export declare function getDaysInMonth(year: number, month: number): number;