import type { Transaction, TransactionObjectArgument } from '@onelabs/sui/transactions'; import type { DeepBookConfig } from '../utils/config.js'; /** * FlashLoanContract class for managing flash loans. */ export declare class FlashLoanContract { #private; /** * @param {DeepBookConfig} config Configuration object for DeepBook */ constructor(config: DeepBookConfig); /** * @description Borrow base asset from the pool * @param {string} poolKey The key to identify the pool * @param {number} borrowAmount The amount to borrow * @returns A function that takes a Transaction object */ borrowBaseAsset: (poolKey: string, borrowAmount: number) => (tx: Transaction) => readonly [{ $kind: "NestedResult"; NestedResult: [number, number]; }, { $kind: "NestedResult"; NestedResult: [number, number]; }]; /** * @description Return base asset to the pool after a flash loan. * @param {string} poolKey The key to identify the pool * @param {number} borrowAmount The amount of the base asset to return * @param {TransactionObjectArgument} baseCoinInput Coin object representing the base asset to be returned * @param {TransactionObjectArgument} flashLoan FlashLoan object representing the loan to be settled * @returns A function that takes a Transaction object */ returnBaseAsset: (poolKey: string, borrowAmount: number, baseCoinInput: TransactionObjectArgument, flashLoan: TransactionObjectArgument) => (tx: Transaction) => TransactionObjectArgument; /** * @description Borrow quote asset from the pool * @param {string} poolKey The key to identify the pool * @param {number} borrowAmount The amount to borrow * @returns A function that takes a Transaction object */ borrowQuoteAsset: (poolKey: string, borrowAmount: number) => (tx: Transaction) => readonly [{ $kind: "NestedResult"; NestedResult: [number, number]; }, { $kind: "NestedResult"; NestedResult: [number, number]; }]; /** * @description Return quote asset to the pool after a flash loan. * @param {string} poolKey The key to identify the pool * @param {number} borrowAmount The amount of the quote asset to return * @param {TransactionObjectArgument} quoteCoinInput Coin object representing the quote asset to be returned * @param {TransactionObjectArgument} flashLoan FlashLoan object representing the loan to be settled * @returns A function that takes a Transaction object */ returnQuoteAsset: (poolKey: string, borrowAmount: number, quoteCoinInput: TransactionObjectArgument, flashLoan: TransactionObjectArgument) => (tx: Transaction) => TransactionObjectArgument; }