@swaptoshi/dex-module
Version:
Klayr decentralized exchange (dex) on-chain module
28 lines (27 loc) • 1.36 kB
TypeScript
import { Uint256String, Uint8String, Int24String, Uint24String, Uint160String } from '../int';
import { DexModuleConfig } from '../../../types';
interface ConstructTokenURIParams {
config: DexModuleConfig;
tokenId: Uint256String;
quoteTokenAddress: Buffer;
baseTokenAddress: Buffer;
quoteTokenSymbol: string;
baseTokenSymbol: string;
quoteTokenDecimals: Uint8String;
baseTokenDecimals: Uint8String;
flipRatio: boolean;
tickLower: Int24String;
tickUpper: Int24String;
tickCurrent: Int24String;
tickSpacing: Int24String;
fee: Uint24String;
poolAddress: Buffer;
}
export declare function constructTokenURI(params: ConstructTokenURIParams): string;
export declare function tickToDecimalString(tick: Int24String, tickSpacing: Int24String, baseTokenDecimals: Uint8String, quoteTokenDecimals: Uint8String, flipRatio: boolean): string;
export declare function fixedPointToDecimalString(sqrtRatioX96: Uint160String, baseTokenDecimals: Uint8String, quoteTokenDecimals: Uint8String): string;
export declare function feeToPercentString(fee: Uint24String): string;
export declare function addressToString(addr: Buffer): string;
export declare function generateSVGImage(params: ConstructTokenURIParams): string;
export declare function tokenToColorHex(token: Buffer, config: DexModuleConfig): string;
export {};