import { DeepBookConfig } from "../utils/config.mjs"; import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions"; //#region src/transactions/flashLoans.d.ts /** * FlashLoanContract class for managing flash loans. */ 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 [{ NestedResult: [number, number]; $kind: "NestedResult"; }, { NestedResult: [number, number]; $kind: "NestedResult"; }]; /** * @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 [{ NestedResult: [number, number]; $kind: "NestedResult"; }, { NestedResult: [number, number]; $kind: "NestedResult"; }]; /** * @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; } //#endregion export { FlashLoanContract }; //# sourceMappingURL=flashLoans.d.mts.map