@gearbox-protocol/sdk 17.12.2 → 17.13.0-next.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/dev/index.js +2 -0
- package/dist/cjs/dev/lowerHealthFactor.js +32 -0
- package/dist/cjs/dev/ltUtils.js +3 -2
- package/dist/cjs/model/analytics.schema.js +71 -7
- package/dist/cjs/model/errors/index.js +4 -0
- package/dist/cjs/model/errors/liquidation-errors.js +9 -0
- package/dist/cjs/model/errors/operation-errors.js +27 -0
- package/dist/cjs/model/index.js +9 -1
- package/dist/cjs/model/liquidations.schema.js +5 -3
- package/dist/cjs/model/opportunities.schema.js +1 -1
- package/dist/cjs/model/positions.schema.js +3 -0
- package/dist/cjs/offchain/analytics/OffchainAnalyticsPositions.js +8 -0
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +0 -37
- package/dist/cjs/onchain/accounts/index.js +3 -0
- package/dist/cjs/onchain/accounts/intents/index.js +1 -0
- package/dist/cjs/onchain/accounts/intents/operations.js +1 -1
- package/dist/cjs/onchain/accounts/intents/plan.js +21 -0
- package/dist/cjs/onchain/accounts/intents/realize.js +29 -7
- package/dist/cjs/onchain/accounts/intents/resolveQuotaUpdate.js +149 -0
- package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +1 -0
- package/dist/cjs/onchain/accounts/intents/tests/update-quota.fixtures.js +102 -0
- package/dist/cjs/onchain/accounts/intents/utils/index.js +1 -0
- package/dist/cjs/onchain/accounts/intents/utils/quotas-for-update.js +28 -10
- package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +175 -5
- package/dist/cjs/onchain/accounts/liquidations/MultichainLiquidationsService.js +28 -0
- package/dist/cjs/onchain/accounts/liquidations/constants.js +1 -1
- package/dist/cjs/onchain/accounts/liquidations/index.js +3 -0
- package/dist/cjs/onchain/accounts/liquidations/partialLiquidation.js +70 -0
- package/dist/cjs/onchain/base/TokensMeta.js +15 -0
- package/dist/cjs/onchain/constants/index.js +1 -0
- package/dist/cjs/onchain/constants/math.js +6 -0
- package/dist/cjs/onchain/index.js +15 -1
- package/dist/cjs/onchain/market/credit/CreditSuite.js +0 -60
- package/dist/cjs/onchain/market/credit/collateralUtils.js +3 -2
- package/dist/cjs/onchain/market/index.js +1 -1
- package/dist/cjs/onchain/market/math.js +34 -12
- package/dist/cjs/onchain/pools/PoolService.js +1 -0
- package/dist/cjs/onchain/positions/PositionsService.js +1 -0
- package/dist/cjs/onchain/positions/calcHealthFactor.js +1 -1
- package/dist/cjs/onchain/preview/preview/CreditAccountState.js +4 -2
- package/dist/cjs/onchain/validation/bundles/checkCreditOperation.js +2 -0
- package/dist/cjs/onchain/validation/bundles/checkLiquidationEligibility.js +8 -1
- package/dist/cjs/onchain/validation/bundles/checkLiquidationFunding.js +2 -1
- package/dist/cjs/onchain/validation/bundles/checkQuotaUpdates.js +45 -0
- package/dist/cjs/onchain/validation/bundles/index.js +2 -0
- package/dist/cjs/onchain/validation/checkLiquidation.js +2 -1
- package/dist/cjs/onchain/validation/checks/checkMaxQuota.js +18 -0
- package/dist/cjs/onchain/validation/checks/checkPartiallyLiquidatable.js +13 -0
- package/dist/cjs/onchain/validation/checks/checkQuotaActive.js +10 -0
- package/dist/cjs/onchain/validation/checks/checkQuotaChange.js +18 -0
- package/dist/cjs/onchain/validation/checks/index.js +8 -0
- package/dist/cjs/onchain/validation/index.js +10 -0
- package/dist/cjs/sdk/liquidations/LiquidationsNamespace.js +14 -0
- package/dist/cjs/sdk/prepare/PrepareApi.js +67 -0
- package/dist/cjs/sdk/rewards/merkl-api.js +1 -1
- package/dist/cjs/sdk/rewards/turtle-api.js +1 -1
- package/dist/esm/dev/index.js +2 -1
- package/dist/esm/dev/lowerHealthFactor.js +31 -0
- package/dist/esm/dev/ltUtils.js +3 -2
- package/dist/esm/dev/mint/index.js +1 -2
- package/dist/esm/model/analytics.schema.js +69 -9
- package/dist/esm/model/errors/index.js +3 -3
- package/dist/esm/model/errors/liquidation-errors.js +9 -1
- package/dist/esm/model/errors/operation-errors.js +25 -1
- package/dist/esm/model/index.js +5 -5
- package/dist/esm/model/liquidations.schema.js +5 -3
- package/dist/esm/model/opportunities.schema.js +1 -1
- package/dist/esm/model/positions.schema.js +3 -0
- package/dist/esm/offchain/analytics/OffchainAnalyticsPositions.js +9 -1
- package/dist/esm/offchain/notices/index.js +1 -2
- package/dist/esm/offchain/opportunities/index.js +1 -2
- package/dist/esm/offchain/positions/index.js +1 -2
- package/dist/esm/onchain/abi/index.js +1 -2
- package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +0 -37
- package/dist/esm/onchain/accounts/index.js +2 -1
- package/dist/esm/onchain/accounts/intents/index.js +2 -1
- package/dist/esm/onchain/accounts/intents/operations.js +1 -1
- package/dist/esm/onchain/accounts/intents/plan.js +22 -2
- package/dist/esm/onchain/accounts/intents/realize.js +29 -7
- package/dist/esm/onchain/accounts/intents/resolveQuotaUpdate.js +148 -0
- package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +1 -0
- package/dist/esm/onchain/accounts/intents/tests/update-quota.fixtures.js +92 -0
- package/dist/esm/onchain/accounts/intents/utils/index.js +2 -2
- package/dist/esm/onchain/accounts/intents/utils/quotas-for-update.js +28 -11
- package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +175 -5
- package/dist/esm/onchain/accounts/liquidations/MultichainLiquidationsService.js +28 -0
- package/dist/esm/onchain/accounts/liquidations/constants.js +1 -1
- package/dist/esm/onchain/accounts/liquidations/index.js +2 -1
- package/dist/esm/onchain/accounts/liquidations/partialLiquidation.js +68 -0
- package/dist/esm/onchain/base/TokensMeta.js +15 -0
- package/dist/esm/onchain/constants/index.js +2 -2
- package/dist/esm/onchain/constants/math.js +6 -1
- package/dist/esm/onchain/index.js +9 -3
- package/dist/esm/onchain/market/adapters/abi/midas/index.js +1 -2
- package/dist/esm/onchain/market/credit/CreditSuite.js +2 -62
- package/dist/esm/onchain/market/credit/collateralUtils.js +3 -2
- package/dist/esm/onchain/market/index.js +2 -2
- package/dist/esm/onchain/market/math.js +34 -12
- package/dist/esm/onchain/pools/PoolService.js +1 -0
- package/dist/esm/onchain/pools/index.js +1 -2
- package/dist/esm/onchain/positions/PositionsService.js +1 -0
- package/dist/esm/onchain/positions/calcHealthFactor.js +1 -1
- package/dist/esm/onchain/preview/preview/CreditAccountState.js +4 -2
- package/dist/esm/onchain/utils/internal/index.js +1 -2
- package/dist/esm/onchain/validation/bundles/checkCreditOperation.js +2 -0
- package/dist/esm/onchain/validation/bundles/checkLiquidationEligibility.js +8 -1
- package/dist/esm/onchain/validation/bundles/checkLiquidationFunding.js +2 -1
- package/dist/esm/onchain/validation/bundles/checkQuotaUpdates.js +44 -0
- package/dist/esm/onchain/validation/bundles/index.js +2 -1
- package/dist/esm/onchain/validation/checkLiquidation.js +2 -1
- package/dist/esm/onchain/validation/checks/checkMaxQuota.js +17 -0
- package/dist/esm/onchain/validation/checks/checkPartiallyLiquidatable.js +12 -0
- package/dist/esm/onchain/validation/checks/checkQuotaActive.js +9 -0
- package/dist/esm/onchain/validation/checks/checkQuotaChange.js +17 -0
- package/dist/esm/onchain/validation/checks/index.js +5 -1
- package/dist/esm/onchain/validation/index.js +6 -1
- package/dist/esm/permissionless/api/chains/index.js +1 -2
- package/dist/esm/permissionless/api/oracles/index.js +1 -2
- package/dist/esm/permissionless/api/transactions/index.js +1 -2
- package/dist/esm/permissionless/bindings/router/index.js +1 -2
- package/dist/esm/permissionless/core/index.js +1 -2
- package/dist/esm/plugins/accounts/index.js +1 -2
- package/dist/esm/plugins/accounts-counter/index.js +1 -2
- package/dist/esm/plugins/bots/abi/index.js +1 -2
- package/dist/esm/sdk/analytics/index.js +1 -2
- package/dist/esm/sdk/execute/index.js +1 -2
- package/dist/esm/sdk/liquidations/LiquidationsNamespace.js +14 -0
- package/dist/esm/sdk/liquidations/index.js +1 -2
- package/dist/esm/sdk/opportunities/index.js +1 -2
- package/dist/esm/sdk/positions/index.js +1 -2
- package/dist/esm/sdk/prepare/PrepareApi.js +67 -0
- package/dist/esm/sdk/preview/index.js +1 -2
- package/dist/esm/sdk/rewards/merkl-api.js +1 -1
- package/dist/esm/sdk/rewards/turtle-api.js +1 -1
- package/dist/types/abi/310/configure/creditSuiteParams.d.ts +4 -5
- package/dist/types/abi/310/configure/iCreditConfigureActions.d.ts +2 -3
- package/dist/types/abi/310/configure/iPoolConfigureActions.d.ts +2 -3
- package/dist/types/abi/310/configure/iPriceOracleConfigureActions.d.ts +2 -3
- package/dist/types/abi/310/crossChainMultisig.d.ts +2 -3
- package/dist/types/abi/310/generated.d.ts +15 -16
- package/dist/types/abi/310/iBytecodeRepository.d.ts +2 -3
- package/dist/types/abi/310/iLinearInterestRateModelV310.d.ts +2 -3
- package/dist/types/abi/310/iMarketConfiguratorFactory.d.ts +2 -3
- package/dist/types/abi/310/iPriceFeedStore.d.ts +2 -3
- package/dist/types/abi/310/iTreasurySplitter.d.ts +2 -3
- package/dist/types/abi/310/instanceManager.d.ts +2 -3
- package/dist/types/abi/AccountMigrator.d.ts +2 -3
- package/dist/types/abi/ILiquidationCompressorV313.d.ts +2 -3
- package/dist/types/abi/IWithdrawalCompressorV310.d.ts +2 -3
- package/dist/types/abi/IWithdrawalCompressorV311.d.ts +2 -3
- package/dist/types/abi/IWithdrawalCompressorV313.d.ts +2 -3
- package/dist/types/abi/compressors/creditAccountCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/creditSuiteCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/defillamaCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/gaugeCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/liquidationCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/marketCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/peripheryCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/priceFeedCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/rewardsCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/rwaCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/rwa/onDemandRWAUnderlyingSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/rwa/securitizeRWAFactorySubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/infinifiWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/kelpLRTWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowFlexibleDepositSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowFlexibleRedeemSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/subcompressors/withdrawal/upshiftWithdrawalSubcompressor.d.ts +2 -3
- package/dist/types/abi/compressors/tokenCompressor.d.ts +2 -3
- package/dist/types/abi/compressors/withdrawalCompressor.d.ts +2 -3
- package/dist/types/abi/errors.d.ts +11 -12
- package/dist/types/abi/governance/batchesChain.d.ts +2 -3
- package/dist/types/abi/governance/governor.d.ts +2 -3
- package/dist/types/abi/governance/iTimeLock.d.ts +2 -3
- package/dist/types/abi/helpers/redemptionLogger.d.ts +2 -3
- package/dist/types/abi/iAirdropDistributor.d.ts +2 -3
- package/dist/types/abi/iBaseRewardPool.d.ts +2 -3
- package/dist/types/abi/iCurvePool.d.ts +2 -3
- package/dist/types/abi/iDefaultAccountFactoryV3.d.ts +2 -3
- package/dist/types/abi/iDegenNFTV2.d.ts +2 -3
- package/dist/types/abi/iERC20.d.ts +2 -3
- package/dist/types/abi/iERC20Permit.d.ts +2 -3
- package/dist/types/abi/iERC20Zapper.d.ts +2 -3
- package/dist/types/abi/iERC20ZapperDeposits.d.ts +2 -3
- package/dist/types/abi/iETHZapper.d.ts +2 -3
- package/dist/types/abi/iETHZapperDeposits.d.ts +2 -3
- package/dist/types/abi/iExpirable.d.ts +2 -3
- package/dist/types/abi/iFarmingPool.d.ts +2 -3
- package/dist/types/abi/iInterestRateModel.d.ts +2 -3
- package/dist/types/abi/iMulticall3.d.ts +2 -3
- package/dist/types/abi/iOffchainOracle.d.ts +2 -3
- package/dist/types/abi/iPausable.d.ts +2 -3
- package/dist/types/abi/iPhantomToken.d.ts +2 -3
- package/dist/types/abi/iPriceFeed.d.ts +2 -3
- package/dist/types/abi/iRedemptionLoggerV310.d.ts +2 -3
- package/dist/types/abi/iStateSerializer.d.ts +2 -3
- package/dist/types/abi/iUpdatablePriceFeed.d.ts +2 -3
- package/dist/types/abi/iVersion.d.ts +2 -3
- package/dist/types/abi/iZapper.d.ts +2 -3
- package/dist/types/abi/ierc4626Adapter.d.ts +2 -3
- package/dist/types/abi/mellow.d.ts +6 -7
- package/dist/types/abi/migration.d.ts +3 -4
- package/dist/types/abi/router/balancerV2Worker.d.ts +2 -3
- package/dist/types/abi/router/balancerV3Worker.d.ts +2 -3
- package/dist/types/abi/router/balancerV3WrapperWorker.d.ts +2 -3
- package/dist/types/abi/router/camelotV3Worker.d.ts +2 -3
- package/dist/types/abi/router/convexWorker.d.ts +2 -3
- package/dist/types/abi/router/curveWorker.d.ts +2 -3
- package/dist/types/abi/router/daiUsdsWorker.d.ts +2 -3
- package/dist/types/abi/router/equalizerRouterWorker.d.ts +2 -3
- package/dist/types/abi/router/erc4626Worker.d.ts +2 -3
- package/dist/types/abi/router/fluidDexWorker.d.ts +2 -3
- package/dist/types/abi/router/gearboxRouter.d.ts +2 -3
- package/dist/types/abi/router/infinifiWorker.d.ts +2 -3
- package/dist/types/abi/router/infraredVaultWorker.d.ts +2 -3
- package/dist/types/abi/router/kelpLRTDepositPoolWorker.d.ts +2 -3
- package/dist/types/abi/router/kodiakWorker.d.ts +2 -3
- package/dist/types/abi/router/lidoWorker.d.ts +2 -3
- package/dist/types/abi/router/mellow4626Worker.d.ts +2 -3
- package/dist/types/abi/router/mellowDVVWorker.d.ts +2 -3
- package/dist/types/abi/router/mellowVaultWorker.d.ts +2 -3
- package/dist/types/abi/router/midasWorker.d.ts +2 -3
- package/dist/types/abi/router/pendleRouterWorker.d.ts +2 -3
- package/dist/types/abi/router/routingManager.d.ts +2 -3
- package/dist/types/abi/router/securitizeOnrampWorker.d.ts +2 -3
- package/dist/types/abi/router/stakingRewardsWorker.d.ts +2 -3
- package/dist/types/abi/router/traderJoeWorker.d.ts +2 -3
- package/dist/types/abi/router/uniswapV2Worker.d.ts +2 -3
- package/dist/types/abi/router/uniswapV3Worker.d.ts +2 -3
- package/dist/types/abi/router/uniswapV4Worker.d.ts +2 -3
- package/dist/types/abi/router/upshiftWorker.d.ts +2 -3
- package/dist/types/abi/router/velodromeV2Worker.d.ts +2 -3
- package/dist/types/abi/router/wstETHWorker.d.ts +2 -3
- package/dist/types/abi/router/yearnV2Worker.d.ts +2 -3
- package/dist/types/abi/rwa/iDSRegistryService.d.ts +2 -3
- package/dist/types/abi/rwa/iDSToken.d.ts +2 -3
- package/dist/types/abi/rwa/iMidasAccessControl.d.ts +2 -3
- package/dist/types/abi/rwa/iMidasDegenNFT.d.ts +2 -3
- package/dist/types/abi/rwa/iMidasLiquidatorV311.d.ts +2 -3
- package/dist/types/abi/rwa/iRWACompressor.d.ts +2 -3
- package/dist/types/abi/rwa/iRWAFactory.d.ts +2 -3
- package/dist/types/abi/rwa/iRWAGateway.d.ts +2 -3
- package/dist/types/abi/rwa/iRWAUnderlying.d.ts +2 -3
- package/dist/types/abi/rwa/iSecuritizeDegenNFT.d.ts +2 -3
- package/dist/types/abi/rwa/iSecuritizeLiquidatorV311.d.ts +2 -3
- package/dist/types/abi/rwa/iSecuritizeRWAFactory.d.ts +2 -3
- package/dist/types/dev/AccountOpener.d.ts +9 -9
- package/dist/types/dev/EthCallSpy.d.ts +6 -7
- package/dist/types/dev/RevolverTransport.d.ts +12 -12
- package/dist/types/dev/abi.d.ts +6 -7
- package/dist/types/dev/calcLiquidatableLTs.d.ts +2 -3
- package/dist/types/dev/claimFromFaucet.d.ts +2 -2
- package/dist/types/dev/create2.d.ts +10 -11
- package/dist/types/dev/createAnvilClient.d.ts +13 -14
- package/dist/types/dev/detectChain.d.ts +2 -3
- package/dist/types/dev/index.d.ts +2 -1
- package/dist/types/dev/isOutOfSyncError.d.ts +2 -3
- package/dist/types/dev/isRateLimitError.d.ts +2 -3
- package/dist/types/dev/isTransientError.d.ts +2 -3
- package/dist/types/dev/kycUtils.d.ts +13 -14
- package/dist/types/dev/logSplitterTransport.d.ts +10 -10
- package/dist/types/dev/lowerHealthFactor.d.ts +34 -0
- package/dist/types/dev/ltUtils.d.ts +3 -4
- package/dist/types/dev/midasUtils.d.ts +8 -9
- package/dist/types/dev/migrateFaucet.d.ts +2 -3
- package/dist/types/dev/mint/AbstractMinter.d.ts +2 -3
- package/dist/types/dev/mint/DealMinter.d.ts +2 -3
- package/dist/types/dev/mint/DirectMinter.d.ts +2 -3
- package/dist/types/dev/mint/FallbackMinter.d.ts +2 -3
- package/dist/types/dev/mint/TransferMinter.d.ts +2 -3
- package/dist/types/dev/mint/factory.d.ts +2 -3
- package/dist/types/dev/mint/types.d.ts +2 -3
- package/dist/types/dev/mode-parity/compareOpportunities.d.ts +8 -8
- package/dist/types/dev/mode-parity/comparePositions.d.ts +12 -13
- package/dist/types/dev/mode-parity/compareRules.d.ts +6 -7
- package/dist/types/dev/mode-parity/fieldDiff.d.ts +29 -30
- package/dist/types/dev/mode-parity/scriptUtils.d.ts +18 -19
- package/dist/types/dev/providers.d.ts +10 -11
- package/dist/types/dev/replaceStorage.d.ts +3 -4
- package/dist/types/dev/resilientTransport.d.ts +6 -7
- package/dist/types/dev/securitizeUtils.d.ts +6 -6
- package/dist/types/dev/transports.d.ts +2 -3
- package/dist/types/dev/types.d.ts +4 -5
- package/dist/types/dev/verifyTestnet.d.ts +4 -5
- package/dist/types/dev/withdrawalAbi.d.ts +9 -10
- package/dist/types/dev/withdrawalUtils.d.ts +3 -4
- package/dist/types/history/assembleOperations.d.ts +3 -4
- package/dist/types/history/classifyMulticallOperations.d.ts +3 -4
- package/dist/types/history/mapOperations.d.ts +3 -4
- package/dist/types/history/parseCreditAccountTransaction.d.ts +3 -4
- package/dist/types/history/populateContractsRegister.d.ts +4 -5
- package/dist/types/history/toLegacyOperation.d.ts +6 -7
- package/dist/types/history/trace/errors.d.ts +6 -7
- package/dist/types/history/trace/extractAdapterCallTraces.d.ts +2 -3
- package/dist/types/history/trace/extractTransfers.d.ts +4 -4
- package/dist/types/history/trace/findFacadeCalls.d.ts +2 -3
- package/dist/types/history/trace/types.d.ts +3 -4
- package/dist/types/history/types.d.ts +13 -13
- package/dist/types/model/analytics.d.ts +66 -13
- package/dist/types/model/analytics.schema.d.ts +182 -39
- package/dist/types/model/charts.d.ts +29 -29
- package/dist/types/model/charts.schema.d.ts +16 -17
- package/dist/types/model/compare.schema.d.ts +9 -10
- package/dist/types/model/curators.d.ts +3 -4
- package/dist/types/model/curators.schema.d.ts +3 -4
- package/dist/types/model/delayed-intent.schema.d.ts +2 -3
- package/dist/types/model/delayed-intents.d.ts +9 -10
- package/dist/types/model/errors/base.d.ts +2 -3
- package/dist/types/model/errors/index.d.ts +3 -3
- package/dist/types/model/errors/liquidation-errors.d.ts +20 -8
- package/dist/types/model/errors/operation-errors.d.ts +76 -39
- package/dist/types/model/errors/oracle-errors.d.ts +3 -4
- package/dist/types/model/errors/prepare-errors.d.ts +21 -22
- package/dist/types/model/errors/preview-errors.d.ts +9 -10
- package/dist/types/model/filters.d.ts +6 -7
- package/dist/types/model/filters.schema.d.ts +5 -6
- package/dist/types/model/index.d.ts +6 -6
- package/dist/types/model/liquidations.d.ts +37 -18
- package/dist/types/model/liquidations.schema.d.ts +12 -10
- package/dist/types/model/notices.d.ts +4 -5
- package/dist/types/model/notices.schema.d.ts +3 -4
- package/dist/types/model/opportunities.d.ts +32 -33
- package/dist/types/model/opportunities.schema.d.ts +26 -27
- package/dist/types/model/positions.d.ts +34 -30
- package/dist/types/model/positions.schema.d.ts +102 -23
- package/dist/types/model/previews.d.ts +21 -21
- package/dist/types/model/primitives.d.ts +12 -13
- package/dist/types/model/primitives.schema.d.ts +11 -12
- package/dist/types/model/response.d.ts +8 -9
- package/dist/types/model/response.schema.d.ts +7 -8
- package/dist/types/model/result.d.ts +8 -9
- package/dist/types/model/rewards.d.ts +4 -5
- package/dist/types/model/rwa.d.ts +20 -21
- package/dist/types/model/rwa.schema.d.ts +3 -4
- package/dist/types/model/withdrawals.d.ts +5 -6
- package/dist/types/model/withdrawals.schema.d.ts +5 -6
- package/dist/types/offchain/AbstractOffchainNamespace.d.ts +4 -5
- package/dist/types/offchain/GearboxAPI.d.ts +2 -3
- package/dist/types/offchain/analytics/OffchainAnalytics.d.ts +2 -3
- package/dist/types/offchain/analytics/OffchainAnalyticsPositions.d.ts +6 -4
- package/dist/types/offchain/analytics/types.d.ts +17 -5
- package/dist/types/offchain/errors/OffchainInvalidJsonError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainNotConfiguredError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainNotImplementedError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainRequestFailedError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainStatusError.d.ts +2 -3
- package/dist/types/offchain/errors/OffchainTransportError.d.ts +3 -4
- package/dist/types/offchain/errors/OffchainValidationError.d.ts +2 -3
- package/dist/types/offchain/errors/backendMessage.d.ts +2 -3
- package/dist/types/offchain/errors/errorCause.d.ts +3 -4
- package/dist/types/offchain/errors/readResponseBody.d.ts +2 -3
- package/dist/types/offchain/notices/OffchainNotices.d.ts +2 -3
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +2 -3
- package/dist/types/offchain/opportunities/types.d.ts +3 -4
- package/dist/types/offchain/positions/OffchainPositions.d.ts +2 -3
- package/dist/types/offchain/positions/types.d.ts +3 -4
- package/dist/types/offchain/types.d.ts +2 -3
- package/dist/types/onchain/MultichainSDK.d.ts +7 -8
- package/dist/types/onchain/OnchainSDK.d.ts +8 -9
- package/dist/types/onchain/abi/oracles.d.ts +27 -28
- package/dist/types/onchain/accounts/CreditAccountsServiceV310.d.ts +3 -12
- package/dist/types/onchain/accounts/bots/AccountBotsService.d.ts +2 -3
- package/dist/types/onchain/accounts/bots/PeripheryCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/bots/abi.d.ts +2 -3
- package/dist/types/onchain/accounts/bots/types.d.ts +13 -14
- package/dist/types/onchain/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +2 -3
- package/dist/types/onchain/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/credit-account-compressor/types.d.ts +11 -12
- package/dist/types/onchain/accounts/index.d.ts +5 -4
- package/dist/types/onchain/accounts/intents/borrow.d.ts +6 -7
- package/dist/types/onchain/accounts/intents/collateral-valuation.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/guards.d.ts +7 -7
- package/dist/types/onchain/accounts/intents/index.d.ts +6 -6
- package/dist/types/onchain/accounts/intents/leverage-band.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/math.d.ts +8 -8
- package/dist/types/onchain/accounts/intents/maxBorrow.d.ts +3 -4
- package/dist/types/onchain/accounts/intents/maxWithdrawCollateral.d.ts +3 -4
- package/dist/types/onchain/accounts/intents/open-strategy.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/operations.d.ts +34 -28
- package/dist/types/onchain/accounts/intents/plan.d.ts +35 -19
- package/dist/types/onchain/accounts/intents/realize.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/resolveQuotaUpdate.d.ts +38 -0
- package/dist/types/onchain/accounts/intents/strategyLimits.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/tail.d.ts +4 -4
- package/dist/types/onchain/accounts/intents/testing/delayed.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/testing/expect.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/testing/market.d.ts +6 -6
- package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +3 -3
- package/dist/types/onchain/accounts/intents/tests/add-collateral.fixtures.d.ts +15 -16
- package/dist/types/onchain/accounts/intents/tests/adjust-leverage.fixtures.d.ts +22 -23
- package/dist/types/onchain/accounts/intents/tests/deposit.fixtures.d.ts +24 -25
- package/dist/types/onchain/accounts/intents/tests/finish-decrease-leverage.fixtures.d.ts +21 -21
- package/dist/types/onchain/accounts/intents/tests/finish-withdraw.fixtures.d.ts +30 -31
- package/dist/types/onchain/accounts/intents/tests/open-strategy.fixtures.d.ts +16 -17
- package/dist/types/onchain/accounts/intents/tests/update-quota.fixtures.d.ts +48 -0
- package/dist/types/onchain/accounts/intents/tests/withdraw-asset.fixtures.d.ts +16 -17
- package/dist/types/onchain/accounts/intents/tests/withdraw.fixtures.d.ts +26 -27
- package/dist/types/onchain/accounts/intents/types.d.ts +46 -30
- package/dist/types/onchain/accounts/intents/utils/adjust-state-to-snapshot.d.ts +2 -3
- package/dist/types/onchain/accounts/intents/utils/assemble-operation-calls.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/utils/borrowed-amount-plus-interest-and-fees.d.ts +2 -3
- package/dist/types/onchain/accounts/intents/utils/common.d.ts +5 -6
- package/dist/types/onchain/accounts/intents/utils/credit-account-slice.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/utils/index.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/utils/ledger.d.ts +3 -4
- package/dist/types/onchain/accounts/intents/utils/pick-token.d.ts +6 -7
- package/dist/types/onchain/accounts/intents/utils/price-impact.d.ts +5 -6
- package/dist/types/onchain/accounts/intents/utils/quotas-for-update.d.ts +27 -9
- package/dist/types/onchain/accounts/intents/utils/router-path.d.ts +6 -7
- package/dist/types/onchain/accounts/intents/view.d.ts +2 -3
- package/dist/types/onchain/accounts/intents/withdraw-limits.d.ts +5 -6
- package/dist/types/onchain/accounts/liquidations/LiquidationsService.d.ts +50 -4
- package/dist/types/onchain/accounts/liquidations/MultichainLiquidationsService.d.ts +13 -4
- package/dist/types/onchain/accounts/liquidations/constants.d.ts +4 -5
- package/dist/types/onchain/accounts/liquidations/index.d.ts +3 -2
- package/dist/types/onchain/accounts/liquidations/partialLiquidation.d.ts +88 -0
- package/dist/types/onchain/accounts/liquidations/skipLiquidatableAccount.d.ts +2 -3
- package/dist/types/onchain/accounts/liquidations/types.d.ts +146 -21
- package/dist/types/onchain/accounts/multicall-utils.d.ts +4 -5
- package/dist/types/onchain/accounts/quota-utils.d.ts +11 -11
- package/dist/types/onchain/accounts/types.d.ts +18 -95
- package/dist/types/onchain/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +7 -7
- package/dist/types/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/addresses.d.ts +4 -5
- package/dist/types/onchain/accounts/withdrawal-compressor/createRedemptionLogger.d.ts +2 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/createWithdrawalCompressor.d.ts +2 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/intent-codec.d.ts +5 -6
- package/dist/types/onchain/accounts/withdrawal-compressor/types.d.ts +16 -17
- package/dist/types/onchain/base/BaseContract.d.ts +5 -6
- package/dist/types/onchain/base/ChainContractsRegister.d.ts +3 -4
- package/dist/types/onchain/base/Construct.d.ts +3 -4
- package/dist/types/onchain/base/MultichainConstruct.d.ts +7 -8
- package/dist/types/onchain/base/SDKConstruct.d.ts +2 -3
- package/dist/types/onchain/base/TokensMeta.d.ts +13 -6
- package/dist/types/onchain/base/errors.d.ts +2 -3
- package/dist/types/onchain/base/token-types.d.ts +18 -18
- package/dist/types/onchain/base/types.d.ts +37 -38
- package/dist/types/onchain/chain/chains.d.ts +20 -21
- package/dist/types/onchain/chain/detectNetwork.d.ts +2 -3
- package/dist/types/onchain/constants/address-provider.d.ts +36 -37
- package/dist/types/onchain/constants/addresses.d.ts +5 -6
- package/dist/types/onchain/constants/bot-permissions.d.ts +3 -4
- package/dist/types/onchain/constants/index.d.ts +2 -2
- package/dist/types/onchain/constants/math.d.ts +25 -21
- package/dist/types/onchain/constants/networks.d.ts +3 -4
- package/dist/types/onchain/constants/periphery.d.ts +3 -4
- package/dist/types/onchain/constants/versions.d.ts +5 -6
- package/dist/types/onchain/core/AbstractAddressProviderContract.d.ts +2 -3
- package/dist/types/onchain/core/AddressProviderV310Contract.d.ts +2 -2
- package/dist/types/onchain/core/createAddressProvider.d.ts +3 -4
- package/dist/types/onchain/core/errors.d.ts +9 -10
- package/dist/types/onchain/core/types.d.ts +4 -5
- package/dist/types/onchain/index.d.ts +13 -7
- package/dist/types/onchain/market/MarketConfiguratorContract.d.ts +2 -2
- package/dist/types/onchain/market/MarketRegister.d.ts +4 -5
- package/dist/types/onchain/market/MarketSuite.d.ts +2 -3
- package/dist/types/onchain/market/ZapperRegister.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/actionAbi.d.ts +4 -5
- package/dist/types/onchain/market/adapters/abi/adapters/erc4626ReferralAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3WrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCamelotV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BaseRewardPoolAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BoosterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1StableNgAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_2AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_3AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_4AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iDaiUsdsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iFluidDexAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiGatewayAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiUnwindingGateway.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtDepositPool.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtWithdrawalManager.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iLidoV1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellow4626VaultAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowClaimerAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowWrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasIssuanceVaultAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasRedemptionVaultAdapterV310.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iPendleRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeOnRampAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeRedemptionGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iStakingRewardsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iTraderJoeRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV2Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV4Adapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iUpshiftVaultAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iVelodromeV2RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iwstEthv1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/mellowDvvAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbi.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbiPatterns.d.ts +12 -13
- package/dist/types/onchain/market/adapters/abi/midas/iMidasGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iBaseOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/targetContractAbi.d.ts +29 -30
- package/dist/types/onchain/market/adapters/abi/utils.d.ts +7 -8
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +4 -5
- package/dist/types/onchain/market/adapters/contracts/AbstractCurveAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/contracts/AccountMigratorAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CamelotV3AdapterContract.d.ts +3 -3
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve2AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve3AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve4AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1AdapterStETHContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/DaiUsdsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/FluidDexAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/LidoV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowClaimerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowDVVAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowWrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/PendleRouterAdapterContract.d.ts +5 -5
- package/dist/types/onchain/market/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/StakingRewardsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/UniswapV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV3AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV4AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UpshiftVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/VelodromeV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/WstETHV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/createAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/legacyAdapterOperations.d.ts +27 -28
- package/dist/types/onchain/market/adapters/transferHelpers.d.ts +10 -11
- package/dist/types/onchain/market/adapters/transfers.d.ts +2 -3
- package/dist/types/onchain/market/adapters/types.d.ts +9 -10
- package/dist/types/onchain/market/credit/CreditConfiguratorV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditFacadeV310BaseContract.d.ts +2 -2
- package/dist/types/onchain/market/credit/CreditFacadeV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditManagerV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditSuite.d.ts +3 -14
- package/dist/types/onchain/market/credit/CreditSuiteStrategy.d.ts +2 -3
- package/dist/types/onchain/market/credit/collateralUtils.d.ts +6 -6
- package/dist/types/onchain/market/credit/createCreditConfigurator.d.ts +2 -3
- package/dist/types/onchain/market/credit/createCreditFacade.d.ts +2 -3
- package/dist/types/onchain/market/credit/createCreditManager.d.ts +2 -3
- package/dist/types/onchain/market/credit/expectedBalanceDeltas.d.ts +4 -5
- package/dist/types/onchain/market/credit/index.d.ts +2 -2
- package/dist/types/onchain/market/credit/types.d.ts +10 -46
- package/dist/types/onchain/market/index.d.ts +3 -3
- package/dist/types/onchain/market/loss-policy/AliasLossPolicyV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/loss-policy/LossPolicyContract.d.ts +2 -2
- package/dist/types/onchain/market/loss-policy/constants.d.ts +5 -6
- package/dist/types/onchain/market/loss-policy/createLossPolicy.d.ts +2 -3
- package/dist/types/onchain/market/loss-policy/types.d.ts +2 -3
- package/dist/types/onchain/market/math.d.ts +48 -30
- package/dist/types/onchain/market/oracle/PriceFeedAnswerMap.d.ts +2 -3
- package/dist/types/onchain/market/oracle/PriceOracleBaseContract.d.ts +2 -3
- package/dist/types/onchain/market/oracle/PriceOracleV310Contract.d.ts +2 -2
- package/dist/types/onchain/market/oracle/collateralPriceInUnderlying.d.ts +2 -3
- package/dist/types/onchain/market/oracle/createPriceOracle.d.ts +2 -3
- package/dist/types/onchain/market/oracle/types.d.ts +5 -6
- package/dist/types/onchain/market/pool/GaugeContract.d.ts +3 -3
- package/dist/types/onchain/market/pool/LinearInterestRateModelContract.d.ts +2 -2
- package/dist/types/onchain/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
- package/dist/types/onchain/market/pool/PoolSuite.d.ts +2 -3
- package/dist/types/onchain/market/pool/PoolV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/pool/TumblerContract.d.ts +2 -2
- package/dist/types/onchain/market/pool/createInterestRateModel.d.ts +2 -3
- package/dist/types/onchain/market/pool/createPool.d.ts +2 -3
- package/dist/types/onchain/market/pool/createPoolQuotaKeeper.d.ts +2 -3
- package/dist/types/onchain/market/pool/createRateKeeper.d.ts +2 -3
- package/dist/types/onchain/market/pool/math.d.ts +6 -7
- package/dist/types/onchain/market/pool/types.d.ts +7 -8
- package/dist/types/onchain/market/pricefeeds/AbstractLPPriceFeed.d.ts +3 -4
- package/dist/types/onchain/market/pricefeeds/AbstractPriceFeed.d.ts +5 -6
- package/dist/types/onchain/market/pricefeeds/PriceFeedRef.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/PriceFeedRegistry.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/feeds/BalancerStablePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/BalancerWeightedPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/BoundedPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CompositePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ConstantPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveCryptoPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveStablePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveUSDPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/Erc4626PriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ExternalPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/MellowLRTPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/PendleTWAPPTPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/PythPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/RedstonePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/WstETHPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/YearnPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ZeroPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/types.d.ts +5 -6
- package/dist/types/onchain/market/pricefeeds/updates/PriceUpdateTx.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/PriceUpdatesCache.d.ts +3 -4
- package/dist/types/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/getRawPriceUpdates.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/isUpdatablePriceFeed.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/types.d.ts +8 -9
- package/dist/types/onchain/market/pricefeeds/updates/updatableDependencies.d.ts +2 -3
- package/dist/types/onchain/market/rwa/RWARegistry.d.ts +3 -4
- package/dist/types/onchain/market/rwa/createDegenNFT.d.ts +2 -3
- package/dist/types/onchain/market/rwa/midas/MidasDegenNFT.d.ts +2 -2
- package/dist/types/onchain/market/rwa/midas/MidasLiquidatorContract.d.ts +2 -2
- package/dist/types/onchain/market/rwa/midas/constants.d.ts +4 -5
- package/dist/types/onchain/market/rwa/securitize/SecuritizeDegenNFT.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeLiquidatorContract.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeRWAFactory.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/constants.d.ts +4 -5
- package/dist/types/onchain/market/rwa/securitize/types.d.ts +5 -6
- package/dist/types/onchain/market/rwa/types.d.ts +16 -16
- package/dist/types/onchain/market/strategyName.d.ts +2 -3
- package/dist/types/onchain/market/types.d.ts +3 -4
- package/dist/types/onchain/market/zapper/IERC20ZapperContract.d.ts +2 -2
- package/dist/types/onchain/market/zapper/IETHZapperContract.d.ts +2 -2
- package/dist/types/onchain/market/zapper/ZapperContract.d.ts +2 -3
- package/dist/types/onchain/market/zapper/createZapper.d.ts +2 -3
- package/dist/types/onchain/market/zapper/types.d.ts +5 -6
- package/dist/types/onchain/opportunities/MultichainOpportunitiesService.d.ts +2 -3
- package/dist/types/onchain/opportunities/OpportunitiesService.d.ts +2 -3
- package/dist/types/onchain/opportunities/types.d.ts +2 -3
- package/dist/types/onchain/options.d.ts +4 -5
- package/dist/types/onchain/plugins/BasePlugin.d.ts +2 -3
- package/dist/types/onchain/plugins/errors.d.ts +2 -3
- package/dist/types/onchain/plugins/types.d.ts +9 -10
- package/dist/types/onchain/pools/PoolService.d.ts +2 -3
- package/dist/types/onchain/pools/types.d.ts +12 -13
- package/dist/types/onchain/positions/MultichainPositionsService.d.ts +2 -3
- package/dist/types/onchain/positions/PositionsService.d.ts +3 -4
- package/dist/types/onchain/positions/calcBorrowRate.d.ts +3 -4
- package/dist/types/onchain/positions/calcHealthFactor.d.ts +3 -4
- package/dist/types/onchain/positions/calcLiquidationPrice.d.ts +3 -4
- package/dist/types/onchain/positions/calcLiquidationPriceForTarget.d.ts +4 -5
- package/dist/types/onchain/positions/calcTimeToLiquidationMs.d.ts +2 -3
- package/dist/types/onchain/positions/types.d.ts +9 -10
- package/dist/types/onchain/preview/parse/classifyInnerOperations.d.ts +3 -4
- package/dist/types/onchain/preview/parse/parseFacadeOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parseOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parsePoolOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parseRWAFactoryOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/types-adapters.d.ts +4 -5
- package/dist/types/onchain/preview/parse/types-facades.d.ts +20 -21
- package/dist/types/onchain/preview/parse/types-pools.d.ts +6 -7
- package/dist/types/onchain/preview/parse/types-rwa.d.ts +5 -6
- package/dist/types/onchain/preview/parse/types.d.ts +4 -4
- package/dist/types/onchain/preview/preview/CreditAccountState.d.ts +5 -5
- package/dist/types/onchain/preview/preview/buildDelayedStrategyPositionOperationPreview.d.ts +2 -3
- package/dist/types/onchain/preview/preview/detectCloseOrRepay.d.ts +3 -4
- package/dist/types/onchain/preview/preview/detectDelayedClaim.d.ts +4 -5
- package/dist/types/onchain/preview/preview/detectDelayedOperation.d.ts +3 -4
- package/dist/types/onchain/preview/preview/estimateClaimableAt.d.ts +2 -3
- package/dist/types/onchain/preview/preview/midasGreenlistsAccount.d.ts +2 -3
- package/dist/types/onchain/preview/preview/previewAdjustStrategyPosition.d.ts +2 -3
- package/dist/types/onchain/preview/preview/previewExitOrRepayStrategyPosition.d.ts +3 -4
- package/dist/types/onchain/preview/preview/previewOpenStrategyPosition.d.ts +2 -2
- package/dist/types/onchain/preview/preview/previewOperation.d.ts +3 -4
- package/dist/types/onchain/preview/preview/previewPoolPositionOperation.d.ts +2 -3
- package/dist/types/onchain/preview/preview/replayInnerOperations.d.ts +4 -5
- package/dist/types/onchain/preview/preview/replayMulticall.d.ts +4 -5
- package/dist/types/onchain/preview/preview/unwrapNativeCollateral.d.ts +2 -3
- package/dist/types/onchain/router/AbstractRouterContract.d.ts +4 -5
- package/dist/types/onchain/router/RouterV310Contract.d.ts +2 -2
- package/dist/types/onchain/router/createRouter.d.ts +2 -3
- package/dist/types/onchain/router/helpers.d.ts +3 -4
- package/dist/types/onchain/router/types.d.ts +15 -16
- package/dist/types/onchain/types/logger.d.ts +3 -4
- package/dist/types/onchain/types/multichain.d.ts +6 -7
- package/dist/types/onchain/types/state-human.d.ts +36 -37
- package/dist/types/onchain/types/state.d.ts +3 -4
- package/dist/types/onchain/types/transactions.d.ts +5 -6
- package/dist/types/onchain/utils/AddressMap.d.ts +2 -3
- package/dist/types/onchain/utils/AddressSet.d.ts +2 -3
- package/dist/types/onchain/utils/AssetsMap.d.ts +2 -3
- package/dist/types/onchain/utils/abi-decode.d.ts +4 -5
- package/dist/types/onchain/utils/bigint-math.d.ts +2 -3
- package/dist/types/onchain/utils/bytes32ToString.d.ts +2 -3
- package/dist/types/onchain/utils/childLogger.d.ts +2 -3
- package/dist/types/onchain/utils/createRawTx.d.ts +2 -3
- package/dist/types/onchain/utils/etherscan.d.ts +4 -5
- package/dist/types/onchain/utils/filterDust.d.ts +4 -5
- package/dist/types/onchain/utils/formatter.d.ts +17 -17
- package/dist/types/onchain/utils/hex.d.ts +2 -3
- package/dist/types/onchain/utils/internal/Hooks.d.ts +3 -4
- package/dist/types/onchain/utils/isDust.d.ts +3 -4
- package/dist/types/onchain/utils/json.d.ts +3 -4
- package/dist/types/onchain/utils/mappers.d.ts +5 -6
- package/dist/types/onchain/utils/retry.d.ts +3 -4
- package/dist/types/onchain/utils/toAddress.d.ts +2 -3
- package/dist/types/onchain/utils/trace.d.ts +8 -9
- package/dist/types/onchain/utils/type-utils.d.ts +2 -3
- package/dist/types/onchain/utils/viem/cast.d.ts +3 -4
- package/dist/types/onchain/utils/viem/executeDelegatedMulticalls.d.ts +3 -4
- package/dist/types/onchain/utils/viem/executeMulticallBatches.d.ts +4 -5
- package/dist/types/onchain/utils/viem/sendRawTx.d.ts +5 -6
- package/dist/types/onchain/utils/viem/simulateCall.d.ts +7 -8
- package/dist/types/onchain/utils/viem/simulateMulticall.d.ts +4 -5
- package/dist/types/onchain/utils/viem/simulateWithPriceUpdates.d.ts +8 -9
- package/dist/types/onchain/utils/viem/watchBlocksAsync.d.ts +4 -4
- package/dist/types/onchain/utils/zod.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkAccountQuotas.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkCollateralFunding.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkCreditOperation.d.ts +6 -7
- package/dist/types/onchain/validation/bundles/checkHealthFactors.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkIncreaseDebt.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkIncreaseQuota.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkLiquidationEligibility.d.ts +7 -7
- package/dist/types/onchain/validation/bundles/checkLiquidationFunding.d.ts +5 -5
- package/dist/types/onchain/validation/bundles/checkMarket.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkMidasAccountGreenlist.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkObtained.d.ts +2 -3
- package/dist/types/onchain/validation/bundles/checkPoolFunding.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkPoolOperation.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkQuotaUpdates.d.ts +15 -0
- package/dist/types/onchain/validation/bundles/checkRWAOpenRequirements.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkRWAOpening.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkWallet.d.ts +4 -5
- package/dist/types/onchain/validation/bundles/checkWalletAllowance.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/checkWalletBalance.d.ts +3 -4
- package/dist/types/onchain/validation/bundles/index.d.ts +2 -1
- package/dist/types/onchain/validation/checkLiquidation.d.ts +7 -7
- package/dist/types/onchain/validation/checkOperation.d.ts +5 -6
- package/dist/types/onchain/validation/checkSimulation.d.ts +5 -6
- package/dist/types/onchain/validation/checks/checkBorrowLimit.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkCollateralised.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkCreditAccountFrozen.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkCreditManagerPaused.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkDebtLimits.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkEmergencyLiquidator.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkForbiddenToken.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkLeverage.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkLiquidatorEligible.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkMarketExpired.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkMaxQuota.d.ts +15 -0
- package/dist/types/onchain/validation/checks/checkPartiallyLiquidatable.d.ts +16 -0
- package/dist/types/onchain/validation/checks/checkPoolLiquidity.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkPoolPaused.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkPoolSunset.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaActive.d.ts +12 -0
- package/dist/types/onchain/validation/checks/checkQuotaChange.d.ts +16 -0
- package/dist/types/onchain/validation/checks/checkQuotaCount.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaLimit.d.ts +3 -4
- package/dist/types/onchain/validation/checks/checkReservePriceLimited.d.ts +3 -4
- package/dist/types/onchain/validation/checks/index.d.ts +5 -1
- package/dist/types/onchain/validation/helpers/amount.d.ts +2 -3
- package/dist/types/onchain/validation/helpers/health-factor-limits.d.ts +5 -6
- package/dist/types/onchain/validation/helpers/token.d.ts +3 -4
- package/dist/types/onchain/validation/index.d.ts +6 -1
- package/dist/types/onchain/validation/raise.d.ts +5 -6
- package/dist/types/permissionless/api/GearboxPermissionless.d.ts +2 -3
- package/dist/types/permissionless/api/chains/ChainsNamespace.d.ts +2 -3
- package/dist/types/permissionless/api/chains/schemas.d.ts +5 -6
- package/dist/types/permissionless/api/chains/types.d.ts +6 -7
- package/dist/types/permissionless/api/deploy/PermissionlessDeploy.d.ts +4 -5
- package/dist/types/permissionless/api/deploy/effective-staleness.d.ts +2 -3
- package/dist/types/permissionless/api/deploy/types.d.ts +6 -7
- package/dist/types/permissionless/api/errors.d.ts +6 -7
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +4 -5
- package/dist/types/permissionless/api/oracles/schemas.d.ts +5 -6
- package/dist/types/permissionless/api/oracles/types.d.ts +5 -6
- package/dist/types/permissionless/api/schemas.d.ts +4 -5
- package/dist/types/permissionless/api/transactions/InstanceOwnerTransactions.d.ts +2 -3
- package/dist/types/permissionless/api/transactions/lp-price-feeds.d.ts +3 -4
- package/dist/types/permissionless/api/transactions/types.d.ts +7 -8
- package/dist/types/permissionless/api/types.d.ts +2 -3
- package/dist/types/permissionless/bindings/address-provider.d.ts +2 -3
- package/dist/types/permissionless/bindings/bytecode-repository.d.ts +2 -2
- package/dist/types/permissionless/bindings/compressors/token-compressor.d.ts +2 -2
- package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +2 -2
- package/dist/types/permissionless/bindings/cross-chain-multisig.d.ts +4 -4
- package/dist/types/permissionless/bindings/factory/abstract-factory.d.ts +2 -3
- package/dist/types/permissionless/bindings/factory/credit-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/loss-policy-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/pool-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/price-oracle-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/factory/rate-keeper-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/governance/batches-chain.d.ts +2 -2
- package/dist/types/permissionless/bindings/governance/governor.d.ts +2 -2
- package/dist/types/permissionless/bindings/governance/timelock.d.ts +2 -3
- package/dist/types/permissionless/bindings/governance/types.d.ts +7 -8
- package/dist/types/permissionless/bindings/instance-manager.d.ts +2 -2
- package/dist/types/permissionless/bindings/market-configurator-factory.d.ts +2 -2
- package/dist/types/permissionless/bindings/market-configurator.d.ts +2 -2
- package/dist/types/permissionless/bindings/price-feed-store.d.ts +2 -2
- package/dist/types/permissionless/bindings/pricefeeds/balancer-stable.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/balancer-weighted.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/bounded.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/composite.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/constant.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-crypto.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-stable.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-twap.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/curve-usd.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/erc4626.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/external.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/index.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/kodiak.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/mellow-lrt.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/pendle-pt-twap.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/pyth.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/redstone.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/wsteth.d.ts +2 -3
- package/dist/types/permissionless/bindings/pricefeeds/zero.d.ts +2 -3
- package/dist/types/permissionless/bindings/router/routing-manager.d.ts +2 -2
- package/dist/types/permissionless/bindings/treasury-splitter.d.ts +2 -2
- package/dist/types/permissionless/bindings/types.d.ts +17 -18
- package/dist/types/permissionless/chains/archive-transport.d.ts +3 -4
- package/dist/types/permissionless/chains/chunked-log-transport.d.ts +2 -2
- package/dist/types/permissionless/core/auditor.d.ts +2 -3
- package/dist/types/permissionless/core/bytecode.d.ts +5 -6
- package/dist/types/permissionless/core/pricefeed-builder.d.ts +6 -7
- package/dist/types/permissionless/core/pricefeed.d.ts +2 -3
- package/dist/types/permissionless/core/proposal.d.ts +5 -6
- package/dist/types/permissionless/core/raw-tx.d.ts +2 -3
- package/dist/types/permissionless/deployment/addresses.d.ts +2 -3
- package/dist/types/permissionless/deployment/mainnet.d.ts +6 -7
- package/dist/types/permissionless/plugins/irm/constructor-params-abi.d.ts +8 -8
- package/dist/types/permissionless/plugins/loss-policies/constructor-params-abi.d.ts +8 -8
- package/dist/types/permissionless/plugins/rate-keepers/constructor-params-abi.d.ts +9 -9
- package/dist/types/permissionless/utils/abi-encoder.d.ts +4 -5
- package/dist/types/permissionless/utils/block-utils.d.ts +2 -3
- package/dist/types/permissionless/utils/create2.d.ts +9 -10
- package/dist/types/permissionless/utils/format.d.ts +7 -8
- package/dist/types/permissionless/utils/governance/batch.d.ts +5 -6
- package/dist/types/permissionless/utils/governance/timelock-txs.d.ts +2 -3
- package/dist/types/permissionless/utils/governance/types.d.ts +3 -4
- package/dist/types/permissionless/utils/literals.d.ts +8 -9
- package/dist/types/permissionless/utils/price-update/get-price-update-tx.d.ts +2 -3
- package/dist/types/permissionless/utils/price-update/get-prices.d.ts +2 -3
- package/dist/types/permissionless/utils/price-update/get-updatable-feeds.d.ts +3 -4
- package/dist/types/permissionless/utils/signature.d.ts +2 -3
- package/dist/types/plugins/accounts/AccountsPlugin.d.ts +3 -4
- package/dist/types/plugins/accounts-counter/AccountsCounterPlugin.d.ts +3 -4
- package/dist/types/plugins/bots/BotsPlugin.d.ts +2 -3
- package/dist/types/plugins/bots/PartialLiquidationBotV310Contract.d.ts +3 -3
- package/dist/types/plugins/bots/abi/iPartialLiquidationBotV310.d.ts +2 -3
- package/dist/types/plugins/bots/config.d.ts +6 -7
- package/dist/types/plugins/bots/deserializePartialLiquidationBotParams.d.ts +2 -3
- package/dist/types/plugins/bots/types.d.ts +11 -12
- package/dist/types/sdk/AbstractNamespace.d.ts +3 -4
- package/dist/types/sdk/GearboxSDK.d.ts +3 -4
- package/dist/types/sdk/analytics/AnalyticsNamespace.d.ts +2 -3
- package/dist/types/sdk/analytics/types.d.ts +3 -4
- package/dist/types/sdk/errors/AllSourcesFailedError.d.ts +2 -3
- package/dist/types/sdk/errors/MissingSourceError.d.ts +2 -3
- package/dist/types/sdk/errors/NoSourceServedError.d.ts +2 -3
- package/dist/types/sdk/errors/SourceChainMismatchError.d.ts +3 -4
- package/dist/types/sdk/errors/SourceUnavailableError.d.ts +2 -3
- package/dist/types/sdk/errors/assertSameChains.d.ts +2 -3
- package/dist/types/sdk/errors/everyChainFailed.d.ts +2 -3
- package/dist/types/sdk/execute/ExecuteApi.d.ts +2 -3
- package/dist/types/sdk/execute/types.d.ts +9 -10
- package/dist/types/sdk/index.d.ts +2 -2
- package/dist/types/sdk/liquidations/LiquidationsNamespace.d.ts +11 -4
- package/dist/types/sdk/liquidations/types.d.ts +24 -9
- package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +2 -3
- package/dist/types/sdk/opportunities/types.d.ts +9 -10
- package/dist/types/sdk/positions/PositionsNamespace.d.ts +2 -3
- package/dist/types/sdk/positions/mergePositionList.d.ts +2 -3
- package/dist/types/sdk/positions/types.d.ts +9 -10
- package/dist/types/sdk/prepare/PrepareApi.d.ts +14 -7
- package/dist/types/sdk/prepare/index.d.ts +2 -2
- package/dist/types/sdk/prepare/types.d.ts +72 -33
- package/dist/types/sdk/prepare/withdrawable-collaterals.d.ts +2 -3
- package/dist/types/sdk/preview/PreviewNamespace.d.ts +2 -3
- package/dist/types/sdk/preview/types.d.ts +4 -5
- package/dist/types/sdk/rewards/RewardsNamespace.d.ts +2 -3
- package/dist/types/sdk/rewards/errors.d.ts +3 -4
- package/dist/types/sdk/rewards/helpers.d.ts +7 -8
- package/dist/types/sdk/rewards/merkl-api.d.ts +6 -6
- package/dist/types/sdk/rewards/toMerklRewards.d.ts +2 -3
- package/dist/types/sdk/rewards/toTurtleRewards.d.ts +2 -3
- package/dist/types/sdk/rewards/turtle-api.d.ts +7 -8
- package/dist/types/sdk/rewards/types.d.ts +5 -6
- package/dist/types/sdk/types.d.ts +13 -14
- package/dist/types/sdk/utils/filterResponse.d.ts +2 -3
- package/dist/types/sdk/utils/mergeChains.d.ts +4 -5
- package/dist/types/sdk/utils/types.d.ts +5 -5
- package/package.json +15 -15
|
@@ -14,7 +14,7 @@ import { EnsureFreshChains, NamespaceOptions } from "./types.js";
|
|
|
14
14
|
* @typeParam Offchain - Backend source namespace.
|
|
15
15
|
* @typeParam T - Payload type of the read.
|
|
16
16
|
**/
|
|
17
|
-
interface MergedQuery<Onchain, Offchain, T> {
|
|
17
|
+
export interface MergedQuery<Onchain, Offchain, T> {
|
|
18
18
|
fromChain: (source: Onchain) => Promise<DataResponse<T>>;
|
|
19
19
|
fromBackend: (source: Offchain) => Promise<DataResponse<T>>;
|
|
20
20
|
merge: ListMerger<T> | EntityMerger<T>;
|
|
@@ -32,7 +32,7 @@ interface MergedQuery<Onchain, Offchain, T> {
|
|
|
32
32
|
* `MultichainOpportunitiesService`.
|
|
33
33
|
* @typeParam Offchain - Backend source namespace, e.g. `OffchainOpportunities`.
|
|
34
34
|
**/
|
|
35
|
-
declare abstract class AbstractNamespace<Onchain, Offchain> {
|
|
35
|
+
export declare abstract class AbstractNamespace<Onchain, Offchain> {
|
|
36
36
|
#private;
|
|
37
37
|
/**
|
|
38
38
|
* How far the backend may lag the chain and still serve a chain.
|
|
@@ -63,5 +63,4 @@ declare abstract class AbstractNamespace<Onchain, Offchain> {
|
|
|
63
63
|
**/
|
|
64
64
|
protected merged<T>(action: string, query: MergedQuery<Onchain, Offchain, T>): Promise<DataResponse<T>>;
|
|
65
65
|
}
|
|
66
|
-
//#endregion
|
|
67
|
-
export { AbstractNamespace, MergedQuery };
|
|
66
|
+
//#endregion
|
|
@@ -18,7 +18,7 @@ import "./rewards/index.js";
|
|
|
18
18
|
* Default {@link GearboxSDKOptions.maxStateAgeSeconds}: the fastest poll an
|
|
19
19
|
* app runs, so a 30 s tick sees state no older than itself.
|
|
20
20
|
**/
|
|
21
|
-
declare const DEFAULT_MAX_STATE_AGE = 30;
|
|
21
|
+
export declare const DEFAULT_MAX_STATE_AGE = 30;
|
|
22
22
|
/**
|
|
23
23
|
* Entry point over both sources of Gearbox data: the chain and the Gearbox
|
|
24
24
|
* backend. The {@link Mode} is fixed at construction and decides which methods
|
|
@@ -38,7 +38,7 @@ declare const DEFAULT_MAX_STATE_AGE = 30;
|
|
|
38
38
|
*
|
|
39
39
|
* @typeParam M - Mode the instance was built in.
|
|
40
40
|
**/
|
|
41
|
-
declare class GearboxSDK<const M extends Mode = Mode> implements IGearboxSDK<M> {
|
|
41
|
+
export declare class GearboxSDK<const M extends Mode = Mode> implements IGearboxSDK<M> {
|
|
42
42
|
#private;
|
|
43
43
|
/**
|
|
44
44
|
* Sources this instance reads from.
|
|
@@ -103,5 +103,4 @@ declare class GearboxSDK<const M extends Mode = Mode> implements IGearboxSDK<M>
|
|
|
103
103
|
**/
|
|
104
104
|
get offchain(): OffchainByMode[M];
|
|
105
105
|
}
|
|
106
|
-
//#endregion
|
|
107
|
-
export { DEFAULT_MAX_STATE_AGE, GearboxSDK };
|
|
106
|
+
//#endregion
|
|
@@ -6,12 +6,11 @@ import "../../offchain/index.js";
|
|
|
6
6
|
import { IAnalytics } from "./types.js";
|
|
7
7
|
//#region src/sdk/analytics/AnalyticsNamespace.d.ts
|
|
8
8
|
/** Backend-only protocol analytics exposed by {@link GearboxSDK}. */
|
|
9
|
-
declare class AnalyticsNamespace implements IAnalytics {
|
|
9
|
+
export declare class AnalyticsNamespace implements IAnalytics {
|
|
10
10
|
#private;
|
|
11
11
|
readonly positions: GearboxAPI["analytics"]["positions"];
|
|
12
12
|
constructor(backend: GearboxAPI);
|
|
13
13
|
/** {@inheritDoc IAnalytics.charts} */
|
|
14
14
|
charts<const Metrics extends readonly ProtocolChartMetric[]>(metrics: Metrics, range: ChartRange, filter?: ChainScopedFilter): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { AnalyticsNamespace };
|
|
16
|
+
//#endregion
|
|
@@ -5,7 +5,7 @@ import { IOffchainAnalyticsPositions } from "../../offchain/analytics/types.js";
|
|
|
5
5
|
import "../../offchain/index.js";
|
|
6
6
|
//#region src/sdk/analytics/types.d.ts
|
|
7
7
|
/** Backend-only protocol analytics, grouped by subject. */
|
|
8
|
-
interface IAnalytics {
|
|
8
|
+
export interface IAnalytics {
|
|
9
9
|
readonly positions: IOffchainAnalyticsPositions;
|
|
10
10
|
/**
|
|
11
11
|
* Charts of the protocol as a whole: one series per metric named, onto the
|
|
@@ -22,10 +22,9 @@ interface IAnalytics {
|
|
|
22
22
|
charts<const Metrics extends readonly ProtocolChartMetric[]>(metrics: Metrics, range: ChartRange, filter?: ChainScopedFilter): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
23
23
|
}
|
|
24
24
|
/** `sdk.analytics` per mode: absent when the SDK has no backend source. */
|
|
25
|
-
interface IAnalyticsByMode {
|
|
25
|
+
export interface IAnalyticsByMode {
|
|
26
26
|
onchain: undefined;
|
|
27
27
|
offchain: IAnalytics;
|
|
28
28
|
both: IAnalytics;
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { IAnalytics, IAnalyticsByMode };
|
|
30
|
+
//#endregion
|
|
@@ -4,8 +4,7 @@ import "../../model/index.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Thrown when a read had sources to ask and none of them served a single chain.
|
|
6
6
|
**/
|
|
7
|
-
declare class AllSourcesFailedError extends AggregateError {
|
|
7
|
+
export declare class AllSourcesFailedError extends AggregateError {
|
|
8
8
|
constructor(action: string, sourceErrors: unknown[], meta?: ResponseMetadata);
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { AllSourcesFailedError };
|
|
10
|
+
//#endregion
|
|
@@ -7,7 +7,7 @@ import { BaseError } from "viem";
|
|
|
7
7
|
* Thrown at construction when a {@link GearboxSDK} was not given a source its
|
|
8
8
|
* {@link Mode} reads from.
|
|
9
9
|
**/
|
|
10
|
-
declare class MissingSourceError extends BaseError {
|
|
10
|
+
export declare class MissingSourceError extends BaseError {
|
|
11
11
|
name: string;
|
|
12
12
|
/**
|
|
13
13
|
* Mode the SDK was built in.
|
|
@@ -19,5 +19,4 @@ declare class MissingSourceError extends BaseError {
|
|
|
19
19
|
readonly source: DataSource;
|
|
20
20
|
constructor(mode: Mode, source: DataSource);
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { MissingSourceError };
|
|
22
|
+
//#endregion
|
|
@@ -6,12 +6,11 @@ import "../../model/index.js";
|
|
|
6
6
|
* metadata entry rather than thrown: the other chains of the same read may
|
|
7
7
|
* still have been served.
|
|
8
8
|
**/
|
|
9
|
-
declare class NoSourceServedError extends AggregateError {
|
|
9
|
+
export declare class NoSourceServedError extends AggregateError {
|
|
10
10
|
/**
|
|
11
11
|
* Chain no source served.
|
|
12
12
|
**/
|
|
13
13
|
readonly chainId: ChainId;
|
|
14
14
|
constructor(chainId: ChainId, reasons: unknown[]);
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { NoSourceServedError };
|
|
16
|
+
//#endregion
|
|
@@ -9,13 +9,13 @@ import { BaseError } from "viem";
|
|
|
9
9
|
* How a source names the chains it covers: by label or by id, depending on which
|
|
10
10
|
* of the two it was configured with.
|
|
11
11
|
**/
|
|
12
|
-
type ChainRef = NetworkType | ChainId;
|
|
12
|
+
export type ChainRef = NetworkType | ChainId;
|
|
13
13
|
/**
|
|
14
14
|
* Thrown at construction when a source covers anything other than exactly the
|
|
15
15
|
* chains a {@link GearboxSDK} was built for, see
|
|
16
16
|
* {@link GearboxSDKOptions.networks}.
|
|
17
17
|
**/
|
|
18
|
-
declare class SourceChainMismatchError extends BaseError {
|
|
18
|
+
export declare class SourceChainMismatchError extends BaseError {
|
|
19
19
|
name: string;
|
|
20
20
|
/**
|
|
21
21
|
* Source whose coverage does not match.
|
|
@@ -31,5 +31,4 @@ declare class SourceChainMismatchError extends BaseError {
|
|
|
31
31
|
readonly covered: readonly ChainRef[];
|
|
32
32
|
constructor(source: DataSource, expected: readonly ChainRef[], covered: readonly ChainRef[]);
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { ChainRef, SourceChainMismatchError };
|
|
34
|
+
//#endregion
|
|
@@ -6,7 +6,7 @@ import { BaseError } from "viem";
|
|
|
6
6
|
* Thrown when a source branch of a namespace is read in a mode that has no such
|
|
7
7
|
* source, e.g. `sdk.opportunities.onchain` in `offchain` mode.
|
|
8
8
|
**/
|
|
9
|
-
declare class SourceUnavailableError extends BaseError {
|
|
9
|
+
export declare class SourceUnavailableError extends BaseError {
|
|
10
10
|
name: string;
|
|
11
11
|
/**
|
|
12
12
|
* Namespace whose branch was read.
|
|
@@ -18,5 +18,4 @@ declare class SourceUnavailableError extends BaseError {
|
|
|
18
18
|
readonly source: DataSource;
|
|
19
19
|
constructor(namespace: string, source: DataSource);
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { SourceUnavailableError };
|
|
21
|
+
//#endregion
|
|
@@ -6,6 +6,5 @@ import { ChainRef } from "./SourceChainMismatchError.js";
|
|
|
6
6
|
* Rejects a source covering anything other than exactly the chains the SDK was
|
|
7
7
|
* built for. A source is not narrowed to them: it has to name them.
|
|
8
8
|
**/
|
|
9
|
-
declare function assertSameChains<T extends ChainRef>(source: DataSource, expected: readonly T[], covered: readonly T[]): void;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { assertSameChains };
|
|
9
|
+
export declare function assertSameChains<T extends ChainRef>(source: DataSource, expected: readonly T[], covered: readonly T[]): void;
|
|
10
|
+
//#endregion
|
|
@@ -5,6 +5,5 @@ import "../../model/index.js";
|
|
|
5
5
|
* Whether a merged envelope covered chains and lost every one of them, which is
|
|
6
6
|
* what makes a read a failure rather than a partial result.
|
|
7
7
|
**/
|
|
8
|
-
declare function everyChainFailed(meta: ResponseMetadata): boolean;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { everyChainFailed };
|
|
8
|
+
export declare function everyChainFailed(meta: ResponseMetadata): boolean;
|
|
9
|
+
//#endregion
|
|
@@ -7,7 +7,7 @@ import { IOpportunitiesExecute, PrepareRequest } from "./types.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* {@inheritDoc IOpportunitiesExecute}
|
|
9
9
|
**/
|
|
10
|
-
declare class ExecuteApi implements IOpportunitiesExecute {
|
|
10
|
+
export declare class ExecuteApi implements IOpportunitiesExecute {
|
|
11
11
|
#private;
|
|
12
12
|
constructor(chainOf: ChainOf);
|
|
13
13
|
/**
|
|
@@ -15,5 +15,4 @@ declare class ExecuteApi implements IOpportunitiesExecute {
|
|
|
15
15
|
**/
|
|
16
16
|
buildTx(request: PrepareRequest): Promise<RawTx>;
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { ExecuteApi };
|
|
18
|
+
//#endregion
|
|
@@ -16,7 +16,7 @@ import { Address } from "viem";
|
|
|
16
16
|
* the tokens on both sides and the zapper, so nothing else is needed to encode
|
|
17
17
|
* the call.
|
|
18
18
|
**/
|
|
19
|
-
interface PoolPrepareRequest {
|
|
19
|
+
export interface PoolPrepareRequest {
|
|
20
20
|
kind: "pool";
|
|
21
21
|
chainId: ChainId;
|
|
22
22
|
pool: Address;
|
|
@@ -30,7 +30,7 @@ interface PoolPrepareRequest {
|
|
|
30
30
|
* values collateral in underlying only, so the wallet's actual collateral
|
|
31
31
|
* assets and the native value to attach come from the caller.
|
|
32
32
|
**/
|
|
33
|
-
interface OpenPrepareRequest {
|
|
33
|
+
export interface OpenPrepareRequest {
|
|
34
34
|
kind: "open";
|
|
35
35
|
chainId: ChainId;
|
|
36
36
|
creditManager: Address;
|
|
@@ -58,7 +58,7 @@ interface OpenPrepareRequest {
|
|
|
58
58
|
* token to withdraw — everything else the transaction needs, the collateral
|
|
59
59
|
* included, is already on the prepared state.
|
|
60
60
|
**/
|
|
61
|
-
interface BorrowPrepareRequest {
|
|
61
|
+
export interface BorrowPrepareRequest {
|
|
62
62
|
kind: "borrow";
|
|
63
63
|
chainId: ChainId;
|
|
64
64
|
creditManager: Address;
|
|
@@ -81,7 +81,7 @@ interface BorrowPrepareRequest {
|
|
|
81
81
|
* `open` with empty arguments: a collateral passed by mistake has nowhere to
|
|
82
82
|
* land.
|
|
83
83
|
**/
|
|
84
|
-
interface OpenEmptyPrepareRequest {
|
|
84
|
+
export interface OpenEmptyPrepareRequest {
|
|
85
85
|
kind: "openEmpty";
|
|
86
86
|
chainId: ChainId;
|
|
87
87
|
creditManager: Address;
|
|
@@ -93,10 +93,10 @@ interface OpenEmptyPrepareRequest {
|
|
|
93
93
|
sim: SDKResult<EmptyCreditAccountResult>;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
* Any
|
|
96
|
+
* Any operation on an existing account, from a viable
|
|
97
97
|
* {@link StrategyResult}: the facade multicall is the result's `calls`.
|
|
98
98
|
**/
|
|
99
|
-
interface AccountPrepareRequest {
|
|
99
|
+
export interface AccountPrepareRequest {
|
|
100
100
|
kind: "account";
|
|
101
101
|
chainId: ChainId;
|
|
102
102
|
creditAccount: Address;
|
|
@@ -108,14 +108,14 @@ interface AccountPrepareRequest {
|
|
|
108
108
|
* `prepare` result plus the few facts about the wallet the preparation does not
|
|
109
109
|
* carry.
|
|
110
110
|
**/
|
|
111
|
-
type PrepareRequest = PoolPrepareRequest | OpenPrepareRequest | OpenEmptyPrepareRequest | BorrowPrepareRequest | AccountPrepareRequest;
|
|
111
|
+
export type PrepareRequest = PoolPrepareRequest | OpenPrepareRequest | OpenEmptyPrepareRequest | BorrowPrepareRequest | AccountPrepareRequest;
|
|
112
112
|
/**
|
|
113
113
|
* The write side of the opportunities namespace: turns what `prepare`
|
|
114
114
|
* answered into the transaction to sign. Sending, and whatever the wallet has
|
|
115
115
|
* to do first (allowances, permits, RWA signatures), stays with the caller —
|
|
116
116
|
* `checkOperation` reports the former on the built transaction's preview.
|
|
117
117
|
**/
|
|
118
|
-
interface IOpportunitiesExecute {
|
|
118
|
+
export interface IOpportunitiesExecute {
|
|
119
119
|
/**
|
|
120
120
|
* The transaction to sign, from a `prepare` result. No second round of math:
|
|
121
121
|
* `account` requests submit the result's own multicall, `open` and `borrow`
|
|
@@ -129,5 +129,4 @@ interface IOpportunitiesExecute {
|
|
|
129
129
|
**/
|
|
130
130
|
buildTx(request: PrepareRequest): Promise<RawTx>;
|
|
131
131
|
}
|
|
132
|
-
//#endregion
|
|
133
|
-
export { AccountPrepareRequest, BorrowPrepareRequest, IOpportunitiesExecute, OpenEmptyPrepareRequest, OpenPrepareRequest, PoolPrepareRequest, PrepareRequest };
|
|
132
|
+
//#endregion
|
|
@@ -5,7 +5,7 @@ import { LeverageBand } from "../onchain/accounts/intents/leverage-band.js";
|
|
|
5
5
|
import { PoolOperationError } from "../onchain/validation/bundles/checkPoolOperation.js";
|
|
6
6
|
import { IAnalytics, IAnalyticsByMode } from "./analytics/types.js";
|
|
7
7
|
import { ILiquidations, ILiquidationsByMode, IsEmergencyLiquidatorProps } from "./liquidations/types.js";
|
|
8
|
-
import { AccountFlowError, AddCollateralParams, AdjustLeverageParams, BorrowParams, BorrowResult, DelayedStrategyResult, DepositStrategyParams, EmptyCreditAccountResult, FinalizeParams, FinalizeResult, IOpportunitiesPrepare, LpParams, LpRedeemParams, LpResult, LpState, MaxBorrowParams, MaxWithdrawCollateralOptions, OpenFlowError, OpenStrategyParams, OpenStrategyResult, PoolInput, PositionInput, PrepareOptions, RepayStrategyParams, StrategyInput, StrategyResult, StrategyRoutesResult, WithRouteErrors, WithdrawCollateralParams, WithdrawStrategyParams } from "./prepare/types.js";
|
|
8
|
+
import { AccountFlowError, AddCollateralParams, AdjustLeverageParams, BorrowParams, BorrowResult, DelayedStrategyResult, DepositStrategyParams, EmptyCreditAccountResult, FinalizeParams, FinalizeResult, IOpportunitiesPrepare, LpParams, LpRedeemParams, LpResult, LpState, MaxBorrowParams, MaxWithdrawCollateralOptions, OpenFlowError, OpenStrategyParams, OpenStrategyResult, PoolInput, PositionInput, PrepareOptions, QuotaBufferState, RepayStrategyParams, StrategyInput, StrategyResult, StrategyRoutesResult, UpdateQuotaParams, WithRouteErrors, WithdrawCollateralParams, WithdrawStrategyParams } from "./prepare/types.js";
|
|
9
9
|
import { ChainOf, PrepareApi } from "./prepare/PrepareApi.js";
|
|
10
10
|
import "./prepare/index.js";
|
|
11
11
|
import { AccountPrepareRequest, BorrowPrepareRequest, IOpportunitiesExecute, OpenEmptyPrepareRequest, OpenPrepareRequest, PoolPrepareRequest, PrepareRequest } from "./execute/types.js";
|
|
@@ -45,4 +45,4 @@ import { SourceUnavailableError } from "./errors/SourceUnavailableError.js";
|
|
|
45
45
|
import { assertSameChains } from "./errors/assertSameChains.js";
|
|
46
46
|
import { everyChainFailed } from "./errors/everyChainFailed.js";
|
|
47
47
|
import "./errors/index.js";
|
|
48
|
-
export { AbstractNamespace, AccountFlowError, AccountPrepareRequest, AddCollateralParams, AdjustLeverageParams, AllSourcesFailedError, AnalyticsNamespace, BorrowParams, BorrowPrepareRequest, BorrowResult, type BorrowState, ChainOf, ChainRef, CheckOperationProps, type CreditAccountNotEmptyError, type CreditAccountNotFoundError, DEFAULT_MAX_OFFCHAIN_LAG, DEFAULT_MAX_STATE_AGE, DelayedStrategyResult, DepositStrategyParams, EmptyCreditAccountResult, EnsureFreshChains, type EntityMerger, ExecuteApi, type ExecutionCost, type FilterResult, FinalizeParams, FinalizeResult, GearboxSDK, GearboxSDKOptions, IAnalytics, IAnalyticsByMode, IGearboxSDK, ILiquidations, ILiquidationsByMode, INotices, INoticesByMode, IOpportunities, IOpportunitiesBase, IOpportunitiesByMode, IOpportunitiesExecute, IOpportunitiesOffchainBranch, IOpportunitiesOffchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOnchainOnly, IOpportunitiesPrepare, IOpportunityMergers, IPositionMergers, IPositions, IPositionsBase, IPositionsByMode, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOnchainOnly, IPreview, IPreviewByMode, type IRewards, type IRewardsByMode, IsEmergencyLiquidatorProps, type LeverageBand, LiquidationsNamespace, type ListMerger, LpParams, LpRedeemParams, LpResult, LpState, MaxBorrowParams, MaxWithdrawCollateralOptions, type MergeListResult, MergedQuery, MerklRequestFailedError, type MerkleXYZUserRewardsV4Response, MissingSourceError, Mode, type MultipleDelayedWithdrawalsError, NamespaceOptions, type NoDelayedRouteError, type NoRecordedIntentError, NoSourceServedError, type NoStrategyTargetCollateralError, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, OpenEmptyPrepareRequest, OpenFlowError, OpenPrepareRequest, OpenStrategyParams, OpenStrategyResult, type OperationState, OpportunitiesNamespace, type PathLossRate, PlainMultichainSDKOptions, PoolInput, type PoolOperationError, PoolPrepareRequest, PositionInput, PositionsNamespace, PrepareApi, PrepareOptions, PrepareRequest, PreviewNamespace, RepayStrategyParams, type RewardsKeys, RewardsNamespace, type RouteErrors, SourceChainMismatchError, SourceUnavailableError, StrategyInput, StrategyResult, StrategyRoutesResult, TurtleRequestFailedError, type TurtleWalletRewards, type UnexpectedFailureError, type UnsupportedCollateralTokenError, type UnsupportedTokenPairError, type WithPartialState, WithRouteErrors, type WithdrawCeilings, WithdrawCollateralParams, WithdrawStrategyParams, type WithdrawalInProgressError, assertSameChains, creditAccountNotEmpty, creditAccountNotFound, everyChainFailed, filterResponse, mergeChainList, mergeChainOne, noStrategyTargetCollateral, unexpectedFailure };
|
|
48
|
+
export { AbstractNamespace, AccountFlowError, AccountPrepareRequest, AddCollateralParams, AdjustLeverageParams, AllSourcesFailedError, AnalyticsNamespace, BorrowParams, BorrowPrepareRequest, BorrowResult, type BorrowState, ChainOf, ChainRef, CheckOperationProps, type CreditAccountNotEmptyError, type CreditAccountNotFoundError, DEFAULT_MAX_OFFCHAIN_LAG, DEFAULT_MAX_STATE_AGE, DelayedStrategyResult, DepositStrategyParams, EmptyCreditAccountResult, EnsureFreshChains, type EntityMerger, ExecuteApi, type ExecutionCost, type FilterResult, FinalizeParams, FinalizeResult, GearboxSDK, GearboxSDKOptions, IAnalytics, IAnalyticsByMode, IGearboxSDK, ILiquidations, ILiquidationsByMode, INotices, INoticesByMode, IOpportunities, IOpportunitiesBase, IOpportunitiesByMode, IOpportunitiesExecute, IOpportunitiesOffchainBranch, IOpportunitiesOffchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOnchainOnly, IOpportunitiesPrepare, IOpportunityMergers, IPositionMergers, IPositions, IPositionsBase, IPositionsByMode, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOnchainOnly, IPreview, IPreviewByMode, type IRewards, type IRewardsByMode, IsEmergencyLiquidatorProps, type LeverageBand, LiquidationsNamespace, type ListMerger, LpParams, LpRedeemParams, LpResult, LpState, MaxBorrowParams, MaxWithdrawCollateralOptions, type MergeListResult, MergedQuery, MerklRequestFailedError, type MerkleXYZUserRewardsV4Response, MissingSourceError, Mode, type MultipleDelayedWithdrawalsError, NamespaceOptions, type NoDelayedRouteError, type NoRecordedIntentError, NoSourceServedError, type NoStrategyTargetCollateralError, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, OpenEmptyPrepareRequest, OpenFlowError, OpenPrepareRequest, OpenStrategyParams, OpenStrategyResult, type OperationState, OpportunitiesNamespace, type PathLossRate, PlainMultichainSDKOptions, PoolInput, type PoolOperationError, PoolPrepareRequest, PositionInput, PositionsNamespace, PrepareApi, PrepareOptions, PrepareRequest, PreviewNamespace, QuotaBufferState, RepayStrategyParams, type RewardsKeys, RewardsNamespace, type RouteErrors, SourceChainMismatchError, SourceUnavailableError, StrategyInput, StrategyResult, StrategyRoutesResult, TurtleRequestFailedError, type TurtleWalletRewards, type UnexpectedFailureError, type UnsupportedCollateralTokenError, type UnsupportedTokenPairError, UpdateQuotaParams, type WithPartialState, WithRouteErrors, type WithdrawCeilings, WithdrawCollateralParams, WithdrawStrategyParams, type WithdrawalInProgressError, assertSameChains, creditAccountNotEmpty, creditAccountNotFound, everyChainFailed, filterResponse, mergeChainList, mergeChainOne, noStrategyTargetCollateral, unexpectedFailure };
|
|
@@ -3,7 +3,7 @@ import { LiquidatableAccount, LiquidationDetails, LiquidationPosition } from "..
|
|
|
3
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
4
|
import "../../model/index.js";
|
|
5
5
|
import { MultichainSDK } from "../../onchain/MultichainSDK.js";
|
|
6
|
-
import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps } from "../../onchain/accounts/liquidations/types.js";
|
|
6
|
+
import { BuildLiquidationTxProps, BuildPartialLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps, GetPartialLiquidationDetailsProps } from "../../onchain/accounts/liquidations/types.js";
|
|
7
7
|
import { CheckLiquidationInput, CheckLiquidationOptions, LiquidationValidationError } from "../../onchain/validation/checkLiquidation.js";
|
|
8
8
|
import "../../onchain/index.js";
|
|
9
9
|
import { ILiquidations, IsEmergencyLiquidatorProps } from "./types.js";
|
|
@@ -12,7 +12,7 @@ import { NamespaceOptions } from "../types.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* {@inheritDoc ILiquidations}
|
|
14
14
|
**/
|
|
15
|
-
declare class LiquidationsNamespace implements ILiquidations {
|
|
15
|
+
export declare class LiquidationsNamespace implements ILiquidations {
|
|
16
16
|
#private;
|
|
17
17
|
constructor(onchain: MultichainSDK, options: NamespaceOptions);
|
|
18
18
|
/**
|
|
@@ -27,6 +27,14 @@ declare class LiquidationsNamespace implements ILiquidations {
|
|
|
27
27
|
* {@inheritDoc ILiquidations.buildLiquidationTx}
|
|
28
28
|
**/
|
|
29
29
|
buildLiquidationTx(props: BuildLiquidationTxProps<true>): Promise<DataResponse<TxCall>>;
|
|
30
|
+
/**
|
|
31
|
+
* {@inheritDoc ILiquidations.getPartialLiquidationDetails}
|
|
32
|
+
**/
|
|
33
|
+
getPartialLiquidationDetails(props: GetPartialLiquidationDetailsProps<true>): Promise<DataResponse<LiquidationDetails>>;
|
|
34
|
+
/**
|
|
35
|
+
* {@inheritDoc ILiquidations.buildPartialLiquidationTx}
|
|
36
|
+
**/
|
|
37
|
+
buildPartialLiquidationTx(props: BuildPartialLiquidationTxProps<true>): Promise<DataResponse<TxCall>>;
|
|
30
38
|
/**
|
|
31
39
|
* {@inheritDoc ILiquidations.getLiquidationPositions}
|
|
32
40
|
**/
|
|
@@ -40,5 +48,4 @@ declare class LiquidationsNamespace implements ILiquidations {
|
|
|
40
48
|
**/
|
|
41
49
|
isEmergencyLiquidator(props: IsEmergencyLiquidatorProps): boolean;
|
|
42
50
|
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { LiquidationsNamespace };
|
|
51
|
+
//#endregion
|
|
@@ -2,7 +2,7 @@ import { ChainId, TxCall } from "../../model/primitives.js";
|
|
|
2
2
|
import { LiquidatableAccount, LiquidationDetails, LiquidationPosition } from "../../model/liquidations.js";
|
|
3
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
4
|
import "../../model/index.js";
|
|
5
|
-
import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps } from "../../onchain/accounts/liquidations/types.js";
|
|
5
|
+
import { BuildLiquidationTxProps, BuildPartialLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps, GetPartialLiquidationDetailsProps } from "../../onchain/accounts/liquidations/types.js";
|
|
6
6
|
import { CheckLiquidationInput, CheckLiquidationOptions, LiquidationValidationError } from "../../onchain/validation/checkLiquidation.js";
|
|
7
7
|
import "../../onchain/index.js";
|
|
8
8
|
import { Address } from "viem";
|
|
@@ -11,7 +11,7 @@ import { Address } from "viem";
|
|
|
11
11
|
* On-chain discovery of liquidatable credit accounts and delayed-withdrawal
|
|
12
12
|
* positions a liquidator wallet holds.
|
|
13
13
|
**/
|
|
14
|
-
interface ILiquidations {
|
|
14
|
+
export interface ILiquidations {
|
|
15
15
|
/**
|
|
16
16
|
* All liquidatable credit accounts: health factor below 1 plus accounts of
|
|
17
17
|
* expired credit managers with outstanding debt. Optionally narrowed.
|
|
@@ -22,21 +22,37 @@ interface ILiquidations {
|
|
|
22
22
|
* liquidator receives. Throws when the chain cannot answer.
|
|
23
23
|
**/
|
|
24
24
|
getLiquidationDetails(props: GetLiquidationDetailsProps<true>): Promise<DataResponse<LiquidationDetails>>;
|
|
25
|
+
/**
|
|
26
|
+
* Partial liquidation of one credit account, in the shape of a full one:
|
|
27
|
+
* what the liquidator pays, receives and must approve. A local estimate from
|
|
28
|
+
* the synced oracle state. Parameters left out are derived from current
|
|
29
|
+
* state. Throws for RWA markets and withdrawal phantom collateral.
|
|
30
|
+
**/
|
|
31
|
+
getPartialLiquidationDetails(props: GetPartialLiquidationDetailsProps<true>): Promise<DataResponse<LiquidationDetails>>;
|
|
25
32
|
/**
|
|
26
33
|
* Transaction that fully liquidates a credit account. The reported block is
|
|
27
34
|
* the one the transaction was built against.
|
|
28
35
|
**/
|
|
29
36
|
buildLiquidationTx(props: BuildLiquidationTxProps<true>): Promise<DataResponse<TxCall>>;
|
|
37
|
+
/**
|
|
38
|
+
* Transaction that partially liquidates a credit account, sending the
|
|
39
|
+
* seized collateral to the liquidator. The reported block is the one the
|
|
40
|
+
* transaction was built against. Throws when the account cannot be
|
|
41
|
+
* partially liquidated.
|
|
42
|
+
**/
|
|
43
|
+
buildPartialLiquidationTx(props: BuildPartialLiquidationTxProps<true>): Promise<DataResponse<TxCall>>;
|
|
30
44
|
/**
|
|
31
45
|
* Delayed-withdrawal positions (redemption receipts) owned by a liquidator
|
|
32
46
|
* wallet, optionally scoped to some of the SDK's chains.
|
|
33
47
|
**/
|
|
34
48
|
getLiquidationPositions(props: GetLiquidationPositionsProps<true>): Promise<DataResponse<LiquidationPosition[]>>;
|
|
35
49
|
/**
|
|
36
|
-
* Whether `liquidator` may send a full liquidation of this
|
|
50
|
+
* Whether `liquidator` may send a full or partial liquidation of this
|
|
51
|
+
* account.
|
|
37
52
|
*
|
|
38
|
-
* `details` must come from {@link ILiquidations.getLiquidationDetails}
|
|
39
|
-
* with the same `liquidator
|
|
53
|
+
* `details` must come from {@link ILiquidations.getLiquidationDetails}
|
|
54
|
+
* called with the same `liquidator`, or from
|
|
55
|
+
* {@link ILiquidations.getPartialLiquidationDetails}.
|
|
40
56
|
**/
|
|
41
57
|
checkLiquidation(props: CheckLiquidationInput, options?: CheckLiquidationOptions): Promise<LiquidationValidationError[]>;
|
|
42
58
|
/**
|
|
@@ -44,7 +60,7 @@ interface ILiquidations {
|
|
|
44
60
|
**/
|
|
45
61
|
isEmergencyLiquidator(props: IsEmergencyLiquidatorProps): boolean;
|
|
46
62
|
}
|
|
47
|
-
interface IsEmergencyLiquidatorProps {
|
|
63
|
+
export interface IsEmergencyLiquidatorProps {
|
|
48
64
|
chainId: ChainId;
|
|
49
65
|
creditManager: Address;
|
|
50
66
|
liquidator: Address;
|
|
@@ -53,10 +69,9 @@ interface IsEmergencyLiquidatorProps {
|
|
|
53
69
|
* `sdk.liquidations` per mode: an on-chain read, absent when the SDK reads no
|
|
54
70
|
* chain.
|
|
55
71
|
**/
|
|
56
|
-
interface ILiquidationsByMode {
|
|
72
|
+
export interface ILiquidationsByMode {
|
|
57
73
|
onchain: ILiquidations;
|
|
58
74
|
offchain: undefined;
|
|
59
75
|
both: ILiquidations;
|
|
60
76
|
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { ILiquidations, ILiquidationsByMode, IsEmergencyLiquidatorProps };
|
|
77
|
+
//#endregion
|
|
@@ -21,7 +21,7 @@ import { Address } from "viem";
|
|
|
21
21
|
* The `opportunities` namespace of a {@link GearboxSDK}, see
|
|
22
22
|
* {@link IOpportunitiesByMode} for what each mode offers.
|
|
23
23
|
**/
|
|
24
|
-
declare class OpportunitiesNamespace extends AbstractNamespace<MultichainSDK["opportunities"], GearboxAPI["opportunities"]> implements IOpportunitiesBase, IOpportunitiesOffchainOnly, IOpportunitiesOnchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOffchainBranch {
|
|
24
|
+
export declare class OpportunitiesNamespace extends AbstractNamespace<MultichainSDK["opportunities"], GearboxAPI["opportunities"]> implements IOpportunitiesBase, IOpportunitiesOffchainOnly, IOpportunitiesOnchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOffchainBranch {
|
|
25
25
|
#private;
|
|
26
26
|
/**
|
|
27
27
|
* {@inheritDoc IOpportunitiesBase.merge}
|
|
@@ -66,5 +66,4 @@ declare class OpportunitiesNamespace extends AbstractNamespace<MultichainSDK["op
|
|
|
66
66
|
charts<const Metrics extends readonly PoolOpportunityChartMetric[]>(key: PoolOpportunityRef, metrics: Metrics, range: ChartRange): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
67
67
|
charts<const Metrics extends readonly StrategyOpportunityChartMetric[]>(key: StrategyOpportunityRef, metrics: Metrics, range: ChartRange): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
|
-
export { OpportunitiesNamespace };
|
|
69
|
+
//#endregion
|
|
@@ -18,7 +18,7 @@ import { Address } from "viem";
|
|
|
18
18
|
/**
|
|
19
19
|
* What the `opportunities` namespace offers in every mode.
|
|
20
20
|
**/
|
|
21
|
-
interface IOpportunitiesBase {
|
|
21
|
+
export interface IOpportunitiesBase {
|
|
22
22
|
/**
|
|
23
23
|
* All pool and strategy opportunities, optionally narrowed. In `both` mode
|
|
24
24
|
* each chain is served by whichever source is fresh enough, see
|
|
@@ -50,7 +50,7 @@ interface IOpportunitiesBase {
|
|
|
50
50
|
/**
|
|
51
51
|
* Reads only a backend can answer.
|
|
52
52
|
**/
|
|
53
|
-
interface IOpportunitiesOffchainOnly {
|
|
53
|
+
export interface IOpportunitiesOffchainOnly {
|
|
54
54
|
/**
|
|
55
55
|
* Protocol-wide totals across every opportunity: the TVL, total borrowed and
|
|
56
56
|
* total supplied the landing page shows.
|
|
@@ -73,7 +73,7 @@ interface IOpportunitiesOffchainOnly {
|
|
|
73
73
|
/**
|
|
74
74
|
* Reads only the chain can answer.
|
|
75
75
|
**/
|
|
76
|
-
interface IOpportunitiesOnchainOnly {
|
|
76
|
+
export interface IOpportunitiesOnchainOnly {
|
|
77
77
|
/**
|
|
78
78
|
* What a deposit, withdrawal or leverage change would do, and the calldata
|
|
79
79
|
* that does it.
|
|
@@ -99,21 +99,21 @@ interface IOpportunitiesOnchainOnly {
|
|
|
99
99
|
* The chain on its own, for a consumer that shows each source as it arrives.
|
|
100
100
|
* Absent in `offchain` mode.
|
|
101
101
|
**/
|
|
102
|
-
interface IOpportunitiesOnchainBranch {
|
|
102
|
+
export interface IOpportunitiesOnchainBranch {
|
|
103
103
|
readonly onchain: IMultichainOpportunitiesService;
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* The backend on its own, see {@link IOpportunitiesOnchainBranch}. Absent in
|
|
107
107
|
* `onchain` mode.
|
|
108
108
|
**/
|
|
109
|
-
interface IOpportunitiesOffchainBranch {
|
|
109
|
+
export interface IOpportunitiesOffchainBranch {
|
|
110
110
|
readonly offchain: IOffchainOpportunities;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Merge policy of each read, exposed so that a consumer reading the two
|
|
114
114
|
* branches itself combines them exactly as `both` mode would.
|
|
115
115
|
**/
|
|
116
|
-
interface IOpportunityMergers {
|
|
116
|
+
export interface IOpportunityMergers {
|
|
117
117
|
list: ListMerger<Opportunity[]>;
|
|
118
118
|
pool: EntityMerger<PoolOpportunityDetail>;
|
|
119
119
|
/**
|
|
@@ -125,7 +125,7 @@ interface IOpportunityMergers {
|
|
|
125
125
|
/**
|
|
126
126
|
* Which methods the `opportunities` namespace has in each mode.
|
|
127
127
|
**/
|
|
128
|
-
interface IOpportunitiesByMode {
|
|
128
|
+
export interface IOpportunitiesByMode {
|
|
129
129
|
onchain: IOpportunitiesBase & IOpportunitiesOnchainOnly & IOpportunitiesOnchainBranch;
|
|
130
130
|
offchain: IOpportunitiesBase & IOpportunitiesOffchainOnly & IOpportunitiesOffchainBranch;
|
|
131
131
|
both: IOpportunitiesBase & IOpportunitiesOnchainOnly & IOpportunitiesOffchainOnly & IOpportunitiesOnchainBranch & IOpportunitiesOffchainBranch;
|
|
@@ -133,6 +133,5 @@ interface IOpportunitiesByMode {
|
|
|
133
133
|
/**
|
|
134
134
|
* The `opportunities` namespace of a {@link GearboxSDK} in mode `M`.
|
|
135
135
|
**/
|
|
136
|
-
type IOpportunities<M extends Mode = Mode> = IOpportunitiesByMode[M];
|
|
137
|
-
//#endregion
|
|
138
|
-
export { IOpportunities, IOpportunitiesBase, IOpportunitiesByMode, IOpportunitiesOffchainBranch, IOpportunitiesOffchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOnchainOnly, IOpportunityMergers };
|
|
136
|
+
export type IOpportunities<M extends Mode = Mode> = IOpportunitiesByMode[M];
|
|
137
|
+
//#endregion
|
|
@@ -19,7 +19,7 @@ import { Address } from "viem";
|
|
|
19
19
|
* The `positions` namespace of a {@link GearboxSDK}, see
|
|
20
20
|
* {@link IPositionsByMode} for what each mode offers.
|
|
21
21
|
**/
|
|
22
|
-
declare class PositionsNamespace extends AbstractNamespace<MultichainSDK["positions"], GearboxAPI["positions"]> implements IPositionsBase, IPositionsOffchainOnly, IPositionsOnchainOnly, IPositionsOnchainBranch, IPositionsOffchainBranch {
|
|
22
|
+
export declare class PositionsNamespace extends AbstractNamespace<MultichainSDK["positions"], GearboxAPI["positions"]> implements IPositionsBase, IPositionsOffchainOnly, IPositionsOnchainOnly, IPositionsOnchainBranch, IPositionsOffchainBranch {
|
|
23
23
|
/**
|
|
24
24
|
* {@inheritDoc IPositionsBase.merge}
|
|
25
25
|
**/
|
|
@@ -51,5 +51,4 @@ declare class PositionsNamespace extends AbstractNamespace<MultichainSDK["positi
|
|
|
51
51
|
**/
|
|
52
52
|
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
53
53
|
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { PositionsNamespace };
|
|
54
|
+
//#endregion
|
|
@@ -19,6 +19,5 @@ import { MergeListResult } from "../utils/types.js";
|
|
|
19
19
|
* still preferred when it has the row. `name` is derived from that collateral,
|
|
20
20
|
* so it follows the same override.
|
|
21
21
|
**/
|
|
22
|
-
declare function mergePositionList<Onchain extends DataResponse<Position[]> | undefined, Offchain extends DataResponse<Position[]> | undefined>(onchain: Onchain, offchain: Offchain, maxLagSeconds?: number): MergeListResult<Onchain, Offchain, Position[]>;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { mergePositionList };
|
|
22
|
+
export declare function mergePositionList<Onchain extends DataResponse<Position[]> | undefined, Offchain extends DataResponse<Position[]> | undefined>(onchain: Onchain, offchain: Offchain, maxLagSeconds?: number): MergeListResult<Onchain, Offchain, Position[]>;
|
|
23
|
+
//#endregion
|
|
@@ -15,7 +15,7 @@ import { Address } from "viem";
|
|
|
15
15
|
/**
|
|
16
16
|
* What the `positions` namespace offers in every mode.
|
|
17
17
|
**/
|
|
18
|
-
interface IPositionsBase {
|
|
18
|
+
export interface IPositionsBase {
|
|
19
19
|
/**
|
|
20
20
|
* Everything a wallet holds: its pool shares, its credit accounts and the
|
|
21
21
|
* delayed withdrawals it took over by liquidating, optionally narrowed. In
|
|
@@ -38,7 +38,7 @@ interface IPositionsBase {
|
|
|
38
38
|
/**
|
|
39
39
|
* Reads only a backend can answer.
|
|
40
40
|
**/
|
|
41
|
-
interface IPositionsOffchainOnly {
|
|
41
|
+
export interface IPositionsOffchainOnly {
|
|
42
42
|
/**
|
|
43
43
|
* Aggregate over everything a wallet holds: the list screen's badges, see
|
|
44
44
|
* {@link PositionsTotals}.
|
|
@@ -70,7 +70,7 @@ interface IPositionsOffchainOnly {
|
|
|
70
70
|
/**
|
|
71
71
|
* Reads only the chain can answer.
|
|
72
72
|
**/
|
|
73
|
-
interface IPositionsOnchainOnly {
|
|
73
|
+
export interface IPositionsOnchainOnly {
|
|
74
74
|
/**
|
|
75
75
|
* Delayed withdrawals of one credit account: claimable rows carry the
|
|
76
76
|
* adapter call and recorded intent a claim is built from; pending rows
|
|
@@ -82,27 +82,27 @@ interface IPositionsOnchainOnly {
|
|
|
82
82
|
* The chain on its own, for a consumer that shows each source as it arrives.
|
|
83
83
|
* Absent in `offchain` mode.
|
|
84
84
|
**/
|
|
85
|
-
interface IPositionsOnchainBranch {
|
|
85
|
+
export interface IPositionsOnchainBranch {
|
|
86
86
|
readonly onchain: IMultichainPositionsService;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* The backend on its own, see {@link IPositionsOnchainBranch}. Absent in
|
|
90
90
|
* `onchain` mode.
|
|
91
91
|
**/
|
|
92
|
-
interface IPositionsOffchainBranch {
|
|
92
|
+
export interface IPositionsOffchainBranch {
|
|
93
93
|
readonly offchain: IOffchainPositions;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Merge policy of each read, exposed so that a consumer reading the two
|
|
97
97
|
* branches itself combines them exactly as `both` mode would.
|
|
98
98
|
**/
|
|
99
|
-
interface IPositionMergers {
|
|
99
|
+
export interface IPositionMergers {
|
|
100
100
|
list: ListMerger<Position[]>;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Which methods the `positions` namespace has in each mode.
|
|
104
104
|
**/
|
|
105
|
-
interface IPositionsByMode {
|
|
105
|
+
export interface IPositionsByMode {
|
|
106
106
|
onchain: IPositionsBase & IPositionsOnchainOnly & IPositionsOnchainBranch;
|
|
107
107
|
offchain: IPositionsBase & IPositionsOffchainOnly & IPositionsOffchainBranch;
|
|
108
108
|
both: IPositionsBase & IPositionsOnchainOnly & IPositionsOffchainOnly & IPositionsOnchainBranch & IPositionsOffchainBranch;
|
|
@@ -110,6 +110,5 @@ interface IPositionsByMode {
|
|
|
110
110
|
/**
|
|
111
111
|
* The `positions` namespace of a {@link GearboxSDK} in mode `M`.
|
|
112
112
|
**/
|
|
113
|
-
type IPositions<M extends Mode = Mode> = IPositionsByMode[M];
|
|
114
|
-
//#endregion
|
|
115
|
-
export { IPositionMergers, IPositions, IPositionsBase, IPositionsByMode, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOnchainOnly };
|
|
113
|
+
export type IPositions<M extends Mode = Mode> = IPositionsByMode[M];
|
|
114
|
+
//#endregion
|