@gearbox-protocol/sdk 16.2.0 → 16.3.0-next.2
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/abi/rwa/iMidasAccessControl.js +23 -0
- package/dist/cjs/abi/rwa/iMidasDegenNFT.js +92 -0
- package/dist/cjs/history/assembleOperations.js +3 -3
- package/dist/cjs/history/classifyMulticallOperations.js +7 -7
- package/dist/cjs/history/index.js +13 -0
- package/dist/cjs/history/parseCreditAccountTransaction.js +5 -5
- package/dist/cjs/{preview → history}/trace/errors.js +1 -1
- package/dist/cjs/{preview → history}/trace/extractAdapterCallTraces.js +1 -1
- package/dist/cjs/{preview → history}/trace/extractTransfers.js +3 -3
- package/dist/cjs/{preview → history}/trace/findFacadeCalls.js +3 -3
- package/dist/cjs/history/trace/index.js +14 -0
- package/dist/cjs/model/errors/index.js +37 -0
- package/dist/cjs/model/errors/liquidation-errors.js +32 -0
- package/dist/cjs/model/errors/operation-errors.js +135 -0
- package/dist/cjs/{onchain/market/oracle/errors.js → model/errors/oracle-errors.js} +1 -1
- package/dist/cjs/model/errors/prepare-errors.js +108 -0
- package/dist/cjs/model/errors/preview-errors.js +12 -0
- package/dist/cjs/model/index.js +45 -2
- package/dist/cjs/model/opportunities.schema.js +3 -1
- package/dist/cjs/model/positions.js +1 -1
- package/dist/cjs/model/result.js +0 -8
- package/dist/cjs/model/rwa.js +53 -0
- package/dist/cjs/model/rwa.schema.js +20 -0
- package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +1 -1
- package/dist/cjs/onchain/accounts/index.js +0 -2
- package/dist/cjs/onchain/accounts/intents/guards.js +42 -66
- package/dist/cjs/onchain/accounts/intents/index.js +38 -35
- package/dist/cjs/onchain/accounts/intents/leverage-band.js +1 -1
- package/dist/cjs/onchain/accounts/intents/math.js +19 -15
- package/dist/cjs/onchain/accounts/intents/open-strategy.js +6 -4
- package/dist/cjs/onchain/accounts/intents/plan.js +52 -48
- package/dist/cjs/onchain/accounts/intents/realize.js +26 -24
- package/dist/cjs/onchain/accounts/intents/tail.js +15 -12
- package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +7 -0
- package/dist/cjs/onchain/accounts/intents/tests/finish-withdraw.fixtures.js +6 -6
- package/dist/cjs/onchain/accounts/intents/tests/withdraw.fixtures.js +12 -12
- package/dist/cjs/onchain/accounts/intents/view.js +1 -1
- package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +2 -2
- package/dist/cjs/onchain/accounts/withdrawal-compressor/index.js +0 -1
- package/dist/cjs/onchain/index.js +130 -38
- package/dist/cjs/onchain/market/MarketSuite.js +10 -4
- package/dist/cjs/onchain/market/adapters/index.js +1 -0
- package/dist/cjs/onchain/market/credit/CreditSuite.js +77 -15
- package/dist/cjs/onchain/market/index.js +8 -8
- package/dist/cjs/onchain/market/oracle/PriceOracleBaseContract.js +6 -6
- package/dist/cjs/onchain/market/oracle/index.js +0 -2
- package/dist/cjs/onchain/market/pool/PoolQuotaKeeperV310Contract.js +8 -0
- package/dist/cjs/onchain/market/rwa/RWARegistry.js +3 -2
- package/dist/cjs/onchain/market/rwa/createDegenNFT.js +53 -0
- package/dist/cjs/onchain/market/rwa/index.js +7 -5
- package/dist/cjs/onchain/market/rwa/midas/MidasDegenNFT.js +56 -0
- package/dist/cjs/onchain/market/rwa/midas/constants.js +2 -0
- package/dist/cjs/onchain/market/rwa/midas/index.js +3 -0
- package/dist/cjs/onchain/market/rwa/securitize/SecuritizeDegenNFT.js +22 -3
- package/dist/cjs/onchain/market/rwa/securitize/SecuritizeRWAFactory.js +9 -9
- package/dist/cjs/onchain/market/rwa/securitize/constants.js +2 -2
- package/dist/cjs/onchain/market/rwa/securitize/index.js +4 -3
- package/dist/cjs/onchain/market/rwa/securitize/types.js +0 -29
- package/dist/cjs/onchain/market/rwa/types.js +0 -7
- package/dist/cjs/onchain/market/zapper/index.js +0 -1
- package/dist/cjs/onchain/opportunities/MultichainOpportunitiesService.js +2 -2
- package/dist/cjs/onchain/opportunities/OpportunitiesService.js +11 -3
- package/dist/cjs/onchain/pools/PoolService.js +10 -16
- package/dist/cjs/onchain/preview/index.js +41 -0
- package/dist/cjs/{preview → onchain/preview}/parse/classifyInnerOperations.js +2 -3
- package/dist/cjs/onchain/preview/parse/index.js +14 -0
- package/dist/cjs/{preview → onchain/preview}/parse/parseFacadeOperationCalldata.js +3 -3
- package/dist/cjs/{preview → onchain/preview}/parse/parseOperationCalldata.js +16 -17
- package/dist/cjs/{preview → onchain/preview}/parse/parsePoolOperationCalldata.js +3 -3
- package/dist/cjs/{preview → onchain/preview}/parse/parseRWAFactoryOperationCalldata.js +11 -12
- package/dist/cjs/{preview → onchain/preview}/parse/types.js +1 -1
- package/dist/cjs/{preview → onchain/preview}/preview/CreditAccountState.js +3 -4
- package/dist/cjs/{preview → onchain/preview}/preview/buildDelayedStrategyPositionOperationPreview.js +10 -11
- package/dist/cjs/{preview → onchain/preview}/preview/detectCloseOrRepay.js +2 -3
- package/dist/cjs/{preview → onchain/preview}/preview/detectDelayedClaim.js +4 -5
- package/dist/cjs/{preview → onchain/preview}/preview/detectDelayedOperation.js +5 -6
- package/dist/cjs/{preview → onchain/preview}/preview/estimateClaimableAt.js +1 -1
- package/dist/cjs/onchain/preview/preview/index.js +26 -0
- package/dist/cjs/{preview → onchain/preview}/preview/previewAdjustStrategyPosition.js +18 -22
- package/dist/cjs/{preview → onchain/preview}/preview/previewExitOrRepayStrategyPosition.js +22 -28
- package/dist/cjs/onchain/preview/preview/previewOpenStrategyPosition.js +60 -0
- package/dist/cjs/onchain/preview/preview/previewOperation.js +119 -0
- package/dist/cjs/{preview/simulate/simulatePoolOperation.js → onchain/preview/preview/previewPoolPositionOperation.js} +46 -32
- package/dist/cjs/onchain/preview/preview/replayInnerOperations.js +109 -0
- package/dist/cjs/onchain/preview/preview/replayMulticall.js +22 -0
- package/dist/cjs/{preview → onchain/preview}/preview/unwrapNativeCollateral.js +11 -14
- package/dist/cjs/onchain/validation/bundles/checkAccountQuotas.js +20 -0
- package/dist/cjs/onchain/validation/bundles/checkCollateralFunding.js +59 -0
- package/dist/cjs/onchain/validation/bundles/checkCreditOperation.js +65 -0
- package/dist/cjs/onchain/validation/bundles/checkDraw.js +28 -0
- package/dist/cjs/onchain/validation/bundles/checkHealthFactors.js +27 -0
- package/dist/cjs/onchain/validation/bundles/checkLiquidationEligibility.js +33 -0
- package/dist/cjs/onchain/validation/bundles/checkLiquidationFunding.js +29 -0
- package/dist/cjs/onchain/validation/bundles/checkMarket.js +24 -0
- package/dist/cjs/onchain/validation/bundles/checkObtained.js +13 -0
- package/dist/cjs/onchain/validation/bundles/checkPoolFunding.js +22 -0
- package/dist/cjs/onchain/validation/bundles/checkPoolOperation.js +35 -0
- package/dist/cjs/onchain/validation/bundles/checkQuotasAsked.js +20 -0
- package/dist/cjs/onchain/validation/bundles/checkRWAOpenRequirements.js +33 -0
- package/dist/cjs/onchain/validation/bundles/checkRWAOpening.js +24 -0
- package/dist/cjs/onchain/validation/bundles/checkWallet.js +22 -0
- package/dist/cjs/onchain/validation/bundles/checkWalletAllowance.js +32 -0
- package/dist/cjs/onchain/validation/bundles/checkWalletBalance.js +41 -0
- package/dist/cjs/onchain/validation/bundles/index.js +35 -0
- package/dist/cjs/onchain/validation/checkLiquidation.js +22 -0
- package/dist/cjs/onchain/validation/checkOperation.js +62 -0
- package/dist/cjs/onchain/validation/checkSimulation.js +60 -0
- package/dist/cjs/onchain/validation/checks/checkBorrowLimit.js +25 -0
- package/dist/cjs/onchain/validation/checks/checkCollateralised.js +26 -0
- package/dist/cjs/onchain/validation/checks/checkCreditAccountFrozen.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkCreditManagerPaused.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkDebtLimits.js +18 -0
- package/dist/cjs/onchain/validation/checks/checkEmergencyLiquidator.js +13 -0
- package/dist/cjs/onchain/validation/checks/checkForbiddenToken.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkLeverage.js +13 -0
- package/dist/cjs/onchain/validation/checks/checkLiquidatorEligible.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkMarketExpired.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkPoolLiquidity.js +25 -0
- package/dist/cjs/onchain/validation/checks/checkPoolPaused.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkPoolSunset.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkQuotaCount.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkQuotaLimit.js +18 -0
- package/dist/cjs/onchain/validation/checks/index.js +31 -0
- package/dist/cjs/onchain/validation/helpers/amount.js +12 -0
- package/dist/cjs/onchain/validation/helpers/health-factor-limits.js +25 -0
- package/dist/cjs/onchain/validation/helpers/index.js +11 -0
- package/dist/cjs/onchain/validation/{token.js → helpers/token.js} +4 -4
- package/dist/cjs/onchain/validation/index.js +85 -27
- package/dist/cjs/onchain/validation/raise.js +33 -0
- package/dist/cjs/sdk/index.js +6 -11
- package/dist/cjs/sdk/liquidations/LiquidationsNamespace.js +9 -0
- package/dist/cjs/sdk/opportunities/OpportunitiesNamespace.js +19 -4
- package/dist/cjs/sdk/prepare/PrepareApi.js +40 -50
- package/dist/cjs/sdk/prepare/index.js +7 -11
- package/dist/cjs/sdk/prepare/types.js +0 -4
- package/dist/cjs/sdk/preview/PreviewNamespace.js +24 -13
- package/dist/esm/abi/rwa/iMidasAccessControl.js +22 -0
- package/dist/esm/abi/rwa/iMidasDegenNFT.js +91 -0
- package/dist/esm/dev/AccountOpener.js +1 -1
- package/dist/esm/dev/withdrawalUtils.js +1 -1
- package/dist/esm/history/assembleOperations.js +2 -2
- package/dist/esm/history/classifyMulticallOperations.js +2 -2
- package/dist/esm/history/index.js +6 -1
- package/dist/esm/history/parseCreditAccountTransaction.js +3 -3
- package/dist/esm/{preview → history}/trace/errors.js +1 -1
- package/dist/esm/{preview → history}/trace/extractAdapterCallTraces.js +1 -1
- package/dist/esm/{preview → history}/trace/extractTransfers.js +2 -2
- package/dist/esm/{preview → history}/trace/findFacadeCalls.js +1 -1
- package/dist/esm/model/errors/index.js +7 -0
- package/dist/esm/model/errors/liquidation-errors.js +29 -0
- package/dist/esm/model/errors/operation-errors.js +121 -0
- package/dist/esm/{onchain/market/oracle/errors.js → model/errors/oracle-errors.js} +1 -1
- package/dist/esm/model/errors/prepare-errors.js +97 -0
- package/dist/esm/model/errors/preview-errors.js +11 -0
- package/dist/esm/model/index.js +10 -3
- package/dist/esm/model/opportunities.schema.js +3 -1
- package/dist/esm/model/positions.js +1 -1
- package/dist/esm/model/result.js +1 -8
- package/dist/esm/model/rwa.js +48 -0
- package/dist/esm/model/rwa.schema.js +18 -0
- package/dist/esm/offchain/opportunities/OffchainOpportunities.js +1 -1
- package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +2 -2
- package/dist/esm/onchain/accounts/index.js +1 -2
- package/dist/esm/onchain/accounts/intents/guards.js +29 -52
- package/dist/esm/onchain/accounts/intents/index.js +39 -35
- package/dist/esm/onchain/accounts/intents/leverage-band.js +1 -1
- package/dist/esm/onchain/accounts/intents/math.js +18 -14
- package/dist/esm/onchain/accounts/intents/open-strategy.js +8 -6
- package/dist/esm/onchain/accounts/intents/plan.js +51 -47
- package/dist/esm/onchain/accounts/intents/realize.js +26 -24
- package/dist/esm/onchain/accounts/intents/tail.js +14 -11
- package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +7 -0
- package/dist/esm/onchain/accounts/intents/tests/finish-withdraw.fixtures.js +6 -6
- package/dist/esm/onchain/accounts/intents/tests/withdraw.fixtures.js +12 -12
- package/dist/esm/onchain/accounts/intents/view.js +1 -1
- package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +3 -3
- package/dist/esm/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/index.js +0 -1
- package/dist/esm/onchain/base/TokensMeta.js +3 -3
- package/dist/esm/onchain/core/createAddressProvider.js +1 -1
- package/dist/esm/onchain/index.js +64 -11
- package/dist/esm/onchain/market/MarketSuite.js +10 -4
- package/dist/esm/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
- package/dist/esm/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/esm/onchain/market/adapters/index.js +1 -0
- package/dist/esm/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/esm/onchain/market/credit/CreditSuite.js +77 -15
- package/dist/esm/onchain/market/index.js +6 -6
- package/dist/esm/onchain/market/oracle/PriceOracleBaseContract.js +1 -1
- package/dist/esm/onchain/market/oracle/index.js +1 -2
- package/dist/esm/onchain/market/pool/PoolQuotaKeeperV310Contract.js +8 -0
- package/dist/esm/onchain/market/pool/PoolV310Contract.js +1 -1
- package/dist/esm/onchain/market/rwa/RWARegistry.js +2 -1
- package/dist/esm/onchain/market/rwa/createDegenNFT.js +52 -0
- package/dist/esm/onchain/market/rwa/index.js +6 -5
- package/dist/esm/onchain/market/rwa/midas/MidasDegenNFT.js +55 -0
- package/dist/esm/onchain/market/rwa/midas/constants.js +2 -1
- package/dist/esm/onchain/market/rwa/midas/index.js +3 -2
- package/dist/esm/onchain/market/rwa/securitize/SecuritizeDegenNFT.js +20 -2
- package/dist/esm/onchain/market/rwa/securitize/SecuritizeRWAFactory.js +4 -4
- package/dist/esm/onchain/market/rwa/securitize/constants.js +2 -2
- package/dist/esm/onchain/market/rwa/securitize/index.js +4 -3
- package/dist/esm/onchain/market/rwa/securitize/types.js +1 -29
- package/dist/esm/onchain/market/rwa/types.js +1 -7
- package/dist/esm/onchain/market/zapper/IETHZapperContract.js +1 -1
- package/dist/esm/onchain/market/zapper/ZapperContract.js +1 -1
- package/dist/esm/onchain/market/zapper/index.js +0 -1
- package/dist/esm/onchain/opportunities/MultichainOpportunitiesService.js +2 -2
- package/dist/esm/onchain/opportunities/OpportunitiesService.js +11 -3
- package/dist/esm/onchain/pools/PoolService.js +10 -16
- package/dist/esm/onchain/preview/index.js +20 -0
- package/dist/esm/{preview → onchain/preview}/parse/classifyInnerOperations.js +2 -3
- package/dist/esm/{preview → onchain/preview}/parse/index.js +0 -1
- package/dist/esm/{preview → onchain/preview}/parse/parseFacadeOperationCalldata.js +1 -1
- package/dist/esm/{preview → onchain/preview}/parse/parseOperationCalldata.js +10 -11
- package/dist/esm/{preview → onchain/preview}/parse/parsePoolOperationCalldata.js +3 -3
- package/dist/esm/{preview → onchain/preview}/parse/parseRWAFactoryOperationCalldata.js +8 -9
- package/dist/esm/{preview → onchain/preview}/parse/types.js +1 -1
- package/dist/esm/{preview → onchain/preview}/preview/CreditAccountState.js +3 -4
- package/dist/esm/{preview → onchain/preview}/preview/buildDelayedStrategyPositionOperationPreview.js +10 -11
- package/dist/esm/{preview → onchain/preview}/preview/detectCloseOrRepay.js +2 -3
- package/dist/esm/{preview → onchain/preview}/preview/detectDelayedClaim.js +4 -5
- package/dist/esm/{preview → onchain/preview}/preview/detectDelayedOperation.js +5 -6
- package/dist/esm/{preview → onchain/preview}/preview/estimateClaimableAt.js +1 -1
- package/dist/esm/{preview → onchain/preview}/preview/index.js +3 -4
- package/dist/esm/{preview → onchain/preview}/preview/previewAdjustStrategyPosition.js +17 -21
- package/dist/esm/{preview → onchain/preview}/preview/previewExitOrRepayStrategyPosition.js +20 -26
- package/dist/esm/{preview → onchain/preview}/preview/previewOpenStrategyPosition.js +25 -15
- package/dist/esm/{preview → onchain/preview}/preview/previewOperation.js +54 -35
- package/dist/esm/{preview/simulate/simulatePoolOperation.js → onchain/preview/preview/previewPoolPositionOperation.js} +46 -30
- package/dist/esm/onchain/preview/preview/replayInnerOperations.js +107 -0
- package/dist/esm/onchain/preview/preview/replayMulticall.js +21 -0
- package/dist/esm/{preview → onchain/preview}/preview/unwrapNativeCollateral.js +11 -14
- package/dist/esm/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/esm/onchain/validation/bundles/checkAccountQuotas.js +19 -0
- package/dist/esm/onchain/validation/bundles/checkCollateralFunding.js +58 -0
- package/dist/esm/onchain/validation/bundles/checkCreditOperation.js +64 -0
- package/dist/esm/onchain/validation/bundles/checkDraw.js +27 -0
- package/dist/esm/onchain/validation/bundles/checkHealthFactors.js +26 -0
- package/dist/esm/onchain/validation/bundles/checkLiquidationEligibility.js +32 -0
- package/dist/esm/onchain/validation/bundles/checkLiquidationFunding.js +28 -0
- package/dist/esm/onchain/validation/bundles/checkMarket.js +23 -0
- package/dist/esm/onchain/validation/bundles/checkObtained.js +12 -0
- package/dist/esm/onchain/validation/bundles/checkPoolFunding.js +21 -0
- package/dist/esm/onchain/validation/bundles/checkPoolOperation.js +34 -0
- package/dist/esm/onchain/validation/bundles/checkQuotasAsked.js +19 -0
- package/dist/esm/onchain/validation/bundles/checkRWAOpenRequirements.js +32 -0
- package/dist/esm/onchain/validation/bundles/checkRWAOpening.js +23 -0
- package/dist/esm/onchain/validation/bundles/checkWallet.js +21 -0
- package/dist/esm/onchain/validation/bundles/checkWalletAllowance.js +31 -0
- package/dist/esm/onchain/validation/bundles/checkWalletBalance.js +40 -0
- package/dist/esm/onchain/validation/bundles/index.js +18 -0
- package/dist/esm/onchain/validation/checkLiquidation.js +21 -0
- package/dist/esm/onchain/validation/checkOperation.js +61 -0
- package/dist/esm/onchain/validation/checkSimulation.js +59 -0
- package/dist/esm/onchain/validation/checks/checkBorrowLimit.js +24 -0
- package/dist/esm/onchain/validation/checks/checkCollateralised.js +25 -0
- package/dist/esm/onchain/validation/checks/checkCreditAccountFrozen.js +9 -0
- package/dist/esm/onchain/validation/checks/checkCreditManagerPaused.js +9 -0
- package/dist/esm/onchain/validation/checks/checkDebtLimits.js +17 -0
- package/dist/esm/onchain/validation/checks/checkEmergencyLiquidator.js +12 -0
- package/dist/esm/onchain/validation/checks/checkForbiddenToken.js +9 -0
- package/dist/esm/onchain/validation/checks/checkLeverage.js +12 -0
- package/dist/esm/onchain/validation/checks/checkLiquidatorEligible.js +9 -0
- package/dist/esm/onchain/validation/checks/checkMarketExpired.js +9 -0
- package/dist/esm/onchain/validation/checks/checkPoolLiquidity.js +24 -0
- package/dist/esm/onchain/validation/checks/checkPoolPaused.js +9 -0
- package/dist/esm/onchain/validation/checks/checkPoolSunset.js +9 -0
- package/dist/esm/onchain/validation/checks/checkQuotaCount.js +9 -0
- package/dist/esm/onchain/validation/checks/checkQuotaLimit.js +17 -0
- package/dist/esm/onchain/validation/checks/index.js +16 -0
- package/dist/esm/onchain/validation/helpers/amount.js +11 -0
- package/dist/esm/onchain/validation/helpers/health-factor-limits.js +21 -0
- package/dist/esm/onchain/validation/helpers/index.js +4 -0
- package/dist/esm/onchain/validation/{token.js → helpers/token.js} +3 -3
- package/dist/esm/onchain/validation/index.js +43 -4
- package/dist/esm/onchain/validation/raise.js +31 -0
- package/dist/esm/sdk/index.js +2 -3
- package/dist/esm/sdk/liquidations/LiquidationsNamespace.js +9 -0
- package/dist/esm/sdk/opportunities/OpportunitiesNamespace.js +19 -4
- package/dist/esm/sdk/prepare/PrepareApi.js +25 -35
- package/dist/esm/sdk/prepare/index.js +3 -3
- package/dist/esm/sdk/prepare/types.js +1 -2
- package/dist/esm/sdk/preview/PreviewNamespace.js +24 -13
- package/dist/types/abi/rwa/iMidasAccessControl.d.ts +22 -0
- package/dist/types/abi/rwa/iMidasDegenNFT.d.ts +82 -0
- package/dist/types/history/assembleOperations.d.ts +4 -5
- package/dist/types/history/classifyMulticallOperations.d.ts +3 -4
- package/dist/types/history/index.d.ts +8 -2
- package/dist/types/history/mapOperations.d.ts +1 -1
- package/dist/types/{preview → history}/trace/errors.d.ts +1 -1
- package/dist/types/{preview → history}/trace/extractAdapterCallTraces.d.ts +1 -1
- package/dist/types/{preview → history}/trace/extractTransfers.d.ts +2 -3
- package/dist/types/{preview → history}/trace/findFacadeCalls.d.ts +1 -1
- package/dist/types/{preview → history}/trace/types.d.ts +1 -1
- package/dist/types/history/types.d.ts +2 -3
- package/dist/types/model/errors/base.d.ts +28 -0
- package/dist/types/model/errors/index.d.ts +7 -0
- package/dist/types/model/errors/liquidation-errors.d.ts +45 -0
- package/dist/types/model/errors/operation-errors.d.ts +216 -0
- package/dist/types/{onchain/market/oracle/errors.d.ts → model/errors/oracle-errors.d.ts} +3 -5
- package/dist/types/model/errors/prepare-errors.d.ts +131 -0
- package/dist/types/model/errors/preview-errors.d.ts +72 -0
- package/dist/types/model/index.d.ts +12 -4
- package/dist/types/model/opportunities.d.ts +12 -2
- package/dist/types/model/opportunities.schema.d.ts +30 -0
- package/dist/types/model/positions.d.ts +2 -2
- package/dist/types/model/previews.d.ts +52 -113
- package/dist/types/model/result.d.ts +4 -8
- package/dist/types/model/rwa.d.ts +167 -0
- package/dist/types/model/rwa.schema.d.ts +29 -0
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +2 -1
- package/dist/types/offchain/opportunities/types.d.ts +4 -1
- package/dist/types/onchain/accounts/CreditAccountsServiceV310.d.ts +3 -1
- package/dist/types/onchain/accounts/index.d.ts +2 -4
- package/dist/types/onchain/accounts/intents/guards.d.ts +8 -18
- package/dist/types/onchain/accounts/intents/index.d.ts +20 -19
- package/dist/types/onchain/accounts/intents/leverage-band.d.ts +1 -1
- package/dist/types/onchain/accounts/intents/math.d.ts +6 -6
- package/dist/types/onchain/accounts/intents/operations.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/plan.d.ts +9 -9
- package/dist/types/onchain/accounts/intents/tail.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/testing/expect.d.ts +3 -3
- package/dist/types/onchain/accounts/intents/tests/finish-withdraw.fixtures.d.ts +6 -6
- package/dist/types/onchain/accounts/intents/tests/withdraw.fixtures.d.ts +12 -12
- package/dist/types/onchain/accounts/intents/types.d.ts +32 -30
- package/dist/types/onchain/accounts/types.d.ts +2 -1
- package/dist/types/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.d.ts +1 -1
- package/dist/types/onchain/accounts/withdrawal-compressor/index.d.ts +1 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/types.d.ts +1 -1
- package/dist/types/onchain/index.d.ts +73 -16
- package/dist/types/onchain/market/MarketSuite.d.ts +5 -1
- package/dist/types/onchain/market/adapters/index.d.ts +2 -1
- package/dist/types/onchain/market/adapters/transfers.d.ts +0 -7
- package/dist/types/onchain/market/credit/CreditSuite.d.ts +30 -8
- package/dist/types/onchain/market/credit/index.d.ts +2 -2
- package/dist/types/onchain/market/credit/types.d.ts +11 -1
- package/dist/types/onchain/market/index.d.ts +11 -10
- package/dist/types/onchain/market/oracle/PriceOracleBaseContract.d.ts +1 -1
- package/dist/types/onchain/market/oracle/index.d.ts +1 -2
- package/dist/types/onchain/market/oracle/types.d.ts +1 -1
- package/dist/types/onchain/market/pool/PoolQuotaKeeperV310Contract.d.ts +5 -0
- package/dist/types/onchain/market/rwa/RWARegistry.d.ts +1 -1
- package/dist/types/onchain/market/rwa/createDegenNFT.d.ts +12 -0
- package/dist/types/onchain/market/rwa/index.d.ts +10 -8
- package/dist/types/onchain/market/rwa/midas/MidasDegenNFT.d.ts +98 -0
- package/dist/types/onchain/market/rwa/midas/constants.d.ts +2 -1
- package/dist/types/onchain/market/rwa/midas/index.d.ts +3 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeDegenNFT.d.ts +8 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeRWAFactory.d.ts +4 -3
- package/dist/types/onchain/market/rwa/securitize/constants.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/index.d.ts +5 -4
- package/dist/types/onchain/market/rwa/securitize/types.d.ts +4 -110
- package/dist/types/onchain/market/rwa/types.d.ts +24 -32
- package/dist/types/onchain/market/zapper/ZapperContract.d.ts +1 -1
- package/dist/types/onchain/market/zapper/index.d.ts +1 -2
- package/dist/types/onchain/market/zapper/types.d.ts +1 -1
- package/dist/types/onchain/opportunities/MultichainOpportunitiesService.d.ts +2 -1
- package/dist/types/onchain/opportunities/OpportunitiesService.d.ts +5 -1
- package/dist/types/onchain/opportunities/types.d.ts +3 -2
- package/dist/types/onchain/pools/types.d.ts +2 -2
- package/dist/types/onchain/preview/index.d.ts +24 -0
- package/dist/types/{preview → onchain/preview}/parse/classifyInnerOperations.d.ts +4 -4
- package/dist/types/{preview → onchain/preview}/parse/index.d.ts +2 -4
- package/dist/types/{preview → onchain/preview}/parse/parseFacadeOperationCalldata.d.ts +4 -4
- package/dist/types/onchain/preview/parse/parseOperationCalldata.d.ts +18 -0
- package/dist/types/{preview → onchain/preview}/parse/parsePoolOperationCalldata.d.ts +7 -7
- package/dist/types/{preview → onchain/preview}/parse/parseRWAFactoryOperationCalldata.d.ts +4 -4
- package/dist/types/{preview → onchain/preview}/parse/types-adapters.d.ts +5 -16
- package/dist/types/{preview → onchain/preview}/parse/types-facades.d.ts +3 -3
- package/dist/types/{preview → onchain/preview}/parse/types-pools.d.ts +1 -1
- package/dist/types/{preview → onchain/preview}/parse/types-rwa.d.ts +3 -3
- package/dist/types/{preview → onchain/preview}/parse/types.d.ts +3 -3
- package/dist/types/{preview → onchain/preview}/preview/CreditAccountState.d.ts +5 -5
- package/dist/types/{preview → onchain/preview}/preview/buildDelayedStrategyPositionOperationPreview.d.ts +5 -5
- package/dist/types/{preview → onchain/preview}/preview/detectCloseOrRepay.d.ts +1 -1
- package/dist/types/{preview → onchain/preview}/preview/detectDelayedClaim.d.ts +8 -8
- package/dist/types/{preview → onchain/preview}/preview/detectDelayedOperation.d.ts +9 -9
- package/dist/types/{preview → onchain/preview}/preview/estimateClaimableAt.d.ts +6 -6
- package/dist/types/{preview → onchain/preview}/preview/index.d.ts +3 -4
- package/dist/types/onchain/preview/preview/previewAdjustStrategyPosition.d.ts +20 -0
- package/dist/types/onchain/preview/preview/previewExitOrRepayStrategyPosition.d.ts +21 -0
- package/dist/types/onchain/preview/preview/previewOpenStrategyPosition.d.ts +14 -0
- package/dist/types/onchain/preview/preview/previewOperation.d.ts +32 -0
- package/dist/types/onchain/preview/preview/previewPoolPositionOperation.d.ts +13 -0
- package/dist/types/{preview → onchain/preview}/preview/replayInnerOperations.d.ts +11 -11
- package/dist/types/{preview → onchain/preview}/preview/replayMulticall.d.ts +10 -10
- package/dist/types/{preview → onchain/preview}/preview/unwrapNativeCollateral.d.ts +10 -20
- package/dist/types/onchain/validation/bundles/checkAccountQuotas.d.ts +16 -0
- package/dist/types/onchain/validation/bundles/checkCollateralFunding.d.ts +22 -0
- package/dist/types/onchain/validation/bundles/checkCreditOperation.d.ts +31 -0
- package/dist/types/onchain/validation/bundles/checkDraw.d.ts +20 -0
- package/dist/types/onchain/validation/bundles/checkHealthFactors.d.ts +39 -0
- package/dist/types/onchain/validation/bundles/checkLiquidationEligibility.d.ts +20 -0
- package/dist/types/onchain/validation/bundles/checkLiquidationFunding.d.ts +18 -0
- package/dist/types/onchain/validation/bundles/checkMarket.d.ts +15 -0
- package/dist/types/onchain/validation/bundles/checkObtained.d.ts +9 -0
- package/dist/types/onchain/validation/bundles/checkPoolFunding.d.ts +19 -0
- package/dist/types/onchain/validation/bundles/checkPoolOperation.d.ts +31 -0
- package/dist/types/onchain/validation/bundles/checkQuotasAsked.d.ts +10 -0
- package/dist/types/onchain/validation/bundles/checkRWAOpenRequirements.d.ts +21 -0
- package/dist/types/onchain/validation/bundles/checkRWAOpening.d.ts +19 -0
- package/dist/types/onchain/validation/bundles/checkWallet.d.ts +23 -0
- package/dist/types/onchain/validation/bundles/checkWalletAllowance.d.ts +18 -0
- package/dist/types/onchain/validation/bundles/checkWalletBalance.d.ts +17 -0
- package/dist/types/onchain/validation/bundles/index.d.ts +18 -0
- package/dist/types/onchain/validation/checkLiquidation.d.ts +23 -0
- package/dist/types/onchain/validation/checkOperation.d.ts +32 -0
- package/dist/types/onchain/validation/checkSimulation.d.ts +56 -0
- package/dist/types/onchain/validation/checks/checkBorrowLimit.d.ts +21 -0
- package/dist/types/onchain/validation/checks/checkCollateralised.d.ts +25 -0
- package/dist/types/onchain/validation/checks/checkCreditAccountFrozen.d.ts +12 -0
- package/dist/types/onchain/validation/checks/checkCreditManagerPaused.d.ts +12 -0
- package/dist/types/onchain/validation/checks/checkDebtLimits.d.ts +21 -0
- package/dist/types/onchain/validation/checks/checkEmergencyLiquidator.d.ts +17 -0
- package/dist/types/onchain/validation/checks/checkForbiddenToken.d.ts +12 -0
- package/dist/types/onchain/validation/checks/checkLeverage.d.ts +12 -0
- package/dist/types/onchain/validation/checks/checkLiquidatorEligible.d.ts +13 -0
- package/dist/types/onchain/validation/checks/checkMarketExpired.d.ts +14 -0
- package/dist/types/onchain/validation/checks/checkPoolLiquidity.d.ts +20 -0
- package/dist/types/onchain/validation/checks/checkPoolPaused.d.ts +12 -0
- package/dist/types/onchain/validation/checks/checkPoolSunset.d.ts +13 -0
- package/dist/types/onchain/validation/checks/checkQuotaCount.d.ts +11 -0
- package/dist/types/onchain/validation/checks/checkQuotaLimit.d.ts +18 -0
- package/dist/types/onchain/validation/checks/index.d.ts +16 -0
- package/dist/types/onchain/validation/helpers/amount.d.ts +7 -0
- package/dist/types/onchain/validation/helpers/health-factor-limits.d.ts +21 -0
- package/dist/types/onchain/validation/helpers/index.d.ts +4 -0
- package/dist/types/onchain/validation/{token.d.ts → helpers/token.d.ts} +4 -4
- package/dist/types/onchain/validation/index.d.ts +43 -4
- package/dist/types/onchain/validation/raise.d.ts +33 -0
- package/dist/types/sdk/execute/types.d.ts +2 -2
- package/dist/types/sdk/index.d.ts +5 -6
- package/dist/types/sdk/liquidations/LiquidationsNamespace.d.ts +5 -0
- package/dist/types/sdk/liquidations/types.d.ts +8 -0
- package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +2 -1
- package/dist/types/sdk/opportunities/types.d.ts +8 -2
- package/dist/types/sdk/prepare/PrepareApi.d.ts +5 -4
- package/dist/types/sdk/prepare/index.d.ts +5 -5
- package/dist/types/sdk/prepare/types.d.ts +41 -22
- package/dist/types/sdk/preview/PreviewNamespace.d.ts +13 -3
- package/dist/types/sdk/preview/index.d.ts +2 -2
- package/dist/types/sdk/preview/types.d.ts +30 -7
- package/package.json +1 -6
- package/dist/cjs/onchain/accounts/withdrawal-compressor/errors.js +0 -1
- package/dist/cjs/onchain/market/zapper/errors.js +0 -1
- package/dist/cjs/onchain/validation/checks.js +0 -258
- package/dist/cjs/onchain/validation/refusal.js +0 -39
- package/dist/cjs/preview/index.js +0 -86
- package/dist/cjs/preview/package.json +0 -1
- package/dist/cjs/preview/parse/errors.js +0 -1
- package/dist/cjs/preview/parse/index.js +0 -15
- package/dist/cjs/preview/prerequisites/AllowancePrerequisite.js +0 -38
- package/dist/cjs/preview/prerequisites/BalancePrerequisite.js +0 -52
- package/dist/cjs/preview/prerequisites/Prerequisite.js +0 -52
- package/dist/cjs/preview/prerequisites/RWAOpenRequirementsPrerequisite.js +0 -53
- package/dist/cjs/preview/prerequisites/buildCollateralPrerequisites.js +0 -63
- package/dist/cjs/preview/prerequisites/buildPartialLiquidationPrerequisites.js +0 -19
- package/dist/cjs/preview/prerequisites/buildPoolPrerequisites.js +0 -76
- package/dist/cjs/preview/prerequisites/buildRWAPrerequisites.js +0 -39
- package/dist/cjs/preview/prerequisites/checkPrerequisites.js +0 -74
- package/dist/cjs/preview/prerequisites/helpers.js +0 -23
- package/dist/cjs/preview/prerequisites/index.js +0 -12
- package/dist/cjs/preview/preview/errors.js +0 -85
- package/dist/cjs/preview/preview/index.js +0 -33
- package/dist/cjs/preview/preview/previewOpenStrategyPosition.js +0 -50
- package/dist/cjs/preview/preview/previewOperation.js +0 -100
- package/dist/cjs/preview/preview/previewPoolPositionOperation.js +0 -49
- package/dist/cjs/preview/preview/replayInnerOperations.js +0 -109
- package/dist/cjs/preview/preview/replayMulticall.js +0 -19
- package/dist/cjs/preview/simulate/errors.js +0 -73
- package/dist/cjs/preview/simulate/index.js +0 -11
- package/dist/cjs/preview/simulate/simulateFacadeOperation.js +0 -15
- package/dist/cjs/preview/simulate/simulateOperation.js +0 -29
- package/dist/cjs/preview/simulate/simulateRWAOperation.js +0 -15
- package/dist/cjs/preview/simulate/types.js +0 -1
- package/dist/cjs/preview/trace/index.js +0 -14
- package/dist/cjs/preview/trace/types.js +0 -1
- package/dist/cjs/preview/types.js +0 -1
- package/dist/cjs/preview/validate/checkOperation.js +0 -187
- package/dist/cjs/preview/validate/checkSimulation.js +0 -39
- package/dist/cjs/preview/validate/index.js +0 -8
- package/dist/cjs/sdk/prepare/errors.js +0 -114
- package/dist/esm/onchain/accounts/withdrawal-compressor/errors.js +0 -1
- package/dist/esm/onchain/market/zapper/errors.js +0 -1
- package/dist/esm/onchain/validation/checks.js +0 -238
- package/dist/esm/onchain/validation/refusal.js +0 -36
- package/dist/esm/preview/index.js +0 -38
- package/dist/esm/preview/package.json +0 -1
- package/dist/esm/preview/parse/errors.js +0 -1
- package/dist/esm/preview/prerequisites/AllowancePrerequisite.js +0 -37
- package/dist/esm/preview/prerequisites/BalancePrerequisite.js +0 -51
- package/dist/esm/preview/prerequisites/Prerequisite.js +0 -51
- package/dist/esm/preview/prerequisites/RWAOpenRequirementsPrerequisite.js +0 -52
- package/dist/esm/preview/prerequisites/buildCollateralPrerequisites.js +0 -62
- package/dist/esm/preview/prerequisites/buildPartialLiquidationPrerequisites.js +0 -18
- package/dist/esm/preview/prerequisites/buildPoolPrerequisites.js +0 -75
- package/dist/esm/preview/prerequisites/buildRWAPrerequisites.js +0 -38
- package/dist/esm/preview/prerequisites/checkPrerequisites.js +0 -73
- package/dist/esm/preview/prerequisites/helpers.js +0 -22
- package/dist/esm/preview/prerequisites/index.js +0 -7
- package/dist/esm/preview/preview/errors.js +0 -79
- package/dist/esm/preview/preview/previewPoolPositionOperation.js +0 -48
- package/dist/esm/preview/preview/replayInnerOperations.js +0 -107
- package/dist/esm/preview/preview/replayMulticall.js +0 -18
- package/dist/esm/preview/simulate/errors.js +0 -71
- package/dist/esm/preview/simulate/index.js +0 -6
- package/dist/esm/preview/simulate/simulateFacadeOperation.js +0 -14
- package/dist/esm/preview/simulate/simulateOperation.js +0 -28
- package/dist/esm/preview/simulate/simulateRWAOperation.js +0 -14
- package/dist/esm/preview/simulate/types.js +0 -1
- package/dist/esm/preview/trace/types.js +0 -1
- package/dist/esm/preview/types.js +0 -1
- package/dist/esm/preview/validate/checkOperation.js +0 -183
- package/dist/esm/preview/validate/checkSimulation.js +0 -38
- package/dist/esm/preview/validate/index.js +0 -3
- package/dist/esm/sdk/prepare/errors.js +0 -108
- package/dist/types/model/errors.d.ts +0 -46
- package/dist/types/onchain/accounts/withdrawal-compressor/errors.d.ts +0 -20
- package/dist/types/onchain/market/zapper/errors.d.ts +0 -18
- package/dist/types/onchain/validation/checks.d.ts +0 -164
- package/dist/types/onchain/validation/refusal.d.ts +0 -242
- package/dist/types/preview/index.d.ts +0 -47
- package/dist/types/preview/parse/errors.d.ts +0 -29
- package/dist/types/preview/parse/parseOperationCalldata.d.ts +0 -18
- package/dist/types/preview/prerequisites/AllowancePrerequisite.d.ts +0 -26
- package/dist/types/preview/prerequisites/BalancePrerequisite.d.ts +0 -29
- package/dist/types/preview/prerequisites/Prerequisite.d.ts +0 -26
- package/dist/types/preview/prerequisites/RWAOpenRequirementsPrerequisite.d.ts +0 -55
- package/dist/types/preview/prerequisites/buildCollateralPrerequisites.d.ts +0 -20
- package/dist/types/preview/prerequisites/buildPartialLiquidationPrerequisites.d.ts +0 -12
- package/dist/types/preview/prerequisites/buildPoolPrerequisites.d.ts +0 -12
- package/dist/types/preview/prerequisites/buildRWAPrerequisites.d.ts +0 -26
- package/dist/types/preview/prerequisites/checkPrerequisites.d.ts +0 -28
- package/dist/types/preview/prerequisites/helpers.d.ts +0 -10
- package/dist/types/preview/prerequisites/index.d.ts +0 -7
- package/dist/types/preview/prerequisites/types.d.ts +0 -53
- package/dist/types/preview/preview/errors.d.ts +0 -44
- package/dist/types/preview/preview/previewAdjustStrategyPosition.d.ts +0 -19
- package/dist/types/preview/preview/previewExitOrRepayStrategyPosition.d.ts +0 -18
- package/dist/types/preview/preview/previewOpenStrategyPosition.d.ts +0 -12
- package/dist/types/preview/preview/previewOperation.d.ts +0 -32
- package/dist/types/preview/preview/previewPoolPositionOperation.d.ts +0 -13
- package/dist/types/preview/simulate/errors.d.ts +0 -52
- package/dist/types/preview/simulate/index.d.ts +0 -7
- package/dist/types/preview/simulate/simulateFacadeOperation.d.ts +0 -16
- package/dist/types/preview/simulate/simulateOperation.d.ts +0 -12
- package/dist/types/preview/simulate/simulatePoolOperation.d.ts +0 -42
- package/dist/types/preview/simulate/simulateRWAOperation.d.ts +0 -16
- package/dist/types/preview/simulate/types.d.ts +0 -48
- package/dist/types/preview/types.d.ts +0 -65
- package/dist/types/preview/validate/checkOperation.d.ts +0 -71
- package/dist/types/preview/validate/checkSimulation.d.ts +0 -32
- package/dist/types/preview/validate/index.d.ts +0 -3
- package/dist/types/sdk/prepare/errors.d.ts +0 -343
- /package/dist/cjs/{preview/prerequisites → history/trace}/types.js +0 -0
- /package/dist/cjs/model/{errors.js → errors/base.js} +0 -0
- /package/dist/cjs/{preview → onchain/preview}/parse/types-adapters.js +0 -0
- /package/dist/cjs/{preview → onchain/preview}/parse/types-facades.js +0 -0
- /package/dist/cjs/{preview → onchain/preview}/parse/types-pools.js +0 -0
- /package/dist/cjs/{preview → onchain/preview}/parse/types-rwa.js +0 -0
- /package/dist/esm/{preview → history}/trace/index.js +0 -0
- /package/dist/esm/{preview/prerequisites → history/trace}/types.js +0 -0
- /package/dist/esm/model/{errors.js → errors/base.js} +0 -0
- /package/dist/esm/{preview → onchain/preview}/parse/types-adapters.js +0 -0
- /package/dist/esm/{preview → onchain/preview}/parse/types-facades.js +0 -0
- /package/dist/esm/{preview → onchain/preview}/parse/types-pools.js +0 -0
- /package/dist/esm/{preview → onchain/preview}/parse/types-rwa.js +0 -0
- /package/dist/types/{preview → history}/trace/index.d.ts +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Bps } from "../../model/primitives.js";
|
|
2
|
-
import { AccountHoldings, AccountMetrics, AccountProjection, OperationPreview } from "../../model/previews.js";
|
|
3
|
-
import "../../model/index.js";
|
|
4
|
-
import { AddressMap } from "../../onchain/utils/AddressMap.js";
|
|
5
|
-
import { CreditSuite } from "../../onchain/market/credit/CreditSuite.js";
|
|
6
|
-
import { OnchainSDK } from "../../onchain/OnchainSDK.js";
|
|
7
|
-
import { PreviewIssue } from "../../onchain/validation/refusal.js";
|
|
8
|
-
import "../../onchain/index.js";
|
|
9
|
-
//#region src/preview/validate/checkOperation.d.ts
|
|
10
|
-
/** Omitting a bar switches its check off — there is no single right one. */
|
|
11
|
-
interface CheckOperationOptions {
|
|
12
|
-
/** Lowest acceptable health factor at main prices, in bps. */
|
|
13
|
-
minHealthFactor?: Bps;
|
|
14
|
-
/** Lowest acceptable health factor at safe prices, in bps. */
|
|
15
|
-
minSafeHealthFactor?: Bps;
|
|
16
|
-
/**
|
|
17
|
-
* Balances the operation is funded from, by token. Given, the wallet's side
|
|
18
|
-
* is checked offline; omitted, funding is left to `checkPrerequisites`.
|
|
19
|
-
*/
|
|
20
|
-
balances?: AddressMap<bigint>;
|
|
21
|
-
/**
|
|
22
|
-
* The factor the account stands at now. Given, an operation that raises it
|
|
23
|
-
* passes even from under the bar — the top-ups that rescue a position would
|
|
24
|
-
* otherwise be refused by the very check meant to protect it.
|
|
25
|
-
*/
|
|
26
|
-
currentHealthFactor?: Bps;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Whether a parsed operation may be signed at all — the protocol state that
|
|
30
|
-
* `checkPrerequisites` leaves out, since that one covers only what the sender
|
|
31
|
-
* can fix themselves.
|
|
32
|
-
*
|
|
33
|
-
* Synchronous: the preview carries the numbers and the market is attached.
|
|
34
|
-
* Reports the most fundamental issue it finds and stops there, which is the one
|
|
35
|
-
* a caller acts on.
|
|
36
|
-
*/
|
|
37
|
-
declare function checkOperation(input: {
|
|
38
|
-
sdk: OnchainSDK;
|
|
39
|
-
preview: OperationPreview;
|
|
40
|
-
}, options?: CheckOperationOptions): PreviewIssue | null;
|
|
41
|
-
/** What the market itself refuses, whatever the operation does. */
|
|
42
|
-
declare function marketIssues(suite: CreditSuite): PreviewIssue | null;
|
|
43
|
-
/**
|
|
44
|
-
* A bar that reads nothing but the projected account, so a parsed transaction
|
|
45
|
-
* and a simulated one are held to it by the same code.
|
|
46
|
-
*
|
|
47
|
-
* These stay separate functions rather than one block because the order the
|
|
48
|
-
* checks run in is the answer: `checkOperation` interleaves the checks that
|
|
49
|
-
* need an operation's *delta* between them, and the caller acts on the first
|
|
50
|
-
* issue reported.
|
|
51
|
-
*/
|
|
52
|
-
declare function quotaCountIssue(suite: CreditSuite, account: Pick<AccountProjection, "quotas">): PreviewIssue | null;
|
|
53
|
-
/**
|
|
54
|
-
* An account's factors, in whichever branch of a routed leg the caller means to
|
|
55
|
-
* be held to: `prepare` reports the outcome the router expects, `preview` the
|
|
56
|
-
* floor its calldata guarantees. The bar is indifferent — it weighs the numbers
|
|
57
|
-
* it is handed — and passing them one by one is what makes the choice visible
|
|
58
|
-
* where it is made.
|
|
59
|
-
*/
|
|
60
|
-
interface WeighedFactors extends Pick<AccountHoldings, "totalDebt">, Pick<AccountMetrics, "healthFactor" | "safeHealthFactor"> {}
|
|
61
|
-
/**
|
|
62
|
-
* The account against whichever bars the caller holds it to.
|
|
63
|
-
*
|
|
64
|
-
* A loan-free account is nothing to weigh: the health factor reports its
|
|
65
|
-
* zero-debt sentinel and no bar applies.
|
|
66
|
-
*
|
|
67
|
-
* {@inheritDoc quotaCountIssue}
|
|
68
|
-
*/
|
|
69
|
-
declare function collateralIssue(account: WeighedFactors, options: CheckOperationOptions): PreviewIssue | null;
|
|
70
|
-
//#endregion
|
|
71
|
-
export { CheckOperationOptions, WeighedFactors, checkOperation, collateralIssue, marketIssues, quotaCountIssue };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { OnchainSDK } from "../../onchain/OnchainSDK.js";
|
|
2
|
-
import { PreviewIssue } from "../../onchain/validation/refusal.js";
|
|
3
|
-
import { OperationState } from "../../onchain/accounts/intents/types.js";
|
|
4
|
-
import "../../onchain/index.js";
|
|
5
|
-
import { CheckOperationOptions } from "./checkOperation.js";
|
|
6
|
-
//#region src/preview/validate/checkSimulation.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Whether a simulated operation clears the caller's own bars.
|
|
9
|
-
*
|
|
10
|
-
* The engine holds an account to the facade's `1.0`, because its guards answer
|
|
11
|
-
* "would this revert". A form is wiser to ask for more, and the engine's own
|
|
12
|
-
* note says so — a caller wanting the stricter bar applies it itself. This is
|
|
13
|
-
* that second opinion, over the numbers the engine already reported.
|
|
14
|
-
*
|
|
15
|
-
* Three of the checks below the engine does not make at all: both health-factor
|
|
16
|
-
* bars are its own `1.0`, and the quota count it never weighs. The other two run
|
|
17
|
-
* against the same numbers the engine used, and are here so that a change in the
|
|
18
|
-
* engine cannot pass silently.
|
|
19
|
-
*
|
|
20
|
-
* What is deliberately absent: the forbidden-token, quota-limit and funding
|
|
21
|
-
* checks all need the *delta* an operation applies, and `OperationState` reports
|
|
22
|
-
* only the state after it. Weighing them against absolutes would refuse a
|
|
23
|
-
* forbidden token the account merely holds, or a quota the operation never
|
|
24
|
-
* touched. The engine performed all three during the walk, so a simulation that
|
|
25
|
-
* came back `ok` has already passed them.
|
|
26
|
-
*/
|
|
27
|
-
declare function checkSimulation(input: {
|
|
28
|
-
sdk: OnchainSDK;
|
|
29
|
-
state: OperationState;
|
|
30
|
-
}, options?: CheckOperationOptions): PreviewIssue | null;
|
|
31
|
-
//#endregion
|
|
32
|
-
export { checkSimulation };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CheckOperationOptions, WeighedFactors, checkOperation, collateralIssue, marketIssues, quotaCountIssue } from "./checkOperation.js";
|
|
2
|
-
import { checkSimulation } from "./checkSimulation.js";
|
|
3
|
-
export { CheckOperationOptions, WeighedFactors, checkOperation, checkSimulation, collateralIssue, marketIssues, quotaCountIssue };
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import { Bps, Token, TokenAmount } from "../../model/primitives.js";
|
|
2
|
-
import { IGearboxError } from "../../model/errors.js";
|
|
3
|
-
import { MalformedPreviewError } from "../../model/previews.js";
|
|
4
|
-
import "../../model/index.js";
|
|
5
|
-
import { BorrowLimitBinding, PreviewIssue } from "../../onchain/validation/refusal.js";
|
|
6
|
-
import { RouteRefusals } from "../../onchain/accounts/intents/types.js";
|
|
7
|
-
import "../../onchain/index.js";
|
|
8
|
-
import { Address } from "viem";
|
|
9
|
-
//#region src/sdk/prepare/errors.d.ts
|
|
10
|
-
/**
|
|
11
|
-
* Why a preparation was refused.
|
|
12
|
-
*
|
|
13
|
-
* One interface per reason, discriminated by `code`, each carrying the numbers
|
|
14
|
-
* behind that reason — so a caller reads the limit that was missed off the
|
|
15
|
-
* error instead of re-deriving it. Switch on `code` and the fields narrow with
|
|
16
|
-
* it.
|
|
17
|
-
*
|
|
18
|
-
* Most codes are the engine's `PreviewErrorReason` members, which is what keeps
|
|
19
|
-
* `prepare` and `preview` refusing in one vocabulary; what differs is where the
|
|
20
|
-
* numbers sit. The engine keeps them one level down, in `detail`, because it
|
|
21
|
-
* distributes them over `reason`; here they are stated outright, so it is
|
|
22
|
-
* `error.maxDebt` rather than `error.detail.maxDebt`.
|
|
23
|
-
*
|
|
24
|
-
* There is deliberately no union of all of them: each `prepare` method names
|
|
25
|
-
* exactly the codes its own flow can raise, see the signatures in
|
|
26
|
-
* {@link IOpportunitiesPrepare}. What is shared is the plumbing every flow
|
|
27
|
-
* goes through, and that is the two base unions below.
|
|
28
|
-
**/
|
|
29
|
-
/**
|
|
30
|
-
* What ANY operation on an existing account can refuse with: the engine's
|
|
31
|
-
* shared guards, the missing account, and a wrapped crash.
|
|
32
|
-
**/
|
|
33
|
-
type AccountFlowError = MarketPausedError | MarketExpiredError | ForbiddenTokenError | QuotaLimitReachedError | InsufficientCollateralError | InsufficientSourceBalanceError | CreditAccountNotFoundError | UnexpectedFailureError;
|
|
34
|
-
/** Same guards for the account-less open flow. */
|
|
35
|
-
type OpenFlowError = MarketPausedError | MarketExpiredError | ForbiddenTokenError | QuotaLimitReachedError | InsufficientCollateralError | InsufficientSourceBalanceError | UnexpectedFailureError;
|
|
36
|
-
/** The debt the request implies falls outside the facade's band. */
|
|
37
|
-
interface DebtOutOfRangeError extends IGearboxError {
|
|
38
|
-
code: "debtOutOfRange";
|
|
39
|
-
/** All three in the market's underlying. */
|
|
40
|
-
requested: TokenAmount;
|
|
41
|
-
minDebt: TokenAmount;
|
|
42
|
-
maxDebt: TokenAmount;
|
|
43
|
-
}
|
|
44
|
-
/** The leverage asked for cannot be expressed as a plan at all. */
|
|
45
|
-
interface LeverageOutOfRangeError extends IGearboxError {
|
|
46
|
-
code: "leverageOutOfRange";
|
|
47
|
-
/**
|
|
48
|
-
* Scaled by `LEVERAGE_DECIMALS` (`100n` = 1x), as the intent states it — not
|
|
49
|
-
* the read model's `Leverage`. Both are absent where the floor is not fixed:
|
|
50
|
-
* the deposit planner's is a function of the deposit.
|
|
51
|
-
**/
|
|
52
|
-
requested?: bigint;
|
|
53
|
-
min?: bigint;
|
|
54
|
-
}
|
|
55
|
-
/** Nothing on the account or in the wallet can fund what was asked. */
|
|
56
|
-
interface InsufficientSourceBalanceError extends IGearboxError {
|
|
57
|
-
code: "insufficientSourceBalance";
|
|
58
|
-
/**
|
|
59
|
-
* Both absent where the request never got as far as naming an amount, which
|
|
60
|
-
* is most of the sites that raise this.
|
|
61
|
-
**/
|
|
62
|
-
required?: TokenAmount;
|
|
63
|
-
held?: TokenAmount;
|
|
64
|
-
}
|
|
65
|
-
/** Input token is not accepted by the flow (e.g. deposit of a non-underlying). */
|
|
66
|
-
interface UnsupportedCollateralTokenError extends IGearboxError {
|
|
67
|
-
code: "unsupportedCollateralToken";
|
|
68
|
-
token: Token;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* No route for the trade the plan needs: no pool pair between the tokens
|
|
72
|
-
* requested, several and none was picked, or the pathfinder itself found no
|
|
73
|
-
* path for the amounts involved.
|
|
74
|
-
**/
|
|
75
|
-
interface UnsupportedTokenPairError extends IGearboxError {
|
|
76
|
-
code: "unsupportedTokenPair";
|
|
77
|
-
/**
|
|
78
|
-
* `to` is absent where the market named no output for `from`; both are absent
|
|
79
|
-
* when the pathfinder reverted rather than answered.
|
|
80
|
-
**/
|
|
81
|
-
from?: Token;
|
|
82
|
-
to?: Token;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* The intent cannot settle with a delay: the source has no redemption config,
|
|
86
|
-
* the chain has no compressor, or the payout is one the tail cannot serve.
|
|
87
|
-
**/
|
|
88
|
-
interface NoDelayedRouteError extends IGearboxError {
|
|
89
|
-
code: "noDelayedRoute";
|
|
90
|
-
/** Absent where the refusal is the intent's, not the token's. */
|
|
91
|
-
token?: Token;
|
|
92
|
-
}
|
|
93
|
-
/** Several redemption venues for the source, and nothing says which. */
|
|
94
|
-
interface MultipleDelayedWithdrawalsError extends IGearboxError {
|
|
95
|
-
code: "multipleDelayedWithdrawals";
|
|
96
|
-
token: Token;
|
|
97
|
-
venues: number;
|
|
98
|
-
}
|
|
99
|
-
/** A redemption of the same asset is already in flight. */
|
|
100
|
-
interface WithdrawalInProgressError extends IGearboxError {
|
|
101
|
-
code: "withdrawalInProgress";
|
|
102
|
-
/** The phantom token standing for the redemption already in flight. */
|
|
103
|
-
inFlight: TokenAmount;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* The claim names no operation to resume: requested without an intent, or read
|
|
107
|
-
* through a compressor too old to report one.
|
|
108
|
-
**/
|
|
109
|
-
interface NoRecordedIntentError extends IGearboxError {
|
|
110
|
-
code: "noRecordedIntent";
|
|
111
|
-
}
|
|
112
|
-
/** The facade is paused: nothing can be done at all. */
|
|
113
|
-
interface MarketPausedError extends IGearboxError {
|
|
114
|
-
code: "marketPaused";
|
|
115
|
-
/**
|
|
116
|
-
* The paused credit manager. Always present from `prepare`: the engine's
|
|
117
|
-
* shared guards check the manager, and the pool-paused variant is raised
|
|
118
|
-
* only by the preview-side `checkOperation` — it never reaches this union.
|
|
119
|
-
**/
|
|
120
|
-
creditManager: Address;
|
|
121
|
-
}
|
|
122
|
-
/** The facade is past its expiration date and takes no more multicalls. */
|
|
123
|
-
interface MarketExpiredError extends IGearboxError {
|
|
124
|
-
code: "marketExpired";
|
|
125
|
-
creditManager: Address;
|
|
126
|
-
/** Unix seconds, as the facade reports it. */
|
|
127
|
-
expirationDate: number;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* The pool cannot lend what the plan draws right now — its free liquidity, the
|
|
131
|
-
* manager's debt limit or the per-block cap stands in the way.
|
|
132
|
-
**/
|
|
133
|
-
interface InsufficientPoolLiquidityError extends IGearboxError {
|
|
134
|
-
code: "insufficientPoolLiquidity";
|
|
135
|
-
/** Both in the market's underlying. */
|
|
136
|
-
requested: TokenAmount;
|
|
137
|
-
available: TokenAmount;
|
|
138
|
-
/**
|
|
139
|
-
* Which of the four ceilings ran out first, so a caller can say what would
|
|
140
|
-
* fix it — waiting for lenders and asking governance are opposite answers.
|
|
141
|
-
**/
|
|
142
|
-
binding: BorrowLimitBinding;
|
|
143
|
-
/**
|
|
144
|
-
* The largest position still openable, absent when even the minimum debt does
|
|
145
|
-
* not fit.
|
|
146
|
-
**/
|
|
147
|
-
solutionAmount?: TokenAmount;
|
|
148
|
-
}
|
|
149
|
-
/** The market takes no more quota for a token the plan wants to hold. */
|
|
150
|
-
interface QuotaLimitReachedError extends IGearboxError {
|
|
151
|
-
code: "quotaLimitReached";
|
|
152
|
-
/** The token whose quota is asked for. */
|
|
153
|
-
token: Token;
|
|
154
|
-
/**
|
|
155
|
-
* In the **underlying**, which is what a quota is measured in. `requested` is
|
|
156
|
-
* absent for a token the market opened no quota for at all — nothing was
|
|
157
|
-
* weighed against a limit.
|
|
158
|
-
**/
|
|
159
|
-
requested: TokenAmount | undefined;
|
|
160
|
-
available: TokenAmount;
|
|
161
|
-
}
|
|
162
|
-
/** The plan would increase the balance of a token the market forbids. */
|
|
163
|
-
interface ForbiddenTokenError extends IGearboxError {
|
|
164
|
-
code: "forbiddenToken";
|
|
165
|
-
token: Token;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* The account would end the transaction owing more than its collateral is worth
|
|
169
|
-
* under liquidation thresholds, which the facade refuses to allow.
|
|
170
|
-
**/
|
|
171
|
-
interface InsufficientCollateralError extends IGearboxError {
|
|
172
|
-
code: "insufficientCollateral";
|
|
173
|
-
/**
|
|
174
|
-
* The factor that was compared, which for a call that hands funds over is the
|
|
175
|
-
* safe-price one; `safePrices` says which, since a projection always reports
|
|
176
|
-
* main prices.
|
|
177
|
-
**/
|
|
178
|
-
healthFactor: Bps;
|
|
179
|
-
/**
|
|
180
|
-
* The bar it was weighed against — the facade's own `1.0` for a check that
|
|
181
|
-
* asks whether the transaction lands, a form's higher bar for one that asks
|
|
182
|
-
* whether it is wise.
|
|
183
|
-
**/
|
|
184
|
-
required: Bps;
|
|
185
|
-
safePrices: boolean;
|
|
186
|
-
}
|
|
187
|
-
/** The pool is winding down: it still pays out, but takes no more deposits. */
|
|
188
|
-
interface PoolSunsetError extends IGearboxError {
|
|
189
|
-
code: "poolSunset";
|
|
190
|
-
pool: Address;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* The account would end up with more quoted tokens than the facade enables at
|
|
194
|
-
* once. A count, not an amount — unlike {@link QuotaLimitReachedError}.
|
|
195
|
-
**/
|
|
196
|
-
interface QuotaCountExceededError extends IGearboxError {
|
|
197
|
-
code: "quotaCountExceeded";
|
|
198
|
-
count: number;
|
|
199
|
-
max: number;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* The transaction could not be replayed: it is malformed, and every field
|
|
203
|
-
* derived from replayed balances is guesswork.
|
|
204
|
-
**/
|
|
205
|
-
interface MalformedTransactionError extends IGearboxError {
|
|
206
|
-
code: "malformedTransaction";
|
|
207
|
-
/**
|
|
208
|
-
* The SDK's own preview warning code (the `MalformedPreviewError`
|
|
209
|
-
* discriminant). Named apart from `code`, which every error in the
|
|
210
|
-
* envelope spells the same way.
|
|
211
|
-
**/
|
|
212
|
-
previewCode: MalformedPreviewError["code"];
|
|
213
|
-
/** What the replay reported, which is narrower than {@link message}. */
|
|
214
|
-
detail: string;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Opening asked for no target token and the market names none of its own, so
|
|
218
|
-
* there is nothing to put the position into.
|
|
219
|
-
*
|
|
220
|
-
* A market fact, not a bad argument: pass a `targetToken` to open against a
|
|
221
|
-
* manager that has no default one.
|
|
222
|
-
**/
|
|
223
|
-
interface NoStrategyTargetCollateralError extends IGearboxError {
|
|
224
|
-
code: "noStrategyTargetCollateral";
|
|
225
|
-
creditManager: Address;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* No account at that address in the markets this SDK is connected to — closed
|
|
229
|
-
* since it was listed, or read on the wrong chain.
|
|
230
|
-
**/
|
|
231
|
-
interface CreditAccountNotFoundError extends IGearboxError {
|
|
232
|
-
code: "creditAccountNotFound";
|
|
233
|
-
creditAccount: Address;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* The account named to open a position on carries debt or quotas.
|
|
237
|
-
*
|
|
238
|
-
* Growing a position that already exists is `depositStrategy`.
|
|
239
|
-
**/
|
|
240
|
-
interface CreditAccountNotEmptyError extends IGearboxError {
|
|
241
|
-
code: "creditAccountNotEmpty";
|
|
242
|
-
creditAccount: Address;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* An empty opening was asked for with something to open it with: collateral to
|
|
246
|
-
* spend, an account to reuse, or a leverage to reach.
|
|
247
|
-
**/
|
|
248
|
-
interface EmptyOpenTakesNothingError extends IGearboxError {
|
|
249
|
-
code: "emptyOpenTakesNothing";
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* The SDK could not answer at all: a read that failed, a chain it is not
|
|
253
|
-
* connected to, a market or token address it knows nothing about, a contract
|
|
254
|
-
* that reverted where nothing should, a bug of ours.
|
|
255
|
-
*
|
|
256
|
-
* The one code that is not a refusal of the request — everything above says
|
|
257
|
-
* "this cannot be done", this one says "we do not know". It exists so that a
|
|
258
|
-
* refusable `prepare` method always answers: the failure that used to escape
|
|
259
|
-
* as an exception arrives here instead, whole, under `cause`.
|
|
260
|
-
**/
|
|
261
|
-
interface UnexpectedFailureError extends IGearboxError {
|
|
262
|
-
code: "unexpectedFailure";
|
|
263
|
-
/** What actually went wrong, for a log and a bug report. */
|
|
264
|
-
cause: Error;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* What every refusal of a two-route request carries on top of its own code,
|
|
268
|
-
* see {@link StrategyRoutesResult}.
|
|
269
|
-
*
|
|
270
|
-
* `refused` says why each route is missing, which is the answer a form needs
|
|
271
|
-
* even when neither exists: the error itself is the instant route's refusal —
|
|
272
|
-
* the one a caller can usually act on — or the delayed route's when the instant
|
|
273
|
-
* one did not get far enough to have a reason of its own.
|
|
274
|
-
**/
|
|
275
|
-
interface WithRouteRefusals {
|
|
276
|
-
refused: RouteRefusals;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* The error each engine reason maps to — the range of {@link toRefusalError},
|
|
280
|
-
* spelled reason by reason so a narrow issue arrives as a narrow error.
|
|
281
|
-
*
|
|
282
|
-
* A lookup table, not a vocabulary: nothing answers with `RefusalErrors[R]`
|
|
283
|
-
* as a union. The unions callers see are the ones each method's signature
|
|
284
|
-
* spells out.
|
|
285
|
-
**/
|
|
286
|
-
interface RefusalErrors {
|
|
287
|
-
debtOutOfRange: DebtOutOfRangeError;
|
|
288
|
-
leverageOutOfRange: LeverageOutOfRangeError;
|
|
289
|
-
insufficientSourceBalance: InsufficientSourceBalanceError;
|
|
290
|
-
unsupportedCollateralToken: UnsupportedCollateralTokenError;
|
|
291
|
-
unsupportedTokenPair: UnsupportedTokenPairError;
|
|
292
|
-
noDelayedRoute: NoDelayedRouteError;
|
|
293
|
-
multipleDelayedWithdrawals: MultipleDelayedWithdrawalsError;
|
|
294
|
-
withdrawalInProgress: WithdrawalInProgressError;
|
|
295
|
-
noRecordedIntent: NoRecordedIntentError;
|
|
296
|
-
marketPaused: MarketPausedError;
|
|
297
|
-
marketExpired: MarketExpiredError;
|
|
298
|
-
insufficientPoolLiquidity: InsufficientPoolLiquidityError;
|
|
299
|
-
quotaLimitReached: QuotaLimitReachedError;
|
|
300
|
-
forbiddenToken: ForbiddenTokenError;
|
|
301
|
-
insufficientCollateral: InsufficientCollateralError;
|
|
302
|
-
poolSunset: PoolSunsetError;
|
|
303
|
-
quotaCountExceeded: QuotaCountExceededError;
|
|
304
|
-
malformedTransaction: MalformedTransactionError;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* The engine's refusal, as the error the namespace answers with.
|
|
308
|
-
*
|
|
309
|
-
* One place does the lifting, so the two shapes cannot drift: `reason` becomes
|
|
310
|
-
* `code`, the detail is spread onto the error, and the sentence comes from
|
|
311
|
-
* {@link MESSAGES}. A malformed transaction is spelled out rather than spread,
|
|
312
|
-
* because its detail names a `code` and a `message` of its own and they are not
|
|
313
|
-
* the envelope's.
|
|
314
|
-
*
|
|
315
|
-
* Generic over the issue it is handed, so a call site that already knows the
|
|
316
|
-
* reason gets that reason's error back rather than a union to narrow again.
|
|
317
|
-
**/
|
|
318
|
-
declare function toRefusalError<I extends PreviewIssue>(issue: I): RefusalErrors[I["reason"]];
|
|
319
|
-
/**
|
|
320
|
-
* {@inheritDoc NoStrategyTargetCollateralError}
|
|
321
|
-
**/
|
|
322
|
-
declare function noStrategyTargetCollateral(creditManager: Address): NoStrategyTargetCollateralError;
|
|
323
|
-
/**
|
|
324
|
-
* {@inheritDoc CreditAccountNotEmptyError}
|
|
325
|
-
**/
|
|
326
|
-
declare function creditAccountNotEmpty(creditAccount: Address): CreditAccountNotEmptyError;
|
|
327
|
-
/**
|
|
328
|
-
* {@inheritDoc CreditAccountNotFoundError}
|
|
329
|
-
**/
|
|
330
|
-
declare function creditAccountNotFound(creditAccount: Address): CreditAccountNotFoundError;
|
|
331
|
-
/**
|
|
332
|
-
* {@inheritDoc EmptyOpenTakesNothingError}
|
|
333
|
-
**/
|
|
334
|
-
declare function emptyOpenTakesNothing(): EmptyOpenTakesNothingError;
|
|
335
|
-
/**
|
|
336
|
-
* {@inheritDoc UnexpectedFailureError}
|
|
337
|
-
*
|
|
338
|
-
* Takes what was thrown, whatever that is: a `throw` is not obliged to raise an
|
|
339
|
-
* `Error`, and `cause` promises one.
|
|
340
|
-
**/
|
|
341
|
-
declare function unexpectedFailure(thrown: unknown): UnexpectedFailureError;
|
|
342
|
-
//#endregion
|
|
343
|
-
export { AccountFlowError, CreditAccountNotEmptyError, CreditAccountNotFoundError, DebtOutOfRangeError, EmptyOpenTakesNothingError, ForbiddenTokenError, InsufficientCollateralError, InsufficientPoolLiquidityError, InsufficientSourceBalanceError, LeverageOutOfRangeError, MalformedTransactionError, MarketExpiredError, MarketPausedError, MultipleDelayedWithdrawalsError, NoDelayedRouteError, NoRecordedIntentError, NoStrategyTargetCollateralError, OpenFlowError, PoolSunsetError, QuotaCountExceededError, QuotaLimitReachedError, RefusalErrors, UnexpectedFailureError, UnsupportedCollateralTokenError, UnsupportedTokenPairError, WithRouteRefusals, WithdrawalInProgressError, creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, noStrategyTargetCollateral, toRefusalError, unexpectedFailure };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|