@gearbox-protocol/sdk 18.4.0 → 18.4.1-aave.10
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/iSecuritizeRWAFactory.js +15 -0
- package/dist/cjs/model/errors/index.js +1 -0
- package/dist/cjs/model/errors/operation-errors.js +9 -0
- package/dist/cjs/model/index.js +2 -4
- package/dist/cjs/offchain/GearboxAPI.js +0 -7
- package/dist/cjs/offchain/index.js +0 -3
- package/dist/cjs/onchain/accounts/bots/AccountBotsService.js +29 -0
- package/dist/cjs/onchain/accounts/bots/PeripheryCompressorV310Contract.js +2 -1
- package/dist/cjs/onchain/accounts/index.js +1 -1
- package/dist/cjs/onchain/accounts/intents/index.js +33 -0
- package/dist/cjs/onchain/accounts/intents/operations.js +21 -0
- package/dist/cjs/onchain/accounts/intents/plan.js +55 -0
- package/dist/cjs/onchain/accounts/intents/readAaveHoldings.js +56 -0
- package/dist/cjs/onchain/accounts/intents/realize.js +84 -2
- package/dist/cjs/onchain/accounts/intents/testing/market.js +1 -0
- package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +3 -2
- package/dist/cjs/onchain/accounts/intents/utils/ledger.js +8 -0
- package/dist/cjs/onchain/chain/chains.js +4 -0
- package/dist/cjs/onchain/index.js +25 -1
- package/dist/cjs/onchain/market/ZapperRegister.js +1 -1
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +94 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveOracle.js +20 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveV3Pool.js +278 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iPoolAddressesProvider.js +11 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iVariableDebtToken.js +17 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/index.js +11 -0
- package/dist/cjs/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +224 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +177 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/index.js +4 -0
- package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +2 -0
- package/dist/cjs/onchain/market/adapters/abi/index.js +17 -0
- package/dist/cjs/onchain/market/adapters/abi/securitize/iSecuritizeNAVProvider.js +15 -0
- package/dist/cjs/onchain/market/adapters/abi/securitize/index.js +2 -0
- package/dist/cjs/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +218 -0
- package/dist/cjs/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +213 -0
- package/dist/cjs/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
- package/dist/cjs/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.js +42 -5
- package/dist/cjs/onchain/market/adapters/contracts/index.js +4 -0
- package/dist/cjs/onchain/market/adapters/createAdapter.js +4 -0
- package/dist/cjs/onchain/market/adapters/index.js +20 -0
- package/dist/cjs/onchain/market/adapters/types.js +2 -0
- package/dist/cjs/onchain/market/index.js +20 -0
- package/dist/cjs/onchain/market/rwa/securitize/SecuritizeRWAFactory.js +9 -0
- package/dist/cjs/onchain/positions/MultichainPositionsService.js +15 -0
- package/dist/cjs/onchain/positions/PositionsService.js +31 -0
- package/dist/cjs/onchain/positions/aaveMoveCalls.js +45 -0
- package/dist/cjs/onchain/positions/projectAavePosition.js +178 -0
- package/dist/cjs/onchain/positions/readAavePosition.js +152 -0
- package/dist/cjs/onchain/preview/index.js +2 -0
- package/dist/cjs/onchain/preview/preview/aaveBridgeBorrows.js +24 -0
- package/dist/cjs/onchain/preview/preview/aaveMoveStart.js +27 -0
- package/dist/cjs/onchain/preview/preview/index.js +2 -0
- package/dist/cjs/onchain/preview/preview/loadAdapterReplayState.js +17 -0
- package/dist/cjs/onchain/preview/preview/previewAdjustStrategyPosition.js +3 -0
- package/dist/cjs/onchain/preview/preview/previewExitOrRepayStrategyPosition.js +5 -2
- package/dist/cjs/onchain/preview/preview/previewOpenStrategyPosition.js +4 -1
- package/dist/cjs/onchain/preview/preview/previewOperation.js +33 -8
- package/dist/cjs/onchain/validation/bundles/checkAaveDelegation.js +54 -0
- package/dist/cjs/onchain/validation/bundles/checkCreditOperation.js +36 -11
- package/dist/cjs/onchain/validation/bundles/index.js +2 -0
- package/dist/cjs/onchain/validation/checkOperation.js +16 -4
- package/dist/cjs/onchain/validation/index.js +2 -0
- package/dist/cjs/sdk/GearboxSDK.js +0 -9
- package/dist/cjs/sdk/execute/ExecuteApi.js +1 -0
- package/dist/cjs/sdk/positions/PositionsNamespace.js +6 -0
- package/dist/cjs/sdk/prepare/PrepareApi.js +98 -0
- package/dist/cjs/sdk/preview/PreviewNamespace.js +42 -0
- package/dist/esm/abi/rwa/iSecuritizeRWAFactory.js +15 -0
- package/dist/esm/model/errors/index.js +2 -2
- package/dist/esm/model/errors/operation-errors.js +9 -1
- package/dist/esm/model/index.js +3 -4
- package/dist/esm/offchain/GearboxAPI.js +0 -7
- package/dist/esm/offchain/index.js +1 -3
- package/dist/esm/onchain/accounts/bots/AccountBotsService.js +29 -0
- package/dist/esm/onchain/accounts/bots/PeripheryCompressorV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/index.js +1 -1
- package/dist/esm/onchain/accounts/intents/index.js +34 -1
- package/dist/esm/onchain/accounts/intents/operations.js +20 -1
- package/dist/esm/onchain/accounts/intents/plan.js +56 -2
- package/dist/esm/onchain/accounts/intents/readAaveHoldings.js +55 -0
- package/dist/esm/onchain/accounts/intents/realize.js +86 -4
- package/dist/esm/onchain/accounts/intents/testing/market.js +1 -0
- package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +3 -2
- package/dist/esm/onchain/accounts/intents/utils/ledger.js +8 -0
- package/dist/esm/onchain/chain/chains.js +4 -0
- package/dist/esm/onchain/index.js +14 -2
- package/dist/esm/onchain/market/ZapperRegister.js +1 -1
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +93 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveOracle.js +19 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveV3Pool.js +277 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iPoolAddressesProvider.js +10 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iVariableDebtToken.js +16 -0
- package/dist/esm/onchain/market/adapters/abi/aave/index.js +6 -0
- package/dist/esm/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +223 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +176 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/index.js +3 -1
- package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +2 -0
- package/dist/esm/onchain/market/adapters/abi/index.js +10 -1
- package/dist/esm/onchain/market/adapters/abi/securitize/iSecuritizeNAVProvider.js +14 -0
- package/dist/esm/onchain/market/adapters/abi/securitize/index.js +2 -1
- package/dist/esm/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +217 -0
- package/dist/esm/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +212 -0
- package/dist/esm/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
- package/dist/esm/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.js +43 -6
- package/dist/esm/onchain/market/adapters/contracts/index.js +3 -1
- package/dist/esm/onchain/market/adapters/createAdapter.js +4 -0
- package/dist/esm/onchain/market/adapters/index.js +11 -1
- package/dist/esm/onchain/market/adapters/types.js +2 -0
- package/dist/esm/onchain/market/index.js +11 -1
- package/dist/esm/onchain/market/rwa/securitize/SecuritizeRWAFactory.js +9 -0
- package/dist/esm/onchain/positions/MultichainPositionsService.js +15 -0
- package/dist/esm/onchain/positions/PositionsService.js +31 -0
- package/dist/esm/onchain/positions/aaveMoveCalls.js +44 -0
- package/dist/esm/onchain/positions/projectAavePosition.js +177 -0
- package/dist/esm/onchain/positions/readAavePosition.js +151 -0
- package/dist/esm/onchain/preview/index.js +2 -1
- package/dist/esm/onchain/preview/preview/aaveBridgeBorrows.js +23 -0
- package/dist/esm/onchain/preview/preview/aaveMoveStart.js +26 -0
- package/dist/esm/onchain/preview/preview/index.js +2 -1
- package/dist/esm/onchain/preview/preview/loadAdapterReplayState.js +16 -0
- package/dist/esm/onchain/preview/preview/previewAdjustStrategyPosition.js +3 -0
- package/dist/esm/onchain/preview/preview/previewExitOrRepayStrategyPosition.js +5 -2
- package/dist/esm/onchain/preview/preview/previewOpenStrategyPosition.js +4 -1
- package/dist/esm/onchain/preview/preview/previewOperation.js +33 -8
- package/dist/esm/onchain/validation/bundles/checkAaveDelegation.js +53 -0
- package/dist/esm/onchain/validation/bundles/checkCreditOperation.js +36 -11
- package/dist/esm/onchain/validation/bundles/index.js +2 -1
- package/dist/esm/onchain/validation/checkOperation.js +16 -4
- package/dist/esm/onchain/validation/index.js +2 -1
- package/dist/esm/sdk/GearboxSDK.js +0 -9
- package/dist/esm/sdk/execute/ExecuteApi.js +1 -0
- package/dist/esm/sdk/positions/PositionsNamespace.js +6 -0
- package/dist/esm/sdk/prepare/PrepareApi.js +99 -1
- package/dist/esm/sdk/preview/PreviewNamespace.js +42 -0
- package/dist/types/abi/rwa/iSecuritizeRWAFactory.d.ts +14 -0
- package/dist/types/model/aave.d.ts +89 -0
- package/dist/types/model/analytics.d.ts +2 -2
- package/dist/types/model/errors/index.d.ts +2 -2
- package/dist/types/model/errors/operation-errors.d.ts +19 -0
- package/dist/types/model/index.d.ts +6 -7
- package/dist/types/model/positions.d.ts +1 -1
- package/dist/types/model/previews.d.ts +31 -0
- package/dist/types/offchain/AbstractOffchainNamespace.d.ts +1 -1
- package/dist/types/offchain/GearboxAPI.d.ts +0 -6
- package/dist/types/offchain/analytics/OffchainAnalytics.d.ts +1 -1
- package/dist/types/offchain/analytics/types.d.ts +1 -1
- package/dist/types/offchain/index.d.ts +1 -3
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +1 -1
- package/dist/types/offchain/opportunities/types.d.ts +1 -1
- package/dist/types/offchain/positions/OffchainPositions.d.ts +1 -1
- package/dist/types/offchain/positions/types.d.ts +1 -1
- package/dist/types/onchain/accounts/bots/AccountBotsService.d.ts +11 -1
- package/dist/types/onchain/accounts/bots/index.d.ts +2 -2
- package/dist/types/onchain/accounts/bots/types.d.ts +7 -1
- package/dist/types/onchain/accounts/index.d.ts +3 -3
- package/dist/types/onchain/accounts/intents/index.d.ts +21 -3
- package/dist/types/onchain/accounts/intents/operations.d.ts +41 -1
- package/dist/types/onchain/accounts/intents/plan.d.ts +32 -3
- package/dist/types/onchain/accounts/intents/readAaveHoldings.d.ts +16 -0
- package/dist/types/onchain/accounts/intents/testing/market.d.ts +4 -0
- package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +4 -0
- package/dist/types/onchain/accounts/intents/types.d.ts +42 -0
- package/dist/types/onchain/index.d.ts +16 -4
- package/dist/types/onchain/market/adapters/abi/aave/iAaveHorizonBridge.d.ts +83 -0
- package/dist/types/onchain/market/adapters/abi/aave/iAaveOracle.d.ts +22 -0
- package/dist/types/onchain/market/adapters/abi/aave/iAaveV3Pool.d.ts +229 -0
- package/dist/types/onchain/market/adapters/abi/aave/iPoolAddressesProvider.d.ts +11 -0
- package/dist/types/onchain/market/adapters/abi/aave/iVariableDebtToken.d.ts +17 -0
- package/dist/types/onchain/market/adapters/abi/aave/index.d.ts +6 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.d.ts +207 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.d.ts +172 -0
- package/dist/types/onchain/market/adapters/abi/adapters/index.d.ts +3 -1
- package/dist/types/onchain/market/adapters/abi/index.d.ts +10 -1
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeNAVProvider.d.ts +13 -0
- package/dist/types/onchain/market/adapters/abi/securitize/index.d.ts +2 -1
- package/dist/types/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.d.ts +361 -0
- package/dist/types/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.d.ts +455 -0
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +8 -0
- package/dist/types/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +19 -4
- package/dist/types/onchain/market/adapters/contracts/index.d.ts +3 -1
- package/dist/types/onchain/market/adapters/index.d.ts +11 -1
- package/dist/types/onchain/market/adapters/types.d.ts +3 -1
- package/dist/types/onchain/market/index.d.ts +11 -1
- package/dist/types/onchain/market/rwa/securitize/SecuritizeRWAFactory.d.ts +20 -0
- package/dist/types/onchain/market/rwa/types.d.ts +6 -0
- package/dist/types/onchain/positions/MultichainPositionsService.d.ts +7 -1
- package/dist/types/onchain/positions/PositionsService.d.ts +16 -2
- package/dist/types/onchain/positions/aaveMoveCalls.d.ts +30 -0
- package/dist/types/onchain/positions/index.d.ts +2 -2
- package/dist/types/onchain/positions/projectAavePosition.d.ts +46 -0
- package/dist/types/onchain/positions/readAavePosition.d.ts +22 -0
- package/dist/types/onchain/positions/types.d.ts +25 -0
- package/dist/types/onchain/preview/index.d.ts +2 -1
- package/dist/types/onchain/preview/preview/aaveBridgeBorrows.d.ts +15 -0
- package/dist/types/onchain/preview/preview/aaveMoveStart.d.ts +18 -0
- package/dist/types/onchain/preview/preview/index.d.ts +2 -1
- package/dist/types/onchain/preview/preview/loadAdapterReplayState.d.ts +13 -0
- package/dist/types/onchain/validation/bundles/checkAaveDelegation.d.ts +21 -0
- package/dist/types/onchain/validation/bundles/checkCreditOperation.d.ts +2 -2
- package/dist/types/onchain/validation/bundles/index.d.ts +2 -1
- package/dist/types/onchain/validation/index.d.ts +2 -1
- package/dist/types/sdk/GearboxSDK.d.ts +1 -8
- package/dist/types/sdk/analytics/AnalyticsNamespace.d.ts +1 -1
- package/dist/types/sdk/analytics/types.d.ts +1 -1
- package/dist/types/sdk/execute/types.d.ts +7 -5
- package/dist/types/sdk/index.d.ts +3 -3
- package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +1 -1
- package/dist/types/sdk/opportunities/types.d.ts +1 -1
- package/dist/types/sdk/positions/PositionsNamespace.d.ts +7 -2
- package/dist/types/sdk/positions/types.d.ts +10 -2
- package/dist/types/sdk/prepare/PrepareApi.d.ts +11 -3
- package/dist/types/sdk/prepare/index.d.ts +2 -2
- package/dist/types/sdk/prepare/types.d.ts +116 -1
- package/dist/types/sdk/preview/PreviewNamespace.d.ts +5 -1
- package/dist/types/sdk/preview/types.d.ts +12 -1
- package/dist/types/sdk/types.d.ts +0 -20
- package/package.json +1 -1
- package/dist/cjs/model/notices.schema.js +0 -25
- package/dist/cjs/offchain/notices/OffchainNotices.js +0 -27
- package/dist/cjs/offchain/notices/index.js +0 -3
- package/dist/esm/model/notices.schema.js +0 -23
- package/dist/esm/offchain/notices/OffchainNotices.js +0 -26
- package/dist/esm/offchain/notices/index.js +0 -1
- package/dist/types/model/notices.d.ts +0 -28
- package/dist/types/model/notices.schema.d.ts +0 -22
- package/dist/types/offchain/notices/OffchainNotices.d.ts +0 -18
- package/dist/types/offchain/notices/index.d.ts +0 -2
- /package/dist/cjs/model/{notices.js → aave.js} +0 -0
- /package/dist/esm/model/{notices.js → aave.js} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { iAaveHorizonBridgeAbi } from "./adapters/abi/aave/iAaveHorizonBridge.js";
|
|
2
|
+
import { iAaveOracleAbi } from "./adapters/abi/aave/iAaveOracle.js";
|
|
3
|
+
import { iAaveV3PoolAbi } from "./adapters/abi/aave/iAaveV3Pool.js";
|
|
4
|
+
import { iPoolAddressesProviderAbi } from "./adapters/abi/aave/iPoolAddressesProvider.js";
|
|
5
|
+
import { iVariableDebtTokenAbi } from "./adapters/abi/aave/iVariableDebtToken.js";
|
|
1
6
|
import { DEGEN_NFT_MIDAS, PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./rwa/midas/constants.js";
|
|
2
7
|
import { DEGEN_NFT_SECURITIZE, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_LIQUIDATOR_SECURITIZE } from "./rwa/securitize/constants.js";
|
|
3
8
|
import { DStokenData, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeRWAFactoryStateHuman } from "./rwa/securitize/types.js";
|
|
@@ -12,6 +17,8 @@ import "./rwa/index.js";
|
|
|
12
17
|
import { AdapterContractStateHuman, AdapterContractType, AdapterProtocolOperation, AdapterType, DelayedWithdrawalClaim, DelayedWithdrawalRequest, IAdapterContract, VersionedAbi } from "./adapters/types.js";
|
|
13
18
|
import { adapterActionAbi, adapterActionSelectors, adapterActionSignatures } from "./adapters/abi/actionAbi.js";
|
|
14
19
|
import { erc4626ReferralAdapterAbi } from "./adapters/abi/adapters/erc4626ReferralAdapter.js";
|
|
20
|
+
import { iAaveHorizonBridgeAdapterAbi } from "./adapters/abi/adapters/iAaveHorizonBridgeAdapter.js";
|
|
21
|
+
import { iAaveV3PoolAdapterAbi } from "./adapters/abi/adapters/iAaveV3PoolAdapter.js";
|
|
15
22
|
import { iBalancerV3RouterAdapterAbi } from "./adapters/abi/adapters/iBalancerV3RouterAdapter.js";
|
|
16
23
|
import { iBalancerV3WrapperAdapterAbi } from "./adapters/abi/adapters/iBalancerV3WrapperAdapter.js";
|
|
17
24
|
import { iCamelotV3AdapterAbi } from "./adapters/abi/adapters/iCamelotV3Adapter.js";
|
|
@@ -52,6 +59,7 @@ import { mellowDvvAdapterAbi } from "./adapters/abi/adapters/mellowDvvAdapter.js
|
|
|
52
59
|
import { adapterConstructorAbi } from "./adapters/abi/conctructorAbi.js";
|
|
53
60
|
import { iMidasGatewayV311Abi } from "./adapters/abi/midas/iMidasGatewayV311.js";
|
|
54
61
|
import { iBaseOnRampAbi } from "./adapters/abi/securitize/iBaseOnRamp.js";
|
|
62
|
+
import { iSecuritizeNAVProviderAbi } from "./adapters/abi/securitize/iSecuritizeNAVProvider.js";
|
|
55
63
|
import { iSecuritizeOnRampAbi } from "./adapters/abi/securitize/iSecuritizeOnRamp.js";
|
|
56
64
|
import { iSecuritizeRedemptionGatewayV311Abi } from "./adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.js";
|
|
57
65
|
import { iBalancerV3RouterAbi, iBalancerV3WrapperAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3RouterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iDaiUsdsAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iInfinifiGatewayAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iMellowClaimerAbi, iMellowWrapperAbi, iMidasIssuanceVaultV310Abi, iPendleRouterAbi, iStakingRewardsAbi, iTraderJoeRouterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iVelodromeV2RouterAbi, iwstETHAbi, lidoV1_WETHGatewayAbi } from "./adapters/abi/targetContractAbi.js";
|
|
@@ -61,6 +69,8 @@ import { iTreehouseRouterAbi } from "./adapters/abi/treehouse/iTreehouseRouter.j
|
|
|
61
69
|
import { getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, parseAdapterAction, parseAdapterDeployParams } from "./adapters/abi/utils.js";
|
|
62
70
|
import { BalancerSwap, BasicSwapCall, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexWithdraw, ConvexWithdrawAndClaim, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveWithdrawal, GetReward, LegacyAdapterOperation, LidoSubmit, MakerDeposit, MakerRedeem, Swap, TokenAmount, Transfers, UniswapSwap, VaultDeposit, WithdrawCollateral, WstETHUnwrap, WstETHWrap } from "./adapters/legacyAdapterOperations.js";
|
|
63
71
|
import { AbstractAdapterContract, AbstractAdapterContractOptions, ConcreteAdapterContractOptions } from "./adapters/contracts/AbstractAdapter.js";
|
|
72
|
+
import { AaveHorizonBridgeAdapterContract } from "./adapters/contracts/AaveHorizonBridgeAdapterContract.js";
|
|
73
|
+
import { AaveV3PoolAdapterContract } from "./adapters/contracts/AaveV3PoolAdapterContract.js";
|
|
64
74
|
import { AccountMigratorAdapterContract } from "./adapters/contracts/AccountMigratorAdapterContract.js";
|
|
65
75
|
import { BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract } from "./adapters/contracts/BalancerV3RouterAdapterContract.js";
|
|
66
76
|
import { BalancerV3WrapperAdapterContract } from "./adapters/contracts/BalancerV3WrapperAdapterContract.js";
|
|
@@ -167,4 +177,4 @@ import "./zapper/index.js";
|
|
|
167
177
|
import { MarketRegister, MarketRegistryState, MarketRegistryStateHuman } from "./MarketRegister.js";
|
|
168
178
|
import { DEFAULT_QUOTA_BUFFER_BPS, MAX_LEVERAGE_BUFFER_BPS, OptimalPartialLiquidationAmounts, OptimalPartialLiquidationAmountsProps, PARTIAL_LIQUIDATION_BUFFER_BPS, QuotaMode, StrategyRateInputs, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, healthFactorBps, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, rayToBps, usdToNumber } from "./math.js";
|
|
169
179
|
import { strategyName } from "./strategyName.js";
|
|
170
|
-
export { AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BasicSwapCall, BoundedPriceFeedContract, CamelotPool, CamelotV3AdapterContract, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConstantPriceFeedContract, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DStokenData, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, GaugeParams, GetInvestorOptions, GetOpenAccountRequirementsProps, GetReward, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IDegenNFT, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTask, type IPriceUpdater, IRWAFactory, IRateKeeperContract, type IUpdatablePriceFeedContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, InterestRateModelType, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, type LatestUpdate, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationFees, MAX_LEVERAGE_BUFFER_BPS, MakerDeposit, MakerRedeem, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MaxBorrowAmount, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, OptimalPartialLiquidationAmounts, OptimalPartialLiquidationAmountsProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegistry, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PriceUpdatesCache, PythPriceFeed, QuotaMode, QuotaSlice, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, StrategyCollateralProps, StrategyRateInputs, Swap, type TimestampedCalldata, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, type UpdatablePriceFeedRegistryHooks, type UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, updatableDependencies, usdToNumber };
|
|
180
|
+
export { AaveHorizonBridgeAdapterContract, AaveV3PoolAdapterContract, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BasicSwapCall, BoundedPriceFeedContract, CamelotPool, CamelotV3AdapterContract, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConstantPriceFeedContract, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DStokenData, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, GaugeParams, GetInvestorOptions, GetOpenAccountRequirementsProps, GetReward, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IDegenNFT, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTask, type IPriceUpdater, IRWAFactory, IRateKeeperContract, type IUpdatablePriceFeedContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, InterestRateModelType, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, type LatestUpdate, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationFees, MAX_LEVERAGE_BUFFER_BPS, MakerDeposit, MakerRedeem, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MaxBorrowAmount, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, OptimalPartialLiquidationAmounts, OptimalPartialLiquidationAmountsProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegistry, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PriceUpdatesCache, PythPriceFeed, QuotaMode, QuotaSlice, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, StrategyCollateralProps, StrategyRateInputs, Swap, type TimestampedCalldata, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, type UpdatablePriceFeedRegistryHooks, type UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iAaveHorizonBridgeAbi, iAaveHorizonBridgeAdapterAbi, iAaveOracleAbi, iAaveV3PoolAbi, iAaveV3PoolAdapterAbi, 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, iPoolAddressesProviderAbi, iSecuritizeNAVProviderAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVariableDebtTokenAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, updatableDependencies, usdToNumber };
|
|
@@ -82,6 +82,20 @@ declare const abi: readonly [{
|
|
|
82
82
|
readonly internalType: "address";
|
|
83
83
|
}];
|
|
84
84
|
readonly stateMutability: "view";
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "function";
|
|
87
|
+
readonly name: "isAllowedBot";
|
|
88
|
+
readonly inputs: readonly [{
|
|
89
|
+
readonly name: "bot";
|
|
90
|
+
readonly type: "address";
|
|
91
|
+
readonly internalType: "address";
|
|
92
|
+
}];
|
|
93
|
+
readonly outputs: readonly [{
|
|
94
|
+
readonly name: "";
|
|
95
|
+
readonly type: "bool";
|
|
96
|
+
readonly internalType: "bool";
|
|
97
|
+
}];
|
|
98
|
+
readonly stateMutability: "view";
|
|
85
99
|
}, {
|
|
86
100
|
readonly type: "function";
|
|
87
101
|
readonly name: "isCreditAccount";
|
|
@@ -493,6 +507,12 @@ export declare class SecuritizeRWAFactory extends BaseContract<abi> implements I
|
|
|
493
507
|
* {@inheritDoc IRWAFactory.getWallet}
|
|
494
508
|
*/
|
|
495
509
|
getWallet(creditAccount: Address): Promise<Address>;
|
|
510
|
+
/**
|
|
511
|
+
* {@inheritDoc IRWAFactory.isAllowedBot}
|
|
512
|
+
*
|
|
513
|
+
* Factories below 3.12 keep no allowlist, and their wallets reject every bot.
|
|
514
|
+
*/
|
|
515
|
+
isAllowedBot(bot: Address): Promise<boolean>;
|
|
496
516
|
/**
|
|
497
517
|
* {@inheritDoc IRWAFactory.multicall}
|
|
498
518
|
*/
|
|
@@ -147,6 +147,12 @@ export interface IRWAFactory<T extends RWAFactoryType = RWAFactoryType> extends
|
|
|
147
147
|
* @param creditAccount - credit account address
|
|
148
148
|
**/
|
|
149
149
|
getWallet(creditAccount: Address): Promise<Address>;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the factory's wallets let a multicall grant `bot` permissions;
|
|
152
|
+
* they reject every other `setBotPermissions`.
|
|
153
|
+
* @param bot - bot address
|
|
154
|
+
**/
|
|
155
|
+
isAllowedBot(bot: Address): Promise<boolean>;
|
|
150
156
|
/**
|
|
151
157
|
* Creates a raw transaction to perform operations on a credit account.
|
|
152
158
|
* Similar to {@link CreditFacadeV310Contract.multicall}.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Position } from "../../model/positions.js";
|
|
2
|
+
import { AavePosition } from "../../model/aave.js";
|
|
2
3
|
import { DataResponse } from "../../model/response.js";
|
|
3
4
|
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
4
5
|
import "../../model/index.js";
|
|
5
6
|
import { PluginsMap } from "../plugins/types.js";
|
|
6
7
|
import "../plugins/index.js";
|
|
7
|
-
import { GetCurrentWithdrawalsProps, IMultichainPositionsService, ListPositionsProps } from "./types.js";
|
|
8
|
+
import { GetCurrentWithdrawalsProps, IMultichainPositionsService, ListAavePositionsProps, ListPositionsProps } from "./types.js";
|
|
8
9
|
import { MultichainConstruct } from "../base/MultichainConstruct.js";
|
|
9
10
|
import "../base/index.js";
|
|
10
11
|
//#region src/onchain/positions/MultichainPositionsService.d.ts
|
|
@@ -24,5 +25,10 @@ export declare class MultichainPositionsService<const Plugins extends PluginsMap
|
|
|
24
25
|
* {@link PositionsService.getCurrentWithdrawals}.
|
|
25
26
|
**/
|
|
26
27
|
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
28
|
+
/**
|
|
29
|
+
* Aave Horizon positions of a wallet on all queried chains, see
|
|
30
|
+
* {@link PositionsService.listAavePositions}.
|
|
31
|
+
**/
|
|
32
|
+
listAavePositions(props: ListAavePositionsProps<true>): Promise<DataResponse<AavePosition[]>>;
|
|
27
33
|
}
|
|
28
34
|
//#endregion
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Bps } from "../../model/primitives.js";
|
|
2
|
-
import { BorrowRateBreakdown, Position, StrategyPosition } from "../../model/positions.js";
|
|
3
2
|
import { AccountMetrics, AccountProjection } from "../../model/previews.js";
|
|
3
|
+
import { BorrowRateBreakdown, Position, StrategyPosition } from "../../model/positions.js";
|
|
4
|
+
import { AavePosition } from "../../model/aave.js";
|
|
4
5
|
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
5
6
|
import "../../model/index.js";
|
|
6
|
-
import { AccountSnapshot, GetCurrentWithdrawalsProps, ListPositionsProps, ListStrategyPositionsProps } from "./types.js";
|
|
7
|
+
import { AccountSnapshot, GetCurrentWithdrawalsProps, ListAavePositionsProps, ListPositionsProps, ListStrategyPositionsProps } from "./types.js";
|
|
7
8
|
import { SDKConstruct } from "../base/SDKConstruct.js";
|
|
8
9
|
import "../base/index.js";
|
|
9
10
|
//#region src/onchain/positions/PositionsService.d.ts
|
|
@@ -42,6 +43,19 @@ export declare class PositionsService extends SDKConstruct {
|
|
|
42
43
|
* @param props - {@link ListStrategyPositionsProps}
|
|
43
44
|
**/
|
|
44
45
|
listStrategyPositions(props: ListStrategyPositionsProps): Promise<StrategyPosition[]>;
|
|
46
|
+
/**
|
|
47
|
+
* Describes the Aave Horizon positions of a wallet, see
|
|
48
|
+
* {@link readAavePosition}. Accounts are found as
|
|
49
|
+
* {@link listStrategyPositions} finds them, zero-debt ones included: an
|
|
50
|
+
* account whose position moved to Aave carries no debt.
|
|
51
|
+
*
|
|
52
|
+
* One Aave pool holds one position per owner, however many of the owner's
|
|
53
|
+
* accounts moved into it, so each is reported once. Its `creditAccount` is
|
|
54
|
+
* one the exit can run through — with no debt and no quota, as
|
|
55
|
+
* `prepare.closeAavePosition` requires — where the owner has one, and any
|
|
56
|
+
* of the accounts otherwise.
|
|
57
|
+
**/
|
|
58
|
+
listAavePositions(props: ListAavePositionsProps): Promise<AavePosition[]>;
|
|
45
59
|
/**
|
|
46
60
|
* Returns delayed withdrawals of a strategy position
|
|
47
61
|
**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Asset } from "../base/types.js";
|
|
2
|
+
import { MultiCall } from "../types/transactions.js";
|
|
3
|
+
import { OnchainSDK } from "../OnchainSDK.js";
|
|
4
|
+
import "../index.js";
|
|
5
|
+
import { Address } from "viem";
|
|
6
|
+
//#region src/onchain/positions/aaveMoveCalls.d.ts
|
|
7
|
+
export interface AaveMoveCallsProps {
|
|
8
|
+
creditManager: Address;
|
|
9
|
+
/** RWA the opening holds, as the Aave pool lists it. */
|
|
10
|
+
token: Address;
|
|
11
|
+
/** What the opening borrows, in underlying units. */
|
|
12
|
+
debt: bigint;
|
|
13
|
+
/** Quotas the opening buys; the facade adds their increase fees to the debt. */
|
|
14
|
+
quotas: readonly Asset[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The calls that move an opening to Aave Horizon at the end of its own
|
|
18
|
+
* multicall, the ones the finalizer bot makes a block later otherwise.
|
|
19
|
+
*
|
|
20
|
+
* The whole balance of `token` is supplied to the Aave pool, the Horizon
|
|
21
|
+
* bridge hands the aTokens to the account owner and borrows against them into
|
|
22
|
+
* the account exactly what the account owes — the debt plus the quota increase
|
|
23
|
+
* fees, no interest accruing within the transaction — on an RWA market the
|
|
24
|
+
* loan is wrapped back into the underlying, the quotas are dropped and the
|
|
25
|
+
* debt is repaid in full.
|
|
26
|
+
*
|
|
27
|
+
* `undefined` when the credit manager has no Aave adapters for `token`.
|
|
28
|
+
**/
|
|
29
|
+
export declare function aaveMoveCalls(sdk: OnchainSDK, props: AaveMoveCallsProps): Promise<MultiCall[] | undefined>;
|
|
30
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountSnapshot, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./types.js";
|
|
1
|
+
import { AccountSnapshot, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListAavePositionsProps, ListAavePositionsPropsBase, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./types.js";
|
|
2
2
|
import { CalcBorrowRateProps, calcBorrowRate } from "./calcBorrowRate.js";
|
|
3
3
|
import { CalcHealthFactorProps, calcHealthFactor } from "./calcHealthFactor.js";
|
|
4
4
|
import { CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, calcLiquidationPriceForTarget } from "./calcLiquidationPriceForTarget.js";
|
|
@@ -6,4 +6,4 @@ import { calcLiquidationPrice, soleNonUnderlyingCollateral } from "./calcLiquida
|
|
|
6
6
|
import { calcTimeToLiquidationMs } from "./calcTimeToLiquidationMs.js";
|
|
7
7
|
import { MultichainPositionsService } from "./MultichainPositionsService.js";
|
|
8
8
|
import { PositionsService, ProjectedPoolOptions } from "./PositionsService.js";
|
|
9
|
-
export { AccountSnapshot, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, MultichainPositionsService, PositionsService, ProjectedPoolOptions, accountSnapshotFromCreditAccountData, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcTimeToLiquidationMs, soleNonUnderlyingCollateral };
|
|
9
|
+
export { AccountSnapshot, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListAavePositionsProps, ListAavePositionsPropsBase, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, MultichainPositionsService, PositionsService, ProjectedPoolOptions, accountSnapshotFromCreditAccountData, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcTimeToLiquidationMs, soleNonUnderlyingCollateral };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AavePositionProjection } from "../../model/aave.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
import { AccountSnapshot } from "./types.js";
|
|
4
|
+
import { OnchainSDK } from "../OnchainSDK.js";
|
|
5
|
+
import "../index.js";
|
|
6
|
+
import { Address } from "viem";
|
|
7
|
+
//#region src/onchain/positions/projectAavePosition.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Where an Aave Horizon opening lands, and how much the Aave side lends.
|
|
10
|
+
**/
|
|
11
|
+
export interface AaveProjection {
|
|
12
|
+
aave: AavePositionProjection;
|
|
13
|
+
/**
|
|
14
|
+
* The most the owner's Aave position can borrow once the collateral is in
|
|
15
|
+
* it, in the market underlying: Aave lends up to the collateral times its
|
|
16
|
+
* LTV, less what the owner already owes there, and the move borrows the
|
|
17
|
+
* whole Gearbox debt or reverts.
|
|
18
|
+
**/
|
|
19
|
+
maxDebt: bigint;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Where an opening lands once it has moved to Aave Horizon, from the snapshot
|
|
23
|
+
* of the credit account it is built in.
|
|
24
|
+
*
|
|
25
|
+
* The move supplies the account's RWA to the pool and borrows the Gearbox
|
|
26
|
+
* debt against it on the owner's behalf, so the Aave side is read off
|
|
27
|
+
* the pool for `owner`: the reserve's LTV and liquidation threshold (its eMode
|
|
28
|
+
* category's, where the owner is in one that lists it), the Aave oracle's
|
|
29
|
+
* prices, the variable borrow rate of the underlying, and whatever the owner
|
|
30
|
+
* already holds and owes there. `healthFactor` and `liquidationPrice` are of
|
|
31
|
+
* that whole position; the values describe this opening alone.
|
|
32
|
+
*
|
|
33
|
+
* The RWA is either on the account already, and the position is on Aave at
|
|
34
|
+
* once (the opening moves it in its own transaction), or still being minted
|
|
35
|
+
* and moved by the finalizer bot once it settles: then the
|
|
36
|
+
* account holds the withdrawal phantom token of a delayed operation the
|
|
37
|
+
* withdrawal compressor lists for the credit manager, the mint takes that
|
|
38
|
+
* operation's `withdrawalLength` and is assumed to come out one for one, and
|
|
39
|
+
* the Gearbox debt accrues interest at the credit manager's rate meanwhile.
|
|
40
|
+
*
|
|
41
|
+
* `undefined` when the credit manager cannot move the account to Aave: no
|
|
42
|
+
* pool adapter lists an asset of the account or the RWA it is being minted
|
|
43
|
+
* into, or no bridge adapter takes its aToken against the underlying.
|
|
44
|
+
**/
|
|
45
|
+
export declare function projectAavePosition(sdk: OnchainSDK, snapshot: AccountSnapshot, owner: Address): Promise<AaveProjection | undefined>;
|
|
46
|
+
//#endregion
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AavePosition } from "../../model/aave.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
import { CreditAccountData } from "../base/types.js";
|
|
4
|
+
import { OnchainSDK } from "../OnchainSDK.js";
|
|
5
|
+
import "../base/index.js";
|
|
6
|
+
import "../index.js";
|
|
7
|
+
//#region src/onchain/positions/readAavePosition.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* The Aave Horizon position of a credit account's owner — the investor of an
|
|
10
|
+
* RWA account — on the pool the account's credit manager moves positions to,
|
|
11
|
+
* reported beside that account.
|
|
12
|
+
*
|
|
13
|
+
* The pool and its RWAs come from the credit manager's Aave pool adapter, kept
|
|
14
|
+
* to those whose aToken a Horizon bridge adapter of the same credit manager
|
|
15
|
+
* takes against the underlying (the asset an RWA underlying wraps). Values are
|
|
16
|
+
* at the Aave oracle's prices, the ones Aave liquidates at.
|
|
17
|
+
*
|
|
18
|
+
* `undefined` when the credit manager has no such adapters, or the owner
|
|
19
|
+
* neither supplies any of those RWAs nor owes anything on the pool.
|
|
20
|
+
**/
|
|
21
|
+
export declare function readAavePosition(sdk: OnchainSDK, ca: CreditAccountData<true>, blockNumber?: bigint): Promise<AavePosition | undefined>;
|
|
22
|
+
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChainId } from "../../model/primitives.js";
|
|
2
2
|
import { Position, PositionFilter } from "../../model/positions.js";
|
|
3
|
+
import { AavePosition } from "../../model/aave.js";
|
|
3
4
|
import { DataResponse } from "../../model/response.js";
|
|
4
5
|
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
5
6
|
import "../../model/index.js";
|
|
@@ -62,6 +63,25 @@ export interface GetCurrentWithdrawalsPropsBase {
|
|
|
62
63
|
export type GetCurrentWithdrawalsProps<Multichain extends boolean = false> = GetCurrentWithdrawalsPropsBase & WithMultichain<Multichain, {
|
|
63
64
|
chainId: ChainId;
|
|
64
65
|
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Chain-independent part of {@link ListAavePositionsProps}.
|
|
68
|
+
**/
|
|
69
|
+
export interface ListAavePositionsPropsBase {
|
|
70
|
+
/**
|
|
71
|
+
* Wallet whose Aave Horizon positions to describe: the account owner, or the
|
|
72
|
+
* investor of an RWA account.
|
|
73
|
+
**/
|
|
74
|
+
wallet: Address;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Props for {@link PositionsService.listAavePositions}.
|
|
78
|
+
**/
|
|
79
|
+
export type ListAavePositionsProps<Multichain extends boolean = false> = ListAavePositionsPropsBase & WithBlock<Multichain> & WithMultichain<Multichain, {
|
|
80
|
+
/**
|
|
81
|
+
* Chains to read. Defaults to every attached chain.
|
|
82
|
+
**/
|
|
83
|
+
chainIds?: ChainId[];
|
|
84
|
+
}>;
|
|
65
85
|
/**
|
|
66
86
|
* Cross-chain reads of the positions namespace: everything a wallet holds.
|
|
67
87
|
**/
|
|
@@ -75,6 +95,11 @@ export interface IMultichainPositionsService {
|
|
|
75
95
|
* {@link PositionsService.getCurrentWithdrawals}.
|
|
76
96
|
**/
|
|
77
97
|
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
98
|
+
/**
|
|
99
|
+
* Aave Horizon positions of a wallet on all queried chains, see
|
|
100
|
+
* {@link PositionsService.listAavePositions}.
|
|
101
|
+
**/
|
|
102
|
+
listAavePositions(props: ListAavePositionsProps<true>): Promise<DataResponse<AavePosition[]>>;
|
|
78
103
|
}
|
|
79
104
|
/**
|
|
80
105
|
* Props for {@link PositionsService.listStrategyPositions}.
|
|
@@ -9,6 +9,7 @@ import { parseOperationCalldata } from "./parse/parseOperationCalldata.js";
|
|
|
9
9
|
import { parsePoolOperationCalldata } from "./parse/parsePoolOperationCalldata.js";
|
|
10
10
|
import { parseRWAFactoryOperationCalldata } from "./parse/parseRWAFactoryOperationCalldata.js";
|
|
11
11
|
import "./parse/index.js";
|
|
12
|
+
import { aaveBridgeBorrows } from "./preview/aaveBridgeBorrows.js";
|
|
12
13
|
import { CreditAccountState, CreditAccountStateProps } from "./preview/CreditAccountState.js";
|
|
13
14
|
import { DetectedDelayedOperation, detectDelayedOperation } from "./preview/detectDelayedOperation.js";
|
|
14
15
|
import { buildDelayedStrategyPositionOperationPreview } from "./preview/buildDelayedStrategyPositionOperationPreview.js";
|
|
@@ -22,4 +23,4 @@ import { previewAdjustStrategyPosition } from "./preview/previewAdjustStrategyPo
|
|
|
22
23
|
import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./preview/previewExitOrRepayStrategyPosition.js";
|
|
23
24
|
import { PreviewOperationError, previewOperation } from "./preview/previewOperation.js";
|
|
24
25
|
import "./preview/index.js";
|
|
25
|
-
export { AdapterOperation, AdapterOperationBase, AddCollateralOp, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseOrRepayOperation, CompareBalancesOp, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, FacadeOperationMetadata, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, Operation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation, PreviewOperationError, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOperation, RWAOperationMetadata, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TraceAdapterExt, UpdateQuotaOp, WithdrawCollateralOp, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, classifyInnerOperations, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, midasGreenlistsAccount, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
26
|
+
export { AdapterOperation, AdapterOperationBase, AddCollateralOp, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseOrRepayOperation, CompareBalancesOp, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, FacadeOperationMetadata, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, Operation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation, PreviewOperationError, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOperation, RWAOperationMetadata, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TraceAdapterExt, UpdateQuotaOp, WithdrawCollateralOp, aaveBridgeBorrows, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, classifyInnerOperations, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, midasGreenlistsAccount, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AaveBridgeBorrow } from "../../../model/aave.js";
|
|
2
|
+
import "../../../model/index.js";
|
|
3
|
+
import { PluginsMap } from "../../plugins/types.js";
|
|
4
|
+
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
5
|
+
import { InnerOperation } from "../parse/types-facades.js";
|
|
6
|
+
import "../parse/index.js";
|
|
7
|
+
import "../../index.js";
|
|
8
|
+
import { Address } from "viem";
|
|
9
|
+
//#region src/onchain/preview/preview/aaveBridgeBorrows.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* The loans the multicall's Horizon bridge calls take as the account owner,
|
|
12
|
+
* at the amounts the calldata names.
|
|
13
|
+
*/
|
|
14
|
+
export declare function aaveBridgeBorrows<P extends PluginsMap>(sdk: OnchainSDK<P>, creditManager: Address, multicall: InnerOperation[]): AaveBridgeBorrow[];
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PluginsMap } from "../../plugins/types.js";
|
|
2
|
+
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
3
|
+
import { InnerOperation } from "../parse/types-facades.js";
|
|
4
|
+
import "../parse/index.js";
|
|
5
|
+
import "../../index.js";
|
|
6
|
+
//#region src/onchain/preview/preview/aaveMoveStart.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Index at which an opening that moves to Aave Horizon in its own multicall
|
|
9
|
+
* starts the move: the first Aave pool adapter call after the debt is drawn,
|
|
10
|
+
* followed by a Horizon bridge borrow. `undefined` for a multicall that does
|
|
11
|
+
* not move a position to Aave.
|
|
12
|
+
*
|
|
13
|
+
* The calls before it build the credit account an opening preview describes;
|
|
14
|
+
* the rest supply its collateral to Aave and repay its debt with the loan
|
|
15
|
+
* Aave takes in the owner's name.
|
|
16
|
+
*/
|
|
17
|
+
export declare function aaveMoveStart<P extends PluginsMap>(sdk: OnchainSDK<P>, multicall: InnerOperation[]): number | undefined;
|
|
18
|
+
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { aaveBridgeBorrows } from "./aaveBridgeBorrows.js";
|
|
1
2
|
import { CreditAccountState, CreditAccountStateProps } from "./CreditAccountState.js";
|
|
2
3
|
import { DetectedDelayedOperation, detectDelayedOperation } from "./detectDelayedOperation.js";
|
|
3
4
|
import { buildDelayedStrategyPositionOperationPreview } from "./buildDelayedStrategyPositionOperationPreview.js";
|
|
@@ -10,4 +11,4 @@ import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./r
|
|
|
10
11
|
import { previewAdjustStrategyPosition } from "./previewAdjustStrategyPosition.js";
|
|
11
12
|
import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./previewExitOrRepayStrategyPosition.js";
|
|
12
13
|
import { PreviewOperationError, previewOperation } from "./previewOperation.js";
|
|
13
|
-
export { CloseOrRepayOperation, CreditAccountState, CreditAccountStateProps, DetectedDelayedClaim, DetectedDelayedOperation, PreviewOperationError, ReplayMulticallResult, ReplayState, ReplayableOperation, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, makeReplayState, midasGreenlistsAccount, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
14
|
+
export { CloseOrRepayOperation, CreditAccountState, CreditAccountStateProps, DetectedDelayedClaim, DetectedDelayedOperation, PreviewOperationError, ReplayMulticallResult, ReplayState, ReplayableOperation, aaveBridgeBorrows, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, makeReplayState, midasGreenlistsAccount, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PluginsMap } from "../../plugins/types.js";
|
|
2
|
+
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
3
|
+
import { InnerOperation } from "../parse/types-facades.js";
|
|
4
|
+
import "../parse/index.js";
|
|
5
|
+
import "../../index.js";
|
|
6
|
+
//#region src/onchain/preview/preview/loadAdapterReplayState.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Has every adapter called in `multicall` read what it needs to replay its
|
|
9
|
+
* call, see {@link AbstractAdapterContract.loadReplayState}. Runs before
|
|
10
|
+
* {@link replayInnerOperations}, which cannot wait on the chain.
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadAdapterReplayState<P extends PluginsMap>(sdk: OnchainSDK<P>, multicall: InnerOperation[]): Promise<void>;
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InsufficientBorrowAllowanceError } from "../../../model/errors/operation-errors.js";
|
|
2
|
+
import { UnexpectedFailureError } from "../../../model/errors/prepare-errors.js";
|
|
3
|
+
import { AaveBridgeBorrow } from "../../../model/aave.js";
|
|
4
|
+
import "../../../model/index.js";
|
|
5
|
+
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
6
|
+
import { Address } from "viem";
|
|
7
|
+
//#region src/onchain/validation/bundles/checkAaveDelegation.d.ts
|
|
8
|
+
export interface CheckAaveDelegationInput {
|
|
9
|
+
sdk: OnchainSDK;
|
|
10
|
+
/** Account owner the bridge borrows as. */
|
|
11
|
+
owner: Address;
|
|
12
|
+
borrow: AaveBridgeBorrow;
|
|
13
|
+
blockNumber?: bigint;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `owner` has delegated the bridge at least the borrowed amount on the
|
|
17
|
+
* variable debt token of the borrowed token, in the pool the bridge borrows
|
|
18
|
+
* from.
|
|
19
|
+
*/
|
|
20
|
+
export declare function checkAaveDelegation(input: CheckAaveDelegationInput): Promise<(InsufficientBorrowAllowanceError | UnexpectedFailureError)[]>;
|
|
21
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountNotMidasGreenlistedError, DebtOutOfRangeError, ForbiddenTokenError, InsufficientCollateralError, InsufficientPoolLiquidityError, QuotaAboveMaxError, QuotaCountExceededError, QuotaLimitReachedError, RWAOpenRequirementsError } from "../../../model/errors/operation-errors.js";
|
|
1
|
+
import { AccountNotMidasGreenlistedError, DebtOutOfRangeError, ForbiddenTokenError, InsufficientBorrowAllowanceError, InsufficientCollateralError, InsufficientPoolLiquidityError, QuotaAboveMaxError, QuotaCountExceededError, QuotaLimitReachedError, RWAOpenRequirementsError } from "../../../model/errors/operation-errors.js";
|
|
2
2
|
import { AdjustStrategyPositionPreview, OpenStrategyPositionPreview } from "../../../model/previews.js";
|
|
3
3
|
import "../../../model/index.js";
|
|
4
4
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
@@ -8,7 +8,7 @@ import { MarketStateError } from "./checkMarket.js";
|
|
|
8
8
|
import { Address } from "viem";
|
|
9
9
|
//#region src/onchain/validation/bundles/checkCreditOperation.d.ts
|
|
10
10
|
/** {@inheritDoc checkCreditOperation} */
|
|
11
|
-
export type CreditOperationError = MarketStateError | DebtOutOfRangeError | InsufficientPoolLiquidityError | ForbiddenTokenError | QuotaCountExceededError | QuotaAboveMaxError | QuotaLimitReachedError | InsufficientCollateralError | WalletFundingError | RWAOpenRequirementsError | AccountNotMidasGreenlistedError;
|
|
11
|
+
export type CreditOperationError = MarketStateError | DebtOutOfRangeError | InsufficientPoolLiquidityError | ForbiddenTokenError | QuotaCountExceededError | QuotaAboveMaxError | QuotaLimitReachedError | InsufficientCollateralError | WalletFundingError | RWAOpenRequirementsError | AccountNotMidasGreenlistedError | InsufficientBorrowAllowanceError;
|
|
12
12
|
/** The two previews that carry a position for the thresholds to weigh. */
|
|
13
13
|
export type CreditOperationPreview = OpenStrategyPositionPreview | AdjustStrategyPositionPreview;
|
|
14
14
|
export interface CreditOperationArgs extends HealthFactorThresholds {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CheckAaveDelegationInput, checkAaveDelegation } from "./checkAaveDelegation.js";
|
|
1
2
|
import { checkAccountQuotas } from "./checkAccountQuotas.js";
|
|
2
3
|
import { CheckWalletInput, WalletFundingError, checkWallet } from "./checkWallet.js";
|
|
3
4
|
import { CheckCollateralFundingInput, CollateralFundingPreview, checkCollateralFunding } from "./checkCollateralFunding.js";
|
|
@@ -17,4 +18,4 @@ import { CheckRWAOpeningInput, RWAOpeningError, checkRWAOpening } from "./checkR
|
|
|
17
18
|
import { CheckRWAOpenRequirementsInput, checkRWAOpenRequirements } from "./checkRWAOpenRequirements.js";
|
|
18
19
|
import { CheckWalletAllowanceInput, checkWalletAllowance } from "./checkWalletAllowance.js";
|
|
19
20
|
import { CheckWalletBalanceInput, checkWalletBalance } from "./checkWalletBalance.js";
|
|
20
|
-
export { CheckCollateralFundingInput, CheckLiquidationEligibilityInput, CheckLiquidationFundingInput, CheckMidasAccountGreenlistInput, CheckPoolFundingInput, CheckRWAOpenRequirementsInput, CheckRWAOpeningInput, CheckWalletAllowanceInput, CheckWalletBalanceInput, CheckWalletInput, CollateralFundingPreview, CreditOperationArgs, CreditOperationError, CreditOperationPreview, HealthFactorThresholds, LiquidationEligibilityError, MarketStateError, PoolOperationArgs, PoolOperationError, QuotaUpdateError, RWAOpeningError, WalletFundingError, WeighedFactors, checkAccountQuotas, checkCollateralFunding, checkCreditOperation, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLiquidationEligibility, checkLiquidationFunding, checkMarket, checkMidasAccountGreenlist, checkObtained, checkPoolFunding, checkPoolOperation, checkQuotaUpdates, checkRWAOpenRequirements, checkRWAOpening, checkWallet, checkWalletAllowance, checkWalletBalance };
|
|
21
|
+
export { CheckAaveDelegationInput, CheckCollateralFundingInput, CheckLiquidationEligibilityInput, CheckLiquidationFundingInput, CheckMidasAccountGreenlistInput, CheckPoolFundingInput, CheckRWAOpenRequirementsInput, CheckRWAOpeningInput, CheckWalletAllowanceInput, CheckWalletBalanceInput, CheckWalletInput, CollateralFundingPreview, CreditOperationArgs, CreditOperationError, CreditOperationPreview, HealthFactorThresholds, LiquidationEligibilityError, MarketStateError, PoolOperationArgs, PoolOperationError, QuotaUpdateError, RWAOpeningError, WalletFundingError, WeighedFactors, checkAaveDelegation, checkAccountQuotas, checkCollateralFunding, checkCreditOperation, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLiquidationEligibility, checkLiquidationFunding, checkMarket, checkMidasAccountGreenlist, checkObtained, checkPoolFunding, checkPoolOperation, checkQuotaUpdates, checkRWAOpenRequirements, checkRWAOpening, checkWallet, checkWalletAllowance, checkWalletBalance };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IntentValidationError, raise } from "./raise.js";
|
|
2
|
+
import { CheckAaveDelegationInput, checkAaveDelegation } from "./bundles/checkAaveDelegation.js";
|
|
2
3
|
import { checkAccountQuotas } from "./bundles/checkAccountQuotas.js";
|
|
3
4
|
import { CheckWalletInput, WalletFundingError, checkWallet } from "./bundles/checkWallet.js";
|
|
4
5
|
import { CheckCollateralFundingInput, CollateralFundingPreview, checkCollateralFunding } from "./bundles/checkCollateralFunding.js";
|
|
@@ -47,4 +48,4 @@ import { amountOf } from "./helpers/amount.js";
|
|
|
47
48
|
import { MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_SAFE_HEALTH_FACTOR_FORM } from "./helpers/health-factor-limits.js";
|
|
48
49
|
import { toToken, toTokenAmount } from "./helpers/token.js";
|
|
49
50
|
import "./helpers/index.js";
|
|
50
|
-
export { BorrowLimitArgs, CheckCollateralFundingInput, CheckLiquidationEligibilityInput, CheckLiquidationFundingInput, CheckLiquidationInput, CheckLiquidationOptions, CheckMidasAccountGreenlistInput, CheckOperationInput, CheckOperationOptions, CheckPoolFundingInput, CheckRWAOpenRequirementsInput, CheckRWAOpeningInput, CheckSimulationInput, CheckWalletAllowanceInput, CheckWalletBalanceInput, CheckWalletInput, CollateralFundingPreview, CollateralisedArgs, CreditAccountFrozenArgs, CreditManagerPausedArgs, CreditOperationArgs, CreditOperationError, CreditOperationPreview, CreditSimulationInput, DebtLimitsArgs, EmergencyLiquidatorArgs, ForbiddenTokenArgs, HealthFactorThresholds, type IntentValidationError, LeverageArgs, LiquidationEligibilityError, LiquidationValidationError, LiquidatorEligibleArgs, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_SAFE_HEALTH_FACTOR_FORM, MarketExpiredArgs, MarketStateError, MaxQuotaArgs, OperationValidationError, PartiallyLiquidatableArgs, PoolLiquidityArgs, PoolOperationArgs, PoolOperationError, PoolPausedArgs, PoolSunsetArgs, QuotaActiveArgs, QuotaChangeArgs, QuotaCountArgs, QuotaLimitArgs, QuotaUpdateError, RWAOpeningError, ReservePriceLimitedArgs, SimulationValidationError, WalletFundingError, WeighedFactors, amountOf, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkMaxQuota, checkMidasAccountGreenlist, checkObtained, checkOperation, checkPartiallyLiquidatable, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaActive, checkQuotaChange, checkQuotaCount, checkQuotaLimit, checkQuotaUpdates, checkRWAOpenRequirements, checkRWAOpening, checkReservePriceLimited, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, raise, toToken, toTokenAmount };
|
|
51
|
+
export { BorrowLimitArgs, CheckAaveDelegationInput, CheckCollateralFundingInput, CheckLiquidationEligibilityInput, CheckLiquidationFundingInput, CheckLiquidationInput, CheckLiquidationOptions, CheckMidasAccountGreenlistInput, CheckOperationInput, CheckOperationOptions, CheckPoolFundingInput, CheckRWAOpenRequirementsInput, CheckRWAOpeningInput, CheckSimulationInput, CheckWalletAllowanceInput, CheckWalletBalanceInput, CheckWalletInput, CollateralFundingPreview, CollateralisedArgs, CreditAccountFrozenArgs, CreditManagerPausedArgs, CreditOperationArgs, CreditOperationError, CreditOperationPreview, CreditSimulationInput, DebtLimitsArgs, EmergencyLiquidatorArgs, ForbiddenTokenArgs, HealthFactorThresholds, type IntentValidationError, LeverageArgs, LiquidationEligibilityError, LiquidationValidationError, LiquidatorEligibleArgs, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_SAFE_HEALTH_FACTOR_FORM, MarketExpiredArgs, MarketStateError, MaxQuotaArgs, OperationValidationError, PartiallyLiquidatableArgs, PoolLiquidityArgs, PoolOperationArgs, PoolOperationError, PoolPausedArgs, PoolSunsetArgs, QuotaActiveArgs, QuotaChangeArgs, QuotaCountArgs, QuotaLimitArgs, QuotaUpdateError, RWAOpeningError, ReservePriceLimitedArgs, SimulationValidationError, WalletFundingError, WeighedFactors, amountOf, checkAaveDelegation, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkMaxQuota, checkMidasAccountGreenlist, checkObtained, checkOperation, checkPartiallyLiquidatable, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaActive, checkQuotaChange, checkQuotaCount, checkQuotaLimit, checkQuotaUpdates, checkRWAOpenRequirements, checkRWAOpening, checkReservePriceLimited, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, raise, toToken, toTokenAmount };
|
|
@@ -6,7 +6,7 @@ import { IOpportunities } from "./opportunities/types.js";
|
|
|
6
6
|
import { IPositions } from "./positions/types.js";
|
|
7
7
|
import { IPreviewByMode } from "./preview/types.js";
|
|
8
8
|
import { IRewardsByMode } from "./rewards/types.js";
|
|
9
|
-
import { GearboxSDKOptions, IGearboxSDK,
|
|
9
|
+
import { GearboxSDKOptions, IGearboxSDK, Mode, OffchainByMode, OnchainByMode } from "./types.js";
|
|
10
10
|
import "./analytics/index.js";
|
|
11
11
|
import "./liquidations/index.js";
|
|
12
12
|
import "./opportunities/index.js";
|
|
@@ -74,13 +74,6 @@ export declare class GearboxSDK<const M extends Mode = Mode> implements IGearbox
|
|
|
74
74
|
* Namespace for claimable rewards. Absent in `offchain` mode.
|
|
75
75
|
**/
|
|
76
76
|
readonly rewards: IRewardsByMode[M];
|
|
77
|
-
/**
|
|
78
|
-
* The banners the backend attaches to a pool opportunity or a strategy
|
|
79
|
-
* position, see {@link Notice}. Top-level because the subject is either
|
|
80
|
-
* kind of entity, so neither namespace owns it. Backend-only, hence gated
|
|
81
|
-
* by mode like every other backend read: absent in `onchain` mode.
|
|
82
|
-
**/
|
|
83
|
-
readonly notices: INoticesByMode[M];
|
|
84
77
|
constructor(options: GearboxSDKOptions<M>);
|
|
85
78
|
/**
|
|
86
79
|
* Attaches the on-chain SDK when this instance owns one; a no-op in `offchain`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChartBundle, ChartRange, ProtocolChartMetric } from "../../model/charts.js";
|
|
2
1
|
import { ChainScopedFilter } from "../../model/filters.js";
|
|
2
|
+
import { ChartBundle, ChartRange, ProtocolChartMetric } from "../../model/charts.js";
|
|
3
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
4
|
import { GearboxAPI } from "../../offchain/GearboxAPI.js";
|
|
5
5
|
import "../../offchain/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChartBundle, ChartRange, ProtocolChartMetric } from "../../model/charts.js";
|
|
2
1
|
import { ChainScopedFilter } from "../../model/filters.js";
|
|
2
|
+
import { ChartBundle, ChartRange, ProtocolChartMetric } from "../../model/charts.js";
|
|
3
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
4
|
import { IOffchainAnalyticsPositions } from "../../offchain/analytics/types.js";
|
|
5
5
|
import "../../offchain/index.js";
|
|
@@ -5,7 +5,7 @@ import "../../model/index.js";
|
|
|
5
5
|
import { Asset } from "../../onchain/base/types.js";
|
|
6
6
|
import { RawTx } from "../../onchain/types/transactions.js";
|
|
7
7
|
import "../../onchain/index.js";
|
|
8
|
-
import { BorrowResult, EmptyCreditAccountResult, LpResult, OpenStrategyResult, StrategyResult } from "../prepare/types.js";
|
|
8
|
+
import { BorrowResult, EmptyCreditAccountResult, LpResult, OpenAavePositionResult, OpenStrategyResult, StrategyResult } from "../prepare/types.js";
|
|
9
9
|
import "../prepare/index.js";
|
|
10
10
|
import { Address } from "viem";
|
|
11
11
|
//#region src/sdk/execute/types.d.ts
|
|
@@ -26,16 +26,18 @@ export interface PoolPrepareRequest {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Opening a new position, from a viable
|
|
29
|
-
* {@link IOpportunitiesPrepare.openNewStrategy}
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* {@link IOpportunitiesPrepare.openNewStrategy} or
|
|
30
|
+
* {@link IOpportunitiesPrepare.openAavePosition} result; the latter's
|
|
31
|
+
* `moveCalls` end the same multicall. The prepared state values collateral in
|
|
32
|
+
* underlying only, so the wallet's actual collateral assets and the native
|
|
33
|
+
* value to attach come from the caller.
|
|
32
34
|
**/
|
|
33
35
|
export interface OpenPrepareRequest {
|
|
34
36
|
kind: "open";
|
|
35
37
|
chainId: ChainId;
|
|
36
38
|
creditManager: Address;
|
|
37
39
|
wallet: Address;
|
|
38
|
-
sim: SDKResult<OpenStrategyResult>;
|
|
40
|
+
sim: SDKResult<OpenStrategyResult | OpenAavePositionResult>;
|
|
39
41
|
/** What leaves the wallet, token by token. */
|
|
40
42
|
collateral: Asset[];
|
|
41
43
|
/** Native value to attach when paying a wrapped-native market in the coin. */
|