UNPKG

@crust_finance/sdk-core

Version:

⚒️ An SDK for building applications on top of Uniswap V3

25 lines (24 loc) 1.04 kB
import JSBI from 'jsbi'; import { BigintIsh, Rounding } from '../../constants'; export declare class Fraction { readonly numerator: JSBI; readonly denominator: JSBI; constructor(numerator: BigintIsh, denominator?: BigintIsh); private static tryParseFraction; get quotient(): JSBI; get remainder(): Fraction; invert(): Fraction; add(other: Fraction | BigintIsh): Fraction; subtract(other: Fraction | BigintIsh): Fraction; lessThan(other: Fraction | BigintIsh): boolean; equalTo(other: Fraction | BigintIsh): boolean; greaterThan(other: Fraction | BigintIsh): boolean; multiply(other: Fraction | BigintIsh): Fraction; divide(other: Fraction | BigintIsh): Fraction; toSignificant(significantDigits: number, format?: object, rounding?: Rounding): string; toFixed(decimalPlaces: number, format?: object, rounding?: Rounding): string; /** * Helper method for converting any super class back to a fraction */ get asFraction(): Fraction; }