@gearbox-protocol/sdk 16.0.0-next.37 → 16.0.0-next.39

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.
Files changed (36) hide show
  1. package/dist/cjs/model/liquidations.schema.js +1 -0
  2. package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +15 -1
  3. package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +1 -2
  4. package/dist/cjs/onchain/index.js +0 -3
  5. package/dist/cjs/onchain/market/credit/CreditSuite.js +68 -3
  6. package/dist/cjs/onchain/market/credit/index.js +0 -3
  7. package/dist/cjs/onchain/market/index.js +0 -3
  8. package/dist/cjs/onchain/positions/PositionsService.js +4 -8
  9. package/dist/cjs/preview/preview/buildDelayedStrategyPositionOperationPreview.js +7 -2
  10. package/dist/cjs/preview/preview/previewAdjustStrategyPosition.js +3 -0
  11. package/dist/cjs/preview/preview/previewExitOrRepayStrategyPosition.js +8 -3
  12. package/dist/cjs/preview/preview/previewOperation.js +4 -3
  13. package/dist/cjs/preview/preview/previewPoolPositionOperation.js +1 -0
  14. package/dist/esm/model/liquidations.schema.js +2 -1
  15. package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +15 -1
  16. package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +1 -2
  17. package/dist/esm/onchain/index.js +1 -2
  18. package/dist/esm/onchain/market/credit/CreditSuite.js +69 -4
  19. package/dist/esm/onchain/market/credit/index.js +1 -2
  20. package/dist/esm/onchain/market/index.js +1 -2
  21. package/dist/esm/onchain/positions/PositionsService.js +4 -8
  22. package/dist/esm/preview/preview/buildDelayedStrategyPositionOperationPreview.js +7 -2
  23. package/dist/esm/preview/preview/previewAdjustStrategyPosition.js +3 -0
  24. package/dist/esm/preview/preview/previewExitOrRepayStrategyPosition.js +8 -3
  25. package/dist/esm/preview/preview/previewOperation.js +4 -3
  26. package/dist/esm/preview/preview/previewPoolPositionOperation.js +1 -0
  27. package/dist/types/model/liquidations.schema.d.ts +18 -0
  28. package/dist/types/model/previews.d.ts +38 -2
  29. package/dist/types/onchain/index.d.ts +1 -2
  30. package/dist/types/onchain/market/credit/CreditSuite.d.ts +48 -1
  31. package/dist/types/onchain/market/credit/index.d.ts +1 -2
  32. package/dist/types/onchain/market/index.d.ts +1 -2
  33. package/package.json +1 -1
  34. package/dist/cjs/onchain/market/credit/creditOperationMarket.js +0 -36
  35. package/dist/esm/onchain/market/credit/creditOperationMarket.js +0 -34
  36. package/dist/types/onchain/market/credit/creditOperationMarket.d.ts +0 -27
@@ -1,6 +1,6 @@
1
1
  import { AddressMap } from "../../utils/AddressMap.js";
2
2
  import { BigIntMath } from "../../utils/bigint-math.js";
3
- import { getLegacyStrategyTarget, isSunsetStrategy } from "../../chain/chains.js";
3
+ import { getAccountTargetCollateral, getLegacyStrategyTarget, isSunsetStrategy } from "../../chain/chains.js";
4
4
  import { PERCENTAGE_FACTOR, RAY } from "../../constants/math.js";
5
5
  import "../../constants/index.js";
6
6
  import "../../utils/index.js";
@@ -85,6 +85,16 @@ var CreditSuite = class extends SDKConstruct {
85
85
  return this.creditManager.underlying;
86
86
  }
87
87
  /**
88
+ * Pool underlying token as the shared read model describes it.
89
+ *
90
+ * For RWA markets this is the unwrapped asset, e.g. USDC rather than
91
+ * dcUSDC (the pool's on-chain underlying). Same as
92
+ * {@link MarketSuite.underlyingToken}.
93
+ */
94
+ get underlyingToken() {
95
+ return this.market.underlyingToken;
96
+ }
97
+ /**
88
98
  * Parent market that contains this credit manager
89
99
  */
90
100
  get market() {
@@ -171,6 +181,37 @@ var CreditSuite = class extends SDKConstruct {
171
181
  };
172
182
  }
