import type { Address } from "viem"; import { type IMarket, Market } from "../market/index.js"; import type { BigIntish } from "../types.js"; import { AccrualPosition, type IAccrualPosition } from "./Position.js"; export interface IPreLiquidationParams { preLltv: BigIntish; preLCF1: BigIntish; preLCF2: BigIntish; preLIF1: BigIntish; preLIF2: BigIntish; preLiquidationOracle: Address; } export declare class PreLiquidationParams implements IPreLiquidationParams { readonly preLltv: bigint; readonly preLCF1: bigint; readonly preLCF2: bigint; readonly preLIF1: bigint; readonly preLIF2: bigint; readonly preLiquidationOracle: `0x${string}`; constructor({ preLltv, preLCF1, preLCF2, preLIF1, preLIF2, preLiquidationOracle, }: IPreLiquidationParams); getCloseFactor(quotient: BigIntish): bigint; getIncentiveFactor(quotient: BigIntish): bigint; } export interface IPreLiquidationPosition extends IAccrualPosition { /** * The pre-liquidation parameters of the associated PreLiquidation contract. */ preLiquidationParams: IPreLiquidationParams; /** * The address of the PreLiquidation contract this position is associated to. */ preLiquidation: Address; /** * The price of the collateral quoted in loan assets used by the PreLiquidation contract. * `undefined` if the oracle reverts. */ preLiquidationOraclePrice?: BigIntish; } export declare class PreLiquidationPosition extends AccrualPosition implements IPreLiquidationPosition { readonly preLiquidationParams: PreLiquidationParams; readonly preLiquidation: `0x${string}`; readonly preLiquidationOraclePrice?: bigint; protected readonly _baseMarket: Market; constructor({ preLiquidationParams, preLiquidation, preLiquidationOraclePrice, ...position }: IPreLiquidationPosition, market: IMarket); get market(): Market; protected get _lltv(): bigint; /** * @inheritdoc `undefined` if the pre-liquidation's oracle reverts. * `undefined` if it may be liquidatable on Morpho. */ get isHealthy(): boolean | undefined; /** * @inheritdoc `undefined` if the pre-liquidation's oracle reverts. */ get isLiquidatable(): boolean | undefined; /** * @inheritdoc `undefined` if the pre-liquidation's oracle reverts. */ get seizableCollateral(): bigint | undefined; }