@dolltoken/v2-sdk
Version:
⚒️ An SDK for building applications on top of Doll V2
16 lines (15 loc) • 904 B
TypeScript
import { Price, Token } from '@dolltoken/sdk-core';
/**
* Returns a price object corresponding to the input tick and the base/quote token
* Inputs must be tokens because the address order is used to interpret the price represented by the tick
* @param baseToken the base token of the price
* @param quoteToken the quote token of the price
* @param tick the tick for which to return the price
*/
export declare function tickToPrice(baseToken: Token, quoteToken: Token, tick: number): Price<Token, Token>;
/**
* Returns the first tick for which the given price is greater than or equal to the tick price
* @param price for which to return the closest tick that represents a price less than or equal to the input price,
* i.e. the price of the returned tick is less than or equal to the input price
*/
export declare function priceToClosestTick(price: Price<Token, Token>): number;