@curvefi/llamalend-api 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -469,6 +469,36 @@ market.loan.estimateGas.repay({ debt, address?, shrink? }) // params: { debt: T
469
469
  | forceUpdateUserState() | ✅ | ✅ | ✅ | ✅ | ✅ |
470
470
  | getCurrentLeverageParams() | ✅ | ✅ | ✅ | ✅ | ✅ |
471
471
 
472
+ ### `isSoftLiquidation` field in `userState` / `userStateBigInt`
473
+
474
+ The `userState` and `userStateBigInt` methods now include an `isSoftLiquidation` field in their return value.
475
+
476
+ **Updated return types:**
477
+
478
+ ```ts
479
+ // userState
480
+ market.userPosition.userState(address?: string): Promise<{
481
+ collateral: string,
482
+ borrowed: string,
483
+ debt: string,
484
+ N: string,
485
+ isSoftLiquidation: boolean,
486
+ }>
487
+
488
+ // userStateBigInt
489
+ market.userPosition.userStateBigInt(address?: string): Promise<{
490
+ _collateral: bigint,
491
+ _borrowed: bigint,
492
+ _debt: bigint,
493
+ _N: bigint,
494
+ isSoftLiquidation: boolean,
495
+ }>
496
+ ```
497
+
498
+ **Logic:** `isSoftLiquidation` is `true` when the user has an active loan (`debt > 0`) and the AMM has partially converted collateral into the borrowed token (`borrowed > 0`).
499
+
500
+ **Note:** Also applies to mint markets (`MintMarketTemplate`). In mint markets the field is returned by `userState` and is `true` when `stablecoin > 0` (the stablecoin amount reflects converted collateral in the AMM).
501
+
472
502
  ---
473
503
 
474
504
  ## Leverage Module (`market.leverage`)