import type { LendingBorrowRequest, LendingDepositRequest, LendingHealth, LendingHealthQuoteRequest, LendingHealthRequest, LendingMarket, LendingPosition, LendingPositionRequest, LendingProvider, LendingProviderContext, LendingRepayRequest, LendingMaxBorrowRequest, LendingUserPosition, LendingUserPositionsRequest, LendingWithdrawMaxRequest, LendingWithdrawRequest, PreparedLendingAction } from "../../lending/interface.js"; import { type Address, type ChainId } from "../../types/index.js"; type VesuChain = "SN_MAIN" | "SN_SEPOLIA"; export interface VesuLendingProviderOptions { fetcher?: typeof fetch; chainConfigs?: Partial>; } export declare class VesuLendingProvider implements LendingProvider { readonly id = "vesu"; private readonly fetcher; private readonly chainConfigs; private readonly vTokenCache; constructor(options?: VesuLendingProviderOptions); supportsChain(chainId: ChainId): boolean; getMarkets(chainId: ChainId): Promise; prepareDeposit(context: LendingProviderContext, request: LendingDepositRequest): Promise; prepareWithdraw(context: LendingProviderContext, request: LendingWithdrawRequest): Promise; prepareWithdrawMax(context: LendingProviderContext, request: LendingWithdrawMaxRequest): Promise; prepareBorrow(context: LendingProviderContext, request: LendingBorrowRequest): Promise; prepareRepay(context: LendingProviderContext, request: LendingRepayRequest): Promise; getPosition(context: LendingProviderContext, request: LendingPositionRequest): Promise; getHealth(context: LendingProviderContext, request: LendingHealthRequest): Promise; quoteProjectedHealth(context: LendingProviderContext, request: LendingHealthQuoteRequest, current: LendingHealth): Promise; /** * Compute the collateral and debt deltas for a projected health quote. * Only supports "borrow" and "repay" actions. */ private computeHealthQuoteDeltas; /** * Given deltas and current health, resolve on-chain prices and compute * projected health values. */ private projectHealth; getPositions(context: LendingProviderContext, request: LendingUserPositionsRequest): Promise; /** * Parse a single API position entry into a domain object. * Returns `null` for entries with missing/invalid fields rather than throwing, * so a single malformed entry does not break the entire positions response. */ private toUserPosition; private parseUserPosition; getMaxBorrowAmount(context: LendingProviderContext, request: LendingMaxBorrowRequest): Promise; /** * Build calls to redeem a user's entire earn position (vToken → underlying) * so the proceeds can be used as collateral in a borrow. */ private buildEarnRedemptionCalls; /** * Read a user's earn position balance (underlying assets) from the vToken. * Returns the amount in the collateral token's base units. */ private readEarnBalance; private readAssetPrice; private readPairMaxLtv; private buildApproveCall; private buildModifyPositionCall; private marketFromRequest; private resolveVTokenAddress; private resolveVaultContext; private resolveWritablePositionContext; private resolveRequestContext; private resolvePoolAddress; private getChainConfig; private requireChainConfig; private isSupportedMarket; private toMarket; } export {}; //# sourceMappingURL=provider.d.ts.map