@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,12 +1,13 @@
|
|
|
1
1
|
import { TokenAmount } from "../../../model/primitives.js";
|
|
2
2
|
import { DelayedIntent } from "../../../model/delayed-intents.js";
|
|
3
3
|
import { AccountProjection } from "../../../model/previews.js";
|
|
4
|
+
import { SDKError } from "../../../model/result.js";
|
|
4
5
|
import "../../../model/index.js";
|
|
5
6
|
import { ClaimableWithdrawal } from "../withdrawal-compressor/types.js";
|
|
6
7
|
import { RouterCASlice } from "../../router/types.js";
|
|
7
8
|
import { MultiCall } from "../../types/transactions.js";
|
|
8
9
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
9
|
-
import {
|
|
10
|
+
import { IntentValidationError } from "../../validation/raise.js";
|
|
10
11
|
import { AccountCalculatorOperation } from "./operations.js";
|
|
11
12
|
import "../../index.js";
|
|
12
13
|
import { Address } from "viem";
|
|
@@ -64,14 +65,14 @@ interface SimulationPrices {
|
|
|
64
65
|
interface OperationState extends AccountProjection, SimulationPrices {}
|
|
65
66
|
/**
|
|
66
67
|
* What planning an intent yields: the operation chain, the state it projects,
|
|
67
|
-
* and the calldata that realises it — or the
|
|
68
|
+
* and the calldata that realises it — or the error that stopped the plan.
|
|
68
69
|
*/
|
|
69
70
|
type IntentPreviewResult = {
|
|
70
71
|
ok: true;
|
|
71
72
|
operations: AccountCalculatorOperation[];
|
|
72
73
|
state: OperationState;
|
|
73
74
|
calls: MultiCall[];
|
|
74
|
-
} |
|
|
75
|
+
} | SDKError<IntentValidationError>;
|
|
75
76
|
/**
|
|
76
77
|
* What a claim did not bring, when the venue served part of a matured
|
|
77
78
|
* withdrawal and left the rest of it queued.
|
|
@@ -109,7 +110,7 @@ type FinishIntentResult = (Extract<IntentPreviewResult, {
|
|
|
109
110
|
* {@link ClaimRemainder}.
|
|
110
111
|
*/
|
|
111
112
|
remainder: ClaimRemainder | undefined;
|
|
112
|
-
}) |
|
|
113
|
+
}) | SDKError<IntentValidationError>;
|
|
113
114
|
/** What the request recorded, and when the tail can be run. */
|
|
114
115
|
interface DelayedStart {
|
|
115
116
|
/**
|
|
@@ -123,17 +124,17 @@ interface DelayedStart {
|
|
|
123
124
|
/**
|
|
124
125
|
* `instant` when the venue served the whole request on the spot, so no claim
|
|
125
126
|
* will ever arrive to carry the tail. The intent is then left half-done —
|
|
126
|
-
* nothing repaid, nothing
|
|
127
|
+
* nothing repaid, nothing withdrawn — and the caller wants `startIntent`
|
|
127
128
|
* instead, which settles all of it in one transaction.
|
|
128
129
|
*/
|
|
129
130
|
settlement: "instant" | "delayed";
|
|
130
131
|
/**
|
|
131
132
|
* What the claim is expected to credit the account with once the redemption
|
|
132
|
-
* matures: the
|
|
133
|
+
* matures: the token the redemption settles in and the amount the request queued.
|
|
133
134
|
* `undefined` when the request settled on the spot and nothing is coming.
|
|
134
135
|
*
|
|
135
|
-
* An estimate, not a quote — the issuer prices the redemption when it
|
|
136
|
-
*
|
|
136
|
+
* An estimate, not a quote — the issuer prices the redemption when it settles,
|
|
137
|
+
* and the state the intent is previewed against was read now.
|
|
137
138
|
*/
|
|
138
139
|
claim: {
|
|
139
140
|
token: Address;
|
|
@@ -172,7 +173,7 @@ type DelayedStartResult = {
|
|
|
172
173
|
state: OperationState;
|
|
173
174
|
calls: MultiCall[];
|
|
174
175
|
delayed: DelayedStart;
|
|
175
|
-
} |
|
|
176
|
+
} | SDKError<IntentValidationError>;
|
|
176
177
|
/** An intent previewed through the router: one transaction, settled now. */
|
|
177
178
|
type InstantRoute = Extract<IntentPreviewResult, {
|
|
178
179
|
ok: true;
|
|
@@ -184,35 +185,35 @@ type DelayedRoute = Extract<DelayedStartResult, {
|
|
|
184
185
|
/**
|
|
185
186
|
* Why a route is missing from an {@link IntentRoutesResult}.
|
|
186
187
|
*
|
|
187
|
-
*
|
|
188
|
+
* An error is the engine's verdict — `noDelayedRoute` for a source with no
|
|
188
189
|
* redemption venue or for a leverage move that settles at once,
|
|
189
|
-
* `
|
|
190
|
+
* `insufficientBalance` for a withdrawal the account cannot fund. A missing key
|
|
190
191
|
* next to a missing route means the route could not be quoted at all: the
|
|
191
192
|
* pathfinder found no way out of the source, or the read behind it failed.
|
|
192
193
|
*/
|
|
193
|
-
interface
|
|
194
|
-
instant
|
|
195
|
-
delayed
|
|
194
|
+
interface RouteErrors {
|
|
195
|
+
instant?: IntentValidationError;
|
|
196
|
+
delayed?: IntentValidationError;
|
|
196
197
|
}
|
|
197
198
|
/**
|
|
198
199
|
* Both ways one intent can be served, previewed side by side: traded through
|
|
199
200
|
* the router, which settles in a single transaction, or redeemed through the
|
|
200
|
-
* source's issuer, which answers now and
|
|
201
|
+
* source's issuer, which answers now and settles days later.
|
|
201
202
|
*
|
|
202
203
|
* Which of them an account can take depends on the intent and the token it
|
|
203
204
|
* sells, so both are quoted and a route it cannot take comes back `undefined`
|
|
204
|
-
* with its
|
|
205
|
-
* unviable, and then `
|
|
206
|
-
*
|
|
205
|
+
* with its error in `errors`. Only when neither answers is the request itself
|
|
206
|
+
* unviable, and then `error` is the instant route's — the route every account
|
|
207
|
+
* is expected to have — falling back to the delayed one's.
|
|
207
208
|
*/
|
|
208
209
|
type IntentRoutesResult = {
|
|
209
210
|
ok: true;
|
|
210
211
|
instant: InstantRoute | undefined;
|
|
211
212
|
delayed: DelayedRoute | undefined;
|
|
212
|
-
|
|
213
|
-
} | (
|
|
214
|
-
/** {@inheritDoc IntentRoutesResult.
|
|
215
|
-
|
|
213
|
+
errors: RouteErrors;
|
|
214
|
+
} | (SDKError<IntentValidationError> & {
|
|
215
|
+
/** {@inheritDoc IntentRoutesResult.errors} */
|
|
216
|
+
errors: RouteErrors;
|
|
216
217
|
});
|
|
217
218
|
/**
|
|
218
219
|
* The intents the engine previews.
|
|
@@ -368,12 +369,13 @@ interface RepayStrategyIntent {
|
|
|
368
369
|
* Intent 2.1 — withdraw part of the position's net value at fixed leverage.
|
|
369
370
|
*
|
|
370
371
|
* The requested amount leaves the account, and debt is repaid in the same
|
|
371
|
-
* proportion so leverage is unchanged: `dD = D0 * W / C0`. Both the
|
|
372
|
-
* the repayment are funded by liquidating the source token, which means the
|
|
372
|
+
* proportion so leverage is unchanged: `dD = D0 * W / C0`. Both the withdrawal
|
|
373
|
+
* and the repayment are funded by liquidating the source token, which means the
|
|
373
374
|
* account must give up `W + dD` of value in total.
|
|
374
375
|
*
|
|
375
|
-
* The
|
|
376
|
-
* pool, so a
|
|
376
|
+
* The withdrawal leg and the repayment leg are quoted separately and do not
|
|
377
|
+
* share a pool, so a bad quote on the withdrawal leg does not eat into the
|
|
378
|
+
* repayment.
|
|
377
379
|
*
|
|
378
380
|
* Asking for the whole net value is the exit instead — there is no leverage
|
|
379
381
|
* left to hold — and the shape changes with it: the quotas are dropped, the
|
|
@@ -388,7 +390,7 @@ interface WithdrawStrategyIntent {
|
|
|
388
390
|
type: "WITHDRAW";
|
|
389
391
|
/**
|
|
390
392
|
* Amount the wallet receives, denominated in `tokenOut`. At or above the
|
|
391
|
-
* account's net value this is an exit, which
|
|
393
|
+
* account's net value this is an exit, which hands over the underlying the
|
|
392
394
|
* position was sold into rather than in `tokenOut`.
|
|
393
395
|
*
|
|
394
396
|
* `MAX_UINT256` is that exit stated outright, and the amount a "close
|
|
@@ -396,7 +398,7 @@ interface WithdrawStrategyIntent {
|
|
|
396
398
|
* rounding can turn it back into a withdrawal that leaves dust behind.
|
|
397
399
|
*/
|
|
398
400
|
amount: bigint;
|
|
399
|
-
/**
|
|
401
|
+
/** Token recipient. */
|
|
400
402
|
to: Address;
|
|
401
403
|
/**
|
|
402
404
|
* Token the wallet receives. Defaults to the market underlying — which, on an
|
|
@@ -439,7 +441,7 @@ interface WithdrawCeilings {
|
|
|
439
441
|
* has caught up with its collateral.
|
|
440
442
|
*
|
|
441
443
|
* A Max button is better served by sending `MAX_UINT256` than this figure —
|
|
442
|
-
* the exit is then named outright, and no rounding in the
|
|
444
|
+
* the exit is then named outright, and no rounding in the withdrawal token's
|
|
443
445
|
* price can drop the request back into the refused gap.
|
|
444
446
|
*/
|
|
445
447
|
exit: bigint;
|
|
@@ -468,4 +470,4 @@ type FinishIntentProps = StartIntentProps & {
|
|
|
468
470
|
claimable: ClaimableWithdrawal;
|
|
469
471
|
};
|
|
470
472
|
//#endregion
|
|
471
|
-
export { AddCollateralIntent, AdjustLeverageIntent, ClaimRemainder, CreditAccountSlice, DelayableIntent, DelayedRoute, DelayedStart, DelayedStartResult, DepositStrategyIntent, FinishIntentProps, FinishIntentResult, InstantRoute, IntentPreviewResult, IntentRoutesResult, OperationState, PathLossRate, RepayStrategyIntent, ResumableIntent,
|
|
473
|
+
export { AddCollateralIntent, AdjustLeverageIntent, ClaimRemainder, CreditAccountSlice, DelayableIntent, DelayedRoute, DelayedStart, DelayedStartResult, DepositStrategyIntent, FinishIntentProps, FinishIntentResult, InstantRoute, IntentPreviewResult, IntentRoutesResult, OperationState, PathLossRate, RepayStrategyIntent, ResumableIntent, RouteErrors, SimulationPrices, StartIntent, StartIntentProps, WithdrawAssetIntent, WithdrawCeilings, WithdrawStrategyIntent };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DelayedIntent } from "../../model/delayed-intents.js";
|
|
2
|
+
import { RWAOpenAccountRequirements, RWAOperationArgs } from "../../model/rwa.js";
|
|
2
3
|
import "../../model/index.js";
|
|
3
4
|
import { ClaimableWithdrawal, RequestableWithdrawal } from "./withdrawal-compressor/types.js";
|
|
4
5
|
import { Asset, CreditAccountData, CreditAccountTokensSlice, PermitResult } from "../base/types.js";
|
|
5
|
-
import { GetOpenAccountRequirementsProps
|
|
6
|
+
import { GetOpenAccountRequirementsProps } from "../market/rwa/types.js";
|
|
6
7
|
import "../market/rwa/index.js";
|
|
7
8
|
import { PriceUpdate } from "../market/pricefeeds/types.js";
|
|
8
9
|
import { PartialLiquidationParams, PrepareUpdateQuotasProps } from "../market/credit/types.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DelayedIntent } from "../../../model/delayed-intents.js";
|
|
2
|
+
import { InvalidDelayedIntentError } from "../../../model/errors/preview-errors.js";
|
|
2
3
|
import { SDKReturn } from "../../../model/result.js";
|
|
3
4
|
import "../../../model/index.js";
|
|
4
|
-
import { InvalidDelayedIntentError } from "./errors.js";
|
|
5
5
|
import { IRedemptionLoggerContract, RedemptionLog } from "./types.js";
|
|
6
6
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
7
7
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InvalidDelayedIntentError } from "./errors.js";
|
|
2
1
|
import { ClaimableWithdrawal, CurrentWithdrawals, DelayedIntentExtended, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./types.js";
|
|
3
2
|
import { AbstractWithdrawalCompressorContract, OnchainRequestableWithdrawal, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./AbstractWithdrawalCompressorContract.js";
|
|
4
3
|
import { WithdrawalCompressorLocation, WithdrawalCompressorVersion, getWithdrawalCompressorAddress } from "./addresses.js";
|
|
@@ -9,4 +8,4 @@ import { RedemptionLoggerV310Contract } from "./RedemptionLoggerV310Contract.js"
|
|
|
9
8
|
import { WithdrawalCompressorV310Contract } from "./WithdrawalCompressorV310Contract.js";
|
|
10
9
|
import { WithdrawalCompressorV311Contract } from "./WithdrawalCompressorV311Contract.js";
|
|
11
10
|
import { WithdrawalCompressorV313Contract } from "./WithdrawalCompressorV313Contract.js";
|
|
12
|
-
export { AbstractWithdrawalCompressorContract, ClaimableWithdrawal, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DelayedIntentExtended, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract,
|
|
11
|
+
export { AbstractWithdrawalCompressorContract, ClaimableWithdrawal, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DelayedIntentExtended, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, OnchainRequestableWithdrawal, PendingWithdrawal, RedemptionLog, RedemptionLoggerV310Contract, RequestableWithdrawal, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, getWithdrawalCompressorAddress, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DelayedIntent } from "../../../model/delayed-intents.js";
|
|
2
|
+
import { InvalidDelayedIntentError } from "../../../model/errors/preview-errors.js";
|
|
2
3
|
import { SDKReturn } from "../../../model/result.js";
|
|
3
4
|
import "../../../model/index.js";
|
|
4
5
|
import { MulticallBatch } from "../../utils/viem/executeMulticallBatches.js";
|
|
5
6
|
import "../../utils/viem/index.js";
|
|
6
|
-
import { InvalidDelayedIntentError } from "./errors.js";
|
|
7
7
|
import { IBaseContract } from "../../base/types.js";
|
|
8
8
|
import { MultiCall } from "../../types/transactions.js";
|
|
9
9
|
import "../../types/index.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ILogger, LogFn } from "./types/logger.js";
|
|
2
|
-
import { UnpriceableTokenError, unpriceableTokenError } from "./market/oracle/errors.js";
|
|
3
2
|
import { AddressMap } from "./utils/AddressMap.js";
|
|
4
3
|
import { AddressSet } from "./utils/AddressSet.js";
|
|
5
4
|
import { GearboxChain, NetworkType, SUPPORTED_NETWORKS, chains, findCuratorMarketConfigurator, getAccountTargetCollateral, getAssetType, getChain, getCuratorName, getLegacyStrategyTarget, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, toChainIds } from "./chain/chains.js";
|
|
@@ -13,7 +12,6 @@ import { SimulateMulticallParameters, SimulateMulticallReturnType, simulateMulti
|
|
|
13
12
|
import { SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./utils/viem/simulateWithPriceUpdates.js";
|
|
14
13
|
import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsync } from "./utils/viem/watchBlocksAsync.js";
|
|
15
14
|
import "./utils/viem/index.js";
|
|
16
|
-
import { InvalidDelayedIntentError } from "./accounts/withdrawal-compressor/errors.js";
|
|
17
15
|
import { ClaimableWithdrawal, CurrentWithdrawals, DelayedIntentExtended, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./accounts/withdrawal-compressor/types.js";
|
|
18
16
|
import { detectNetwork } from "./chain/detectNetwork.js";
|
|
19
17
|
import "./chain/index.js";
|
|
@@ -33,13 +31,15 @@ import { BLOCKS_PER_WEEK_BY_NETWORK, RAMP_DURATION_BY_NETWORK } from "./constant
|
|
|
33
31
|
import { PERIPHERY_CONTRACTS, PeripheryContract } from "./constants/periphery.js";
|
|
34
32
|
import { VERSION_RANGE_310, VersionRange, isV310, isVersionRange } from "./constants/versions.js";
|
|
35
33
|
import "./constants/index.js";
|
|
36
|
-
import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.js";
|
|
40
|
-
import { GetInvestorOptions, GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./market/rwa/types.js";
|
|
41
|
-
import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./market/rwa/securitize/types.js";
|
|
34
|
+
import { DEGEN_NFT_MIDAS, PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
|
|
35
|
+
import { DEGEN_NFT_SECURITIZE, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
|
|
36
|
+
import { DStokenData, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeRWAFactoryStateHuman } from "./market/rwa/securitize/types.js";
|
|
42
37
|
import { SecuritizeRWAFactory } from "./market/rwa/securitize/SecuritizeRWAFactory.js";
|
|
38
|
+
import { SecuritizeDegenNFT } from "./market/rwa/securitize/SecuritizeDegenNFT.js";
|
|
39
|
+
import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.js";
|
|
40
|
+
import { GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, KycCheckResult, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAInvestorData, RWAState, RWAStateHuman, RWAUnderlyingData, isRWAFactory } from "./market/rwa/types.js";
|
|
41
|
+
import { MidasDegenNFT } from "./market/rwa/midas/MidasDegenNFT.js";
|
|
42
|
+
import { MidasLiquidatorContract } from "./market/rwa/midas/MidasLiquidatorContract.js";
|
|
43
43
|
import { RWARegistry } from "./market/rwa/RWARegistry.js";
|
|
44
44
|
import { AddressProviderV3StateHuman, AliasLossPolicyStateHuman, AssetPriceFeedStateHuman, BalancerWeightedPriceFeedStateHuman, BaseContractStateHuman, BasePriceFeedStateHuman, BotListStateHuman, BoundedOracleStateHuman, ConstantOracleStateHuman, CoreStateHuman, CreditConfiguratorStateHuman, CreditFacadeStateHuman, CreditManagerDebtParamsHuman, CreditManagerStateHuman, CreditSuiteStateHuman, GaugeParamsHuman, GaugeStateHuman, GearStakingV3StateHuman, GearboxStateHuman, InterestRateModelStateHuman, LPPriceFeedStateHuman, LinearInterestRateModelStateHuman, LossPolicyStateHuman, MarketStateHuman, MultichainStateHuman, PoolQuotaKeeperStateHuman, PoolStateHuman, PoolSuiteStateHuman, PriceFeedStateHuman, PriceOracleStateHuman, QuotaParamsHuman, RateKeeperStateHuman, RedstonePriceFeedStateHuman, TumblerStateHuman, ZapperStateHuman } from "./types/state-human.js";
|
|
45
45
|
import { AdapterContractStateHuman, AdapterContractType, AdapterProtocolOperation, AdapterType, DelayedWithdrawalClaim, DelayedWithdrawalRequest, IAdapterContract, VersionedAbi } from "./market/adapters/types.js";
|
|
@@ -128,6 +128,7 @@ import { UpshiftVaultAdapterContract } from "./market/adapters/contracts/Upshift
|
|
|
128
128
|
import { VelodromeV2RouterAdapterContract } from "./market/adapters/contracts/VelodromeV2AdapterContract.js";
|
|
129
129
|
import { WstETHV1AdapterContract } from "./market/adapters/contracts/WstETHV1AdapterContract.js";
|
|
130
130
|
import { AdapterFactoryArgs, createAdapter } from "./market/adapters/createAdapter.js";
|
|
131
|
+
import { TokenTransfer } from "./market/adapters/transfers.js";
|
|
131
132
|
import { allTransfersAsTokenAmounts, classifyCurveOperation, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, fnSigToName, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers } from "./market/adapters/transferHelpers.js";
|
|
132
133
|
import { IPriceFeedContract, IUpdatablePriceFeedContract, PriceFeedContractType, PriceFeedUsageType, PriceUpdate, UpdatePriceFeedsResult } from "./market/pricefeeds/types.js";
|
|
133
134
|
import { PriceFeedRef } from "./market/pricefeeds/PriceFeedRef.js";
|
|
@@ -154,7 +155,7 @@ import { RedstonePriceFeedContract } from "./market/pricefeeds/RedstonePriceFeed
|
|
|
154
155
|
import { WstETHPriceFeedContract } from "./market/pricefeeds/WstETHPriceFeed.js";
|
|
155
156
|
import { YearnPriceFeedContract } from "./market/pricefeeds/YearnPriceFeed.js";
|
|
156
157
|
import { ZeroPriceFeedContract } from "./market/pricefeeds/ZeroPriceFeed.js";
|
|
157
|
-
import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps, QuotaSlice } from "./market/credit/types.js";
|
|
158
|
+
import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, MaxBorrowAmount, PartialLiquidationParams, PrepareUpdateQuotasProps, QuotaSlice } from "./market/credit/types.js";
|
|
158
159
|
import { CreditConfiguratorV310Contract, RampEvent } from "./market/credit/CreditConfiguratorV310Contract.js";
|
|
159
160
|
import { CreditFacadeV310Abi as abi, CreditFacadeV310BaseContract } from "./market/credit/CreditFacadeV310BaseContract.js";
|
|
160
161
|
import { CreditFacadeV310Contract } from "./market/credit/CreditFacadeV310Contract.js";
|
|
@@ -178,7 +179,6 @@ import { CreditSuite } from "./market/credit/CreditSuite.js";
|
|
|
178
179
|
import { StrategyCollateralProps, dominantCollateral, isStrategyCollateral, pickStrategyTargetCollateral } from "./market/credit/collateralUtils.js";
|
|
179
180
|
import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./market/credit/expectedBalanceDeltas.js";
|
|
180
181
|
import { CompressorZapperData, ZapperData } from "./market/types.js";
|
|
181
|
-
import { UnsupportedZapperFunctionError } from "./market/zapper/errors.js";
|
|
182
182
|
import { IZapperContract, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem } from "./market/zapper/types.js";
|
|
183
183
|
import { createZapper } from "./market/zapper/createZapper.js";
|
|
184
184
|
import { ZapperContract } from "./market/zapper/ZapperContract.js";
|
|
@@ -255,12 +255,11 @@ import { AccountToCheck, BotStatusCall, BotsDirectResponse, CMSlice, ConnectedBo
|
|
|
255
255
|
import { AccountBotsService } from "./accounts/bots/AccountBotsService.js";
|
|
256
256
|
import { PeripheryCompressorV310Contract } from "./accounts/bots/PeripheryCompressorV310Contract.js";
|
|
257
257
|
import { CreditAccountsServiceV310 } from "./accounts/CreditAccountsServiceV310.js";
|
|
258
|
-
import {
|
|
259
|
-
import { borrowable } from "./accounts/intents/guards.js";
|
|
258
|
+
import { IntentValidationError, raise } from "./validation/raise.js";
|
|
260
259
|
import { LeverageBand } from "./accounts/intents/leverage-band.js";
|
|
261
260
|
import { CalcDefaultQuotaProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, calcDefaultQuota, calcQuotaUpdate, calcRecommendedQuota, roundUpQuota } from "./accounts/quota-utils.js";
|
|
262
261
|
import { AccountCalculatorOperation } from "./accounts/intents/operations.js";
|
|
263
|
-
import { AddCollateralIntent, AdjustLeverageIntent, ClaimRemainder, CreditAccountSlice, DelayableIntent, DelayedRoute, DelayedStart, DelayedStartResult, DepositStrategyIntent, FinishIntentProps, FinishIntentResult, InstantRoute, IntentPreviewResult, IntentRoutesResult, OperationState, PathLossRate, RepayStrategyIntent, ResumableIntent,
|
|
262
|
+
import { AddCollateralIntent, AdjustLeverageIntent, ClaimRemainder, CreditAccountSlice, DelayableIntent, DelayedRoute, DelayedStart, DelayedStartResult, DepositStrategyIntent, FinishIntentProps, FinishIntentResult, InstantRoute, IntentPreviewResult, IntentRoutesResult, OperationState, PathLossRate, RepayStrategyIntent, ResumableIntent, RouteErrors, StartIntent, WithdrawAssetIntent, WithdrawCeilings, WithdrawStrategyIntent } from "./accounts/intents/types.js";
|
|
264
263
|
import { OpenStrategyProps, OpenStrategyState } from "./accounts/intents/open-strategy.js";
|
|
265
264
|
import { fetchCreditAccountSlice, toCreditAccountSlice } from "./accounts/intents/utils/credit-account-slice.js";
|
|
266
265
|
import { isPhantomToken } from "./accounts/intents/utils/pick-token.js";
|
|
@@ -271,7 +270,65 @@ import { LiquidationsService } from "./accounts/liquidations/LiquidationsService
|
|
|
271
270
|
import { MultichainLiquidationsService } from "./accounts/liquidations/MultichainLiquidationsService.js";
|
|
272
271
|
import "./accounts/index.js";
|
|
273
272
|
import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
|
|
274
|
-
import {
|
|
275
|
-
import {
|
|
273
|
+
import { AdapterOperation, AdapterOperationBase, TraceAdapterExt } from "./preview/parse/types-adapters.js";
|
|
274
|
+
import { AddCollateralOp, CloseCreditAccountOperation, CompareBalancesOp, CreditAccountOperation, DecreaseDebtOp, DirectTokenTransferOperation, FacadeOperationMetadata, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, StoreExpectedBalancesOp, UpdateQuotaOp, WithdrawCollateralOp } from "./preview/parse/types-facades.js";
|
|
275
|
+
import { PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation } from "./preview/parse/types-pools.js";
|
|
276
|
+
import { RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOperation, RWAOperationMetadata } from "./preview/parse/types-rwa.js";
|
|
277
|
+
import { Operation, isPoolOperation, isRWAOperation } from "./preview/parse/types.js";
|
|
278
|
+
import { ClassifyInnerOperationsProps, classifyInnerOperations } from "./preview/parse/classifyInnerOperations.js";
|
|
279
|
+
import { parseFacadeOperationCalldata } from "./preview/parse/parseFacadeOperationCalldata.js";
|
|
280
|
+
import { parseOperationCalldata } from "./preview/parse/parseOperationCalldata.js";
|
|
281
|
+
import { parsePoolOperationCalldata } from "./preview/parse/parsePoolOperationCalldata.js";
|
|
282
|
+
import { parseRWAFactoryOperationCalldata } from "./preview/parse/parseRWAFactoryOperationCalldata.js";
|
|
283
|
+
import { CreditAccountState, CreditAccountStateProps } from "./preview/preview/CreditAccountState.js";
|
|
284
|
+
import { DetectedDelayedOperation, detectDelayedOperation } from "./preview/preview/detectDelayedOperation.js";
|
|
285
|
+
import { buildDelayedStrategyPositionOperationPreview } from "./preview/preview/buildDelayedStrategyPositionOperationPreview.js";
|
|
286
|
+
import { classifyCloseOrRepay, isCloseOrRepay } from "./preview/preview/detectCloseOrRepay.js";
|
|
287
|
+
import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./preview/preview/detectDelayedClaim.js";
|
|
288
|
+
import { estimateClaimableAt } from "./preview/preview/estimateClaimableAt.js";
|
|
289
|
+
import { ReplayState, makeReplayState, replayInnerOperations } from "./preview/preview/replayInnerOperations.js";
|
|
290
|
+
import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./preview/preview/replayMulticall.js";
|
|
291
|
+
import { previewAdjustStrategyPosition } from "./preview/preview/previewAdjustStrategyPosition.js";
|
|
292
|
+
import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./preview/preview/previewExitOrRepayStrategyPosition.js";
|
|
293
|
+
import { PreviewOperationError, previewOperation } from "./preview/preview/previewOperation.js";
|
|
294
|
+
import "./preview/index.js";
|
|
295
|
+
import { checkAccountQuotas } from "./validation/bundles/checkAccountQuotas.js";
|
|
296
|
+
import { CheckWalletInput, WalletFundingError, checkWallet } from "./validation/bundles/checkWallet.js";
|
|
297
|
+
import { CheckCollateralFundingInput, CollateralFundingPreview, checkCollateralFunding } from "./validation/bundles/checkCollateralFunding.js";
|
|
298
|
+
import { HealthFactorThresholds, WeighedFactors, checkHealthFactors } from "./validation/bundles/checkHealthFactors.js";
|
|
299
|
+
import { MarketStateError, checkMarket } from "./validation/bundles/checkMarket.js";
|
|
300
|
+
import { CreditOperationArgs, CreditOperationError, CreditOperationPreview, checkCreditOperation } from "./validation/bundles/checkCreditOperation.js";
|
|
301
|
+
import { checkDraw } from "./validation/bundles/checkDraw.js";
|
|
302
|
+
import { CheckLiquidationEligibilityInput, LiquidationEligibilityError, checkLiquidationEligibility } from "./validation/bundles/checkLiquidationEligibility.js";
|
|
303
|
+
import { CheckLiquidationFundingInput, checkLiquidationFunding } from "./validation/bundles/checkLiquidationFunding.js";
|
|
304
|
+
import { checkObtained } from "./validation/bundles/checkObtained.js";
|
|
305
|
+
import { CheckPoolFundingInput, checkPoolFunding } from "./validation/bundles/checkPoolFunding.js";
|
|
306
|
+
import { PoolOperationArgs, PoolOperationError, checkPoolOperation } from "./validation/bundles/checkPoolOperation.js";
|
|
307
|
+
import { checkQuotasAsked } from "./validation/bundles/checkQuotasAsked.js";
|
|
308
|
+
import { CheckRWAOpeningInput, checkRWAOpening } from "./validation/bundles/checkRWAOpening.js";
|
|
309
|
+
import { CheckRWAOpenRequirementsInput, checkRWAOpenRequirements } from "./validation/bundles/checkRWAOpenRequirements.js";
|
|
310
|
+
import { CheckWalletAllowanceInput, checkWalletAllowance } from "./validation/bundles/checkWalletAllowance.js";
|
|
311
|
+
import { CheckWalletBalanceInput, checkWalletBalance } from "./validation/bundles/checkWalletBalance.js";
|
|
312
|
+
import { CheckLiquidationInput, CheckLiquidationOptions, LiquidationValidationError, checkLiquidation } from "./validation/checkLiquidation.js";
|
|
313
|
+
import { CheckOperationInput, CheckOperationOptions, OperationValidationError, checkOperation } from "./validation/checkOperation.js";
|
|
314
|
+
import { CheckSimulationInput, CreditSimulationInput, PoolSimulationInput, SimulationValidationError, checkSimulation } from "./validation/checkSimulation.js";
|
|
315
|
+
import { BorrowLimitArgs, checkBorrowLimit } from "./validation/checks/checkBorrowLimit.js";
|
|
316
|
+
import { CollateralisedArgs, checkCollateralised } from "./validation/checks/checkCollateralised.js";
|
|
317
|
+
import { CreditAccountFrozenArgs, checkCreditAccountFrozen } from "./validation/checks/checkCreditAccountFrozen.js";
|
|
318
|
+
import { CreditManagerPausedArgs, checkCreditManagerPaused } from "./validation/checks/checkCreditManagerPaused.js";
|
|
319
|
+
import { DebtLimitsArgs, checkDebtLimits } from "./validation/checks/checkDebtLimits.js";
|
|
320
|
+
import { EmergencyLiquidatorArgs, checkEmergencyLiquidator } from "./validation/checks/checkEmergencyLiquidator.js";
|
|
321
|
+
import { ForbiddenTokenArgs, checkForbiddenToken } from "./validation/checks/checkForbiddenToken.js";
|
|
322
|
+
import { LeverageArgs, checkLeverage } from "./validation/checks/checkLeverage.js";
|
|
323
|
+
import { LiquidatorEligibleArgs, checkLiquidatorEligible } from "./validation/checks/checkLiquidatorEligible.js";
|
|
324
|
+
import { MarketExpiredArgs, checkMarketExpired } from "./validation/checks/checkMarketExpired.js";
|
|
325
|
+
import { PoolLiquidityArgs, checkPoolLiquidity } from "./validation/checks/checkPoolLiquidity.js";
|
|
326
|
+
import { PoolPausedArgs, checkPoolPaused } from "./validation/checks/checkPoolPaused.js";
|
|
327
|
+
import { PoolSunsetArgs, checkPoolSunset } from "./validation/checks/checkPoolSunset.js";
|
|
328
|
+
import { QuotaCountArgs, checkQuotaCount } from "./validation/checks/checkQuotaCount.js";
|
|
329
|
+
import { QuotaLimitArgs, checkQuotaLimit } from "./validation/checks/checkQuotaLimit.js";
|
|
330
|
+
import { amountOf } from "./validation/helpers/amount.js";
|
|
331
|
+
import { MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_SAFE_HEALTH_FACTOR_FORM } from "./validation/helpers/health-factor-limits.js";
|
|
332
|
+
import { toToken, toTokenAmount } from "./validation/helpers/token.js";
|
|
276
333
|
import "./validation/index.js";
|
|
277
|
-
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountMigratorAdapterContract, AccountSnapshot, AccountToCheck, AdapterContractStateHuman, AdapterContractType, AdapterData, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetWithAmountInTarget, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BasicSwapCall, BigIntMath, type BlockNumberProps, type BorrowLimitBinding, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcDefaultQuotaProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, CallTrace, CamelotPool, CamelotV3AdapterContract, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, type ClaimRemainder, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DaiUsdsAdapterContract, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawalClaim, DelayedWithdrawalRequest, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, type FinishIntentResult, FluidDexAdapterContract, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, GetExternalAccountCurrentWithdrawalsProps, GetInvestorOptions, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetReward, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMultichainOpportunitiesService, IMultichainPositionsService, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, type InstantRoute, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LegacyAdapterOperation, type LeverageBand, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MakerDeposit, MakerRedeem, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, Methods, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OpenStrategyState, type OperationState, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, type PathLossRate, PendingWithdrawal, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, type PreviewErrorDetails, type PreviewErrorReason, type PreviewIssue, type PreviewRefusal, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, ProjectedPoolOptions, PythPriceFeed, QuotaKeeperState, QuotaMode, type QuotaParamsHuman, QuotaSlice, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedemptionPhantomRename, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOnRampAdapterContract, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StakingRewardsAdapterContract, type StartIntent, StrategyCollateralProps, StrategyRateInputs, SupportedValue, Swap, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenAmount, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, type TumblerStateHuman, TypedObjectUtils, Unarray, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnpriceableTokenError, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VERSION_RANGE_310, VaultDeposit, VelodromeV2RouterAdapterContract, VersionRange, VersionedAbi, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, type WithdrawCeilings, WithdrawCollateral, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, borrowable, botPermissionsToString, bpsToRay, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isDust, isLPPriceFeed, isMalformedPreviewError, isPhantomToken, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, percentFmt, pickStrategyTargetCollateral, raise, rayToBps, rayToNumber, refuse, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, unpriceableTokenError, usdToNumber, watchBlocksAsync };
|
|
334
|
+
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountMigratorAdapterContract, AccountSnapshot, AccountToCheck, AdapterContractStateHuman, AdapterContractType, AdapterData, AdapterFactoryArgs, AdapterOperation, AdapterOperationBase, AdapterProtocolOperation, AdapterType, type AddCollateralIntent, AddCollateralOp, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetWithAmountInTarget, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BasicSwapCall, BigIntMath, type BlockNumberProps, BorrowLimitArgs, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcDefaultQuotaProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, CallTrace, CamelotPool, CamelotV3AdapterContract, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, CheckCollateralFundingInput, CheckLiquidationEligibilityInput, CheckLiquidationFundingInput, CheckLiquidationInput, CheckLiquidationOptions, CheckOperationInput, CheckOperationOptions, CheckPoolFundingInput, CheckRWAOpenRequirementsInput, CheckRWAOpeningInput, CheckSimulationInput, CheckWalletAllowanceInput, CheckWalletBalanceInput, CheckWalletInput, ClaimFarmRewardsProps, type ClaimRemainder, ClaimableWithdrawal, ClassifyInnerOperationsProps, ClientOptions, CloseCreditAccountOperation, CloseCreditAccountResult, CloseOrRepayOperation, ClosePathBalances, CollateralFundingPreview, CollateralisedArgs, CompareBalancesOp, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountFrozenArgs, CreditAccountOperation, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountState, CreditAccountStateProps, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerPausedArgs, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditOperationArgs, CreditOperationError, CreditOperationPreview, CreditSimulationInput, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DaiUsdsAdapterContract, DebtLimitsArgs, DecreaseDebtOp, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawalClaim, DelayedWithdrawalRequest, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, EmergencyLiquidatorArgs, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, FacadeOperationMetadata, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, type FinishIntentResult, FluidDexAdapterContract, ForbiddenTokenArgs, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, GetExternalAccountCurrentWithdrawalsProps, GetInvestorOptions, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetReward, GetWithdrawalRequestResultProps, HealthFactorThresholds, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IDegenNFT, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMultichainOpportunitiesService, IMultichainPositionsService, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, IncreaseDebtOp, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, InnerFacadeOperation, InnerOperation, type InstantRoute, type IntentPreviewResult, type IntentRoutesResult, type IntentValidationError, type InterestRateModelStateHuman, InterestRateModelType, IsDustOptions, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, KycCheckResult, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LegacyAdapterOperation, LeverageArgs, type LeverageBand, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidateCreditAccountOperation, LiquidationEligibilityError, LiquidationFees, LiquidationValidationError, LiquidationsService, LiquidatorEligibleArgs, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MakerDeposit, MakerRedeem, MarketData, MarketExpiredArgs, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketStateError, type MarketStateHuman, MarketSuite, MarketType, MaxBorrowAmount, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, Methods, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallOperation, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenCreditAccountOperation, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OpenStrategyState, Operation, OperationMetadata, type OperationState, OperationValidationError, OpportunitiesService, OptimalRepaidAmountProps, OuterFacadeOperation, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationOperation, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, type PathLossRate, PendingWithdrawal, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolDepositOperation, PoolLiquidityArgs, PoolMintOperation, PoolOperation, PoolOperationArgs, PoolOperationError, PoolPausedArgs, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolRedeemOperation, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolSimulationInput, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolSunsetArgs, PoolV310Contract, PoolWithdrawOperation, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewOperationError, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, ProjectedPoolOptions, PythPriceFeed, QuotaCountArgs, QuotaKeeperState, QuotaLimitArgs, QuotaMode, type QuotaParamsHuman, QuotaSlice, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAInvestorData, RWALiquidatorInfo, RWAMulticallOperation, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenCreditAccountOperation, RWAOperation, RWAOperationMetadata, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedemptionPhantomRename, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, ReplayMulticallResult, ReplayState, ReplayableOperation, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteErrors, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, SimulationValidationError, StakingRewardsAdapterContract, type StartIntent, StoreExpectedBalancesOp, StrategyCollateralProps, StrategyRateInputs, SupportedValue, Swap, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenAmount, TokenInfo, TokenMetaData, TokenTransfer, TokensMeta, TokensMetaState, TraceAdapterExt, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, type TumblerStateHuman, TypedObjectUtils, Unarray, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatePriceFeedsResult, UpdateQuotaOp, UpshiftVaultAdapterContract, VERSION_RANGE_310, VaultDeposit, VelodromeV2RouterAdapterContract, VersionRange, VersionedAbi, VotingContractStatus, WAD, WAD_DECIMALS_POW, WalletFundingError, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, WeighedFactors, type WithBlock, type WithMultichain, type WithdrawAssetIntent, type WithdrawCeilings, WithdrawCollateral, WithdrawCollateralOp, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, botPermissionsToString, bpsToRay, buildDelayedStrategyPositionOperationPreview, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkDraw, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkObtained, checkOperation, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaCount, checkQuotaLimit, checkQuotasAsked, checkRWAOpenRequirements, checkRWAOpening, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, childLogger, classifyCloseOrRepay, classifyCurveOperation, classifyInnerOperations, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectDelayedClaim, detectDelayedOperation, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateClaimableAt, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isCloseOrRepay, isDust, isLPPriceFeed, isPhantomToken, isPoolOperation, isPublicNetwork, isRWAFactory, isRWAOperation, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, makeReplayState, mellowDvvAdapterAbi, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parsePosNegAmount, parseRWAFactoryOperationCalldata, percentFmt, pickStrategyTargetCollateral, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, raise, rayToBps, rayToNumber, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
|
|
@@ -109,7 +109,7 @@ declare class MarketSuite extends SDKConstruct {
|
|
|
109
109
|
isUnderlyingLike(token: Address): boolean;
|
|
110
110
|
/**
|
|
111
111
|
* Prices a figure already denominated in this market's underlying — a debt,
|
|
112
|
-
* a TVL, a
|
|
112
|
+
* a TVL, a withdrawal — as the read model reports one.
|
|
113
113
|
*
|
|
114
114
|
* The token it names is {@link underlyingToken}, so an amount coming out of a
|
|
115
115
|
* preview or a simulation carries the same identity as the one on a
|
|
@@ -145,6 +145,10 @@ declare class MarketSuite extends SDKConstruct {
|
|
|
145
145
|
* entered. Read from a hardcoded per-chain list.
|
|
146
146
|
*/
|
|
147
147
|
get sunset(): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Whether `sender` may liquidate a paused facade of this market.
|
|
150
|
+
*/
|
|
151
|
+
isEmergencyLiquidator(sender: Address): boolean;
|
|
148
152
|
/**
|
|
149
153
|
* Quota configuration of every token the market quotes: how much of it the
|
|
150
154
|
* market accepts in total, and what holding it costs.
|
|
@@ -85,5 +85,6 @@ import { VelodromeV2RouterAdapterContract } from "./contracts/VelodromeV2Adapter
|
|
|
85
85
|
import { WstETHV1AdapterContract } from "./contracts/WstETHV1AdapterContract.js";
|
|
86
86
|
import "./contracts/index.js";
|
|
87
87
|
import { AdapterFactoryArgs, createAdapter } from "./createAdapter.js";
|
|
88
|
+
import { TokenTransfer } from "./transfers.js";
|
|
88
89
|
import { allTransfersAsTokenAmounts, classifyCurveOperation, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, fnSigToName, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers } from "./transferHelpers.js";
|
|
89
|
-
export { AbstractAdapterContract, AbstractAdapterContractOptions, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BasicSwapCall, CamelotPool, CamelotV3AdapterContract, ConcreteAdapterContractOptions, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, FluidDexAdapterContract, GetReward, IAdapterContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, MakerDeposit, MakerRedeem, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasRedemptionVaultAdapterContract, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTokenType, SecuritizeOnRampAdapterContract, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, Swap, TokenAmount, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, classifyCurveOperation, createAdapter, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, erc4626ReferralAdapterAbi, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers };
|
|
90
|
+
export { AbstractAdapterContract, AbstractAdapterContractOptions, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BasicSwapCall, CamelotPool, CamelotV3AdapterContract, ConcreteAdapterContractOptions, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, FluidDexAdapterContract, GetReward, IAdapterContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, MakerDeposit, MakerRedeem, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasRedemptionVaultAdapterContract, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTokenType, SecuritizeOnRampAdapterContract, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, Swap, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, classifyCurveOperation, createAdapter, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, erc4626ReferralAdapterAbi, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers };
|
|
@@ -2,13 +2,6 @@ import { Address } from "viem";
|
|
|
2
2
|
//#region src/onchain/market/adapters/transfers.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* A single ERC-20 Transfer event captured between Execute boundaries.
|
|
5
|
-
*
|
|
6
|
-
* Internal to adapter legacy helpers (kept here so {@link toNetTransfers} stays
|
|
7
|
-
* typed) and intentionally **not** re-exported from the package barrel: the
|
|
8
|
-
* canonical, public `TokenTransfer` lives in the `preview` module. The two are
|
|
9
|
-
* structurally identical, so values flow between the modules without casts.
|
|
10
|
-
*
|
|
11
|
-
* @deprecated Will be deprecated when we get rid of classifyLegacyOperation
|
|
12
5
|
*/
|
|
13
6
|
interface TokenTransfer {
|
|
14
7
|
token: Address;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Bps, Timestamp, Token, UnderlyingToken } from "../../../model/primitives.js";
|
|
2
|
+
import { KycRequirement, RWAOperationArgs } from "../../../model/rwa.js";
|
|
2
3
|
import { StrategyOpportunity, StrategyOpportunityDetail } from "../../../model/opportunities.js";
|
|
3
4
|
import { CreditOperationMarket } from "../../../model/previews.js";
|
|
4
5
|
import "../../../model/index.js";
|
|
5
6
|
import { CreditAccountData, CreditSuiteState } from "../../base/types.js";
|
|
6
|
-
import {
|
|
7
|
+
import { IDegenNFT, IRWAFactory } from "../rwa/types.js";
|
|
7
8
|
import { CreditSuiteStateHuman } from "../../types/state-human.js";
|
|
8
|
-
import { ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams } from "./types.js";
|
|
9
|
+
import { ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, MaxBorrowAmount, PartialLiquidationParams } from "./types.js";
|
|
9
10
|
import { IRouterContract } from "../../router/types.js";
|
|
10
11
|
import "../../router/index.js";
|
|
11
12
|
import { MarketConfiguratorContract } from "../MarketConfiguratorContract.js";
|
|
@@ -93,6 +94,16 @@ declare class CreditSuite extends SDKConstruct {
|
|
|
93
94
|
* for RWA markets.
|
|
94
95
|
*/
|
|
95
96
|
get rwaFactory(): IRWAFactory | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* KYC-gated degen NFT on this suite's facade, loaded on first use.
|
|
99
|
+
* `undefined` when the facade has none, or when the NFT is not a KYC gate.
|
|
100
|
+
*/
|
|
101
|
+
degenNFT(): Promise<IDegenNFT | undefined>;
|
|
102
|
+
/**
|
|
103
|
+
* What `wallet` still has to do before the facade lets it open an account;
|
|
104
|
+
* `null` when nothing (no degen NFT, not a KYC gate, or already eligible).
|
|
105
|
+
*/
|
|
106
|
+
kycRequirement(wallet: Address, targetCollateral: Address): Promise<KycRequirement | null>;
|
|
96
107
|
/**
|
|
97
108
|
* Builds a transaction that executes a multicall on one of this suite's
|
|
98
109
|
* credit accounts.
|
|
@@ -167,6 +178,23 @@ declare class CreditSuite extends SDKConstruct {
|
|
|
167
178
|
* Tokens forbidden by the facade.
|
|
168
179
|
*/
|
|
169
180
|
get forbiddenTokens(): Address[];
|
|
181
|
+
/**
|
|
182
|
+
* Whether the facade forbids a token, see {@link forbiddenTokens}. A
|
|
183
|
+
* forbidden token may be sold and may leave, but its balance must not grow.
|
|
184
|
+
*/
|
|
185
|
+
isForbidden(token: Address): boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Largest debt one new position can take from this credit manager right now,
|
|
188
|
+
* and which limit set that number.
|
|
189
|
+
*
|
|
190
|
+
* Minimum of:
|
|
191
|
+
* - the pool's available liquidity,
|
|
192
|
+
* - this manager's remaining debt allowance, and
|
|
193
|
+
* - the facade's per-account `maxDebt`.
|
|
194
|
+
* While `maxDebtPerBlockMultiplier` is `0` the facade
|
|
195
|
+
* takes no new debt at all, so the answer is `0`.
|
|
196
|
+
*/
|
|
197
|
+
maxBorrowAmount(): MaxBorrowAmount;
|
|
170
198
|
/**
|
|
171
199
|
* The single target collateral of this suite's strategy, or `undefined` when
|
|
172
200
|
* none can be resolved.
|
|
@@ -182,12 +210,6 @@ declare class CreditSuite extends SDKConstruct {
|
|
|
182
210
|
* without quota.
|
|
183
211
|
*/
|
|
184
212
|
get strategyTargetCollateral(): Address | undefined;
|
|
185
|
-
/**
|
|
186
|
-
* Largest debt a single new position can take on right now: the tightest of
|
|
187
|
-
* this manager's remaining debt limit, the pool's free liquidity and the
|
|
188
|
-
* facade's per-account maximum.
|
|
189
|
-
*/
|
|
190
|
-
get maxBorrowAmount(): bigint;
|
|
191
213
|
/**
|
|
192
214
|
* Display name of this suite's leveraged strategy, e.g. `"wstETH / WETH"`,
|
|
193
215
|
* or `undefined` when {@link strategyTargetCollateral} cannot be resolved.
|