/** * RAY precision unit (10^27) * Used for high precision fixed-point calculations * @type {{bigint: bigint, number: number}} */ declare const RAY: { bigint: bigint; number: number; }; /** * WAD precision unit (10^18) * Common precision unit for Ethereum tokens (matches ETH's 18 decimals) * @type {{bigint: bigint, number: number}} */ declare const WAD: { bigint: bigint; number: number; }; /** * Converts a bigint value to a formatted number string with specified decimal precision * * @param {bigint} value - The bigint value to convert * @param {Object} opts - Formatting options * @param {number} [opts.decimals=18] - Number of decimals to use when converting from bigint * @param {number} [opts.minimumFractionDigits=0] - Minimum number of fraction digits to display * @param {number} [opts.maximumFractionDigits=3] - Maximum number of fraction digits to display * @returns {string} The formatted number as a string * * @example * // Returns "123.456" * bigIntToNumberAsString(BigInt("123456000000000000000"), { decimals: 18 }) */ declare function bigIntToNumberAsString(value: bigint, opts?: { decimals?: number; minimumFractionDigits?: number; maximumFractionDigits?: number; }): string; /** * Calculates the expected amount of shares to be minted based on deposit amount and rate * * The calculation follows the formula: * sharesMinted = depositAmount * ONE_SHARE / rateInQuote * * @param {bigint} depositAmount - The amount to deposit in quote asset decimals * @param {bigint} rateInQuote - The rate in quote representing "quote asset per share" * @param {number} shareDecimals - The decimal precision of the BoringVault shares (ONE_SHARE) * @returns {bigint} The expected amount of shares to be minted */ declare function calculateExpectedSharesMinted(depositAmount: bigint, rateInQuote: bigint, shareDecimals: number): bigint; /** * Calculates the atomic price with slippage applied * The calculation follows the formula: * atomicPrice = rateInQuote * (1 - slippage) * * @param {bigint} rateInQuote - The rate in quote representing "quote asset per share" * @param {number} slippage - The maximum acceptable slippage as a decimal (e.g., 0.01 for 1%) * @param {number} quoteDecimals - The decimal precision of the quote asset * @returns {bigint} The atomic price with slippage applied */ declare function calculateAtomicPrice(rateInQuote: bigint, slippage: number): bigint; export { RAY, WAD, bigIntToNumberAsString, calculateAtomicPrice, calculateExpectedSharesMinted };