/** * Calculates the Annual Percentage Yield (APY) based on the Annual Percentage Rate (APR). * @param apr The Annual Percentage Rate. * @param compoundFrequency The number of times the interest is compounded in a year. Default is 365. * @returns The Annual Percentage Yield (APY). */ export declare function aprToApy(apr: number, compoundFrequency?: number): number; /** * Calculates the Annual Percentage Rate (APR) based on the Annual Percentage Yield (APY). * @param apy The Annual Percentage Yield. * @param compoundFrequency The number of times the interest is compounded in a year. Default is 365. * @returns The Annual Percentage Rate (APR). */ export declare function apyToApr(apy: number, compoundFrequency?: number): number; /** * Represents a yield information with APR and APY (as fraction). * If negative, it means that it costs money to hold the asset. */ export type Yield = { /** * APR (Annual Percentage Rate) as fraction. * 0.25 means 25% APR * -0.25 means -25% APR */ apr: number; /** * APY (Annual Percentage Yield) as fraction. * 0.28 means 28% APY * -0.28 means -28% APR */ apy: number; /** * (Optional) The address of the token this yield is associated with. */ address?: string; }; /** * Creates a Yield object from the given APR. * @param apr The Annual Percentage Rate. * @returns The Yield object with the calculated APY. */ export declare const yieldFromApr: (apr: number) => Yield; /** * Creates a Yield object from the given APY. * @param apy The Annual Percentage Yield. * @returns The Yield object with the calculated APR. */ export declare const yieldFromApy: (apy: number) => Yield; export type YieldElement = { apy: number; value: number; };