@gearbox-protocol/sdk 17.13.0-next.4 → 17.13.0-next.6
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.
- package/dist/cjs/model/errors/index.js +1 -0
- package/dist/cjs/model/errors/liquidation-errors.js +9 -0
- package/dist/cjs/model/index.js +1 -0
- package/dist/cjs/model/liquidations.schema.js +2 -1
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +0 -37
- package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +116 -20
- package/dist/cjs/onchain/accounts/liquidations/MultichainLiquidationsService.js +28 -0
- package/dist/cjs/onchain/accounts/liquidations/constants.js +1 -1
- package/dist/cjs/onchain/accounts/liquidations/partialLiquidation.js +7 -11
- package/dist/cjs/onchain/base/TokensMeta.js +15 -0
- package/dist/cjs/onchain/index.js +2 -0
- package/dist/cjs/onchain/validation/bundles/checkLiquidationEligibility.js +7 -1
- package/dist/cjs/onchain/validation/bundles/checkLiquidationFunding.js +2 -1
- package/dist/cjs/onchain/validation/checkLiquidation.js +2 -1
- package/dist/cjs/onchain/validation/checks/checkPartiallyLiquidatable.js +13 -0
- package/dist/cjs/onchain/validation/checks/index.js +2 -0
- package/dist/cjs/onchain/validation/index.js +2 -0
- package/dist/cjs/sdk/liquidations/LiquidationsNamespace.js +14 -0
- package/dist/esm/dev/mint/index.js +1 -2
- package/dist/esm/model/errors/index.js +2 -2
- package/dist/esm/model/errors/liquidation-errors.js +9 -1
- package/dist/esm/model/index.js +2 -2
- package/dist/esm/model/liquidations.schema.js +2 -1
- package/dist/esm/offchain/notices/index.js +1 -2
- package/dist/esm/offchain/opportunities/index.js +1 -2
- package/dist/esm/offchain/positions/index.js +1 -2
- package/dist/esm/onchain/abi/index.js +1 -2
- package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +0 -37
- package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +116 -20
- package/dist/esm/onchain/accounts/liquidations/MultichainLiquidationsService.js +28 -0
- package/dist/esm/onchain/accounts/liquidations/constants.js +1 -1
- package/dist/esm/onchain/accounts/liquidations/partialLiquidation.js +7 -11
- package/dist/esm/onchain/base/TokensMeta.js +15 -0
- package/dist/esm/onchain/index.js +2 -1
- package/dist/esm/onchain/market/adapters/abi/midas/index.js +1 -2
- package/dist/esm/onchain/pools/index.js +1 -2
- package/dist/esm/onchain/utils/internal/index.js +1 -2
- package/dist/esm/onchain/validation/bundles/checkLiquidationEligibility.js +7 -1
- package/dist/esm/onchain/validation/bundles/checkLiquidationFunding.js +2 -1
- package/dist/esm/onchain/validation/checkLiquidation.js +2 -1
- package/dist/esm/onchain/validation/checks/checkPartiallyLiquidatable.js +12 -0
- package/dist/esm/onchain/validation/checks/index.js +2 -1
- package/dist/esm/onchain/validation/index.js +2 -1
- package/dist/esm/permissionless/api/chains/index.js +1 -2
- package/dist/esm/permissionless/api/oracles/index.js +1 -2
- package/dist/esm/permissionless/api/transactions/index.js +1 -2
- package/dist/esm/permissionless/bindings/router/index.js +1 -2
- package/dist/esm/permissionless/core/index.js +1 -2
- package/dist/esm/plugins/accounts/index.js +1 -2
- package/dist/esm/plugins/accounts-counter/index.js +1 -2
- package/dist/esm/plugins/bots/abi/index.js +1 -2
- package/dist/esm/sdk/analytics/index.js +1 -2
- package/dist/esm/sdk/execute/index.js +1 -2
- package/dist/esm/sdk/liquidations/LiquidationsNamespace.js +14 -0
- package/dist/esm/sdk/liquidations/index.js +1 -2
- package/dist/esm/sdk/opportunities/index.js +1 -2
- package/dist/esm/sdk/positions/index.js +1 -2
- package/dist/esm/sdk/preview/index.js +1 -2
- package/dist/types/abi/310/configure/creditSuiteParams.d.ts +4 -5
- package/dist/types/abi/310/configure/iCreditConfigureActions.d.ts +2 -3
- package/dist/types/abi/310/configure/iPoolConfigureActions.d.ts +2 -3
- package/dist/types/abi/310/configure/iPriceOracleConfigureActions.d.ts +2 -3
- package/dist/types/abi/310/crossChainMultisig.d.ts +2 -3
- package/dist/types/abi/310/generated.d.ts +15 -16
- package/dist/types/abi/310/iBytecodeRepository.d.ts +2 -3
- package/dist/types/abi/310/iLinearInterestRateModelV310.d.ts +2 -3
- package/dist/types/abi/310/iMarketConfiguratorFactory.d.ts +2 -3
- package/dist/types/abi/310/iPriceFeedStore.d.ts +2 -3
- package/dist/types/abi/310/iTreasurySplitter.d.ts +2 -3
- package/dist/types/abi/310/instanceManager.d.ts +2 -3
- package/dist/types/abi/AccountMigrator.d.ts +2 -3
- package/dist/types/abi/ILiquidationCompressorV313.d.ts +2 -3
- package/dist/types/abi/IWithdrawalCompressorV310.d.ts +2 -3
- package/dist/types/abi/IWithdrawalCompressorV311.d.ts +2 -3
- package/dist/types/abi/IWithdrawalCompressorV313.d.ts +2 -3
- package/dist/types/abi/compressors/creditAccountCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/creditSuiteCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/defillamaCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/gaugeCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/liquidationCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/marketCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/peripheryCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/priceFeedCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/rewardsCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/rwaCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/rwa/onDemandRWAUnderlyingSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/rwa/securitizeRWAFactorySubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/infinifiWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/kelpLRTWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowFlexibleDepositSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowFlexibleRedeemSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/upshiftWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/tokenCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/withdrawalCompressor.d.ts +2 -3
- package/dist/types/abi/errors.d.ts +11 -12
- package/dist/types/abi/governance/batchesChain.d.ts +2 -3
- package/dist/types/abi/governance/governor.d.ts +2 -3
- package/dist/types/abi/governance/iTimeLock.d.ts +2 -3
- package/dist/types/abi/helpers/redemptionLogger.d.ts +2 -3
- package/dist/types/abi/iAirdropDistributor.d.ts +2 -3
- package/dist/types/abi/iBaseRewardPool.d.ts +2 -3
- package/dist/types/abi/iCurvePool.d.ts +2 -3
- package/dist/types/abi/iDefaultAccountFactoryV3.d.ts +2 -3
- package/dist/types/abi/iDegenNFTV2.d.ts +2 -3
- package/dist/types/abi/iERC20.d.ts +2 -3
- package/dist/types/abi/iERC20Permit.d.ts +2 -3
- package/dist/types/abi/iERC20Zapper.d.ts +2 -3
- package/dist/types/abi/iERC20ZapperDeposits.d.ts +2 -3
- package/dist/types/abi/iETHZapper.d.ts +2 -3
- package/dist/types/abi/iETHZapperDeposits.d.ts +2 -3
- package/dist/types/abi/iExpirable.d.ts +2 -3
- package/dist/types/abi/iFarmingPool.d.ts +2 -3
- package/dist/types/abi/iInterestRateModel.d.ts +2 -3
- package/dist/types/abi/iMulticall3.d.ts +2 -3
- package/dist/types/abi/iOffchainOracle.d.ts +2 -3
- package/dist/types/abi/iPausable.d.ts +2 -3
- package/dist/types/abi/iPhantomToken.d.ts +2 -3
- package/dist/types/abi/iPriceFeed.d.ts +2 -3
- package/dist/types/abi/iRedemptionLoggerV310.d.ts +2 -3
- package/dist/types/abi/iStateSerializer.d.ts +2 -3
- package/dist/types/abi/iUpdatablePriceFeed.d.ts +2 -3
- package/dist/types/abi/iVersion.d.ts +2 -3
- package/dist/types/abi/iZapper.d.ts +2 -3
- package/dist/types/abi/ierc4626Adapter.d.ts +2 -3
- package/dist/types/abi/mellow.d.ts +6 -7
- package/dist/types/abi/migration.d.ts +3 -4
- package/dist/types/abi/router/balancerV2Worker.d.ts +2 -3
- package/dist/types/abi/router/balancerV3Worker.d.ts +2 -3
- package/dist/types/abi/router/balancerV3WrapperWorker.d.ts +2 -3
- package/dist/types/abi/router/camelotV3Worker.d.ts +2 -3
- package/dist/types/abi/router/convexWorker.d.ts +2 -3
- package/dist/types/abi/router/curveWorker.d.ts +2 -3
- package/dist/types/abi/router/daiUsdsWorker.d.ts +2 -3
- package/dist/types/abi/router/equalizerRouterWorker.d.ts +2 -3
- package/dist/types/abi/router/erc4626Worker.d.ts +2 -3
- package/dist/types/abi/router/fluidDexWorker.d.ts +2 -3
- package/dist/types/abi/router/gearboxRouter.d.ts +2 -3
- package/dist/types/abi/router/infinifiWorker.d.ts +2 -3
- package/dist/types/abi/router/infraredVaultWorker.d.ts +2 -3
- package/dist/types/abi/router/kelpLRTDepositPoolWorker.d.ts +2 -3
- package/dist/types/abi/router/kodiakWorker.d.ts +2 -3
- package/dist/types/abi/router/lidoWorker.d.ts +2 -3
- package/dist/types/abi/router/mellow4626Worker.d.ts +2 -3
- package/dist/types/abi/router/mellowDVVWorker.d.ts +2 -3
- package/dist/types/abi/router/mellowVaultWorker.d.ts +2 -3
- package/dist/types/abi/router/midasWorker.d.ts +2 -3
- package/dist/types/abi/router/pendleRouterWorker.d.ts +2 -3
- package/dist/types/abi/router/routingManager.d.ts +2 -3
- package/dist/types/abi/router/securitizeOnrampWorker.d.ts +2 -3
- package/dist/types/abi/router/stakingRewardsWorker.d.ts +2 -3
- package/dist/types/abi/router/traderJoeWorker.d.ts +2 -3
- package/dist/types/abi/router/uniswapV2Worker.d.ts +2 -3
- package/dist/types/abi/router/uniswapV3Worker.d.ts +2 -3
- package/dist/types/abi/router/uniswapV4Worker.d.ts +2 -3
- package/dist/types/abi/router/upshiftWorker.d.ts +2 -3
- package/dist/types/abi/router/velodromeV2Worker.d.ts +2 -3
- package/dist/types/abi/router/wstETHWorker.d.ts +2 -3
- package/dist/types/abi/router/yearnV2Worker.d.ts +2 -3
- package/dist/types/abi/rwa/iDSRegistryService.d.ts +2 -3
- package/dist/types/abi/rwa/iDSToken.d.ts +2 -3
- package/dist/types/abi/rwa/iMidasAccessControl.d.ts +2 -3
- package/dist/types/abi/rwa/iMidasDegenNFT.d.ts +2 -3
- package/dist/types/abi/rwa/iMidasLiquidatorV311.d.ts +2 -3
- package/dist/types/abi/rwa/iRWACompressor.d.ts +2 -3
- package/dist/types/abi/rwa/iRWAFactory.d.ts +2 -3
- package/dist/types/abi/rwa/iRWAGateway.d.ts +2 -3
- package/dist/types/abi/rwa/iRWAUnderlying.d.ts +2 -3
- package/dist/types/abi/rwa/iSecuritizeDegenNFT.d.ts +2 -3
- package/dist/types/abi/rwa/iSecuritizeLiquidatorV311.d.ts +2 -3
- package/dist/types/abi/rwa/iSecuritizeRWAFactory.d.ts +2 -3
- package/dist/types/dev/AccountOpener.d.ts +9 -9
- package/dist/types/dev/EthCallSpy.d.ts +6 -7
- package/dist/types/dev/RevolverTransport.d.ts +12 -12
- package/dist/types/dev/abi.d.ts +6 -7
- package/dist/types/dev/calcLiquidatableLTs.d.ts +2 -3
- package/dist/types/dev/claimFromFaucet.d.ts +2 -2
- package/dist/types/dev/create2.d.ts +10 -11
- package/dist/types/dev/createAnvilClient.d.ts +13 -14
- package/dist/types/dev/detectChain.d.ts +2 -3
- package/dist/types/dev/isOutOfSyncError.d.ts +2 -3
- package/dist/types/dev/isRateLimitError.d.ts +2 -3
- package/dist/types/dev/isTransientError.d.ts +2 -3
- package/dist/types/dev/kycUtils.d.ts +13 -14
- package/dist/types/dev/logSplitterTransport.d.ts +10 -10
- package/dist/types/dev/ltUtils.d.ts +3 -4
- package/dist/types/dev/midasUtils.d.ts +8 -9
- package/dist/types/dev/migrateFaucet.d.ts +2 -3
- package/dist/types/dev/mint/AbstractMinter.d.ts +2 -3
- package/dist/types/dev/mint/DealMinter.d.ts +2 -3
- package/dist/types/dev/mint/DirectMinter.d.ts +2 -3
- package/dist/types/dev/mint/FallbackMinter.d.ts +2 -3
- package/dist/types/dev/mint/TransferMinter.d.ts +2 -3
- package/dist/types/dev/mint/factory.d.ts +2 -3
- package/dist/types/dev/mint/types.d.ts +2 -3
- package/dist/types/dev/mode-parity/compareOpportunities.d.ts +8 -8
- package/dist/types/dev/mode-parity/comparePositions.d.ts +12 -13
- package/dist/types/dev/mode-parity/compareRules.d.ts +6 -7
- package/dist/types/dev/mode-parity/fieldDiff.d.ts +29 -30
- package/dist/types/dev/mode-parity/scriptUtils.d.ts +18 -19
- package/dist/types/dev/providers.d.ts +10 -11
- package/dist/types/dev/replaceStorage.d.ts +3 -4
- package/dist/types/dev/resilientTransport.d.ts +6 -7
- package/dist/types/dev/securitizeUtils.d.ts +6 -6
- package/dist/types/dev/transports.d.ts +2 -3
- package/dist/types/dev/types.d.ts +4 -5
- package/dist/types/dev/verifyTestnet.d.ts +4 -5
- package/dist/types/dev/withdrawalAbi.d.ts +9 -10
- package/dist/types/dev/withdrawalUtils.d.ts +3 -4
- package/dist/types/history/assembleOperations.d.ts +3 -4
- package/dist/types/history/classifyMulticallOperations.d.ts +3 -4
- package/dist/types/history/mapOperations.d.ts +3 -4
- package/dist/types/history/parseCreditAccountTransaction.d.ts +3 -4
- package/dist/types/history/populateContractsRegister.d.ts +4 -5
- package/dist/types/history/toLegacyOperation.d.ts +6 -7
- package/dist/types/history/trace/errors.d.ts +6 -7
- package/dist/types/history/trace/extractAdapterCallTraces.d.ts +2 -3
- package/dist/types/history/trace/extractTransfers.d.ts +4 -4
- package/dist/types/history/trace/findFacadeCalls.d.ts +2 -3
- package/dist/types/history/trace/types.d.ts +3 -4
- package/dist/types/history/types.d.ts +13 -13
- package/dist/types/model/analytics.d.ts +11 -12
- package/dist/types/model/analytics.schema.d.ts +13 -14
- package/dist/types/model/charts.d.ts +29 -29
- package/dist/types/model/charts.schema.d.ts +16 -17
- package/dist/types/model/compare.schema.d.ts +9 -10
- package/dist/types/model/curators.d.ts +3 -4
- package/dist/types/model/curators.schema.d.ts +3 -4
- package/dist/types/model/delayed-intent.schema.d.ts +2 -3
- package/dist/types/model/delayed-intents.d.ts +9 -10
- package/dist/types/model/errors/base.d.ts +2 -3
- package/dist/types/model/errors/index.d.ts +2 -2
- package/dist/types/model/errors/liquidation-errors.d.ts +20 -8
- package/dist/types/model/errors/operation-errors.d.ts +44 -45
- package/dist/types/model/errors/oracle-errors.d.ts +3 -4
- package/dist/types/model/errors/prepare-errors.d.ts +21 -22
- package/dist/types/model/errors/preview-errors.d.ts +9 -10
- package/dist/types/model/filters.d.ts +6 -7
- package/dist/types/model/filters.schema.d.ts +5 -6
- package/dist/types/model/index.d.ts +2 -2
- package/dist/types/model/liquidations.d.ts +29 -18
- package/dist/types/model/liquidations.schema.d.ts +10 -10
- package/dist/types/model/notices.d.ts +4 -5
- package/dist/types/model/notices.schema.d.ts +3 -4
- package/dist/types/model/opportunities.d.ts +31 -32
- package/dist/types/model/opportunities.schema.d.ts +26 -27
- package/dist/types/model/positions.d.ts +29 -30
- package/dist/types/model/positions.schema.d.ts +22 -23
- package/dist/types/model/previews.d.ts +21 -21
- package/dist/types/model/primitives.d.ts +12 -13
- package/dist/types/model/primitives.schema.d.ts +11 -12
- package/dist/types/model/response.d.ts +8 -9
- package/dist/types/model/response.schema.d.ts +7 -8
- package/dist/types/model/result.d.ts +8 -9
- package/dist/types/model/rewards.d.ts +4 -5
- package/dist/types/model/rwa.d.ts +20 -21
- package/dist/types/model/rwa.schema.d.ts +3 -4
- package/dist/types/model/withdrawals.d.ts +5 -6
- package/dist/types/model/withdrawals.schema.d.ts +5 -6
- package/dist/types/offchain/AbstractOffchainNamespace.d.ts +4 -5
- package/dist/types/offchain/GearboxAPI.d.ts +2 -3
- package/dist/types/offchain/analytics/OffchainAnalytics.d.ts +2 -3
- package/dist/types/offchain/analytics/OffchainAnalyticsPositions.d.ts +2 -3
- package/dist/types/offchain/analytics/types.d.ts +3 -4
- package/dist/types/offchain/errors/OffchainInvalidJsonError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainNotConfiguredError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainNotImplementedError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainRequestFailedError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainStatusError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainTransportError.d.ts +3 -4
- package/dist/types/offchain/errors/OffchainValidationError.d.ts +2 -3
- package/dist/types/offchain/errors/backendMessage.d.ts +2 -3
- package/dist/types/offchain/errors/errorCause.d.ts +3 -4
- package/dist/types/offchain/errors/readResponseBody.d.ts +2 -3
- package/dist/types/offchain/notices/OffchainNotices.d.ts +2 -3
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +2 -3
- package/dist/types/offchain/opportunities/types.d.ts +3 -4
- package/dist/types/offchain/positions/OffchainPositions.d.ts +2 -3
- package/dist/types/offchain/positions/types.d.ts +3 -4
- package/dist/types/offchain/types.d.ts +2 -3
- package/dist/types/onchain/MultichainSDK.d.ts +7 -8
- package/dist/types/onchain/OnchainSDK.d.ts +9 -10
- package/dist/types/onchain/abi/oracles.d.ts +27 -28
- package/dist/types/onchain/accounts/CreditAccountsServiceV310.d.ts +3 -12
- package/dist/types/onchain/accounts/bots/AccountBotsService.d.ts +2 -3
- package/dist/types/onchain/accounts/bots/PeripheryCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/bots/abi.d.ts +2 -3
- package/dist/types/onchain/accounts/bots/types.d.ts +13 -14
- package/dist/types/onchain/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +2 -3
- package/dist/types/onchain/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/credit-account-compressor/types.d.ts +11 -12
- package/dist/types/onchain/accounts/index.d.ts +8 -8
- package/dist/types/onchain/accounts/intents/borrow.d.ts +6 -7
- package/dist/types/onchain/accounts/intents/collateral-valuation.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/guards.d.ts +7 -7
- package/dist/types/onchain/accounts/intents/index.d.ts +5 -5
- package/dist/types/onchain/accounts/intents/leverage-band.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/math.d.ts +8 -8
- package/dist/types/onchain/accounts/intents/maxBorrow.d.ts +3 -4
- package/dist/types/onchain/accounts/intents/maxWithdrawCollateral.d.ts +3 -4
- package/dist/types/onchain/accounts/intents/open-strategy.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/operations.d.ts +28 -28
- package/dist/types/onchain/accounts/intents/plan.d.ts +18 -19
- package/dist/types/onchain/accounts/intents/realize.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/resolveQuotaUpdate.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/strategyLimits.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/tail.d.ts +4 -4
- package/dist/types/onchain/accounts/intents/testing/delayed.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/testing/expect.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/testing/market.d.ts +6 -6
- package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +3 -3
- package/dist/types/onchain/accounts/intents/tests/add-collateral.fixtures.d.ts +15 -16
- package/dist/types/onchain/accounts/intents/tests/adjust-leverage.fixtures.d.ts +22 -23
- package/dist/types/onchain/accounts/intents/tests/deposit.fixtures.d.ts +24 -25
- package/dist/types/onchain/accounts/intents/tests/finish-decrease-leverage.fixtures.d.ts +21 -21
- package/dist/types/onchain/accounts/intents/tests/finish-withdraw.fixtures.d.ts +30 -31
- package/dist/types/onchain/accounts/intents/tests/open-strategy.fixtures.d.ts +16 -17
- package/dist/types/onchain/accounts/intents/tests/update-quota.fixtures.d.ts +12 -13
- package/dist/types/onchain/accounts/intents/tests/withdraw-asset.fixtures.d.ts +16 -17
- package/dist/types/onchain/accounts/intents/tests/withdraw.fixtures.d.ts +26 -27
- package/dist/types/onchain/accounts/intents/types.d.ts +30 -31
- package/dist/types/onchain/accounts/intents/utils/adjust-state-to-snapshot.d.ts +2 -3
- package/dist/types/onchain/accounts/intents/utils/assemble-operation-calls.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/utils/borrowed-amount-plus-interest-and-fees.d.ts +2 -3
- package/dist/types/onchain/accounts/intents/utils/common.d.ts +5 -6
- package/dist/types/onchain/accounts/intents/utils/credit-account-slice.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/utils/ledger.d.ts +3 -4
- package/dist/types/onchain/accounts/intents/utils/pick-token.d.ts +6 -7
- package/dist/types/onchain/accounts/intents/utils/price-impact.d.ts +5 -6
- package/dist/types/onchain/accounts/intents/utils/quotas-for-update.d.ts +8 -8
- package/dist/types/onchain/accounts/intents/utils/router-path.d.ts +6 -7
- package/dist/types/onchain/accounts/intents/view.d.ts +2 -3
- package/dist/types/onchain/accounts/intents/withdraw-limits.d.ts +5 -6
- package/dist/types/onchain/accounts/liquidations/LiquidationsService.d.ts +32 -15
- package/dist/types/onchain/accounts/liquidations/MultichainLiquidationsService.d.ts +13 -4
- package/dist/types/onchain/accounts/liquidations/constants.d.ts +4 -5
- package/dist/types/onchain/accounts/liquidations/index.d.ts +2 -2
- package/dist/types/onchain/accounts/liquidations/partialLiquidation.d.ts +7 -8
- package/dist/types/onchain/accounts/liquidations/skipLiquidatableAccount.d.ts +2 -3
- package/dist/types/onchain/accounts/liquidations/types.d.ts +140 -27
- package/dist/types/onchain/accounts/multicall-utils.d.ts +4 -5
- package/dist/types/onchain/accounts/quota-utils.d.ts +11 -11
- package/dist/types/onchain/accounts/types.d.ts +17 -96
- package/dist/types/onchain/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +7 -7
- package/dist/types/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/addresses.d.ts +4 -5
- package/dist/types/onchain/accounts/withdrawal-compressor/createRedemptionLogger.d.ts +2 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/createWithdrawalCompressor.d.ts +2 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/intent-codec.d.ts +5 -6
- package/dist/types/onchain/accounts/withdrawal-compressor/types.d.ts +16 -17
- package/dist/types/onchain/base/BaseContract.d.ts +5 -6
- package/dist/types/onchain/base/ChainContractsRegister.d.ts +3 -4
- package/dist/types/onchain/base/Construct.d.ts +3 -4
- package/dist/types/onchain/base/MultichainConstruct.d.ts +7 -8
- package/dist/types/onchain/base/SDKConstruct.d.ts +2 -3
- package/dist/types/onchain/base/TokensMeta.d.ts +13 -6
- package/dist/types/onchain/base/errors.d.ts +2 -3
- package/dist/types/onchain/base/token-types.d.ts +18 -18
- package/dist/types/onchain/base/types.d.ts +37 -38
- package/dist/types/onchain/chain/chains.d.ts +20 -21
- package/dist/types/onchain/chain/detectNetwork.d.ts +2 -3
- package/dist/types/onchain/constants/address-provider.d.ts +36 -37
- package/dist/types/onchain/constants/addresses.d.ts +5 -6
- package/dist/types/onchain/constants/bot-permissions.d.ts +3 -4
- package/dist/types/onchain/constants/math.d.ts +21 -22
- package/dist/types/onchain/constants/networks.d.ts +3 -4
- package/dist/types/onchain/constants/periphery.d.ts +3 -4
- package/dist/types/onchain/constants/versions.d.ts +5 -6
- package/dist/types/onchain/core/AbstractAddressProviderContract.d.ts +2 -3
- package/dist/types/onchain/core/AddressProviderV310Contract.d.ts +2 -2
- package/dist/types/onchain/core/createAddressProvider.d.ts +3 -4
- package/dist/types/onchain/core/errors.d.ts +9 -10
- package/dist/types/onchain/core/types.d.ts +4 -5
- package/dist/types/onchain/index.d.ts +8 -7
- package/dist/types/onchain/market/MarketConfiguratorContract.d.ts +2 -2
- package/dist/types/onchain/market/MarketRegister.d.ts +4 -5
- package/dist/types/onchain/market/MarketSuite.d.ts +2 -3
- package/dist/types/onchain/market/ZapperRegister.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/actionAbi.d.ts +4 -5
- package/dist/types/onchain/market/adapters/abi/adapters/erc4626ReferralAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3WrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCamelotV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BaseRewardPoolAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BoosterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1StableNgAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_2AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_3AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_4AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iDaiUsdsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iFluidDexAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiGatewayAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiUnwindingGateway.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtDepositPool.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtWithdrawalManager.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iLidoV1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellow4626VaultAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowClaimerAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowWrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasIssuanceVaultAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasRedemptionVaultAdapterV310.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iPendleRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeOnRampAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeRedemptionGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iStakingRewardsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iTraderJoeRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV2Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV4Adapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iUpshiftVaultAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iVelodromeV2RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iwstEthv1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/mellowDvvAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbi.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbiPatterns.d.ts +12 -13
- package/dist/types/onchain/market/adapters/abi/midas/iMidasGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iBaseOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/targetContractAbi.d.ts +29 -30
- package/dist/types/onchain/market/adapters/abi/utils.d.ts +7 -8
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +4 -5
- package/dist/types/onchain/market/adapters/contracts/AbstractCurveAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/contracts/AccountMigratorAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CamelotV3AdapterContract.d.ts +3 -3
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve2AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve3AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve4AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1AdapterStETHContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/DaiUsdsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/FluidDexAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/LidoV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowClaimerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowDVVAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowWrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/PendleRouterAdapterContract.d.ts +5 -5
- package/dist/types/onchain/market/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/StakingRewardsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/UniswapV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV3AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV4AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UpshiftVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/VelodromeV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/WstETHV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/createAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/legacyAdapterOperations.d.ts +27 -28
- package/dist/types/onchain/market/adapters/transferHelpers.d.ts +10 -11
- package/dist/types/onchain/market/adapters/transfers.d.ts +2 -3
- package/dist/types/onchain/market/adapters/types.d.ts +9 -10
- package/dist/types/onchain/market/credit/CreditConfiguratorV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditFacadeV310BaseContract.d.ts +2 -2
- package/dist/types/onchain/market/credit/CreditFacadeV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditManagerV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditSuite.d.ts +2 -3
- package/dist/types/onchain/market/credit/CreditSuiteStrategy.d.ts +2 -3
- package/dist/types/onchain/market/credit/collateralUtils.d.ts +5 -6
- package/dist/types/onchain/market/credit/createCreditConfigurator.d.ts +2 -3
- package/dist/types/onchain/market/credit/createCreditFacade.d.ts +2 -3
- package/dist/types/onchain/market/credit/createCreditManager.d.ts +2 -3
- package/dist/types/onchain/market/credit/expectedBalanceDeltas.d.ts +4 -5
- package/dist/types/onchain/market/credit/types.d.ts +10 -11
- package/dist/types/onchain/market/loss-policy/AliasLossPolicyV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/loss-policy/LossPolicyContract.d.ts +2 -2
- package/dist/types/onchain/market/loss-policy/constants.d.ts +5 -6
- package/dist/types/onchain/market/loss-policy/createLossPolicy.d.ts +2 -3
- package/dist/types/onchain/market/loss-policy/types.d.ts +2 -3
- package/dist/types/onchain/market/math.d.ts +23 -24
- package/dist/types/onchain/market/oracle/PriceFeedAnswerMap.d.ts +2 -3
- package/dist/types/onchain/market/oracle/PriceOracleBaseContract.d.ts +2 -3
- package/dist/types/onchain/market/oracle/PriceOracleV310Contract.d.ts +2 -2
- package/dist/types/onchain/market/oracle/collateralPriceInUnderlying.d.ts +2 -3
- package/dist/types/onchain/market/oracle/createPriceOracle.d.ts +2 -3
- package/dist/types/onchain/market/oracle/types.d.ts +5 -6
- package/dist/types/onchain/market/pool/GaugeContract.d.ts +3 -3
- package/dist/types/onchain/market/pool/LinearInterestRateModelContract.d.ts +2 -2
- package/dist/types/onchain/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
- package/dist/types/onchain/market/pool/PoolSuite.d.ts +2 -3
- package/dist/types/onchain/market/pool/PoolV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/pool/TumblerContract.d.ts +2 -2
- package/dist/types/onchain/market/pool/createInterestRateModel.d.ts +2 -3
- package/dist/types/onchain/market/pool/createPool.d.ts +2 -3
- package/dist/types/onchain/market/pool/createPoolQuotaKeeper.d.ts +2 -3
- package/dist/types/onchain/market/pool/createRateKeeper.d.ts +2 -3
- package/dist/types/onchain/market/pool/math.d.ts +6 -7
- package/dist/types/onchain/market/pool/types.d.ts +7 -8
- package/dist/types/onchain/market/pricefeeds/AbstractLPPriceFeed.d.ts +3 -4
- package/dist/types/onchain/market/pricefeeds/AbstractPriceFeed.d.ts +5 -6
- package/dist/types/onchain/market/pricefeeds/PriceFeedRef.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/PriceFeedRegistry.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/feeds/BalancerStablePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/BalancerWeightedPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/BoundedPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CompositePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ConstantPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveCryptoPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveStablePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveUSDPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/Erc4626PriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ExternalPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/MellowLRTPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/PendleTWAPPTPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/PythPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/RedstonePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/WstETHPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/YearnPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ZeroPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/types.d.ts +5 -6
- package/dist/types/onchain/market/pricefeeds/updates/PriceUpdateTx.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/PriceUpdatesCache.d.ts +3 -4
- package/dist/types/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/getRawPriceUpdates.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/isUpdatablePriceFeed.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/types.d.ts +8 -9
- package/dist/types/onchain/market/pricefeeds/updates/updatableDependencies.d.ts +2 -3
- package/dist/types/onchain/market/rwa/RWARegistry.d.ts +3 -4
- package/dist/types/onchain/market/rwa/createDegenNFT.d.ts +2 -3
- package/dist/types/onchain/market/rwa/midas/MidasDegenNFT.d.ts +2 -2
- package/dist/types/onchain/market/rwa/midas/MidasLiquidatorContract.d.ts +2 -2
- package/dist/types/onchain/market/rwa/midas/constants.d.ts +4 -5
- package/dist/types/onchain/market/rwa/securitize/SecuritizeDegenNFT.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeLiquidatorContract.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeRWAFactory.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/constants.d.ts +4 -5
- package/dist/types/onchain/market/rwa/securitize/types.d.ts +5 -6
- package/dist/types/onchain/market/rwa/types.d.ts +16 -16
- package/dist/types/onchain/market/strategyName.d.ts +2 -3
- package/dist/types/onchain/market/types.d.ts +3 -4
- package/dist/types/onchain/market/zapper/IERC20ZapperContract.d.ts +2 -2
- package/dist/types/onchain/market/zapper/IETHZapperContract.d.ts +2 -2
- package/dist/types/onchain/market/zapper/ZapperContract.d.ts +2 -3
- package/dist/types/onchain/market/zapper/createZapper.d.ts +2 -3
- package/dist/types/onchain/market/zapper/types.d.ts +5 -6
- package/dist/types/onchain/opportunities/MultichainOpportunitiesService.d.ts +2 -3
- package/dist/types/onchain/opportunities/OpportunitiesService.d.ts +2 -3
- package/dist/types/onchain/opportunities/types.d.ts +2 -3
- package/dist/types/onchain/options.d.ts +4 -5
- package/dist/types/onchain/plugins/BasePlugin.d.ts +2 -3
- package/dist/types/onchain/plugins/errors.d.ts +2 -3
- package/dist/types/onchain/plugins/types.d.ts +9 -10
- package/dist/types/onchain/pools/PoolService.d.ts +2 -3
- package/dist/types/onchain/pools/types.d.ts +12 -13
- package/dist/types/onchain/positions/MultichainPositionsService.d.ts +2 -3
- package/dist/types/onchain/positions/PositionsService.d.ts +3 -4
- package/dist/types/onchain/positions/calcBorrowRate.d.ts +3 -4
- package/dist/types/onchain/positions/calcHealthFactor.d.ts +3 -4
- package/dist/types/onchain/positions/calcLiquidationPrice.d.ts +3 -4
- package/dist/types/onchain/positions/calcLiquidationPriceForTarget.d.ts +4 -5
- package/dist/types/onchain/positions/calcTimeToLiquidationMs.d.ts +2 -3
- package/dist/types/onchain/positions/types.d.ts +9 -10
- package/dist/types/onchain/preview/parse/classifyInnerOperations.d.ts +3 -4
- package/dist/types/onchain/preview/parse/parseFacadeOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parseOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parsePoolOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parseRWAFactoryOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/types-adapters.d.ts +4 -5
- package/dist/types/onchain/preview/parse/types-facades.d.ts +20 -21
- package/dist/types/onchain/preview/parse/types-pools.d.ts +6 -7
- package/dist/types/onchain/preview/parse/types-rwa.d.ts +5 -6
- package/dist/types/onchain/preview/parse/types.d.ts +4 -4
- package/dist/types/onchain/preview/preview/CreditAccountState.d.ts +3 -4
- package/dist/types/onchain/preview/preview/buildDelayedStrategyPositionOperationPreview.d.ts +2 -3
- package/dist/types/onchain/preview/preview/detectCloseOrRepay.d.ts +3 -4
- package/dist/types/onchain/preview/preview/detectDelayedClaim.d.ts +4 -5
- package/dist/types/onchain/preview/preview/detectDelayedOperation.d.ts +3 -4
- package/dist/types/onchain/preview/preview/estimateClaimableAt.d.ts +2 -3
- package/dist/types/onchain/preview/preview/midasGreenlistsAccount.d.ts +2 -3
- package/dist/types/onchain/preview/preview/previewAdjustStrategyPosition.d.ts +2 -3
- package/dist/types/onchain/preview/preview/previewExitOrRepayStrategyPosition.d.ts +3 -4
- package/dist/types/onchain/preview/preview/previewOpenStrategyPosition.d.ts +2 -2
- package/dist/types/onchain/preview/preview/previewOperation.d.ts +3 -4
- package/dist/types/onchain/preview/preview/previewPoolPositionOperation.d.ts +2 -3
- package/dist/types/onchain/preview/preview/replayInnerOperations.d.ts +4 -5
- package/dist/types/onchain/preview/preview/replayMulticall.d.ts +4 -5
- package/dist/types/onchain/preview/preview/unwrapNativeCollateral.d.ts +2 -3
- package/dist/types/onchain/router/AbstractRouterContract.d.ts +4 -5
- package/dist/types/onchain/router/RouterV310Contract.d.ts +2 -2
- package/dist/types/onchain/router/createRouter.d.ts +2 -3
- package/dist/types/onchain/router/helpers.d.ts +3 -4
- package/dist/types/onchain/router/types.d.ts +15 -16
- package/dist/types/onchain/types/logger.d.ts +3 -4
- package/dist/types/onchain/types/multichain.d.ts +6 -7
- package/dist/types/onchain/types/state-human.d.ts +36 -37
- package/dist/types/onchain/types/state.d.ts +3 -4
- package/dist/types/onchain/types/transactions.d.ts +5 -6
- package/dist/types/onchain/utils/AddressMap.d.ts +2 -3
- package/dist/types/onchain/utils/AddressSet.d.ts +2 -3
- package/dist/types/onchain/utils/AssetsMap.d.ts +2 -3
- package/dist/types/onchain/utils/abi-decode.d.ts +4 -5
- package/dist/types/onchain/utils/bigint-math.d.ts +2 -3
- package/dist/types/onchain/utils/bytes32ToString.d.ts +2 -3
- package/dist/types/onchain/utils/childLogger.d.ts +2 -3
- package/dist/types/onchain/utils/createRawTx.d.ts +2 -3
- package/dist/types/onchain/utils/etherscan.d.ts +4 -5
- package/dist/types/onchain/utils/filterDust.d.ts +4 -5
- package/dist/types/onchain/utils/formatter.d.ts +17 -17
- package/dist/types/onchain/utils/hex.d.ts +2 -3
- package/dist/types/onchain/utils/internal/Hooks.d.ts +3 -4
- package/dist/types/onchain/utils/isDust.d.ts +3 -4
- package/dist/types/onchain/utils/json.d.ts +3 -4
- package/dist/types/onchain/utils/mappers.d.ts +5 -6
- package/dist/types/onchain/utils/retry.d.ts +3 -4
- package/dist/types/onchain/utils/toAddress.d.ts +2 -3
- package/dist/types/onchain/utils/trace.d.ts +8 -9
- package/dist/types/onchain/utils/type-utils.d.ts +2 -3
- package/dist/types/onchain/utils/viem/cast.d.ts +3 -4
- package/dist/types/onchain/utils/viem/executeDelegatedMulticalls.d.ts +3 -4
- package/dist/types/onchain/utils/viem/executeMulticallBatches.d.ts +4 -5
- package/dist/types/onchain/utils/viem/sendRawTx.d.ts +5 -6
- package/dist/types/onchain/utils/viem/simulateCall.d.ts +7 -8
- package/dist/types/onchain/utils/viem/simulateMulticall.d.ts +4 -5
- package/dist/types/onchain/utils/viem/simulateWithPriceUpdates.d.ts +8 -9
- package/dist/types/onchain/utils/viem/watchBlocksAsync.d.ts +4 -4
- package/dist/types/onchain/utils/zod.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkAccountQuotas.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkCollateralFunding.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkCreditOperation.d.ts +5 -6
- package/dist/types/onchain/validation/bundles/checkHealthFactors.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkIncreaseDebt.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkIncreaseQuota.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkLiquidationEligibility.d.ts +7 -7
- package/dist/types/onchain/validation/bundles/checkLiquidationFunding.d.ts +5 -5
- package/dist/types/onchain/validation/bundles/checkMarket.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkMidasAccountGreenlist.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkObtained.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkPoolFunding.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkPoolOperation.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkQuotaUpdates.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkRWAOpenRequirements.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkRWAOpening.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkWallet.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkWalletAllowance.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkWalletBalance.d.ts +3 -4
- package/dist/types/onchain/validation/checkLiquidation.d.ts +7 -7
- package/dist/types/onchain/validation/checkOperation.d.ts +5 -6
- package/dist/types/onchain/validation/checkSimulation.d.ts +5 -6
- package/dist/types/onchain/validation/checks/checkBorrowLimit.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkCollateralised.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkCreditAccountFrozen.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkCreditManagerPaused.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkDebtLimits.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkEmergencyLiquidator.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkForbiddenToken.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkLeverage.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkLiquidatorEligible.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkMarketExpired.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkMaxQuota.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkPartiallyLiquidatable.d.ts +15 -0
- package/dist/types/onchain/validation/checks/checkPoolLiquidity.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkPoolPaused.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkPoolSunset.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaActive.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaChange.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaCount.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaLimit.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkReservePriceLimited.d.ts +3 -4
- package/dist/types/onchain/validation/checks/index.d.ts +2 -1
- package/dist/types/onchain/validation/helpers/amount.d.ts +2 -3
- package/dist/types/onchain/validation/helpers/health-factor-limits.d.ts +5 -6
- package/dist/types/onchain/validation/helpers/token.d.ts +3 -4
- package/dist/types/onchain/validation/index.d.ts +2 -1
- package/dist/types/onchain/validation/raise.d.ts +4 -5
- package/dist/types/permissionless/api/GearboxPermissionless.d.ts +2 -3
- package/dist/types/permissionless/api/chains/ChainsNamespace.d.ts +2 -3
- package/dist/types/permissionless/api/chains/schemas.d.ts +5 -6
- package/dist/types/permissionless/api/chains/types.d.ts +6 -7
- package/dist/types/permissionless/api/deploy/PermissionlessDeploy.d.ts +4 -5
- package/dist/types/permissionless/api/deploy/effective-staleness.d.ts +2 -3
- package/dist/types/permissionless/api/deploy/types.d.ts +6 -7
- package/dist/types/permissionless/api/errors.d.ts +6 -7
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +4 -5
- package/dist/types/permissionless/api/oracles/schemas.d.ts +5 -6
- package/dist/types/permissionless/api/oracles/types.d.ts +5 -6
- package/dist/types/permissionless/api/schemas.d.ts +4 -5
- package/dist/types/permissionless/api/transactions/InstanceOwnerTransactions.d.ts +2 -3
- package/dist/types/permissionless/api/transactions/lp-price-feeds.d.ts +3 -4
- package/dist/types/permissionless/api/transactions/types.d.ts +7 -8
- package/dist/types/permissionless/api/types.d.ts +2 -3
- package/dist/types/permissionless/bindings/address-provider.d.ts +2 -3
- package/dist/types/permissionless/bindings/bytecode-repository.d.ts +2 -2
- package/dist/types/permissionless/bindings/compressors/token-compressor.d.ts +2 -2
- package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +2 -2
- package/dist/types/permissionless/bindings/cross-chain-multisig.d.ts +4 -4
- package/dist/types/permissionless/bindings/factory/abstract-factory.d.ts +2 -3
- package/dist/types/permissionless/bindings/factory/credit-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/loss-policy-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/pool-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/price-oracle-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/rate-keeper-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/governance/batches-chain.d.ts +2 -2
- package/dist/types/permissionless/bindings/governance/governor.d.ts +2 -2
- package/dist/types/permissionless/bindings/governance/timelock.d.ts +2 -3
- package/dist/types/permissionless/bindings/governance/types.d.ts +7 -8
- package/dist/types/permissionless/bindings/instance-manager.d.ts +2 -2
- package/dist/types/permissionless/bindings/market-configurator-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/market-configurator.d.ts +2 -2
- package/dist/types/permissionless/bindings/price-feed-store.d.ts +2 -2
- package/dist/types/permissionless/bindings/pricefeeds/balancer-stable.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/balancer-weighted.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/bounded.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/composite.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/constant.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-crypto.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-stable.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-twap.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-usd.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/erc4626.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/external.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/index.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/kodiak.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/mellow-lrt.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/pendle-pt-twap.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/pyth.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/redstone.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/wsteth.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/zero.d.ts +2 -3
- package/dist/types/permissionless/bindings/router/routing-manager.d.ts +2 -2
- package/dist/types/permissionless/bindings/treasury-splitter.d.ts +2 -2
- package/dist/types/permissionless/bindings/types.d.ts +17 -18
- package/dist/types/permissionless/chains/archive-transport.d.ts +3 -4
- package/dist/types/permissionless/chains/chunked-log-transport.d.ts +2 -2
- package/dist/types/permissionless/core/auditor.d.ts +2 -3
- package/dist/types/permissionless/core/bytecode.d.ts +5 -6
- package/dist/types/permissionless/core/pricefeed-builder.d.ts +6 -7
- package/dist/types/permissionless/core/pricefeed.d.ts +2 -3
- package/dist/types/permissionless/core/proposal.d.ts +5 -6
- package/dist/types/permissionless/core/raw-tx.d.ts +2 -3
- package/dist/types/permissionless/deployment/addresses.d.ts +2 -3
- package/dist/types/permissionless/deployment/mainnet.d.ts +6 -7
- package/dist/types/permissionless/plugins/irm/constructor-params-abi.d.ts +8 -8
- package/dist/types/permissionless/plugins/loss-policies/constructor-params-abi.d.ts +8 -8
- package/dist/types/permissionless/plugins/rate-keepers/constructor-params-abi.d.ts +9 -9
- package/dist/types/permissionless/utils/abi-encoder.d.ts +4 -5
- package/dist/types/permissionless/utils/block-utils.d.ts +2 -3
- package/dist/types/permissionless/utils/create2.d.ts +9 -10
- package/dist/types/permissionless/utils/format.d.ts +7 -8
- package/dist/types/permissionless/utils/governance/batch.d.ts +5 -6
- package/dist/types/permissionless/utils/governance/timelock-txs.d.ts +2 -3
- package/dist/types/permissionless/utils/governance/types.d.ts +3 -4
- package/dist/types/permissionless/utils/literals.d.ts +8 -9
- package/dist/types/permissionless/utils/price-update/get-price-update-tx.d.ts +2 -3
- package/dist/types/permissionless/utils/price-update/get-prices.d.ts +2 -3
- package/dist/types/permissionless/utils/price-update/get-updatable-feeds.d.ts +3 -4
- package/dist/types/permissionless/utils/signature.d.ts +2 -3
- package/dist/types/plugins/accounts/AccountsPlugin.d.ts +3 -4
- package/dist/types/plugins/accounts-counter/AccountsCounterPlugin.d.ts +3 -4
- package/dist/types/plugins/bots/BotsPlugin.d.ts +2 -3
- package/dist/types/plugins/bots/PartialLiquidationBotV310Contract.d.ts +3 -3
- package/dist/types/plugins/bots/abi/iPartialLiquidationBotV310.d.ts +2 -3
- package/dist/types/plugins/bots/config.d.ts +6 -7
- package/dist/types/plugins/bots/deserializePartialLiquidationBotParams.d.ts +2 -3
- package/dist/types/plugins/bots/types.d.ts +11 -12
- package/dist/types/sdk/AbstractNamespace.d.ts +3 -4
- package/dist/types/sdk/GearboxSDK.d.ts +3 -4
- package/dist/types/sdk/analytics/AnalyticsNamespace.d.ts +2 -3
- package/dist/types/sdk/analytics/types.d.ts +3 -4
- package/dist/types/sdk/errors/AllSourcesFailedError.d.ts +2 -3
- package/dist/types/sdk/errors/MissingSourceError.d.ts +2 -3
- package/dist/types/sdk/errors/NoSourceServedError.d.ts +2 -3
- package/dist/types/sdk/errors/SourceChainMismatchError.d.ts +3 -4
- package/dist/types/sdk/errors/SourceUnavailableError.d.ts +2 -3
- package/dist/types/sdk/errors/assertSameChains.d.ts +2 -3
- package/dist/types/sdk/errors/everyChainFailed.d.ts +2 -3
- package/dist/types/sdk/execute/ExecuteApi.d.ts +2 -3
- package/dist/types/sdk/execute/types.d.ts +8 -9
- package/dist/types/sdk/liquidations/LiquidationsNamespace.d.ts +11 -4
- package/dist/types/sdk/liquidations/types.d.ts +24 -9
- package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +2 -3
- package/dist/types/sdk/opportunities/types.d.ts +9 -10
- package/dist/types/sdk/positions/PositionsNamespace.d.ts +2 -3
- package/dist/types/sdk/positions/mergePositionList.d.ts +2 -3
- package/dist/types/sdk/positions/types.d.ts +9 -10
- package/dist/types/sdk/prepare/PrepareApi.d.ts +3 -4
- package/dist/types/sdk/prepare/types.d.ts +33 -33
- package/dist/types/sdk/prepare/withdrawable-collaterals.d.ts +2 -3
- package/dist/types/sdk/preview/PreviewNamespace.d.ts +2 -3
- package/dist/types/sdk/preview/types.d.ts +4 -5
- package/dist/types/sdk/rewards/RewardsNamespace.d.ts +2 -3
- package/dist/types/sdk/rewards/errors.d.ts +3 -4
- package/dist/types/sdk/rewards/helpers.d.ts +7 -8
- package/dist/types/sdk/rewards/merkl-api.d.ts +6 -6
- package/dist/types/sdk/rewards/toMerklRewards.d.ts +2 -3
- package/dist/types/sdk/rewards/toTurtleRewards.d.ts +2 -3
- package/dist/types/sdk/rewards/turtle-api.d.ts +7 -8
- package/dist/types/sdk/rewards/types.d.ts +5 -6
- package/dist/types/sdk/types.d.ts +13 -14
- package/dist/types/sdk/utils/filterResponse.d.ts +2 -3
- package/dist/types/sdk/utils/mergeChains.d.ts +4 -5
- package/dist/types/sdk/utils/types.d.ts +5 -5
- package/package.json +15 -15
|
@@ -25,6 +25,7 @@ exports.noDelayedRoute = require_model_errors_prepare_errors.noDelayedRoute;
|
|
|
25
25
|
exports.noRecordedIntent = require_model_errors_prepare_errors.noRecordedIntent;
|
|
26
26
|
exports.noStrategyTargetCollateral = require_model_errors_prepare_errors.noStrategyTargetCollateral;
|
|
27
27
|
exports.notEmergencyLiquidator = require_model_errors_liquidation_errors.notEmergencyLiquidator;
|
|
28
|
+
exports.partialLiquidationImpossible = require_model_errors_liquidation_errors.partialLiquidationImpossible;
|
|
28
29
|
exports.poolPaused = require_model_errors_operation_errors.poolPaused;
|
|
29
30
|
exports.poolSunset = require_model_errors_operation_errors.poolSunset;
|
|
30
31
|
exports.quotaAboveMax = require_model_errors_operation_errors.quotaAboveMax;
|
|
@@ -8,6 +8,14 @@ function creditAccountFrozen(creditAccount) {
|
|
|
8
8
|
creditAccount
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
+
/** {@inheritDoc PartialLiquidationImpossibleError} */
|
|
12
|
+
function partialLiquidationImpossible(creditAccount) {
|
|
13
|
+
return {
|
|
14
|
+
code: "partialLiquidationImpossible",
|
|
15
|
+
message: `Credit account ${creditAccount} cannot be partially liquidated.`,
|
|
16
|
+
creditAccount
|
|
17
|
+
};
|
|
18
|
+
}
|
|
11
19
|
/** {@inheritDoc NotEmergencyLiquidatorError} */
|
|
12
20
|
function notEmergencyLiquidator(creditManager, liquidator) {
|
|
13
21
|
return {
|
|
@@ -30,3 +38,4 @@ function liquidatorNotEligible(kycProtocol, kycToken) {
|
|
|
30
38
|
exports.creditAccountFrozen = creditAccountFrozen;
|
|
31
39
|
exports.liquidatorNotEligible = liquidatorNotEligible;
|
|
32
40
|
exports.notEmergencyLiquidator = notEmergencyLiquidator;
|
|
41
|
+
exports.partialLiquidationImpossible = partialLiquidationImpossible;
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -138,6 +138,7 @@ exports.opportunityKeySchema = require_model_opportunities_schema.opportunityKey
|
|
|
138
138
|
exports.opportunityKindSchema = require_model_opportunities_schema.opportunityKindSchema;
|
|
139
139
|
exports.opportunitySchema = require_model_opportunities_schema.opportunitySchema;
|
|
140
140
|
exports.opportunityTotalsSchema = require_model_opportunities_schema.opportunityTotalsSchema;
|
|
141
|
+
exports.partialLiquidationImpossible = require_model_errors_liquidation_errors.partialLiquidationImpossible;
|
|
141
142
|
exports.pnlBreakdownSchema = require_model_positions_schema.pnlBreakdownSchema;
|
|
142
143
|
exports.pointRewardsSchema = require_model_opportunities_schema.pointRewardsSchema;
|
|
143
144
|
exports.pointsProgramPnLSchema = require_model_positions_schema.pointsProgramPnLSchema;
|
|
@@ -86,7 +86,8 @@ const liquidationDetailsSchema = zod_v4.z.object({
|
|
|
86
86
|
isCreditAccountFrozen: zod_v4.z.boolean(),
|
|
87
87
|
kycProtocol: zod_v4.z.string().optional(),
|
|
88
88
|
kycToken: require_model_primitives_schema.tokenSchema.optional(),
|
|
89
|
-
approve: liquidationApprovalSchema.optional()
|
|
89
|
+
approve: liquidationApprovalSchema.optional(),
|
|
90
|
+
isPartiallyLiquidatable: zod_v4.z.boolean().optional()
|
|
90
91
|
});
|
|
91
92
|
//#endregion
|
|
92
93
|
exports.delayedReceivedAssetSchema = delayedReceivedAssetSchema;
|
|
@@ -94,43 +94,6 @@ var CreditAccountsServiceV310 = class extends require_onchain_base_SDKConstruct.
|
|
|
94
94
|
return Object.values(r);
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
* {@inheritDoc ICreditAccountsService.fullyLiquidate}
|
|
98
|
-
**/
|
|
99
|
-
async fullyLiquidate(props) {
|
|
100
|
-
const { account, to, slippage = 50n, keepAssets, ignoreReservePrices, applyLossPolicy, debtOnly } = props;
|
|
101
|
-
const cm = this.sdk.marketRegister.findCreditManager(account.creditManager);
|
|
102
|
-
const routerCloseResult = await this.sdk.routerFor(account).findBestClosePath({
|
|
103
|
-
creditAccount: account,
|
|
104
|
-
creditManager: cm.creditManager,
|
|
105
|
-
slippage,
|
|
106
|
-
keepAssets,
|
|
107
|
-
debtOnly
|
|
108
|
-
});
|
|
109
|
-
const calls = await this.prependPriceUpdates(account.creditManager, routerCloseResult.calls, account, { ignoreReservePrices });
|
|
110
|
-
let lossPolicyData;
|
|
111
|
-
if (applyLossPolicy) {
|
|
112
|
-
lossPolicyData = await this.sdk.marketRegister.findByCreditManager(account.creditManager).lossPolicy.getLiquidationData(account.creditAccount);
|
|
113
|
-
this.logger?.debug({ lossPolicyData }, "loss policy data");
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
tx: cm.creditFacade.liquidateCreditAccount(account.creditAccount, to, calls, lossPolicyData),
|
|
117
|
-
calls,
|
|
118
|
-
routerCloseResult,
|
|
119
|
-
lossPolicyData,
|
|
120
|
-
creditFacade: cm.creditFacade
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* {@inheritDoc ICreditAccountsService.partiallyLiquidate}
|
|
125
|
-
*/
|
|
126
|
-
async partiallyLiquidate(props) {
|
|
127
|
-
const { account, to } = props;
|
|
128
|
-
const cm = this.sdk.marketRegister.findCreditManager(account.creditManager);
|
|
129
|
-
const { tokenOut, repaidAmount, minSeizedAmount } = this.sdk.liquidations.getPartialLiquidationParams(account, props);
|
|
130
|
-
const updates = await this.getOnDemandPriceUpdates(account, true);
|
|
131
|
-
return cm.creditFacade.partiallyLiquidateCreditAccount(account.creditAccount, tokenOut, repaidAmount, minSeizedAmount, to, updates);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
97
|
* {@inheritDoc ICreditAccountsService.assembleCloseCreditAccountCalls}
|
|
135
98
|
*/
|
|
136
99
|
async assembleCloseCreditAccountCalls({ creditAccount: ca, routerCalls, assetsToWithdraw, to }) {
|
|
@@ -89,6 +89,97 @@ var LiquidationsService = class extends require_onchain_base_SDKConstruct.SDKCon
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
+
* Builds the transaction that fully liquidates a credit account, repaying
|
|
93
|
+
* the debt by swapping the account's own collateral through the router.
|
|
94
|
+
* The underlying left after the swaps is sent to `to`.
|
|
95
|
+
**/
|
|
96
|
+
async fullyLiquidate(props) {
|
|
97
|
+
const { account, to, slippage = 50n, keepAssets, ignoreReservePrices, applyLossPolicy, debtOnly } = props;
|
|
98
|
+
const cm = this.sdk.marketRegister.findCreditManager(account.creditManager);
|
|
99
|
+
const routerCloseResult = await this.sdk.routerFor(account).findBestClosePath({
|
|
100
|
+
creditAccount: account,
|
|
101
|
+
creditManager: cm.creditManager,
|
|
102
|
+
slippage,
|
|
103
|
+
keepAssets,
|
|
104
|
+
debtOnly
|
|
105
|
+
});
|
|
106
|
+
const calls = await this.sdk.accounts.prependPriceUpdates(account.creditManager, routerCloseResult.calls, account, { ignoreReservePrices });
|
|
107
|
+
let lossPolicyData;
|
|
108
|
+
if (applyLossPolicy) {
|
|
109
|
+
lossPolicyData = await cm.market.lossPolicy.getLiquidationData(account.creditAccount);
|
|
110
|
+
this.logger?.debug({ lossPolicyData }, "loss policy data");
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
tx: cm.creditFacade.liquidateCreditAccount(account.creditAccount, to, calls, lossPolicyData),
|
|
114
|
+
calls,
|
|
115
|
+
routerCloseResult
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Details of a partial liquidation of a credit account, in the shape of a
|
|
120
|
+
* full one: what the liquidator pays, what it receives and what it must
|
|
121
|
+
* approve, plus {@link LiquidationDetails.isPartiallyLiquidatable}.
|
|
122
|
+
*
|
|
123
|
+
* A local estimate from the synced oracle state, without fresh price
|
|
124
|
+
* updates. Parameters left out of `props` are derived from current state.
|
|
125
|
+
*
|
|
126
|
+
* @throws For RWA markets, for a withdrawal phantom `tokenOut`, and when no
|
|
127
|
+
* `tokenOut` can be picked.
|
|
128
|
+
**/
|
|
129
|
+
async getPartialLiquidationDetails(props) {
|
|
130
|
+
const { creditAccount, blockNumber } = props;
|
|
131
|
+
const ca = await this.#getCreditAccountData(creditAccount, blockNumber);
|
|
132
|
+
const suite = this.sdk.marketRegister.findCreditManager(ca.creditManager);
|
|
133
|
+
const { priceOracle } = suite.market;
|
|
134
|
+
const { underlying } = suite;
|
|
135
|
+
const { tokenOut, repaidAmount, isPartiallyLiquidatable } = this.#getPartialLiquidationParams(ca, suite, props);
|
|
136
|
+
const { liquidationDiscount } = suite.liquidationFees();
|
|
137
|
+
const seizedValue = repaidAmount * require_onchain_constants_math.PERCENTAGE_FACTOR / BigInt(liquidationDiscount);
|
|
138
|
+
const seizedAmount = priceOracle.convert(underlying, tokenOut, repaidAmount) * require_onchain_constants_math.PERCENTAGE_FACTOR / BigInt(liquidationDiscount);
|
|
139
|
+
return {
|
|
140
|
+
...this.#buildAccount(ca, suite),
|
|
141
|
+
repaymentAmount: priceOracle.toTokenAmount(underlying, repaidAmount),
|
|
142
|
+
estimatedProfit: priceOracle.toTokenAmount(underlying, seizedValue - repaidAmount),
|
|
143
|
+
isDelayed: false,
|
|
144
|
+
receivedAssets: [{
|
|
145
|
+
isDelayed: false,
|
|
146
|
+
...priceOracle.toTokenAmount(tokenOut, seizedAmount),
|
|
147
|
+
token: this.sdk.tokensMeta.mustGetToken(this.sdk.tokensMeta.depositedToken(tokenOut))
|
|
148
|
+
}],
|
|
149
|
+
isLiquidatorEligible: true,
|
|
150
|
+
isCreditAccountFrozen: false,
|
|
151
|
+
approve: repaidAmount === 0n ? void 0 : {
|
|
152
|
+
spender: suite.creditManager.address,
|
|
153
|
+
...priceOracle.toTokenAmount(underlying, repaidAmount * (require_onchain_constants_math.PERCENTAGE_FACTOR + require_onchain_accounts_liquidations_constants.LIQUIDATION_APPROVAL_BUFFER) / require_onchain_constants_math.PERCENTAGE_FACTOR)
|
|
154
|
+
},
|
|
155
|
+
isPartiallyLiquidatable
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Builds the transaction that partially liquidates a credit account,
|
|
160
|
+
* repaying part of its debt from the liquidator's funds in exchange for
|
|
161
|
+
* discounted collateral sent to the liquidator. Parameters left out of
|
|
162
|
+
* `props` are derived from current state.
|
|
163
|
+
*
|
|
164
|
+
* @throws For RWA markets, for a withdrawal phantom `tokenOut`, when no
|
|
165
|
+
* `tokenOut` can be picked, and when the account cannot be partially
|
|
166
|
+
* liquidated, see {@link LiquidationDetails.isPartiallyLiquidatable}.
|
|
167
|
+
**/
|
|
168
|
+
async buildPartialLiquidationTx(props) {
|
|
169
|
+
const { creditAccount, liquidator, blockNumber } = props;
|
|
170
|
+
const ca = await this.#getCreditAccountData(creditAccount, blockNumber);
|
|
171
|
+
const suite = this.sdk.marketRegister.findCreditManager(ca.creditManager);
|
|
172
|
+
const params = this.#getPartialLiquidationParams(ca, suite, props);
|
|
173
|
+
if (!params.isPartiallyLiquidatable) throw new Error(`credit account ${this.labelAddress(creditAccount)} cannot be partially liquidated`);
|
|
174
|
+
const updates = await this.sdk.accounts.getOnDemandPriceUpdates(ca, true);
|
|
175
|
+
const tx = suite.creditFacade.partiallyLiquidateCreditAccount(ca.creditAccount, params.tokenOut, params.repaidAmount, params.minSeizedAmount, liquidator, updates);
|
|
176
|
+
this.logger?.debug(`built tx to partially liquidate credit account ${this.labelAddress(creditAccount)} to ${this.labelAddress(liquidator)}`);
|
|
177
|
+
return {
|
|
178
|
+
to: tx.to,
|
|
179
|
+
callData: tx.callData
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
92
183
|
* Optimal partial liquidation of a credit account: the collateral to seize
|
|
93
184
|
* and the amounts that bring its health factor close to `optimalHF`.
|
|
94
185
|
*
|
|
@@ -112,24 +203,6 @@ var LiquidationsService = class extends require_onchain_base_SDKConstruct.SDKCon
|
|
|
112
203
|
});
|
|
113
204
|
}
|
|
114
205
|
/**
|
|
115
|
-
* Everything a partial liquidation of a credit account needs, with any
|
|
116
|
-
* parameter the caller pinned down taken as given and the rest derived from
|
|
117
|
-
* current state. A derived `tokenOut` is never a withdrawal phantom token.
|
|
118
|
-
*
|
|
119
|
-
* @param ca - Credit account to partially liquidate.
|
|
120
|
-
* @param overrides - Parameters to use instead of the derived defaults.
|
|
121
|
-
* @throws If a derived `tokenOut` cannot be picked, or if the seized token is
|
|
122
|
-
* not a collateral token of the credit manager.
|
|
123
|
-
**/
|
|
124
|
-
getPartialLiquidationParams(ca, overrides) {
|
|
125
|
-
return require_onchain_accounts_liquidations_partialLiquidation.partialLiquidationParams({
|
|
126
|
-
suite: this.sdk.marketRegister.findCreditManager(ca.creditManager),
|
|
127
|
-
account: ca,
|
|
128
|
-
overrides,
|
|
129
|
-
exclude: (token) => this.#isWithdrawalPhantom(token)
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
206
|
* Returns the status of delayed-withdrawal positions (redemption receipts)
|
|
134
207
|
* owned by a liquidator wallet: what is receivable, how much, and when it
|
|
135
208
|
* becomes claimable.
|
|
@@ -251,11 +324,34 @@ var LiquidationsService = class extends require_onchain_base_SDKConstruct.SDKCon
|
|
|
251
324
|
#liquidationApproval(data, suite, priceOracle) {
|
|
252
325
|
const { requiredToken, requiredAmount, liquidationCall } = data;
|
|
253
326
|
if (requiredAmount === 0n) return;
|
|
327
|
+
const spender = require_onchain_utils_hex.hexEq(liquidationCall.target, suite.creditFacade.address) ? suite.creditManager.address : liquidationCall.target;
|
|
328
|
+
const bufferedAmount = requiredAmount * (require_onchain_constants_math.PERCENTAGE_FACTOR + require_onchain_accounts_liquidations_constants.LIQUIDATION_APPROVAL_BUFFER) / require_onchain_constants_math.PERCENTAGE_FACTOR;
|
|
254
329
|
return {
|
|
255
|
-
spender
|
|
256
|
-
...priceOracle.toTokenAmount(requiredToken,
|
|
330
|
+
spender,
|
|
331
|
+
...priceOracle.toTokenAmount(requiredToken, bufferedAmount)
|
|
257
332
|
};
|
|
258
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Everything a partial liquidation of a credit account needs, with any
|
|
336
|
+
* parameter the caller pinned down taken as given and the rest derived from
|
|
337
|
+
* current state. A derived `tokenOut` is never a withdrawal phantom token.
|
|
338
|
+
*
|
|
339
|
+
* @throws For RWA markets, whose wrapped underlying and KYC-gated collateral
|
|
340
|
+
* the bare facade call cannot handle, for a withdrawal phantom `tokenOut`,
|
|
341
|
+
* which does not redeem instantly, if a derived `tokenOut` cannot be picked,
|
|
342
|
+
* and if the seized token is not a collateral token of the credit manager.
|
|
343
|
+
**/
|
|
344
|
+
#getPartialLiquidationParams(ca, suite, overrides) {
|
|
345
|
+
const label = this.labelAddress(ca.creditAccount);
|
|
346
|
+
if (suite.market.rwa) throw new Error(`cannot partially liquidate ${label}: RWA markets are not supported`);
|
|
347
|
+
if (overrides.tokenOut && this.#isWithdrawalPhantom(overrides.tokenOut)) throw new Error(`cannot partially liquidate ${label}: ${this.labelAddress(overrides.tokenOut)} is a withdrawal phantom token`);
|
|
348
|
+
return require_onchain_accounts_liquidations_partialLiquidation.partialLiquidationParams({
|
|
349
|
+
suite,
|
|
350
|
+
account: ca,
|
|
351
|
+
overrides,
|
|
352
|
+
exclude: (token) => this.#isWithdrawalPhantom(token)
|
|
353
|
+
});
|
|
354
|
+
}
|
|
259
355
|
async #getCreditAccountData(creditAccount, blockNumber) {
|
|
260
356
|
const ca = await this.sdk.accounts.getCreditAccountData(creditAccount, blockNumber);
|
|
261
357
|
if (!ca) throw new Error(`credit account ${creditAccount} not found`);
|
|
@@ -53,6 +53,34 @@ var MultichainLiquidationsService = class extends require_onchain_base_Multichai
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
+
* {@inheritDoc LiquidationsService.getPartialLiquidationDetails}
|
|
57
|
+
**/
|
|
58
|
+
async getPartialLiquidationDetails(props) {
|
|
59
|
+
return this.queryChain({
|
|
60
|
+
network: props.network,
|
|
61
|
+
block: props.blockNumber ?? "latest",
|
|
62
|
+
run: (sdk, block) => sdk.liquidations.getPartialLiquidationDetails({
|
|
63
|
+
...props,
|
|
64
|
+
blockNumber: block.blockNumber
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* {@inheritDoc LiquidationsService.buildPartialLiquidationTx}
|
|
70
|
+
*
|
|
71
|
+
* The reported block is the one the transaction was built against.
|
|
72
|
+
**/
|
|
73
|
+
async buildPartialLiquidationTx(props) {
|
|
74
|
+
return this.queryChain({
|
|
75
|
+
network: props.network,
|
|
76
|
+
block: props.blockNumber ?? "latest",
|
|
77
|
+
run: (sdk, block) => sdk.liquidations.buildPartialLiquidationTx({
|
|
78
|
+
...props,
|
|
79
|
+
blockNumber: block.blockNumber
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
56
84
|
* Liquidation positions of all queried chains, see
|
|
57
85
|
* {@link LiquidationsService.getLiquidationPositions}.
|
|
58
86
|
**/
|
|
@@ -4,7 +4,7 @@ const LIQUIDATION_COMPRESSOR_V313_ADDRESS = "0xB70C4500a0afF02107eB983a348F22492
|
|
|
4
4
|
/**
|
|
5
5
|
* Headroom (in bps) added on top of the amount the liquidation pulls when
|
|
6
6
|
* building the liquidator's approval, so that the transaction does not revert
|
|
7
|
-
* when prices move between the preview and the execution.
|
|
7
|
+
* when prices move or interest accrues between the preview and the execution.
|
|
8
8
|
**/
|
|
9
9
|
const LIQUIDATION_APPROVAL_BUFFER = 50n;
|
|
10
10
|
//#endregion
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_onchain_constants_math = require("../../constants/math.js");
|
|
3
|
+
require("../../constants/index.js");
|
|
2
4
|
const require_onchain_market_math = require("../../market/math.js");
|
|
3
5
|
const require_onchain_market_credit_collateralUtils = require("../../market/credit/collateralUtils.js");
|
|
4
6
|
require("../../market/index.js");
|
|
@@ -29,12 +31,15 @@ function optimalPartialLiquidation({ suite, account, optimalHF = suite.optimalHF
|
|
|
29
31
|
function partialLiquidationParams({ suite, account, overrides = {}, exclude }) {
|
|
30
32
|
const tokenOut = overrides.tokenOut ?? bestTokenOut(suite, account, exclude);
|
|
31
33
|
const optimalHF = overrides.optimalHF ?? suite.optimalHFForPartialLiquidation(account);
|
|
32
|
-
const
|
|
34
|
+
const { market } = suite;
|
|
35
|
+
const { optimalAmount, isOptimalRepayable } = optimalAmounts(suite, account, tokenOut, optimalHF);
|
|
36
|
+
const repaidAmount = overrides.repaidAmount ?? optimalAmount;
|
|
33
37
|
return {
|
|
34
38
|
tokenOut,
|
|
35
39
|
optimalHF,
|
|
36
40
|
repaidAmount,
|
|
37
|
-
minSeizedAmount: overrides.minSeizedAmount ??
|
|
41
|
+
minSeizedAmount: overrides.minSeizedAmount ?? require_onchain_market_math.minSeizedAmount(market.priceOracle.convert(market.underlying, tokenOut, repaidAmount), suite.liquidationFees().liquidationDiscount),
|
|
42
|
+
isPartiallyLiquidatable: (account.healthFactor < require_onchain_constants_math.WAD || suite.isExpired) && isOptimalRepayable && optimalAmount > 0n
|
|
38
43
|
};
|
|
39
44
|
}
|
|
40
45
|
function bestTokenOut(suite, account, exclude) {
|
|
@@ -60,15 +65,6 @@ function optimalAmounts(suite, account, tokenOut, optimalHF, liquidationThreshol
|
|
|
60
65
|
ltTokenOut: BigInt(ltTokenOut)
|
|
61
66
|
});
|
|
62
67
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Minimum amount of `token` that must be seized when repaying `repaidAmount`
|
|
65
|
-
* of underlying.
|
|
66
|
-
**/
|
|
67
|
-
function minSeizedAmountOf(suite, token, repaidAmount) {
|
|
68
|
-
const { market } = suite;
|
|
69
|
-
const tokenAmount = market.priceOracle.convert(market.underlying, token, repaidAmount);
|
|
70
|
-
return require_onchain_market_math.minSeizedAmount(tokenAmount, suite.liquidationFees().liquidationDiscount);
|
|
71
|
-
}
|
|
72
68
|
//#endregion
|
|
73
69
|
exports.optimalPartialLiquidation = optimalPartialLiquidation;
|
|
74
70
|
exports.partialLiquidationParams = partialLiquidationParams;
|
|
@@ -10,6 +10,7 @@ const require_onchain_utils_formatter = require("../utils/formatter.js");
|
|
|
10
10
|
require("../utils/index.js");
|
|
11
11
|
const require_onchain_core_errors = require("../core/errors.js");
|
|
12
12
|
const require_onchain_utils_viem_executeMulticallBatches = require("../utils/viem/executeMulticallBatches.js");
|
|
13
|
+
let viem = require("viem");
|
|
13
14
|
//#region src/onchain/base/TokensMeta.ts
|
|
14
15
|
/**
|
|
15
16
|
* Registry of token metadata (symbol, decimals, phantom type) keyed by address.
|
|
@@ -81,6 +82,20 @@ var TokensMeta = class extends require_onchain_utils_AddressMap.AddressMap {
|
|
|
81
82
|
return !!t.contractType?.startsWith("PHANTOM_TOKEN::");
|
|
82
83
|
}
|
|
83
84
|
/**
|
|
85
|
+
* Returns underlying token of a phantom token, or the token itself if it is not a phantom token.
|
|
86
|
+
*
|
|
87
|
+
* @param token - Token address.
|
|
88
|
+
* @throws If extended token data is not loaded, or a phantom token has no
|
|
89
|
+
* serialized params.
|
|
90
|
+
*/
|
|
91
|
+
depositedToken(token) {
|
|
92
|
+
const meta = this.mustGet(token);
|
|
93
|
+
if (!this.isPhantomToken(meta)) return token;
|
|
94
|
+
if (!meta.serializedParams) throw new Error(`phantom token ${meta.symbol} (${token}) has no serialized params`);
|
|
95
|
+
const [, deposited] = (0, viem.decodeAbiParameters)([{ type: "address" }, { type: "address" }], meta.serializedParams);
|
|
96
|
+
return deposited;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
84
99
|
* Returns true if the token is a RWA underlying token, throws if the token data is not loaded
|
|
85
100
|
* @param t
|
|
86
101
|
* @returns
|
|
@@ -213,6 +213,7 @@ const require_onchain_validation_checks_checkLeverage = require("./validation/ch
|
|
|
213
213
|
const require_onchain_validation_checks_checkLiquidatorEligible = require("./validation/checks/checkLiquidatorEligible.js");
|
|
214
214
|
const require_onchain_validation_checks_checkMarketExpired = require("./validation/checks/checkMarketExpired.js");
|
|
215
215
|
const require_onchain_validation_checks_checkMaxQuota = require("./validation/checks/checkMaxQuota.js");
|
|
216
|
+
const require_onchain_validation_checks_checkPartiallyLiquidatable = require("./validation/checks/checkPartiallyLiquidatable.js");
|
|
216
217
|
const require_onchain_validation_checks_checkPoolLiquidity = require("./validation/checks/checkPoolLiquidity.js");
|
|
217
218
|
const require_onchain_validation_checks_checkPoolPaused = require("./validation/checks/checkPoolPaused.js");
|
|
218
219
|
const require_onchain_validation_checks_checkPoolSunset = require("./validation/checks/checkPoolSunset.js");
|
|
@@ -597,6 +598,7 @@ exports.checkMaxQuota = require_onchain_validation_checks_checkMaxQuota.checkMax
|
|
|
597
598
|
exports.checkMidasAccountGreenlist = require_onchain_validation_bundles_checkMidasAccountGreenlist.checkMidasAccountGreenlist;
|
|
598
599
|
exports.checkObtained = require_onchain_validation_bundles_checkObtained.checkObtained;
|
|
599
600
|
exports.checkOperation = require_onchain_validation_checkOperation.checkOperation;
|
|
601
|
+
exports.checkPartiallyLiquidatable = require_onchain_validation_checks_checkPartiallyLiquidatable.checkPartiallyLiquidatable;
|
|
600
602
|
exports.checkPoolFunding = require_onchain_validation_bundles_checkPoolFunding.checkPoolFunding;
|
|
601
603
|
exports.checkPoolLiquidity = require_onchain_validation_checks_checkPoolLiquidity.checkPoolLiquidity;
|
|
602
604
|
exports.checkPoolOperation = require_onchain_validation_bundles_checkPoolOperation.checkPoolOperation;
|
|
@@ -2,11 +2,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_onchain_validation_checks_checkCreditAccountFrozen = require("../checks/checkCreditAccountFrozen.js");
|
|
3
3
|
const require_onchain_validation_checks_checkEmergencyLiquidator = require("../checks/checkEmergencyLiquidator.js");
|
|
4
4
|
const require_onchain_validation_checks_checkLiquidatorEligible = require("../checks/checkLiquidatorEligible.js");
|
|
5
|
+
const require_onchain_validation_checks_checkPartiallyLiquidatable = require("../checks/checkPartiallyLiquidatable.js");
|
|
5
6
|
require("../checks/index.js");
|
|
6
7
|
//#region src/onchain/validation/bundles/checkLiquidationEligibility.ts
|
|
7
8
|
/**
|
|
8
9
|
* Whether this wallet may liquidate this account, from the facts the
|
|
9
|
-
*
|
|
10
|
+
* liquidation details already report and the market's emergency-liquidator
|
|
11
|
+
* list.
|
|
10
12
|
*/
|
|
11
13
|
function checkLiquidationEligibility(input) {
|
|
12
14
|
const { sdk, details, liquidator } = input;
|
|
@@ -16,6 +18,10 @@ function checkLiquidationEligibility(input) {
|
|
|
16
18
|
frozen: details.isCreditAccountFrozen,
|
|
17
19
|
creditAccount: details.creditAccount
|
|
18
20
|
}),
|
|
21
|
+
...require_onchain_validation_checks_checkPartiallyLiquidatable.checkPartiallyLiquidatable({
|
|
22
|
+
partiallyLiquidatable: details.isPartiallyLiquidatable,
|
|
23
|
+
creditAccount: details.creditAccount
|
|
24
|
+
}),
|
|
19
25
|
...require_onchain_validation_checks_checkEmergencyLiquidator.checkEmergencyLiquidator({
|
|
20
26
|
paused: details.paused,
|
|
21
27
|
isEmergencyLiquidator: market.isEmergencyLiquidator(liquidator),
|
|
@@ -3,7 +3,8 @@ const require_onchain_validation_bundles_checkWalletAllowance = require("./check
|
|
|
3
3
|
const require_onchain_validation_bundles_checkWalletBalance = require("./checkWalletBalance.js");
|
|
4
4
|
//#region src/onchain/validation/bundles/checkLiquidationFunding.ts
|
|
5
5
|
/**
|
|
6
|
-
* What the liquidator wallet must hold and have approved
|
|
6
|
+
* What the liquidator wallet must hold and have approved, for a full or
|
|
7
|
+
* partial liquidation alike.
|
|
7
8
|
*/
|
|
8
9
|
async function checkLiquidationFunding(input) {
|
|
9
10
|
const { sdk, details, liquidator, blockNumber } = input;
|
|
@@ -3,7 +3,8 @@ const require_onchain_validation_bundles_checkLiquidationEligibility = require("
|
|
|
3
3
|
const require_onchain_validation_bundles_checkLiquidationFunding = require("./bundles/checkLiquidationFunding.js");
|
|
4
4
|
//#region src/onchain/validation/checkLiquidation.ts
|
|
5
5
|
/**
|
|
6
|
-
* Whether `liquidator` may send
|
|
6
|
+
* Whether `liquidator` may send the full or partial liquidation `details`
|
|
7
|
+
* describe
|
|
7
8
|
*/
|
|
8
9
|
async function checkLiquidation(sdk, input, options = {}) {
|
|
9
10
|
const { details, liquidator } = input;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_model_errors_liquidation_errors = require("../../../model/errors/liquidation-errors.js");
|
|
3
|
+
require("../../../model/index.js");
|
|
4
|
+
//#region src/onchain/validation/checks/checkPartiallyLiquidatable.ts
|
|
5
|
+
/**
|
|
6
|
+
* A partial liquidation that cannot reach the target health factor without
|
|
7
|
+
* leaving less than the minimum debt is refused.
|
|
8
|
+
*/
|
|
9
|
+
function checkPartiallyLiquidatable(args) {
|
|
10
|
+
return args.partiallyLiquidatable === false ? [require_model_errors_liquidation_errors.partialLiquidationImpossible(args.creditAccount)] : [];
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.checkPartiallyLiquidatable = checkPartiallyLiquidatable;
|
|
@@ -10,6 +10,7 @@ const require_onchain_validation_checks_checkLeverage = require("./checkLeverage
|
|
|
10
10
|
const require_onchain_validation_checks_checkLiquidatorEligible = require("./checkLiquidatorEligible.js");
|
|
11
11
|
const require_onchain_validation_checks_checkMarketExpired = require("./checkMarketExpired.js");
|
|
12
12
|
const require_onchain_validation_checks_checkMaxQuota = require("./checkMaxQuota.js");
|
|
13
|
+
const require_onchain_validation_checks_checkPartiallyLiquidatable = require("./checkPartiallyLiquidatable.js");
|
|
13
14
|
const require_onchain_validation_checks_checkPoolLiquidity = require("./checkPoolLiquidity.js");
|
|
14
15
|
const require_onchain_validation_checks_checkPoolPaused = require("./checkPoolPaused.js");
|
|
15
16
|
const require_onchain_validation_checks_checkPoolSunset = require("./checkPoolSunset.js");
|
|
@@ -29,6 +30,7 @@ exports.checkLeverage = require_onchain_validation_checks_checkLeverage.checkLev
|
|
|
29
30
|
exports.checkLiquidatorEligible = require_onchain_validation_checks_checkLiquidatorEligible.checkLiquidatorEligible;
|
|
30
31
|
exports.checkMarketExpired = require_onchain_validation_checks_checkMarketExpired.checkMarketExpired;
|
|
31
32
|
exports.checkMaxQuota = require_onchain_validation_checks_checkMaxQuota.checkMaxQuota;
|
|
33
|
+
exports.checkPartiallyLiquidatable = require_onchain_validation_checks_checkPartiallyLiquidatable.checkPartiallyLiquidatable;
|
|
32
34
|
exports.checkPoolLiquidity = require_onchain_validation_checks_checkPoolLiquidity.checkPoolLiquidity;
|
|
33
35
|
exports.checkPoolPaused = require_onchain_validation_checks_checkPoolPaused.checkPoolPaused;
|
|
34
36
|
exports.checkPoolSunset = require_onchain_validation_checks_checkPoolSunset.checkPoolSunset;
|
|
@@ -14,6 +14,7 @@ const require_onchain_validation_checks_checkLeverage = require("./checks/checkL
|
|
|
14
14
|
const require_onchain_validation_checks_checkLiquidatorEligible = require("./checks/checkLiquidatorEligible.js");
|
|
15
15
|
const require_onchain_validation_checks_checkMarketExpired = require("./checks/checkMarketExpired.js");
|
|
16
16
|
const require_onchain_validation_checks_checkMaxQuota = require("./checks/checkMaxQuota.js");
|
|
17
|
+
const require_onchain_validation_checks_checkPartiallyLiquidatable = require("./checks/checkPartiallyLiquidatable.js");
|
|
17
18
|
const require_onchain_validation_checks_checkPoolLiquidity = require("./checks/checkPoolLiquidity.js");
|
|
18
19
|
const require_onchain_validation_checks_checkPoolPaused = require("./checks/checkPoolPaused.js");
|
|
19
20
|
const require_onchain_validation_checks_checkPoolSunset = require("./checks/checkPoolSunset.js");
|
|
@@ -76,6 +77,7 @@ exports.checkMaxQuota = require_onchain_validation_checks_checkMaxQuota.checkMax
|
|
|
76
77
|
exports.checkMidasAccountGreenlist = require_onchain_validation_bundles_checkMidasAccountGreenlist.checkMidasAccountGreenlist;
|
|
77
78
|
exports.checkObtained = require_onchain_validation_bundles_checkObtained.checkObtained;
|
|
78
79
|
exports.checkOperation = require_onchain_validation_checkOperation.checkOperation;
|
|
80
|
+
exports.checkPartiallyLiquidatable = require_onchain_validation_checks_checkPartiallyLiquidatable.checkPartiallyLiquidatable;
|
|
79
81
|
exports.checkPoolFunding = require_onchain_validation_bundles_checkPoolFunding.checkPoolFunding;
|
|
80
82
|
exports.checkPoolLiquidity = require_onchain_validation_checks_checkPoolLiquidity.checkPoolLiquidity;
|
|
81
83
|
exports.checkPoolOperation = require_onchain_validation_bundles_checkPoolOperation.checkPoolOperation;
|
|
@@ -35,6 +35,20 @@ var LiquidationsNamespace = class {
|
|
|
35
35
|
return this.#onchain.liquidations.buildLiquidationTx(props);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
+
* {@inheritDoc ILiquidations.getPartialLiquidationDetails}
|
|
39
|
+
**/
|
|
40
|
+
async getPartialLiquidationDetails(props) {
|
|
41
|
+
await this.#ensureFresh?.(require_onchain_chain_chains.toChainIds([props.network]));
|
|
42
|
+
return this.#onchain.liquidations.getPartialLiquidationDetails(props);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* {@inheritDoc ILiquidations.buildPartialLiquidationTx}
|
|
46
|
+
**/
|
|
47
|
+
async buildPartialLiquidationTx(props) {
|
|
48
|
+
await this.#ensureFresh?.(require_onchain_chain_chains.toChainIds([props.network]));
|
|
49
|
+
return this.#onchain.liquidations.buildPartialLiquidationTx(props);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
38
52
|
* {@inheritDoc ILiquidations.getLiquidationPositions}
|
|
39
53
|
**/
|
|
40
54
|
async getLiquidationPositions(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./base.js";
|
|
2
|
-
import { creditAccountFrozen, liquidatorNotEligible, notEmergencyLiquidator } from "./liquidation-errors.js";
|
|
2
|
+
import { creditAccountFrozen, liquidatorNotEligible, notEmergencyLiquidator, partialLiquidationImpossible } from "./liquidation-errors.js";
|
|
3
3
|
import { accountNotMidasGreenlisted, creditManagerPaused, debtOutOfRange, forbiddenToken, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, leverageOutOfRange, marketExpired, poolPaused, poolSunset, quotaAboveMax, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, reservePriceLimited, rwaOpenRequirementsNotMet } from "./operation-errors.js";
|
|
4
4
|
import { unpriceableTokenError } from "./oracle-errors.js";
|
|
5
5
|
import { creditAccountNotEmpty, creditAccountNotFound, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, unexpectedFailure, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress } from "./prepare-errors.js";
|
|
6
6
|
import { malformedTransaction } from "./preview-errors.js";
|
|
7
|
-
export { accountNotMidasGreenlisted, creditAccountFrozen, creditAccountNotEmpty, creditAccountNotFound, creditManagerPaused, debtOutOfRange, forbiddenToken, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, leverageOutOfRange, liquidatorNotEligible, malformedTransaction, marketExpired, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, notEmergencyLiquidator, poolPaused, poolSunset, quotaAboveMax, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, reservePriceLimited, rwaOpenRequirementsNotMet, unexpectedFailure, unpriceableTokenError, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress };
|
|
7
|
+
export { accountNotMidasGreenlisted, creditAccountFrozen, creditAccountNotEmpty, creditAccountNotFound, creditManagerPaused, debtOutOfRange, forbiddenToken, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, leverageOutOfRange, liquidatorNotEligible, malformedTransaction, marketExpired, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, notEmergencyLiquidator, partialLiquidationImpossible, poolPaused, poolSunset, quotaAboveMax, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, reservePriceLimited, rwaOpenRequirementsNotMet, unexpectedFailure, unpriceableTokenError, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress };
|
|
@@ -7,6 +7,14 @@ function creditAccountFrozen(creditAccount) {
|
|
|
7
7
|
creditAccount
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
+
/** {@inheritDoc PartialLiquidationImpossibleError} */
|
|
11
|
+
function partialLiquidationImpossible(creditAccount) {
|
|
12
|
+
return {
|
|
13
|
+
code: "partialLiquidationImpossible",
|
|
14
|
+
message: `Credit account ${creditAccount} cannot be partially liquidated.`,
|
|
15
|
+
creditAccount
|
|
16
|
+
};
|
|
17
|
+
}
|
|
10
18
|
/** {@inheritDoc NotEmergencyLiquidatorError} */
|
|
11
19
|
function notEmergencyLiquidator(creditManager, liquidator) {
|
|
12
20
|
return {
|
|
@@ -26,4 +34,4 @@ function liquidatorNotEligible(kycProtocol, kycToken) {
|
|
|
26
34
|
};
|
|
27
35
|
}
|
|
28
36
|
//#endregion
|
|
29
|
-
export { creditAccountFrozen, liquidatorNotEligible, notEmergencyLiquidator };
|
|
37
|
+
export { creditAccountFrozen, liquidatorNotEligible, notEmergencyLiquidator, partialLiquidationImpossible };
|
package/dist/esm/model/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { borrowRateBreakdownSchema, pnlBreakdownSchema, pointsProgramPnLSchema,
|
|
|
14
14
|
import { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema } from "./analytics.schema.js";
|
|
15
15
|
import "./curators.js";
|
|
16
16
|
import "./delayed-intents.js";
|
|
17
|
-
import { creditAccountFrozen, liquidatorNotEligible, notEmergencyLiquidator } from "./errors/liquidation-errors.js";
|
|
17
|
+
import { creditAccountFrozen, liquidatorNotEligible, notEmergencyLiquidator, partialLiquidationImpossible } from "./errors/liquidation-errors.js";
|
|
18
18
|
import { accountNotMidasGreenlisted, creditManagerPaused, debtOutOfRange, forbiddenToken, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, leverageOutOfRange, marketExpired, poolPaused, poolSunset, quotaAboveMax, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, reservePriceLimited, rwaOpenRequirementsNotMet } from "./errors/operation-errors.js";
|
|
19
19
|
import { unpriceableTokenError } from "./errors/oracle-errors.js";
|
|
20
20
|
import { creditAccountNotEmpty, creditAccountNotFound, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, unexpectedFailure, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress } from "./errors/prepare-errors.js";
|
|
@@ -33,4 +33,4 @@ import { safeValue, sdkErr, sdkOk } from "./result.js";
|
|
|
33
33
|
import "./rewards.js";
|
|
34
34
|
import "./withdrawals.js";
|
|
35
35
|
import { positionClaimableWithdrawalSchema, positionPendingWithdrawalSchema, positionWithdrawalsSchema, withdrawalOutputAmountSchema } from "./withdrawals.schema.js";
|
|
36
|
-
export { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, CHART_METRIC_UNITS, CHART_RANGES, CHART_UNAVAILABLE_CODES, FILTER_ALL, KYC_REGISTRATION_LINKS, POOL_OPPORTUNITY_CHART_METRICS, POOL_POSITION_CHART_METRICS, PROTOCOL_CHART_METRICS, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_PROTOCOLS, SECURITIZE_REGISTER_VAULT_TYPES, STRATEGY_OPPORTUNITY_CHART_METRICS, STRATEGY_POSITION_CHART_METRICS, STRATEGY_POSITION_COLLATERAL_ERROR, accountNotMidasGreenlisted, amountSchema, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema, apyBreakdownSchema, asEstimated, assetTypeSchema, backendPreferred, booleanParamSchema, borrowRateBreakdownSchema, bpsSchema, chainFailedSchema, chainIdSchema, chainMetadataSchema, chainSucceededSchema, chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, compareTagOf, creditAccountFrozen, creditAccountNotEmpty, creditAccountNotFound, creditManagerPaused, curatorNameSchema, curatorSchema, dataSourceSchema, debtOutOfRange, delayedReceivedAssetSchema, encodeFlag, filterAllSchema, filterable, forbiddenToken, instantReceivedAssetSchema, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, isFilterSet, kycRequirementSchema, leverageOutOfRange, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, liquidatorNotEligible, malformedTransaction, marketExpired, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, notEmergencyLiquidator, noticeKindSchema, noticeSchema, offchainOnly, onchainOnly, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterQueryParamsSchema, opportunityFilterQuerySchema, opportunityFilterSchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, opportunityTotalsSchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolOpportunityChartMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPaused, poolPositionChartMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, poolSunset, positionClaimableWithdrawalSchema, positionCollateralSchema, positionFilterQueryParamsSchema, positionFilterQuerySchema, positionFilterSchema, positionId, positionKeySchema, positionKindSchema, positionPendingWithdrawalSchema, positionSchema, positionTransactionKindSchema, positionTransactionSchema, positionWithdrawalsSchema, positionsTotalsSchema, priceFeedDataSchema, priceFeedSummarySchema, protocolChartMetricSchema, quotaAboveMax, quotaAssetSchema, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, reservePriceLimited, responseMetadataSchema, responseSchema, rewardsPnLSchema, rewardsSchema, rwaOpenRequirementsNotMet, rwaProtocolSchema, safeValue, sdkErr, sdkOk, strategyOpportunityChartMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionChartMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenQuotaRateSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, tolerance, txCallSchema, underlyingTokenSchema, unexpectedFailure, unpriceableTokenError, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress, withdrawalOutputAmountSchema };
|
|
36
|
+
export { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, CHART_METRIC_UNITS, CHART_RANGES, CHART_UNAVAILABLE_CODES, FILTER_ALL, KYC_REGISTRATION_LINKS, POOL_OPPORTUNITY_CHART_METRICS, POOL_POSITION_CHART_METRICS, PROTOCOL_CHART_METRICS, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_PROTOCOLS, SECURITIZE_REGISTER_VAULT_TYPES, STRATEGY_OPPORTUNITY_CHART_METRICS, STRATEGY_POSITION_CHART_METRICS, STRATEGY_POSITION_COLLATERAL_ERROR, accountNotMidasGreenlisted, amountSchema, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema, apyBreakdownSchema, asEstimated, assetTypeSchema, backendPreferred, booleanParamSchema, borrowRateBreakdownSchema, bpsSchema, chainFailedSchema, chainIdSchema, chainMetadataSchema, chainSucceededSchema, chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, compareTagOf, creditAccountFrozen, creditAccountNotEmpty, creditAccountNotFound, creditManagerPaused, curatorNameSchema, curatorSchema, dataSourceSchema, debtOutOfRange, delayedReceivedAssetSchema, encodeFlag, filterAllSchema, filterable, forbiddenToken, instantReceivedAssetSchema, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, isFilterSet, kycRequirementSchema, leverageOutOfRange, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, liquidatorNotEligible, malformedTransaction, marketExpired, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, notEmergencyLiquidator, noticeKindSchema, noticeSchema, offchainOnly, onchainOnly, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterQueryParamsSchema, opportunityFilterQuerySchema, opportunityFilterSchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, opportunityTotalsSchema, partialLiquidationImpossible, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolOpportunityChartMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPaused, poolPositionChartMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, poolSunset, positionClaimableWithdrawalSchema, positionCollateralSchema, positionFilterQueryParamsSchema, positionFilterQuerySchema, positionFilterSchema, positionId, positionKeySchema, positionKindSchema, positionPendingWithdrawalSchema, positionSchema, positionTransactionKindSchema, positionTransactionSchema, positionWithdrawalsSchema, positionsTotalsSchema, priceFeedDataSchema, priceFeedSummarySchema, protocolChartMetricSchema, quotaAboveMax, quotaAssetSchema, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, reservePriceLimited, responseMetadataSchema, responseSchema, rewardsPnLSchema, rewardsSchema, rwaOpenRequirementsNotMet, rwaProtocolSchema, safeValue, sdkErr, sdkOk, strategyOpportunityChartMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionChartMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenQuotaRateSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, tolerance, txCallSchema, underlyingTokenSchema, unexpectedFailure, unpriceableTokenError, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress, withdrawalOutputAmountSchema };
|
|
@@ -85,7 +85,8 @@ const liquidationDetailsSchema = z.object({
|
|
|
85
85
|
isCreditAccountFrozen: z.boolean(),
|
|
86
86
|
kycProtocol: z.string().optional(),
|
|
87
87
|
kycToken: tokenSchema.optional(),
|
|
88
|
-
approve: liquidationApprovalSchema.optional()
|
|
88
|
+
approve: liquidationApprovalSchema.optional(),
|
|
89
|
+
isPartiallyLiquidatable: z.boolean().optional()
|
|
89
90
|
});
|
|
90
91
|
//#endregion
|
|
91
92
|
export { delayedReceivedAssetSchema, instantReceivedAssetSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionSchema, receivedAssetSchema };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { OffchainNotices };
|
|
1
|
+
export { OffchainNotices } from "./OffchainNotices.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, chainlinkReadableAggregatorAbi, compositePriceFeedAbi, constantPriceFeedAbi, curveCryptoLpPriceFeedAbi, curveStableLpPriceFeedAbi, curveUsdPriceFeedAbi, erc4626PriceFeedAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCurvePoolAbi, iMellowVaultAbi, iRedstonePriceFeedEventsAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, iwstEthAbi, iyVaultAbi, mellowLrtPriceFeedAbi, pendleTWAPPTPriceFeedAbi, pythPriceFeedAbi, redstonePriceFeedAbi, wstEthPriceFeedAbi, yearnPriceFeedAbi, zeroPriceFeedAbi };
|
|
1
|
+
export { boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, chainlinkReadableAggregatorAbi, compositePriceFeedAbi, constantPriceFeedAbi, curveCryptoLpPriceFeedAbi, curveStableLpPriceFeedAbi, curveUsdPriceFeedAbi, erc4626PriceFeedAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCurvePoolAbi, iMellowVaultAbi, iRedstonePriceFeedEventsAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, iwstEthAbi, iyVaultAbi, mellowLrtPriceFeedAbi, pendleTWAPPTPriceFeedAbi, pythPriceFeedAbi, redstonePriceFeedAbi, wstEthPriceFeedAbi, yearnPriceFeedAbi, zeroPriceFeedAbi } from "./oracles.js";
|