import { EnvOption, CacheOption, Pool, AssetIdentifier, PoolStats, FeeDetail, CoinObject, TransactionResult, SingleCoinTransactionResult, AccountCapOption, BorrowFeeOption, SuiClientOption, MarketOption, MarketsOption, ServiceOption } from './types.js'; import { Transaction } from '@mysten/sui/transactions'; /** * Enumeration of pool operations * * This enum defines the different types of operations that can be performed * on lending pools, used for health factor calculations and operation tracking. */ export declare enum PoolOperator { /** Supply/deposit operation */ Supply = 1, /** Withdraw operation */ Withdraw = 2, /** Borrow operation */ Borrow = 3, /** Repay operation */ Repay = 4 } /** * Fetches all available lending pools * * This function retrieves the complete list of lending pools from the Navi protocol API. * It's wrapped with caching and singleton behavior for efficient data access. * * @param options - Optional environment and caching options * @returns Promise - Array of all available lending pools */ export declare const getPools: (options?: Partial) => Promise; /** * Gets information for a specific lending pool * * This function retrieves pool information based on various identifier types: * - Pool object (returns directly) * - String (coin type - normalized for comparison) * - Number (pool ID) * * @param identifier - Asset identifier (string, Pool object, or number) * @param options - Optional environment options * @returns Promise - Pool information * @throws Error if pool is not found */ export declare function getPool(identifier: AssetIdentifier, options?: Partial): Promise; /** * Fetches protocol statistics * * This function retrieves overall protocol statistics including TVL, * total borrow amounts, and other key metrics. * * @param options - Optional caching options * @returns Promise - Protocol statistics */ export declare const getStats: (options?: Partial) => Promise; /** * Fetches protocol fee information * * This function retrieves detailed fee information including: * - Total fee value * - V3 borrow fees * - Borrow interest fees * - Flash loan and liquidation fees * * @param options - Optional caching options * @returns Promise with detailed fee breakdown */ export declare const getFees: (options?: Partial) => Promise<{ totalValue: number; v3BorrowFee: { totalValue: number; details: FeeDetail[]; }; borrowInterestFee: { totalValue: number; details: FeeDetail[]; }; flashloanAndLiquidationFee: { totalValue: number; details: FeeDetail[]; }; }>; /** * Builds a deposit transaction for a lending pool * * This function creates a transaction block for depositing coins into a lending pool. * It handles both regular deposits and deposits with account capabilities, * and includes special handling for SUI gas coins. * * @param tx - Transaction object to build * @param identifier - Asset identifier for the pool * @param coinObject - Coin object to deposit * @param options - Optional parameters including environment, account capability, and amount * @returns Promise - Transaction with deposit operation */ export declare function depositCoinPTB(tx: Transaction, identifier: AssetIdentifier, coinObject: CoinObject, options?: Partial): Promise; /** * Builds a withdraw transaction for a lending pool * * Constructs and adds withdrawal operations to a transaction object. * This function supports standard withdrawal and withdrawal using account capability. * * @param tx - The transaction builder to append operations to * @param identifier - Asset identifier for the pool * @param amount - Amount to withdraw * @param options - Optional parameters including environment and account capability * @returns Transaction result representing the withdrawn coins */ export declare function withdrawCoinPTB(tx: Transaction, identifier: AssetIdentifier, amount: number | TransactionResult, options?: Partial): Promise; export declare function borrowCoinPTB(tx: Transaction, identifier: AssetIdentifier, amount: number | TransactionResult, options?: Partial): Promise; /** * Builds a repay transaction for a lending pool debt * * Constructs and adds repayment operations to an existing transaction object. * This function handles loan repayments, supporting both standard user * repayments and privileged operations via account capabilities. * * * @param tx - The transaction builder to append repayment operations to * @param identifier - Unique identifier for the lending pool asset (e.g., "USDC", "SUI") * @param coinObject - The coin object to use for repayment, or GasCoin for SUI payments * @param options - Configuration options for the repayment * - `amount` - Specific amount to repay (required for SUI gas coin, otherwise uses value of specified coinObject) * - `accountCap` - Optional account capability object for privileged repayments * - `env` - Environment configuration * - `cacheTime` - Cache duration for configuration data * * @returns Promise - The modified transaction object with repayment operations added * * @throws {Error} When amount is not provided for SUI gas coin repayments * @throws Will throw if pool doesn't exist or repayment validation fails */ export declare function repayCoinPTB(tx: Transaction, identifier: AssetIdentifier, coinObject: CoinObject, options?: Partial): Promise; /** * Fetches the current borrow fee rate * * This function can retrieve borrow fee rates in two ways: * - If `address` and `asset` are provided, it calculates the specific borrow fee rate * for a given address and asset by calling the on-chain `get_borrow_fee_v2` function * - Otherwise, it returns the global borrow fee rate from the incentive V3 contract * * @param options - Optional configuration options * - `address` - User address to calculate specific borrow fee (requires `asset` to be set) * - `asset` - Asset identifier to calculate specific borrow fee (requires `address` to be set) * - `env` - Environment setting ('dev' or 'prod') * - `client` - Sui client instance for on-chain queries * - `cacheTime` - Cache expiration time in milliseconds * - `disableCache` - Whether to disable caching for this operation * @returns Promise - Borrow fee rate as a decimal number * - When `address` and `asset` are provided: returns the specific fee rate (divided by 10000) * - Otherwise: returns the global fee rate (divided by 100) */ export declare const getBorrowFee: (options?: Partial) => Promise; //# sourceMappingURL=pool.d.ts.map