173
183
  /**
184
+ * What a liquidation takes off an account, in basis points: the premium the
185
+ * liquidator keeps plus the protocol's own fee, with the suite's expiration
186
+ * already resolved.
187
+ *
188
+ * Not {@link LiquidationFees.liquidationDiscount}, which is the complement of
189
+ * the premium alone (`100% - liquidationPremium`) and says what share of the
190
+ * seized collateral repays the debt.
191
+ */
192
+ totalLiquidationDiscount() {
193
+ const { feeLiquidation, liquidationDiscount } = this.liquidationFees();
194
+ return Number(PERCENTAGE_FACTOR) - liquidationDiscount + feeLiquidation;
195
+ }
196
+ /**
197
+ * The market half of every credit operation result, read off this suite: a
198
+ * preview, a projection, the open-strategy walk and a liquidatable-account
199
+ * row all spread it, so the five fields are filled in one place and cannot
200
+ * drift apart between the halves of the SDK.
201
+ *
202
+ * The curator comes from the same getter {@link strategyOpportunity} reads, so
203
+ * a result and the opportunity beside it name one entity.
204
+ */
205
+ creditOperationMarket() {
206
+ return {
207
+ creditManager: this.creditManager.address,
208
+ name: this.strategyName ?? this.underlyingToken.symbol,
209
+ underlyingToken: this.underlyingToken,
210
+ curator: this.market.curator,
211
+ liquidationDiscount: this.totalLiquidationDiscount()
212
+ };
213
+ }
214
+ /**
174
215
  * Whether this suite can be used right now. A paused pool blocks borrowing,
175
216
  * so the suite is unusable even when its own facade is live.
176
217
  */
