@everestswap/sdk
Version:
🛠An SDK for building applications on top of Everest.
24 lines (23 loc) • 1.08 kB
TypeScript
import { BigintIsh, Rounding, ChainId } from '../../constants';
import { Currency } from '../currency';
import { Route } from '../route';
import { Fraction } from './fraction';
import { CurrencyAmount } from './currencyAmount';
export declare class Price extends Fraction {
/**
* Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade.
* @param chainId
*/
readonly baseCurrency: Currency;
readonly quoteCurrency: Currency;
readonly scalar: Fraction;
static fromRoute(route: Route): Price;
constructor(baseCurrency: Currency, quoteCurrency: Currency, denominator: BigintIsh, numerator: BigintIsh);
get raw(): Fraction;
get adjusted(): Fraction;
invert(): Price;
multiply(other: Price): Price;
quote(currencyAmount: CurrencyAmount, chainId?: ChainId): CurrencyAmount;
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
}