UNPKG

@f5i23q999d/cow-sdk

Version:

<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>

23 lines (22 loc) 854 B
import { QuoteAmountsAndCosts } from './types.js'; import { type OrderParameters } from './generated/index.js'; export interface QuoteAmountsAndCostsParams { orderParams: OrderParameters; sellDecimals: number; buyDecimals: number; slippagePercentBps: number; partnerFeeBps: number | undefined; } export declare function getQuoteAmountsAndCosts(params: QuoteAmountsAndCostsParams): QuoteAmountsAndCosts; type BigNumber = { big: bigint; num: number; }; /** * BigInt works well with subtraction and addition, but it's not very good with multiplication and division * To multiply/divide token amounts we have to convert them to numbers, but we have to be careful with precision * @param value * @param decimals */ export declare function getBigNumber(value: string | bigint | number, decimals: number): BigNumber; export {};