@@ -221,7 +262,31 @@ var CreditSuite = class extends SDKConstruct {
221
262
  get strategyName() {
222
263
  const collateral = this.strategyTargetCollateral;
223
264
  if (!collateral) return;
224
- return strategyName(this.tokensMeta.mustGetToken(collateral), this.market.underlyingToken);
265
+ return strategyName(this.tokensMeta.mustGetToken(collateral), this.underlyingToken);
266
+ }
267
+ /**
268
+ * Collateral token an existing credit account in this suite is a strategy
269
+ * in. Same as {@link StrategyPosition.targetCollateral}.
270
+ *
271
+ * Resolution, in order:
272
+ * 1. a hardcoded per-account override, when present;
273
+ * 2. {@link strategyTargetCollateral};
274
+ * 3. `null` when neither can be resolved.
275
+ */
276
+ accountTargetCollateral(creditAccount) {
277
+ const addr = getAccountTargetCollateral(creditAccount, this.chainId) ?? this.strategyTargetCollateral;
278
+ return addr ? this.tokensMeta.mustGetToken(addr) : null;
279
+ }
280
+ /**
281
+ * Display name of an existing credit account in this suite, e.g.
282
+ * `"wstETH / WETH"`. Same as {@link StrategyPosition.name}.
283
+ *
284
+ * {@link accountTargetCollateral} over the underlying, or the underlying
285
+ * symbol when no target can be resolved.
286
+ */
287
+ accountStrategyName(creditAccount) {
288
+ const target = this.accountTargetCollateral(creditAccount);
289
+ return target ? strategyName(target, this.underlyingToken) : this.underlyingToken.symbol;
225
290
  }
226
291
  /**
227
292
  * Describes this suite's leveraged strategy as the shared read model does,
@@ -244,9 +309,9 @@ var CreditSuite = class extends SDKConstruct {
244
309
  chainId: this.chainId,
245
310
  creditManager: cm.address,
246
311
  targetCollateral: this.tokensMeta.mustGetToken(collateral),
247
- name: this.strategyName ?? this.market.underlyingToken.symbol,
312
+ name: this.strategyName ?? this.underlyingToken.symbol,
248
313
  curator: market.curator,
249
- underlyingToken: market.underlyingToken,
314
+ underlyingToken: this.underlyingToken,
250
315
  totalBorrowed: oracle.toAmount(pool.underlying, borrowed),
251
316
  allowedDepositTokens: this.#allowedDepositTokens(collateral),
252
317
  paused: this.isPaused,
@@ -4,7 +4,6 @@ import { CreditFacadeV310Contract } from "./CreditFacadeV310Contract.js";
4
4
  import { CreditManagerV310Contract } from "./CreditManagerV310Contract.js";
5
5
  import { dominantCollateral, isStrategyCollateral, pickStrategyTargetCollateral } from "./collateralUtils.js";
6
6
  import { CreditSuite } from "./CreditSuite.js";
7
- import { creditOperationMarket, totalLiquidationDiscount } from "./creditOperationMarket.js";
8
7
  import { expectedBalanceDeltas } from "./expectedBalanceDeltas.js";
9
8
  import "./types.js";
10
- export { CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, abi as creditFacadeV310Abi, creditOperationMarket, dominantCollateral, expectedBalanceDeltas, isStrategyCollateral, pickStrategyTargetCollateral, totalLiquidationDiscount };
9
+ export { CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, abi as creditFacadeV310Abi, dominantCollateral, expectedBalanceDeltas, isStrategyCollateral, pickStrategyTargetCollateral };
@@ -92,7 +92,6 @@ import { CreditManagerV310Contract } from "./credit/CreditManagerV310Contract.js
92
92
  import { strategyName } from "./strategyName.js";
93
93
  import { dominantCollateral, isStrategyCollateral, pickStrategyTargetCollateral } from "./credit/collateralUtils.js";
94
94
  import { CreditSuite } from "./credit/CreditSuite.js";
95
- import { creditOperationMarket, totalLiquidationDiscount } from "./credit/creditOperationMarket.js";
96
95
  import { expectedBalanceDeltas } from "./credit/expectedBalanceDeltas.js";
97
96
  import "./credit/index.js";
98
97
  import { collateralPriceInUnderlying } from "./oracle/collateralPriceInUnderlying.js";
@@ -146,4 +145,4 @@ import { RWARegistry } from "./rwa/RWARegistry.js";
146
145
  import { RWA_FACTORY_TYPES, isRWAFactory } from "./rwa/types.js";
147
146
  import "./rwa/index.js";
148
147
  import "./types.js";
149
- export { AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterType, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CamelotV3AdapterContract, CompositePriceFeedContract, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LidoV1AdapterContract, LinearInterestRateModelContract, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, TraderJoePoolVersion, TraderJoeRouterAdapterContract, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnsupportedZapperFunctionError, UpshiftVaultAdapterContract, VelodromeV2RouterAdapterContract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, creditOperationMarket, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fetchRedstonePayloads, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, totalLiquidationDiscount, usdToNumber };
148
+ export { AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterType, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CamelotV3AdapterContract, CompositePriceFeedContract, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LidoV1AdapterContract, LinearInterestRateModelContract, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, TraderJoePoolVersion, TraderJoeRouterAdapterContract, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnsupportedZapperFunctionError, UpshiftVaultAdapterContract, VelodromeV2RouterAdapterContract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fetchRedstonePayloads, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, usdToNumber };
@@ -1,13 +1,10 @@
1
1
  import { AddressMap } from "../utils/AddressMap.js";
2
- import { getAccountTargetCollateral } from "../chain/chains.js";
3
2
  import "../constants/math.js";
4
3
  import "../constants/index.js";
5
4
  import "../utils/index.js";
6
5
  import { SDKConstruct } from "../base/SDKConstruct.js";
7
6
  import "../base/index.js";
8
7
  import { bpsToRay, calcBorrowApy, calcPositionLeverage, healthFactorBps, usdToNumber } from "../market/math.js";
9
- import { strategyName } from "../market/strategyName.js";
10
- import { creditOperationMarket } from "../market/credit/creditOperationMarket.js";
11
8
  import { isFilterSet } from "../../model/filters.js";
12
9
  import { STRATEGY_POSITION_COLLATERAL_ERROR, matchesPositionFilter } from "../../model/positions.js";
13
10
  import "../../model/index.js";
@@ -263,7 +260,7 @@ var PositionsService = class extends SDKConstruct {
263
260
  const market = this.sdk.marketRegister.findByCreditManager(creditManager);
264
261
  const { priceOracle } = market;
265
262
  return {
266
- ...creditOperationMarket(this.sdk.marketRegister.findCreditManager(creditManager)),
263
+ ...this.sdk.marketRegister.findCreditManager(creditManager).creditOperationMarket(),
267
264
  totalValue: market.toUnderlyingAmount(totalValue),
268
265
  totalDebt: market.toUnderlyingAmount(totalDebt),
269
266
  netValue: market.toUnderlyingAmount(totalValue - totalDebt),
@@ -286,9 +283,8 @@ var PositionsService = class extends SDKConstruct {
286
283
  const { market } = suite;
287
284
  const { priceOracle } = market;
288
285
  const { pool } = market.pool;
289
- const token = market.underlyingToken;
286
+ const token = suite.underlyingToken;
290
287
  const totalDebtValue = ca.debt + ca.accruedInterest + ca.accruedFees;
291
- const target = getAccountTargetCollateral(ca.creditAccount, this.sdk.chainId) ?? suite.strategyTargetCollateral;
292
288
  const priceFailed = !ca.success;
293
289
  const recomputeTotals = ca.debt === 0n || priceFailed;
294
290
  const collaterals = [];
@@ -322,8 +318,8 @@ var PositionsService = class extends SDKConstruct {
322
318
  creditManager: ca.creditManager,
323
319
  creditAccount: ca.creditAccount,
324
320
  underlyingToken: token,
325
- name: target ? strategyName(this.sdk.tokensMeta.mustGetToken(target), token) : token.symbol,
326
- targetCollateral: target ? this.sdk.tokensMeta.mustGetToken(target) : null,
321
+ name: suite.accountStrategyName(ca.creditAccount),
322
+ targetCollateral: suite.accountTargetCollateral(ca.creditAccount),
327
323
  leverage: calcPositionLeverage(totalValue, totalDebtValue),
328
324
  borrowApy: calcBorrowApy(pool.baseInterestRate, suite.creditManager.feeInterest),
329
325
  totalDebt: {
@@ -1,7 +1,6 @@
1
1
  import { AssetsMap } from "../../onchain/utils/AssetsMap.js";
2
2
  import { BigIntMath } from "../../onchain/utils/bigint-math.js";
3
3
  import { DUST_THRESHOLD } from "../../onchain/constants/math.js";
4
- import { creditOperationMarket } from "../../onchain/market/credit/creditOperationMarket.js";
5
4
  import { ERROR_UNPRICEABLE_TOKEN, asEstimated } from "../../model/previews.js";
6
5
  import "../../model/index.js";
7
6
  import "../../onchain/index.js";
@@ -163,11 +162,14 @@ function totalValueInUnderlying(post, convert, dust) {
163
162
  function buildClosePreview(post, converter, receivedToken, sdk) {
164
163
  const totalValue = totalValueInUnderlying(post, converter.convert, 0n);
165
164
  const oracle = sdk.marketRegister.findByCreditManager(post.creditManager).priceOracle;
165
+ const suite = sdk.marketRegister.findCreditManager(post.creditManager);
166
166
  return {
167
167
  operation: "CloseCreditAccount",
168
168
  permanent: false,
169
- ...creditOperationMarket(sdk.marketRegister.findCreditManager(post.creditManager)),
169
+ ...suite.creditOperationMarket(),
170
170
  creditAccount: post.creditAccount,
171
+ name: suite.accountStrategyName(post.creditAccount),
172
+ targetCollateral: suite.accountTargetCollateral(post.creditAccount),
171
173
  receivedAmount: oracle.toTokenAmount(receivedToken, BigIntMath.max(totalValue - post.totalDebt, 0n)),
172
174
  error: converter.error
173
175
  };
@@ -175,11 +177,14 @@ function buildClosePreview(post, converter, receivedToken, sdk) {
175
177
  function buildAdjustPreview(post, before, collateralWithdrawn, converter, sdk) {
176
178
  const snap = post.toSnapshot(totalValueInUnderlying(post, converter.convert, DUST_THRESHOLD));
177
179
  const market = sdk.marketRegister.findByCreditManager(post.creditManager);
180
+ const suite = sdk.marketRegister.findCreditManager(post.creditManager);
178
181
  const oracle = market.priceOracle;
179
182
  return {
180
183
  operation: "AdjustCreditAccount",
181
184
  ...asEstimated(sdk.positions.projection(snap, { availableLiquidityChange: before.totalDebt - post.totalDebt })),
182
185
  creditAccount: post.creditAccount,
186
+ name: suite.accountStrategyName(post.creditAccount),
187
+ targetCollateral: suite.accountTargetCollateral(post.creditAccount),
183
188
  collateralAdded: [],
184
189
  collateralWithdrawn: collateralWithdrawn.toAssets().map((a) => oracle.toTokenAmount(a.token, a.balance)),
185
190
  totalDebtChange: market.toUnderlyingAmount(post.totalDebt - before.totalDebt),
@@ -16,6 +16,7 @@ import { unwrapNativeCollateral } from "./unwrapNativeCollateral.js";
16
16
  function previewAdjustStrategyPosition(input, operation, options) {
17
17
  const { sdk, value = 0n } = input;
18
18
  const market = sdk.marketRegister.findByCreditManager(operation.creditManager);
19
+ const suite = sdk.marketRegister.findCreditManager(operation.creditManager);
19
20
  const oracle = market.priceOracle;
20
21
  const { before, after, error: replayError } = replayMulticall(sdk, operation, options);
21
22
  const account = after.account;
@@ -39,6 +40,8 @@ function previewAdjustStrategyPosition(input, operation, options) {
39
40
  operation: "AdjustCreditAccount",
40
41
  ...asEstimated(sdk.positions.projection(snap, { availableLiquidityChange: before.totalDebt - account.totalDebt })),
41
42
  creditAccount: operation.creditAccount,
43
+ name: suite.accountStrategyName(operation.creditAccount),
44
+ targetCollateral: suite.accountTargetCollateral(operation.creditAccount),
42
45
  collateralAdded: collateralAdded.map((a) => oracle.toTokenAmount(a.token, a.balance)),
43
46
  collateralWithdrawn: after.collateralWithdrawn.toAssets().map((a) => oracle.toTokenAmount(a.token, a.balance)),
44
47
  totalDebtChange: market.toUnderlyingAmount(account.totalDebt - before.totalDebt),
@@ -1,6 +1,5 @@
1
1
  import { AP_WETH_TOKEN } from "../../onchain/constants/address-provider.js";
2
2
  import "../../onchain/constants/math.js";
3
- import { creditOperationMarket } from "../../onchain/market/credit/creditOperationMarket.js";
4
3
  import "../../onchain/index.js";
5
4
  import { classifyCloseOrRepay } from "./detectCloseOrRepay.js";
6
5
  import { replayMulticall } from "./replayMulticall.js";
@@ -24,6 +23,7 @@ function previewCloseCreditAccount(input, operation, permanent, replay) {
24
23
  const { sdk } = input;
25
24
  const market = sdk.marketRegister.findByCreditManager(operation.creditManager);
26
25
  const { after, error } = replay;
26
+ const suite = sdk.marketRegister.findCreditManager(operation.creditManager);
27
27
  let receivedToken = market.underlying;
28
28
  for (const m of operation.multicall) if (m.operation === "WithdrawCollateral" && m.amount === 115792089237316195423570985008687907853269984665640564039457584007913129639935n) {
29
29
  receivedToken = m.token;
@@ -32,8 +32,10 @@ function previewCloseCreditAccount(input, operation, permanent, replay) {
32
32
  return {
33
33
  operation: "CloseCreditAccount",
34
34
  permanent,
35
- ...creditOperationMarket(sdk.marketRegister.findCreditManager(operation.creditManager)),
35
+ ...suite.creditOperationMarket(),
36
36
  creditAccount: operation.creditAccount,
37
+ name: suite.accountStrategyName(operation.creditAccount),
38
+ targetCollateral: suite.accountTargetCollateral(operation.creditAccount),
37
39
  receivedAmount: market.priceOracle.toTokenAmount(receivedToken, after.collateralWithdrawn.getOrZero(receivedToken)),
38
40
  error
39
41
  };
@@ -49,11 +51,14 @@ function previewRepayCreditAccount(input, operation, permanent, replay) {
49
51
  const { before, after, error: replayError } = replay;
50
52
  const { assets: collateralAdded, error: unwrapError } = unwrapNativeCollateral(after.collateralAdded.toAssets(), value, sdk.addressProvider.getAddress(AP_WETH_TOKEN, 0));
51
53
  const error = replayError ?? unwrapError;
54
+ const suite = sdk.marketRegister.findCreditManager(operation.creditManager);
52
55
  return {
53
56
  operation: "RepayCreditAccount",
54
57
  permanent,
55
- ...creditOperationMarket(sdk.marketRegister.findCreditManager(operation.creditManager)),
58
+ ...suite.creditOperationMarket(),
56
59
  creditAccount: operation.creditAccount,
60
+ name: suite.accountStrategyName(operation.creditAccount),
61
+ targetCollateral: suite.accountTargetCollateral(operation.creditAccount),
57
62
  collateralAdded: collateralAdded.map((a) => market.priceOracle.toTokenAmount(a.token, a.balance)),
58
63
  debtRepaid: market.toUnderlyingAmount(before.totalDebt - after.account.totalDebt),
59
64
  collateralWithdrawn: after.collateralWithdrawn.toAssets().map((a) => market.priceOracle.toTokenAmount(a.token, a.balance)),
@@ -1,5 +1,3 @@
1
- import { creditOperationMarket } from "../../onchain/market/credit/creditOperationMarket.js";
2
- import "../../onchain/index.js";
3
1
  import { parseOperationCalldata } from "../parse/parseOperationCalldata.js";
4
2
  import { isPoolOperation } from "../parse/types.js";
5
3
  import "../parse/index.js";
@@ -66,10 +64,13 @@ async function previewMulticallOperation(input, operation, options) {
66
64
  const convert = (token, to, amount) => market.priceOracle.convert(token, to, amount);
67
65
  const meta = sdk.tokensMeta.get(market.underlying);
68
66
  const receivedToken = meta && sdk.tokensMeta.isRWAUnderlying(meta) ? meta.asset : market.underlying;
67
+ const suite = sdk.marketRegister.findCreditManager(operation.creditManager);
69
68
  return {
70
69
  operation: "DelayedCreditAccountOperation",
71
70
  creditAccount: operation.creditAccount,
72
- ...creditOperationMarket(sdk.marketRegister.findCreditManager(operation.creditManager)),
71
+ ...suite.creditOperationMarket(),
72
+ name: suite.accountStrategyName(operation.creditAccount),
73
+ targetCollateral: suite.accountTargetCollateral(operation.creditAccount),
73
74
  intent: delayed.intent,
74
75
  estClaimableAt: estimateClaimableAt(sdk, delayed.request.phantomToken),
75
76
  instantPreview,
@@ -15,6 +15,7 @@ async function previewPoolPositionOperation(input, operation, options) {
15
15
  operation: operation.operation,
16
16
  pool: operation.pool,
17
17
  name: sdk.tokensMeta.mustGetToken(operation.pool).name,
18
+ underlyingToken: market.underlyingToken,
18
19
  shareRate: market.pool.pool.dieselRate,
19
20
  tokenIn: market.priceOracle.toTokenAmount(tokenIn, sim.amountIn),
20
21
  tokenOut: market.priceOracle.toTokenAmount(tokenOut, sim.amountOut)
@@ -20,6 +20,15 @@ declare const liquidatableAccountFilterSchema: z.ZodObject<{
20
20
  declare const liquidatableAccountSchema: z.ZodObject<{
21
21
  creditManager: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
22
22
  name: z.ZodString;
23
+ underlyingToken: z.ZodObject<{
24
+ chainId: z.ZodNumber;
25
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
26
+ symbol: z.ZodString;
27
+ name: z.ZodString;
28
+ decimals: z.ZodNumber;
29
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
30
+ wrappedAddress: z.ZodNullable<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
31
+ }, z.core.$strip>;
23
32
  curator: z.ZodObject<{
24
33
  address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
25
34
  name: z.ZodOptional<z.ZodEnum<{
@@ -212,6 +221,15 @@ declare const liquidationPositionSchema: z.ZodObject<{
212
221
  declare const liquidationDetailsSchema: z.ZodObject<{
213
222
  creditManager: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
214
223
  name: z.ZodString;
224
+ underlyingToken: z.ZodObject<{
225
+ chainId: z.ZodNumber;
226
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
227
+ symbol: z.ZodString;
228
+ name: z.ZodString;
229
+ decimals: z.ZodNumber;
230
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
231
+ wrappedAddress: z.ZodNullable<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
232
+ }, z.core.$strip>;
215
233
  curator: z.ZodObject<{
216
234
  address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
217
235
  name: z.ZodOptional<z.ZodEnum<{
@@ -1,4 +1,4 @@
1
- import { Bps, ChainId, Leverage, Timestamp, TokenAmount } from "./primitives.js";
1
+ import { Bps, ChainId, Leverage, Timestamp, Token, TokenAmount, UnderlyingToken } from "./primitives.js";
2
2
  import { Curator } from "./curators.js";
3
3
  import { DelayedIntent } from "./delayed-intents.js";
4
4
  import { BorrowRateBreakdown } from "./positions.js";
@@ -112,6 +112,13 @@ interface PoolPositionOperationPreview {
112
112
  * Human-readable pool name
113
113
  */
114
114
  name: string;
115
+ /**
116
+ * Pool underlying token.
117
+ *
118
+ * For RWA markets this is the unwrapped asset, e.g. USDC rather than
119
+ * dcUSDC (the pool's on-chain underlying). Same as {@link PoolPosition.underlyingToken}.
120
+ */
121
+ underlyingToken: UnderlyingToken;
115
122
  /**
116
123
  * Token that goes from user to pool
117
124
  * In case of deposit, underlying for direct deposit, zapper input for zapper-routed deposit
@@ -157,9 +164,18 @@ interface CreditOperationMarket {
157
164
  */
158
165
  creditManager: Address;
159
166
  /**
160
- * Human-readable credit manager name.
167
+ * Human-readable strategy name, e.g. `"wstETH / WETH"`. Same as
168
+ * {@link StrategyPosition.name}
161
169
  */
162
170
  name: string;
171
+ /**
172
+ * Pool underlying token.
173
+ *
174
+ * For RWA markets this is the unwrapped asset, e.g. USDC rather than
175
+ * dcUSDC (the pool's on-chain underlying). Same as
176
+ * {@link StrategyPosition.underlyingToken}.
177
+ */
178
+ underlyingToken: UnderlyingToken;
163
179
  /**
164
180
  * Curator of the market {@link creditManager} belongs to, in the same shape
165
181
  * {@link StrategyOpportunity} reports it: the market configurator's address,
@@ -403,6 +419,11 @@ interface AdjustStrategyPositionPreview extends EstimatedProjection, AccountStat
403
419
  * Credit account that is being adjusted
404
420
  */
405
421
  creditAccount: Address;
422
+ /**
423
+ * Collateral token this position is a strategy in. Same as
424
+ * {@link StrategyPosition.targetCollateral}
425
+ */
426
+ targetCollateral: Token | null;
406
427
  /**
407
428
  * Tokens that were added as collateral during account opening.
408
429
  *
@@ -448,6 +469,11 @@ interface ExitStrategyPositionPreview extends CreditOperationMarket {
448
469
  * Credit account that is being closed
449
470
  */
450
471
  creditAccount: Address;
472
+ /**
473
+ * Collateral token this position is a strategy in. Same as
474
+ * {@link StrategyPosition.targetCollateral}
475
+ */
476
+ targetCollateral: Token | null;
451
477
  /**
452
478
  * Token withdrawn to the user and its minimal guaranteed amount, from the
453
479
  * multicall replay (all collateral is swapped into the received token
@@ -488,6 +514,11 @@ interface RepayStrategyPositionPreview extends CreditOperationMarket {
488
514
  * Credit account that is being repaid
489
515
  */
490
516
  creditAccount: Address;
517
+ /**
518
+ * Collateral token this position is a strategy in. Same as
519
+ * {@link StrategyPosition.targetCollateral}
520
+ */
521
+ targetCollateral: Token | null;
491
522
  /**
492
523
  * Tokens added from the wallet to cover the debt (`addCollateral` calls).
493
524
  *
@@ -539,6 +570,11 @@ interface DelayedStrategyPositionOperationPreview extends CreditOperationMarket
539
570
  * Credit account the operation is performed on
540
571
  */
541
572
  creditAccount: Address;
573
+ /**
574
+ * Collateral token this position is a strategy in. Same as
575
+ * {@link StrategyPosition.targetCollateral}
576
+ */
577
+ targetCollateral: Token | null;
542
578
  /**
543
579
  * Decoded from the withdrawal request's extraData; undefined when the
544
580
  * request carries no intent (e.g. Mellow)
@@ -174,7 +174,6 @@ import { PoolV310Contract } from "./market/pool/PoolV310Contract.js";
174
174
  import { MarketSuite } from "./market/MarketSuite.js";
175
175
  import { CreditSuite } from "./market/credit/CreditSuite.js";
176
176
  import { StrategyCollateralProps, dominantCollateral, isStrategyCollateral, pickStrategyTargetCollateral } from "./market/credit/collateralUtils.js";
177
- import { creditOperationMarket, totalLiquidationDiscount } from "./market/credit/creditOperationMarket.js";
178
177
  import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./market/credit/expectedBalanceDeltas.js";
179
178
  import { CompressorZapperData, ZapperData } from "./market/types.js";
180
179
  import { IZapperContract, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem } from "./market/zapper/types.js";
@@ -274,4 +273,4 @@ import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./opti
274
273
  import { MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_SAFE_HEALTH_FACTOR_FORM, amountOf, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, isMalformedPreviewError } from "./validation/checks.js";
275
274
  import { toToken, toTokenAmount } from "./validation/token.js";
276
275
  import "./validation/index.js";
277
- export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountMigratorAdapterContract, AccountSnapshot, AccountToCheck, AdapterContractStateHuman, AdapterContractType, AdapterData, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetWithAmountInTarget, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BasicSwapCall, BigIntMath, type BlockNumberProps, BorrowLimitBinding, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcDefaultQuotaProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, CallTrace, CamelotPool, CamelotV3AdapterContract, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DaiUsdsAdapterContract, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawalClaim, DelayedWithdrawalRequest, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, FluidDexAdapterContract, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, GetExternalAccountCurrentWithdrawalsProps, GetInvestorOptions, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetReward, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMultichainOpportunitiesService, IMultichainPositionsService, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, type InstantRoute, IntentPreviewError, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LegacyAdapterOperation, type LeverageBand, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MakerDeposit, MakerRedeem, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, Methods, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OpenStrategyState, type OperationState, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, type PathLossRate, PendingWithdrawal, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewRefusal, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, ProjectedPoolOptions, PythPriceFeed, QuotaKeeperState, QuotaMode, type QuotaParamsHuman, QuotaSlice, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedemptionPhantomRename, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOnRampAdapterContract, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StakingRewardsAdapterContract, type StartIntent, StrategyCollateralProps, StrategyRateInputs, SupportedValue, Swap, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenAmount, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, type TumblerStateHuman, TypedObjectUtils, Unarray, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VERSION_RANGE_310, VaultDeposit, VelodromeV2RouterAdapterContract, VersionRange, VersionedAbi, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, WithdrawCollateral, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, borrowable, botPermissionsToString, bpsToRay, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, creditOperationMarket, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isDust, isLPPriceFeed, isMalformedPreviewError, isPhantomToken, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, percentFmt, pickStrategyTargetCollateral, raise, rayToBps, rayToNumber, refuse, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, totalLiquidationDiscount, usdToNumber, watchBlocksAsync };
276
+ export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountMigratorAdapterContract, AccountSnapshot, AccountToCheck, AdapterContractStateHuman, AdapterContractType, AdapterData, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetWithAmountInTarget, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BasicSwapCall, BigIntMath, type BlockNumberProps, BorrowLimitBinding, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcDefaultQuotaProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, CallTrace, CamelotPool, CamelotV3AdapterContract, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DaiUsdsAdapterContract, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawalClaim, DelayedWithdrawalRequest, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, FluidDexAdapterContract, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, GetExternalAccountCurrentWithdrawalsProps, GetInvestorOptions, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetReward, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMultichainOpportunitiesService, IMultichainPositionsService, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, type InstantRoute, IntentPreviewError, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LegacyAdapterOperation, type LeverageBand, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MakerDeposit, MakerRedeem, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, Methods, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OpenStrategyState, type OperationState, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, type PathLossRate, PendingWithdrawal, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewRefusal, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, ProjectedPoolOptions, PythPriceFeed, QuotaKeeperState, QuotaMode, type QuotaParamsHuman, QuotaSlice, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedemptionPhantomRename, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOnRampAdapterContract, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StakingRewardsAdapterContract, type StartIntent, StrategyCollateralProps, StrategyRateInputs, SupportedValue, Swap, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenAmount, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, type TumblerStateHuman, TypedObjectUtils, Unarray, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VERSION_RANGE_310, VaultDeposit, VelodromeV2RouterAdapterContract, VersionRange, VersionedAbi, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, WithdrawCollateral, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, borrowable, botPermissionsToString, bpsToRay, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isDust, isLPPriceFeed, isMalformedPreviewError, isPhantomToken, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, percentFmt, pickStrategyTargetCollateral, raise, rayToBps, rayToNumber, refuse, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
@@ -1,5 +1,6 @@
1
- import { Timestamp } from "../../../model/primitives.js";
1
+ import { Bps, Timestamp, Token, UnderlyingToken } from "../../../model/primitives.js";
2
2
  import { StrategyOpportunity, StrategyOpportunityDetail } from "../../../model/opportunities.js";
3
+ import { CreditOperationMarket } from "../../../model/previews.js";
3
4
  import "../../../model/index.js";
4
5
  import { CreditAccountData, CreditSuiteState } from "../../base/types.js";
5
6
  import { IRWAFactory, RWAOperationArgs } from "../rwa/types.js";
@@ -71,6 +72,14 @@ declare class CreditSuite extends SDKConstruct {
71
72
  * Token borrowed from the pool and used as the account debt asset.
72
73
  */
73
74
  get underlying(): Address;
75
+ /**
76
+ * Pool underlying token as the shared read model describes it.
77
+ *
78
+ * For RWA markets this is the unwrapped asset, e.g. USDC rather than
79
+ * dcUSDC (the pool's on-chain underlying). Same as
80
+ * {@link MarketSuite.underlyingToken}.
81
+ */
82
+ get underlyingToken(): UnderlyingToken;
74
83
  /**
75
84
  * Parent market that contains this credit manager
76
85
  */
@@ -129,6 +138,26 @@ declare class CreditSuite extends SDKConstruct {
129
138
  * for both.
130
139
  */
131
140
  liquidationFees(): LiquidationFees;
141
+ /**
142
+ * What a liquidation takes off an account, in basis points: the premium the
143
+ * liquidator keeps plus the protocol's own fee, with the suite's expiration
144
+ * already resolved.
145
+ *
146
+ * Not {@link LiquidationFees.liquidationDiscount}, which is the complement of
147
+ * the premium alone (`100% - liquidationPremium`) and says what share of the
148
+ * seized collateral repays the debt.
149
+ */
150
+ totalLiquidationDiscount(): Bps;
151
+ /**
152
+ * The market half of every credit operation result, read off this suite: a
153
+ * preview, a projection, the open-strategy walk and a liquidatable-account
154
+ * row all spread it, so the five fields are filled in one place and cannot
155
+ * drift apart between the halves of the SDK.
156
+ *
157
+ * The curator comes from the same getter {@link strategyOpportunity} reads, so
158
+ * a result and the opportunity beside it name one entity.
159
+ */
160
+ creditOperationMarket(): CreditOperationMarket;
132
161
  /**
133
162
  * Whether this suite can be used right now. A paused pool blocks borrowing,
134
163
  * so the suite is unusable even when its own facade is live.
@@ -164,6 +193,24 @@ declare class CreditSuite extends SDKConstruct {
164
193
  * or `undefined` when {@link strategyTargetCollateral} cannot be resolved.
165
194
  */
166
195
  get strategyName(): string | undefined;
196
+ /**
197
+ * Collateral token an existing credit account in this suite is a strategy
198
+ * in. Same as {@link StrategyPosition.targetCollateral}.
199
+ *
200
+ * Resolution, in order:
201
+ * 1. a hardcoded per-account override, when present;
202
+ * 2. {@link strategyTargetCollateral};
203
+ * 3. `null` when neither can be resolved.
204
+ */
205
+ accountTargetCollateral(creditAccount: Address): Token | null;
206
+ /**
207
+ * Display name of an existing credit account in this suite, e.g.
208
+ * `"wstETH / WETH"`. Same as {@link StrategyPosition.name}.
209
+ *
210
+ * {@link accountTargetCollateral} over the underlying, or the underlying
211
+ * symbol when no target can be resolved.
212
+ */
213
+ accountStrategyName(creditAccount: Address): string;
167
214
  /**
168
215
  * Describes this suite's leveraged strategy as the shared read model does,
169
216
  * or `undefined` when {@link strategyTargetCollateral} cannot be resolved or
@@ -5,6 +5,5 @@ import { CreditFacadeV310Contract } from "./CreditFacadeV310Contract.js";
5
5
  import { CreditManagerV310Contract } from "./CreditManagerV310Contract.js";
6
6
  import { CreditSuite } from "./CreditSuite.js";
7
7
  import { StrategyCollateralProps, dominantCollateral, isStrategyCollateral, pickStrategyTargetCollateral } from "./collateralUtils.js";
8
- import { creditOperationMarket, totalLiquidationDiscount } from "./creditOperationMarket.js";
9
8
  import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./expectedBalanceDeltas.js";
10
- export { BalanceDelta, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, ExpectedBalanceDeltasProps, ExpectedOutput, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps, QuotaSlice, RampEvent, StrategyCollateralProps, creditOperationMarket, dominantCollateral, expectedBalanceDeltas, isStrategyCollateral, pickStrategyTargetCollateral, totalLiquidationDiscount };
9
+ export { BalanceDelta, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, ExpectedBalanceDeltasProps, ExpectedOutput, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps, QuotaSlice, RampEvent, StrategyCollateralProps, dominantCollateral, expectedBalanceDeltas, isStrategyCollateral, pickStrategyTargetCollateral };