import BN from 'bn.js';
import Decimal from 'decimal.js';
import { BigFractionBytes } from '../lib';
export declare class Fraction {
    static MAX_SIZE_F: number;
    static MAX_SIZE_BF: number;
    static FRACTIONS: number;
    static MULTIPLIER: Decimal;
    /** The scaled-fraction representation of `1` (2^60) as a BN, for integer fixed-point arithmetic. */
    static ONE_SF: BN;
    static MAX_F_BN: BN;
    static MAX_BF_BN: BN;
    static MIN_BN: BN;
    valueSf: BN;
    constructor(valueSf: BN);
    toDecimal(): Decimal;
    static fromDecimal(n: Decimal | number): Fraction;
    static fromBps(n: Decimal | number): Fraction;
    static fromPercent(n: Decimal | number): Fraction;
    getValue(): BN;
    /** A fraction representing the integer `n` (i.e. `n * 2^60`). */
    static fromInt(n: BN | number): Fraction;
    add(x: Fraction): Fraction;
    sub(x: Fraction): Fraction;
    /** Subtraction clamped at zero, mirroring the program's `saturating_sub`. */
    saturatingSub(x: Fraction): Fraction;
    /** Fixed-point multiply, truncating toward zero: `floor(a_sf * b_sf / 2^60)`. */
    mul(x: Fraction): Fraction;
    /** `floor(self * numerator / denominator)`, preserving the fixed-point scale (mirrors `full_mul_int_ratio`). */
    mulIntRatio(numerator: BN | number, denominator: BN | number): Fraction;
    /** The integer floor of this fraction (mirrors `to_floor`). */
    floorToBn(): BN;
    /** The integer ceil of this fraction (mirrors `to_ceil`). */
    ceilToBn(): BN;
    gt(x: Fraction): boolean;
    lt(x: Fraction): boolean;
    gte(x: Fraction): boolean;
    lte(x: Fraction): boolean;
    eq(x: Fraction): boolean;
}
export declare const ZERO_FRACTION: Fraction;
export declare function bfToDecimal(x: BigFractionBytes): Decimal;
//# sourceMappingURL=fraction.d.ts.map