import { type MarketId } from "@morpho-org/blue-sdk"; import type { SimulationState } from "@morpho-org/simulation-sdk"; import { type ReallocationComputeOptions, type VaultReallocation } from "../types"; /** * Computes vault reallocations for a borrow operation on a target market. * * Replicates the shared liquidity algorithm from `populateSubBundle` in * `@morpho-org/bundler-sdk-viem`. First attempts "friendly" reallocations * respecting withdrawal utilization targets, then falls back to aggressive * reallocations (100% withdrawal utilization) if liquidity is still insufficient. * * @param params.reallocationData - The simulation state containing market, vault, and position data. * @param params.marketId - The target market to reallocate liquidity into. * @param params.borrowAmount - The intended borrow amount (used to compute post-borrow utilization). * @param params.options - Optional reallocation computation options. * @returns Array of vault reallocations, sorted with withdrawals in ascending market id order. */ export declare const computeReallocations: ({ reallocationData: data, marketId, borrowAmount, options, }: { readonly reallocationData: SimulationState; readonly marketId: MarketId; readonly borrowAmount: bigint; readonly options?: ReallocationComputeOptions; }) => readonly VaultReallocation[];