The four legs of an adjustment, with ABSENCE preserved (MK-085).

Every field is optional and undefined means "no such leg", which is a different input from a leg of zero. previewAdjustTrove reads _isDebtIncrease from the PRESENCE of increaseDebt (packages/core/src/math/previewAdjust.ts, MK-060), mirroring the contract's separate _isDebtIncrease parameter, so a caller that fills an absent leg with 0n asks a question the caller did not mean.

interface AdjustPreviewLegs {
    addCollateral?: bigint;
    increaseDebt?: bigint;
    repayDebt?: bigint;
    withdrawCollateral?: bigint;
}

Properties

addCollateral?: bigint
increaseDebt?: bigint
repayDebt?: bigint
withdrawCollateral?: bigint