import { Transaction } from '@mysten/sui/transactions'; import { EnvOption, AssetIdentifier, CoinObject, CacheOption, FloashloanAsset, TransactionResult, MarketOption, ServiceOption } from './types.js'; /** * Get all available flash loan assets from the API * Uses caching to avoid repeated API calls * * @param options - Optional environment and cache configuration * @returns Array of flash loan asset configurations */ export declare const getAllFlashLoanAssets: (options?: Partial) => Promise; /** * Get a specific flash loan asset by identifier * * @param identifier - Asset identifier (string coin type, number asset ID, or object with id) * @param options - Optional environment configuration * @returns Flash loan asset configuration or null if not found */ export declare function getFlashLoanAsset(identifier: AssetIdentifier, options?: Partial): Promise; /** * Create a flash loan transaction in the PTB (Programmable Transaction Block) * * This function initiates a flash loan by borrowing the specified amount of assets. * The borrowed assets must be repaid within the same transaction using repayFlashLoanPTB. * * @param tx - The transaction block to add the flash loan operation to * @param identifier - Asset identifier to borrow * @param amount - Amount to borrow (number or transaction result) * @param options - Optional environment configuration * @returns Tuple containing [balance, receipt] where receipt is needed for repayment * @throws Error if the pool does not support flash loans */ export declare function flashloanPTB(tx: Transaction, identifier: AssetIdentifier, amount: number | TransactionResult, options?: Partial): Promise<{ NestedResult: [number, number]; $kind: "NestedResult"; }[]>; /** * Repay a flash loan transaction in the PTB * * This function repays the flash loan using the receipt from the original flash loan * and the coin object containing the repayment amount. * * @param tx - The transaction block to add the repayment operation to * @param identifier - Asset identifier being repaid * @param receipt - Receipt from the original flash loan transaction * @param coinObject - Coin object containing the repayment amount * @param options - Optional environment configuration * @returns Tuple containing [balance] after repayment * @throws Error if the pool does not support flash loans */ export declare function repayFlashLoanPTB(tx: Transaction, identifier: AssetIdentifier, receipt: TransactionResult | string, coinObject: CoinObject, options?: Partial): Promise<{ NestedResult: [number, number]; $kind: "NestedResult"; }[]>; //# sourceMappingURL=flashloan.d.ts.map