@gearbox-protocol/sdk 17.13.0-next.1 → 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/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 +156 -28
- package/dist/cjs/onchain/accounts/liquidations/MultichainLiquidationsService.js +28 -0
- package/dist/cjs/onchain/accounts/liquidations/constants.js +1 -1
- package/dist/cjs/onchain/accounts/liquidations/partialLiquidation.js +11 -15
- 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 +11 -0
- 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/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 +156 -28
- package/dist/esm/onchain/accounts/liquidations/MultichainLiquidationsService.js +28 -0
- package/dist/esm/onchain/accounts/liquidations/constants.js +1 -1
- package/dist/esm/onchain/accounts/liquidations/partialLiquidation.js +11 -15
- 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 +7 -2
- package/dist/esm/onchain/market/adapters/abi/midas/index.js +1 -2
- 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 +9 -10
- package/dist/types/onchain/abi/oracles.d.ts +27 -28
- package/dist/types/onchain/accounts/CreditAccountsServiceV310.d.ts +3 -12
- package/dist/types/onchain/accounts/bots/AccountBotsService.d.ts +2 -3
- package/dist/types/onchain/accounts/bots/PeripheryCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/bots/abi.d.ts +2 -3
- package/dist/types/onchain/accounts/bots/types.d.ts +13 -14
- package/dist/types/onchain/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +2 -3
- package/dist/types/onchain/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/credit-account-compressor/types.d.ts +11 -12
- package/dist/types/onchain/accounts/index.d.ts +9 -9
- 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 +39 -19
- package/dist/types/onchain/accounts/liquidations/MultichainLiquidationsService.d.ts +13 -4
- package/dist/types/onchain/accounts/liquidations/constants.d.ts +4 -5
- package/dist/types/onchain/accounts/liquidations/index.d.ts +2 -2
- package/dist/types/onchain/accounts/liquidations/partialLiquidation.d.ts +15 -8
- package/dist/types/onchain/accounts/liquidations/skipLiquidatableAccount.d.ts +2 -3
- package/dist/types/onchain/accounts/liquidations/types.d.ts +125 -35
- package/dist/types/onchain/accounts/multicall-utils.d.ts +4 -5
- package/dist/types/onchain/accounts/quota-utils.d.ts +11 -11
- package/dist/types/onchain/accounts/types.d.ts +17 -96
- package/dist/types/onchain/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +7 -7
- package/dist/types/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +2 -2
- package/dist/types/onchain/accounts/withdrawal-compressor/addresses.d.ts +4 -5
- package/dist/types/onchain/accounts/withdrawal-compressor/createRedemptionLogger.d.ts +2 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/createWithdrawalCompressor.d.ts +2 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/intent-codec.d.ts +5 -6
- package/dist/types/onchain/accounts/withdrawal-compressor/types.d.ts +16 -17
- package/dist/types/onchain/base/BaseContract.d.ts +5 -6
- package/dist/types/onchain/base/ChainContractsRegister.d.ts +3 -4
- package/dist/types/onchain/base/Construct.d.ts +3 -4
- package/dist/types/onchain/base/MultichainConstruct.d.ts +7 -8
- package/dist/types/onchain/base/SDKConstruct.d.ts +2 -3
- package/dist/types/onchain/base/TokensMeta.d.ts +13 -6
- package/dist/types/onchain/base/errors.d.ts +2 -3
- package/dist/types/onchain/base/token-types.d.ts +18 -18
- package/dist/types/onchain/base/types.d.ts +37 -38
- package/dist/types/onchain/chain/chains.d.ts +20 -21
- package/dist/types/onchain/chain/detectNetwork.d.ts +2 -3
- package/dist/types/onchain/constants/address-provider.d.ts +36 -37
- package/dist/types/onchain/constants/addresses.d.ts +5 -6
- package/dist/types/onchain/constants/bot-permissions.d.ts +3 -4
- package/dist/types/onchain/constants/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 +14 -9
- package/dist/types/onchain/market/MarketConfiguratorContract.d.ts +2 -2
- package/dist/types/onchain/market/MarketRegister.d.ts +4 -5
- package/dist/types/onchain/market/MarketSuite.d.ts +2 -3
- package/dist/types/onchain/market/ZapperRegister.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/actionAbi.d.ts +4 -5
- package/dist/types/onchain/market/adapters/abi/adapters/erc4626ReferralAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3WrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCamelotV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BaseRewardPoolAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BoosterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1StableNgAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_2AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_3AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_4AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iDaiUsdsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iFluidDexAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiGatewayAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiUnwindingGateway.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtDepositPool.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtWithdrawalManager.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iLidoV1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellow4626VaultAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowClaimerAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowWrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasIssuanceVaultAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasRedemptionVaultAdapterV310.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iPendleRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeOnRampAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeRedemptionGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iStakingRewardsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iTraderJoeRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV2Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV4Adapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iUpshiftVaultAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iVelodromeV2RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iwstEthv1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/mellowDvvAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbi.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbiPatterns.d.ts +12 -13
- package/dist/types/onchain/market/adapters/abi/midas/iMidasGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iBaseOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/targetContractAbi.d.ts +29 -30
- package/dist/types/onchain/market/adapters/abi/utils.d.ts +7 -8
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +4 -5
- package/dist/types/onchain/market/adapters/contracts/AbstractCurveAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/contracts/AccountMigratorAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CamelotV3AdapterContract.d.ts +3 -3
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve2AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve3AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve4AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1AdapterStETHContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/DaiUsdsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/FluidDexAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/LidoV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowClaimerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowDVVAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowWrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/PendleRouterAdapterContract.d.ts +5 -5
- package/dist/types/onchain/market/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/StakingRewardsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/UniswapV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV3AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV4AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UpshiftVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/VelodromeV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/WstETHV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/createAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/legacyAdapterOperations.d.ts +27 -28
- package/dist/types/onchain/market/adapters/transferHelpers.d.ts +10 -11
- package/dist/types/onchain/market/adapters/transfers.d.ts +2 -3
- package/dist/types/onchain/market/adapters/types.d.ts +9 -10
- package/dist/types/onchain/market/credit/CreditConfiguratorV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditFacadeV310BaseContract.d.ts +2 -2
- package/dist/types/onchain/market/credit/CreditFacadeV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditManagerV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditSuite.d.ts +2 -3
- package/dist/types/onchain/market/credit/CreditSuiteStrategy.d.ts +2 -3
- package/dist/types/onchain/market/credit/collateralUtils.d.ts +5 -6
- package/dist/types/onchain/market/credit/createCreditConfigurator.d.ts +2 -3
- package/dist/types/onchain/market/credit/createCreditFacade.d.ts +2 -3
- package/dist/types/onchain/market/credit/createCreditManager.d.ts +2 -3
- package/dist/types/onchain/market/credit/expectedBalanceDeltas.d.ts +4 -5
- package/dist/types/onchain/market/credit/types.d.ts +10 -11
- package/dist/types/onchain/market/loss-policy/AliasLossPolicyV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/loss-policy/LossPolicyContract.d.ts +2 -2
- package/dist/types/onchain/market/loss-policy/constants.d.ts +5 -6
- package/dist/types/onchain/market/loss-policy/createLossPolicy.d.ts +2 -3
- package/dist/types/onchain/market/loss-policy/types.d.ts +2 -3
- package/dist/types/onchain/market/math.d.ts +23 -24
- package/dist/types/onchain/market/oracle/PriceFeedAnswerMap.d.ts +2 -3
- package/dist/types/onchain/market/oracle/PriceOracleBaseContract.d.ts +2 -3
- package/dist/types/onchain/market/oracle/PriceOracleV310Contract.d.ts +2 -2
- package/dist/types/onchain/market/oracle/collateralPriceInUnderlying.d.ts +2 -3
- package/dist/types/onchain/market/oracle/createPriceOracle.d.ts +2 -3
- package/dist/types/onchain/market/oracle/types.d.ts +5 -6
- package/dist/types/onchain/market/pool/GaugeContract.d.ts +3 -3
- package/dist/types/onchain/market/pool/LinearInterestRateModelContract.d.ts +2 -2
- package/dist/types/onchain/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
- package/dist/types/onchain/market/pool/PoolSuite.d.ts +2 -3
- package/dist/types/onchain/market/pool/PoolV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/pool/TumblerContract.d.ts +2 -2
- package/dist/types/onchain/market/pool/createInterestRateModel.d.ts +2 -3
- package/dist/types/onchain/market/pool/createPool.d.ts +2 -3
- package/dist/types/onchain/market/pool/createPoolQuotaKeeper.d.ts +2 -3
- package/dist/types/onchain/market/pool/createRateKeeper.d.ts +2 -3
- package/dist/types/onchain/market/pool/math.d.ts +6 -7
- package/dist/types/onchain/market/pool/types.d.ts +7 -8
- package/dist/types/onchain/market/pricefeeds/AbstractLPPriceFeed.d.ts +3 -4
- package/dist/types/onchain/market/pricefeeds/AbstractPriceFeed.d.ts +5 -6
- package/dist/types/onchain/market/pricefeeds/PriceFeedRef.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/PriceFeedRegistry.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/feeds/BalancerStablePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/BalancerWeightedPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/BoundedPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CompositePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ConstantPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveCryptoPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveStablePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/CurveUSDPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/Erc4626PriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ExternalPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/MellowLRTPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/PendleTWAPPTPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/PythPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/RedstonePriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/WstETHPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/YearnPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/feeds/ZeroPriceFeed.d.ts +2 -2
- package/dist/types/onchain/market/pricefeeds/types.d.ts +5 -6
- package/dist/types/onchain/market/pricefeeds/updates/PriceUpdateTx.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/PriceUpdatesCache.d.ts +3 -4
- package/dist/types/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/getRawPriceUpdates.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/isUpdatablePriceFeed.d.ts +2 -3
- package/dist/types/onchain/market/pricefeeds/updates/types.d.ts +8 -9
- package/dist/types/onchain/market/pricefeeds/updates/updatableDependencies.d.ts +2 -3
- package/dist/types/onchain/market/rwa/RWARegistry.d.ts +3 -4
- package/dist/types/onchain/market/rwa/createDegenNFT.d.ts +2 -3
- package/dist/types/onchain/market/rwa/midas/MidasDegenNFT.d.ts +2 -2
- package/dist/types/onchain/market/rwa/midas/MidasLiquidatorContract.d.ts +2 -2
- package/dist/types/onchain/market/rwa/midas/constants.d.ts +4 -5
- package/dist/types/onchain/market/rwa/securitize/SecuritizeDegenNFT.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeLiquidatorContract.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/SecuritizeRWAFactory.d.ts +2 -2
- package/dist/types/onchain/market/rwa/securitize/constants.d.ts +4 -5
- package/dist/types/onchain/market/rwa/securitize/types.d.ts +5 -6
- package/dist/types/onchain/market/rwa/types.d.ts +16 -16
- package/dist/types/onchain/market/strategyName.d.ts +2 -3
- package/dist/types/onchain/market/types.d.ts +3 -4
- package/dist/types/onchain/market/zapper/IERC20ZapperContract.d.ts +2 -2
- package/dist/types/onchain/market/zapper/IETHZapperContract.d.ts +2 -2
- package/dist/types/onchain/market/zapper/ZapperContract.d.ts +2 -3
- package/dist/types/onchain/market/zapper/createZapper.d.ts +2 -3
- package/dist/types/onchain/market/zapper/types.d.ts +5 -6
- package/dist/types/onchain/opportunities/MultichainOpportunitiesService.d.ts +2 -3
- package/dist/types/onchain/opportunities/OpportunitiesService.d.ts +2 -3
- package/dist/types/onchain/opportunities/types.d.ts +2 -3
- package/dist/types/onchain/options.d.ts +4 -5
- package/dist/types/onchain/plugins/BasePlugin.d.ts +2 -3
- package/dist/types/onchain/plugins/errors.d.ts +2 -3
- package/dist/types/onchain/plugins/types.d.ts +9 -10
- package/dist/types/onchain/pools/PoolService.d.ts +2 -3
- package/dist/types/onchain/pools/types.d.ts +12 -13
- package/dist/types/onchain/positions/MultichainPositionsService.d.ts +2 -3
- package/dist/types/onchain/positions/PositionsService.d.ts +3 -4
- package/dist/types/onchain/positions/calcBorrowRate.d.ts +3 -4
- package/dist/types/onchain/positions/calcHealthFactor.d.ts +3 -4
- package/dist/types/onchain/positions/calcLiquidationPrice.d.ts +3 -4
- package/dist/types/onchain/positions/calcLiquidationPriceForTarget.d.ts +4 -5
- package/dist/types/onchain/positions/calcTimeToLiquidationMs.d.ts +2 -3
- package/dist/types/onchain/positions/types.d.ts +9 -10
- package/dist/types/onchain/preview/parse/classifyInnerOperations.d.ts +3 -4
- package/dist/types/onchain/preview/parse/parseFacadeOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parseOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parsePoolOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/parseRWAFactoryOperationCalldata.d.ts +2 -3
- package/dist/types/onchain/preview/parse/types-adapters.d.ts +4 -5
- package/dist/types/onchain/preview/parse/types-facades.d.ts +20 -21
- package/dist/types/onchain/preview/parse/types-pools.d.ts +6 -7
- package/dist/types/onchain/preview/parse/types-rwa.d.ts +5 -6
- package/dist/types/onchain/preview/parse/types.d.ts +4 -4
- package/dist/types/onchain/preview/preview/CreditAccountState.d.ts +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
|
@@ -17,7 +17,7 @@ import { Address } from "viem";
|
|
|
17
17
|
* account address, CM lookup, underlying for conversion, debt, token balances
|
|
18
18
|
* and initial quotas.
|
|
19
19
|
*/
|
|
20
|
-
type CreditAccountSlice = Omit<RouterCASlice, "debt"> & {
|
|
20
|
+
export type CreditAccountSlice = Omit<RouterCASlice, "debt"> & {
|
|
21
21
|
/** either base debt or debt plus interest and fees */
|
|
22
22
|
totalDebt: bigint;
|
|
23
23
|
};
|
|
@@ -27,7 +27,7 @@ type CreditAccountSlice = Omit<RouterCASlice, "debt"> & {
|
|
|
27
27
|
* In `PERCENTAGE_FACTOR_1KK` (1_000_000 = 100%), negative for a loss — the
|
|
28
28
|
* legacy 1e6 scale, not the `Bps` the rest of this module speaks.
|
|
29
29
|
*/
|
|
30
|
-
interface PathLossRate {
|
|
30
|
+
export interface PathLossRate {
|
|
31
31
|
pathPriceImpact: bigint;
|
|
32
32
|
netValuePriceImpact: bigint;
|
|
33
33
|
totalValuePriceImpact: bigint;
|
|
@@ -38,7 +38,7 @@ interface PathLossRate {
|
|
|
38
38
|
* routed legs and redemption request return, the expected claim included, less
|
|
39
39
|
* the value of what they spend. Negative for a loss.
|
|
40
40
|
*/
|
|
41
|
-
interface ExecutionCost {
|
|
41
|
+
export interface ExecutionCost {
|
|
42
42
|
/** `out − in` in the market underlying. */
|
|
43
43
|
amount: TokenAmount;
|
|
44
44
|
/** `(out − in) / in`, in `PERCENTAGE_FACTOR_1KK` (1_000_000 = 100%). */
|
|
@@ -52,7 +52,7 @@ interface ExecutionCost {
|
|
|
52
52
|
* names its amounts, and it reports what that transaction does rather than what
|
|
53
53
|
* the market charges while a form is open.
|
|
54
54
|
*/
|
|
55
|
-
interface SimulationPrices {
|
|
55
|
+
export interface SimulationPrices {
|
|
56
56
|
/**
|
|
57
57
|
* What the routed legs lost to market depth. `undefined` where nothing was
|
|
58
58
|
* routed or nothing could be measured. Zero also represents a sign that
|
|
@@ -75,7 +75,7 @@ interface SimulationPrices {
|
|
|
75
75
|
* {@link AccountProjection} vocabulary, plus the prices only a routed walk can
|
|
76
76
|
* report.
|
|
77
77
|
*/
|
|
78
|
-
interface OperationState extends AccountProjection, SimulationPrices {
|
|
78
|
+
export interface OperationState extends AccountProjection, SimulationPrices {
|
|
79
79
|
/**
|
|
80
80
|
* What the operation gives up against the oracle.
|
|
81
81
|
*
|
|
@@ -109,20 +109,20 @@ interface OperationState extends AccountProjection, SimulationPrices {
|
|
|
109
109
|
* about where the account would have landed, and a caller shows a blank rather
|
|
110
110
|
* than the account as it stands.
|
|
111
111
|
*/
|
|
112
|
-
interface WithPartialState<S> {
|
|
112
|
+
export interface WithPartialState<S> {
|
|
113
113
|
state: Partial<S>;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
116
|
* A flow that projects `S`, turned down by the engine: the code and its own
|
|
117
117
|
* numbers, with {@link WithPartialState.state} beside them.
|
|
118
118
|
*/
|
|
119
|
-
type RefusedIntent<S> = IntentValidationError & WithPartialState<S>;
|
|
119
|
+
export type RefusedIntent<S> = IntentValidationError & WithPartialState<S>;
|
|
120
120
|
/**
|
|
121
121
|
* What planning an intent yields: the operation chain, the state it projects,
|
|
122
122
|
* and the calldata that realises it — or the error that stopped the plan,
|
|
123
123
|
* carrying the part of that state the plan did reach.
|
|
124
124
|
*/
|
|
125
|
-
type IntentPreviewResult = {
|
|
125
|
+
export type IntentPreviewResult = {
|
|
126
126
|
ok: true;
|
|
127
127
|
operations: AccountCalculatorOperation[];
|
|
128
128
|
state: OperationState;
|
|
@@ -139,7 +139,7 @@ type IntentPreviewResult = {
|
|
|
139
139
|
* The tail then serves the share that arrived, and this says what is left to
|
|
140
140
|
* serve later.
|
|
141
141
|
*/
|
|
142
|
-
interface ClaimRemainder {
|
|
142
|
+
export interface ClaimRemainder {
|
|
143
143
|
/**
|
|
144
144
|
* The withdrawal position the claim left on the account: the phantom token
|
|
145
145
|
* standing for the part that has not matured.
|
|
@@ -156,7 +156,7 @@ interface ClaimRemainder {
|
|
|
156
156
|
* What finishing a delayed intent yields: {@link IntentPreviewResult}, plus
|
|
157
157
|
* whether the claim it was built on settled the withdrawal whole.
|
|
158
158
|
*/
|
|
159
|
-
type FinishIntentResult = (Extract<IntentPreviewResult, {
|
|
159
|
+
export type FinishIntentResult = (Extract<IntentPreviewResult, {
|
|
160
160
|
ok: true;
|
|
161
161
|
}> & {
|
|
162
162
|
/**
|
|
@@ -167,7 +167,7 @@ type FinishIntentResult = (Extract<IntentPreviewResult, {
|
|
|
167
167
|
remainder: ClaimRemainder | undefined;
|
|
168
168
|
}) | SDKError<RefusedIntent<OperationState>>;
|
|
169
169
|
/** What the request recorded, and when the tail can be run. */
|
|
170
|
-
interface DelayedStart {
|
|
170
|
+
export interface DelayedStart {
|
|
171
171
|
/**
|
|
172
172
|
* The intent written into the request, and decoded back from the claimable
|
|
173
173
|
* withdrawal at claim time. `prepare.finalize` picks it up from there, and
|
|
@@ -222,7 +222,7 @@ interface DelayedStart {
|
|
|
222
222
|
* it trades do not exist yet — so its half of the numbers is an estimate. What
|
|
223
223
|
* the transaction on offer does is not.
|
|
224
224
|
*/
|
|
225
|
-
type DelayedStartResult = {
|
|
225
|
+
export type DelayedStartResult = {
|
|
226
226
|
ok: true;
|
|
227
227
|
operations: AccountCalculatorOperation[];
|
|
228
228
|
state: OperationState;
|
|
@@ -230,11 +230,11 @@ type DelayedStartResult = {
|
|
|
230
230
|
delayed: DelayedStart;
|
|
231
231
|
} | SDKError<RefusedIntent<OperationState>>;
|
|
232
232
|
/** An intent previewed through the router: one transaction, settled now. */
|
|
233
|
-
type InstantRoute = Extract<IntentPreviewResult, {
|
|
233
|
+
export type InstantRoute = Extract<IntentPreviewResult, {
|
|
234
234
|
ok: true;
|
|
235
235
|
}>;
|
|
236
236
|
/** An intent previewed as a redemption: the request now, the tail later. */
|
|
237
|
-
type DelayedRoute = Extract<DelayedStartResult, {
|
|
237
|
+
export type DelayedRoute = Extract<DelayedStartResult, {
|
|
238
238
|
ok: true;
|
|
239
239
|
}>;
|
|
240
240
|
/**
|
|
@@ -246,7 +246,7 @@ type DelayedRoute = Extract<DelayedStartResult, {
|
|
|
246
246
|
* next to a missing route means the route could not be quoted at all: the
|
|
247
247
|
* pathfinder found no way out of the source, or the read behind it failed.
|
|
248
248
|
*/
|
|
249
|
-
interface RouteErrors {
|
|
249
|
+
export interface RouteErrors {
|
|
250
250
|
instant?: IntentValidationError;
|
|
251
251
|
delayed?: IntentValidationError;
|
|
252
252
|
}
|
|
@@ -261,7 +261,7 @@ interface RouteErrors {
|
|
|
261
261
|
* unviable, and then `error` is the instant route's — the route every account
|
|
262
262
|
* is expected to have — falling back to the delayed one's.
|
|
263
263
|
*/
|
|
264
|
-
type IntentRoutesResult = {
|
|
264
|
+
export type IntentRoutesResult = {
|
|
265
265
|
ok: true;
|
|
266
266
|
instant: InstantRoute | undefined;
|
|
267
267
|
delayed: DelayedRoute | undefined;
|
|
@@ -284,9 +284,10 @@ type IntentRoutesResult = {
|
|
|
284
284
|
* | `DEPOSIT` | `prepare.depositStrategy` | grows |
|
|
285
285
|
* | `WITHDRAW` | `prepare.withdrawStrategy` | shrinks |
|
|
286
286
|
* | `REPAY` | `prepare.repayStrategy` | shrinks |
|
|
287
|
+
* | `UPDATE_QUOTA` | `prepare.updateQuota` | fixed |
|
|
287
288
|
*/
|
|
288
289
|
/** Shared inputs for every start intent. */
|
|
289
|
-
type StartIntentProps = {
|
|
290
|
+
export type StartIntentProps = {
|
|
290
291
|
creditAccount: CreditAccountSlice;
|
|
291
292
|
sdk: OnchainSDK;
|
|
292
293
|
/**
|
|
@@ -316,7 +317,7 @@ type StartIntentProps = {
|
|
|
316
317
|
* RWA wrap leg, so whatever is sent lands as-is. Debt is untouched, therefore
|
|
317
318
|
* leverage drops and the health factor improves.
|
|
318
319
|
*/
|
|
319
|
-
interface AddCollateralIntent {
|
|
320
|
+
export interface AddCollateralIntent {
|
|
320
321
|
type: "ADD_COLLATERAL";
|
|
321
322
|
/** Position token to deposit. */
|
|
322
323
|
token: Address;
|
|
@@ -337,7 +338,7 @@ interface AddCollateralIntent {
|
|
|
337
338
|
* @see AdjustLeverageIntent and the `WITHDRAW` intent for the deleveraging
|
|
338
339
|
* withdrawals, which do change debt.
|
|
339
340
|
*/
|
|
340
|
-
interface WithdrawAssetIntent {
|
|
341
|
+
export interface WithdrawAssetIntent {
|
|
341
342
|
type: "WITHDRAW_ASSET";
|
|
342
343
|
/** Token to withdraw; must already be on the account. */
|
|
343
344
|
token: Address;
|
|
@@ -352,7 +353,7 @@ interface WithdrawAssetIntent {
|
|
|
352
353
|
* raising it borrows more and buys the position token, lowering it sells the
|
|
353
354
|
* position token and repays. TVL moves with the debt; net value does not.
|
|
354
355
|
*/
|
|
355
|
-
interface AdjustLeverageIntent {
|
|
356
|
+
export interface AdjustLeverageIntent {
|
|
356
357
|
type: "ADJUST_LEVERAGE";
|
|
357
358
|
/**
|
|
358
359
|
* Target total leverage scaled by `LEVERAGE_DECIMALS` (300n = 3x). 100n (1x)
|
|
@@ -380,7 +381,7 @@ interface AdjustLeverageIntent {
|
|
|
380
381
|
* an RWA market takes the unwrapped asset (USDC rather than dcUSDC), which this
|
|
381
382
|
* flow wraps for you.
|
|
382
383
|
*/
|
|
383
|
-
interface DepositStrategyIntent {
|
|
384
|
+
export interface DepositStrategyIntent {
|
|
384
385
|
type: "DEPOSIT";
|
|
385
386
|
/** Collateral token: the market underlying, or `rwa.asset` on an RWA market. */
|
|
386
387
|
token: Address;
|
|
@@ -413,7 +414,7 @@ interface DepositStrategyIntent {
|
|
|
413
414
|
* token plus `value`), and an RWA market takes the unwrapped asset behind its
|
|
414
415
|
* underlying, which this flow wraps for you.
|
|
415
416
|
*/
|
|
416
|
-
interface RepayStrategyIntent {
|
|
417
|
+
export interface RepayStrategyIntent {
|
|
417
418
|
type: "REPAY";
|
|
418
419
|
/** Funding token: the market underlying, or `rwa.asset` on an RWA market. */
|
|
419
420
|
token: Address;
|
|
@@ -453,7 +454,7 @@ interface RepayStrategyIntent {
|
|
|
453
454
|
* @see WithdrawAssetIntent for moving a single asset out at fixed debt, and
|
|
454
455
|
* AdjustLeverageIntent for changing leverage without withdrawing.
|
|
455
456
|
*/
|
|
456
|
-
interface WithdrawStrategyIntent {
|
|
457
|
+
export interface WithdrawStrategyIntent {
|
|
457
458
|
type: "WITHDRAW";
|
|
458
459
|
/**
|
|
459
460
|
* Amount the wallet receives, denominated in `tokenOut`. At or above the
|
|
@@ -479,6 +480,22 @@ interface WithdrawStrategyIntent {
|
|
|
479
480
|
*/
|
|
480
481
|
sourceToken?: Address;
|
|
481
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* Change the quota of one token the account already holds.
|
|
485
|
+
*
|
|
486
|
+
* No balance moves and debt is untouched; only how much of the token counts
|
|
487
|
+
* as collateral changes, and with it the quota fee the account pays.
|
|
488
|
+
*/
|
|
489
|
+
export interface UpdateQuotaIntent {
|
|
490
|
+
type: "UPDATE_QUOTA";
|
|
491
|
+
/** Collateral token on the account, other than the underlying. */
|
|
492
|
+
token: Address;
|
|
493
|
+
/**
|
|
494
|
+
* Target quota in underlying units; 0 disables it. Omit to size it to the
|
|
495
|
+
* balance: its value in underlying × LT, raised by `quotaReserve`.
|
|
496
|
+
*/
|
|
497
|
+
quota?: bigint;
|
|
498
|
+
}
|
|
482
499
|
/**
|
|
483
500
|
* Where a withdraw form's scale ends, in underlying units — and it ends twice.
|
|
484
501
|
*
|
|
@@ -494,7 +511,7 @@ interface WithdrawStrategyIntent {
|
|
|
494
511
|
* an `exit` of its entire net value. That gap is the market's rule showing
|
|
495
512
|
* through, not a miscount: such a position frees real money only by leaving.
|
|
496
513
|
*/
|
|
497
|
-
interface WithdrawCeilings {
|
|
514
|
+
export interface WithdrawCeilings {
|
|
498
515
|
/**
|
|
499
516
|
* Largest partial withdrawal the facade's `debtLimits` accept: the one whose
|
|
500
517
|
* proportional repayment leaves the debt at `minDebt`. `0n` when the debt
|
|
@@ -535,12 +552,12 @@ interface WithdrawCeilings {
|
|
|
535
552
|
*/
|
|
536
553
|
exit: bigint;
|
|
537
554
|
}
|
|
538
|
-
type StartIntent = AddCollateralIntent | WithdrawAssetIntent | AdjustLeverageIntent | DepositStrategyIntent | RepayStrategyIntent | WithdrawStrategyIntent;
|
|
555
|
+
export type StartIntent = AddCollateralIntent | WithdrawAssetIntent | AdjustLeverageIntent | DepositStrategyIntent | RepayStrategyIntent | WithdrawStrategyIntent | UpdateQuotaIntent;
|
|
539
556
|
/**
|
|
540
557
|
* The intents that can be started as a redemption rather than a swap: the two
|
|
541
558
|
* that sell a position asset. The others buy one, and buying settles at once.
|
|
542
559
|
*/
|
|
543
|
-
type DelayableIntent = AdjustLeverageIntent | WithdrawStrategyIntent;
|
|
560
|
+
export type DelayableIntent = AdjustLeverageIntent | WithdrawStrategyIntent;
|
|
544
561
|
/**
|
|
545
562
|
* A delayed intent this engine knows how to finish — every one of them.
|
|
546
563
|
*
|
|
@@ -548,9 +565,9 @@ type DelayableIntent = AdjustLeverageIntent | WithdrawStrategyIntent;
|
|
|
548
565
|
* operation here (sell everything, settle the loan, hand the rest over), not
|
|
549
566
|
* the facade's own close entry point, so the engine can build its tail too.
|
|
550
567
|
*/
|
|
551
|
-
type ResumableIntent = DelayedIntent;
|
|
568
|
+
export type ResumableIntent = DelayedIntent;
|
|
552
569
|
/** Shared inputs plus the matured withdrawal the tail is built around. */
|
|
553
|
-
type FinishIntentProps = StartIntentProps & {
|
|
570
|
+
export type FinishIntentProps = StartIntentProps & {
|
|
554
571
|
intent: ResumableIntent;
|
|
555
572
|
/**
|
|
556
573
|
* The matured withdrawal, as reported by
|
|
@@ -558,5 +575,4 @@ type FinishIntentProps = StartIntentProps & {
|
|
|
558
575
|
*/
|
|
559
576
|
claimable: ClaimableWithdrawal;
|
|
560
577
|
};
|
|
561
|
-
//#endregion
|
|
562
|
-
export { AddCollateralIntent, AdjustLeverageIntent, ClaimRemainder, CreditAccountSlice, DelayableIntent, DelayedRoute, DelayedStart, DelayedStartResult, DepositStrategyIntent, ExecutionCost, FinishIntentProps, FinishIntentResult, InstantRoute, IntentPreviewResult, IntentRoutesResult, OperationState, PathLossRate, RefusedIntent, RepayStrategyIntent, ResumableIntent, RouteErrors, SimulationPrices, StartIntent, StartIntentProps, WithPartialState, WithdrawAssetIntent, WithdrawCeilings, WithdrawStrategyIntent };
|
|
578
|
+
//#endregion
|
|
@@ -8,6 +8,5 @@ import { Address } from "viem";
|
|
|
8
8
|
* position-metric functions take: the state prices what it reports, a snapshot
|
|
9
9
|
* only names it.
|
|
10
10
|
**/
|
|
11
|
-
declare function adjustStateToSnapshot(creditManager: Address, state: OperationState): AccountSnapshot;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { adjustStateToSnapshot };
|
|
11
|
+
export declare function adjustStateToSnapshot(creditManager: Address, state: OperationState): AccountSnapshot;
|
|
12
|
+
//#endregion
|
|
@@ -5,6 +5,6 @@ import "../../../index.js";
|
|
|
5
5
|
interface Props {
|
|
6
6
|
operations: AccountCalculatorOperation[];
|
|
7
7
|
}
|
|
8
|
-
declare function assembleOperationCalls({ operations }: Props): MultiCall[];
|
|
8
|
+
export declare function assembleOperationCalls({ operations }: Props): MultiCall[];
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export {};
|
package/dist/types/onchain/accounts/intents/utils/borrowed-amount-plus-interest-and-fees.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* On the v3 SDK `CreditAccountData` the parts
|
|
6
6
|
* come as separate `debt` / `accruedInterest` / `accruedFees` fields.
|
|
7
7
|
*/
|
|
8
|
-
declare function calcBorrowedAmountPlusInterestAndFees(ca: {
|
|
8
|
+
export declare function calcBorrowedAmountPlusInterestAndFees(ca: {
|
|
9
9
|
/** Debt principal in underlying. */
|
|
10
10
|
debt: bigint;
|
|
11
11
|
/** Base and quota interest accrued on the account. */
|
|
@@ -13,5 +13,4 @@ declare function calcBorrowedAmountPlusInterestAndFees(ca: {
|
|
|
13
13
|
/** Fees accrued on the account. */
|
|
14
14
|
accruedFees: bigint;
|
|
15
15
|
}): bigint;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { calcBorrowedAmountPlusInterestAndFees };
|
|
16
|
+
//#endregion
|
|
@@ -8,7 +8,7 @@ import "../../../index.js";
|
|
|
8
8
|
import { Address } from "viem";
|
|
9
9
|
//#region src/onchain/accounts/intents/utils/common.d.ts
|
|
10
10
|
/** Case-insensitive address equality. */
|
|
11
|
-
declare const eq: (a: Address, b: Address) => boolean;
|
|
11
|
+
export declare const eq: (a: Address, b: Address) => boolean;
|
|
12
12
|
/**
|
|
13
13
|
* The suite and market behind a credit manager, or nothing where the register
|
|
14
14
|
* has no entry for it.
|
|
@@ -17,17 +17,16 @@ declare const eq: (a: Address, b: Address) => boolean;
|
|
|
17
17
|
* finished attaching: a question the register cannot answer yet is not an
|
|
18
18
|
* error. Everything that prepares a transaction wants the throw instead.
|
|
19
19
|
*/
|
|
20
|
-
declare function resolveCreditManager(sdk: OnchainSDK, creditManager: Address): {
|
|
20
|
+
export declare function resolveCreditManager(sdk: OnchainSDK, creditManager: Address): {
|
|
21
21
|
suite: CreditSuite;
|
|
22
22
|
market: MarketSuite;
|
|
23
23
|
} | undefined;
|
|
24
|
-
declare function toTargetDecimals(fromAmount: bigint, fromToken: Address, toToken: Address, sdk: OnchainSDK): bigint;
|
|
24
|
+
export declare function toTargetDecimals(fromAmount: bigint, fromToken: Address, toToken: Address, sdk: OnchainSDK): bigint;
|
|
25
25
|
/**
|
|
26
26
|
* Router CA slice from the account slice. RouterV310 reads `ca.tokens` for
|
|
27
27
|
* underlyingBalance, so balances are overlaid with the post-claim projection
|
|
28
28
|
* (legacy `overlayExpectedBalancesOntoCaTokens`): existing tokens keep quota
|
|
29
29
|
* with balance from the projection (0n when absent), new tokens get quota 0n.
|
|
30
30
|
*/
|
|
31
|
-
declare function toRouterCaSlice(creditAccount: CreditAccountSlice, expectedBalances?: Asset[]): RouterCASlice;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { eq, resolveCreditManager, toRouterCaSlice, toTargetDecimals };
|
|
31
|
+
export declare function toRouterCaSlice(creditAccount: CreditAccountSlice, expectedBalances?: Asset[]): RouterCASlice;
|
|
32
|
+
//#endregion
|
|
@@ -14,7 +14,7 @@ import { Address } from "viem";
|
|
|
14
14
|
* Addresses are lowercased so that `eq` comparisons and `AddressMap` lookups
|
|
15
15
|
* behave consistently everywhere downstream.
|
|
16
16
|
*/
|
|
17
|
-
declare function toCreditAccountSlice(ca: CreditAccountDataPayload): CreditAccountSlice;
|
|
17
|
+
export declare function toCreditAccountSlice(ca: CreditAccountDataPayload): CreditAccountSlice;
|
|
18
18
|
/**
|
|
19
19
|
* The slice a flow that has no account yet quotes against.
|
|
20
20
|
*
|
|
@@ -23,7 +23,7 @@ declare function toCreditAccountSlice(ca: CreditAccountDataPayload): CreditAccou
|
|
|
23
23
|
* flow reasons about is one the transaction itself puts there. The zero
|
|
24
24
|
* address stands in for the account so the shape is complete.
|
|
25
25
|
*/
|
|
26
|
-
declare function unopenedAccountSlice(args: {
|
|
26
|
+
export declare function unopenedAccountSlice(args: {
|
|
27
27
|
creditManager: Address;
|
|
28
28
|
creditFacade: Address;
|
|
29
29
|
underlying: Address;
|
|
@@ -37,6 +37,5 @@ declare function unopenedAccountSlice(args: {
|
|
|
37
37
|
*
|
|
38
38
|
* @throws When the account is not found in the connected markets.
|
|
39
39
|
*/
|
|
40
|
-
declare function fetchCreditAccountSlice(sdk: OnchainSDK, creditAccount: Address): Promise<CreditAccountSlice>;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { fetchCreditAccountSlice, toCreditAccountSlice, unopenedAccountSlice };
|
|
40
|
+
export declare function fetchCreditAccountSlice(sdk: OnchainSDK, creditAccount: Address): Promise<CreditAccountSlice>;
|
|
41
|
+
//#endregion
|
|
@@ -7,5 +7,5 @@ import { assembleOperationCalls } from "./assemble-operation-calls.js";
|
|
|
7
7
|
import { calcBorrowedAmountPlusInterestAndFees } from "./borrowed-amount-plus-interest-and-fees.js";
|
|
8
8
|
import { eq, resolveCreditManager, toRouterCaSlice, toTargetDecimals } from "./common.js";
|
|
9
9
|
import { LedgerSnapshot, OperationLedger } from "./ledger.js";
|
|
10
|
-
import { clearedQuotas, getQuotasForUpdate, quotaIncreaseLimit, quotasAfterUpdate, withDirectTransferQuota } from "./quotas-for-update.js";
|
|
11
|
-
export { CandidateToken, LedgerSnapshot, LegProbe, OpenStrategyLeg, OperationLedger, RouterPaths, SwapLeg, adjustStateToSnapshot, assembleOperationCalls, calcBorrowedAmountPlusInterestAndFees, clearedQuotas, collectPriceImpact, createOraclePaths, createRouterPaths, eq, fetchCreditAccountSlice, getQuotasForUpdate, isPhantomToken, isRedemptionPhantomToken, lossRate, pickFattestNonPhantomToken, quotaIncreaseLimit, quotasAfterUpdate, rankAccountTokens, resolveCreditManager, startProbe, toCreditAccountSlice, toRouterCaSlice, toTargetDecimals, unopenedAccountSlice, withDirectTransferQuota };
|
|
10
|
+
import { ResizedQuotaProps, clearedQuotas, getQuotasForUpdate, quotaIncreaseLimit, quotasAfterUpdate, resizedQuota, withDirectTransferQuota } from "./quotas-for-update.js";
|
|
11
|
+
export { CandidateToken, LedgerSnapshot, LegProbe, OpenStrategyLeg, OperationLedger, ResizedQuotaProps, RouterPaths, SwapLeg, adjustStateToSnapshot, assembleOperationCalls, calcBorrowedAmountPlusInterestAndFees, clearedQuotas, collectPriceImpact, createOraclePaths, createRouterPaths, eq, fetchCreditAccountSlice, getQuotasForUpdate, isPhantomToken, isRedemptionPhantomToken, lossRate, pickFattestNonPhantomToken, quotaIncreaseLimit, quotasAfterUpdate, rankAccountTokens, resizedQuota, resolveCreditManager, startProbe, toCreditAccountSlice, toRouterCaSlice, toTargetDecimals, unopenedAccountSlice, withDirectTransferQuota };
|
|
@@ -5,7 +5,7 @@ import "../../../index.js";
|
|
|
5
5
|
import { Address } from "viem";
|
|
6
6
|
//#region src/onchain/accounts/intents/utils/ledger.d.ts
|
|
7
7
|
/** Account state at one point in an operation chain. */
|
|
8
|
-
interface LedgerSnapshot {
|
|
8
|
+
export interface LedgerSnapshot {
|
|
9
9
|
/** Non-zero balances only, lowercased, in insertion order. */
|
|
10
10
|
assets: Asset[];
|
|
11
11
|
/** Sum of `assets` priced in the underlying. */
|
|
@@ -22,7 +22,7 @@ interface LedgerSnapshot {
|
|
|
22
22
|
* a builder that re-simulated the chain from the start for every leg would be
|
|
23
23
|
* quadratic in the number of legs and easy to desynchronise.
|
|
24
24
|
*/
|
|
25
|
-
declare class OperationLedger {
|
|
25
|
+
export declare class OperationLedger {
|
|
26
26
|
#private;
|
|
27
27
|
constructor(args: {
|
|
28
28
|
initialAssets: readonly Asset[] | Asset[];
|
|
@@ -37,5 +37,4 @@ declare class OperationLedger {
|
|
|
37
37
|
/** Advances the state by one operation; quota changes move no balance. */
|
|
38
38
|
apply(op: AccountCalculatorOperation): this;
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
|
-
export { LedgerSnapshot, OperationLedger };
|
|
40
|
+
//#endregion
|
|
@@ -11,7 +11,7 @@ import { Address } from "viem";
|
|
|
11
11
|
* `TokensMeta.isPhantomToken`, which throws when extended token data has not
|
|
12
12
|
* been loaded. Here an unknown token is simply treated as non-phantom.
|
|
13
13
|
*/
|
|
14
|
-
declare function isPhantomToken(sdk: OnchainSDK, token: Address): boolean;
|
|
14
|
+
export declare function isPhantomToken(sdk: OnchainSDK, token: Address): boolean;
|
|
15
15
|
/**
|
|
16
16
|
* Whether `token` is the phantom of a redemption in flight, rather than one of
|
|
17
17
|
* the phantoms a position is simply held in (Convex, Infrared, staking
|
|
@@ -20,8 +20,8 @@ declare function isPhantomToken(sdk: OnchainSDK, token: Address): boolean;
|
|
|
20
20
|
* Only the former stands between an account and being emptied: it cannot be
|
|
21
21
|
* sold and it cannot leave until its claim has landed.
|
|
22
22
|
*/
|
|
23
|
-
declare function isRedemptionPhantomToken(sdk: OnchainSDK, token: Address): boolean;
|
|
24
|
-
interface CandidateToken {
|
|
23
|
+
export declare function isRedemptionPhantomToken(sdk: OnchainSDK, token: Address): boolean;
|
|
24
|
+
export interface CandidateToken {
|
|
25
25
|
token: Address;
|
|
26
26
|
balance: bigint;
|
|
27
27
|
/** Balance priced in the market underlying, used for the ranking. */
|
|
@@ -33,7 +33,7 @@ interface CandidateToken {
|
|
|
33
33
|
* Phantoms are dropped because a pending delayed withdrawal cannot be spent:
|
|
34
34
|
* it has to be claimed first, in a transaction of its own.
|
|
35
35
|
*/
|
|
36
|
-
declare function rankAccountTokens(args: {
|
|
36
|
+
export declare function rankAccountTokens(args: {
|
|
37
37
|
creditAccount: CreditAccountSlice;
|
|
38
38
|
sdk: OnchainSDK;
|
|
39
39
|
/** Tokens to skip, e.g. the operation's own target. */
|
|
@@ -46,10 +46,9 @@ declare function rankAccountTokens(args: {
|
|
|
46
46
|
* Used for the source of a partial withdraw and the position leg of a leverage
|
|
47
47
|
* adjustment, both of which the caller may override explicitly.
|
|
48
48
|
*/
|
|
49
|
-
declare function pickFattestNonPhantomToken(args: {
|
|
49
|
+
export declare function pickFattestNonPhantomToken(args: {
|
|
50
50
|
creditAccount: CreditAccountSlice;
|
|
51
51
|
sdk: OnchainSDK;
|
|
52
52
|
exclude?: Address[];
|
|
53
53
|
}): CandidateToken | undefined;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { CandidateToken, isPhantomToken, isRedemptionPhantomToken, pickFattestNonPhantomToken, rankAccountTokens };
|
|
54
|
+
//#endregion
|
|
@@ -7,7 +7,7 @@ import "../../../index.js";
|
|
|
7
7
|
import { Address } from "viem";
|
|
8
8
|
//#region src/onchain/accounts/intents/utils/price-impact.d.ts
|
|
9
9
|
/** One leg's contribution to the preview's impact. */
|
|
10
|
-
interface LegProbe {
|
|
10
|
+
export interface LegProbe {
|
|
11
11
|
tokenOut: Address;
|
|
12
12
|
/**
|
|
13
13
|
* The real route's `amount`, never its `minAmount`: the floor is a tolerance
|
|
@@ -20,7 +20,7 @@ interface LegProbe {
|
|
|
20
20
|
probe: Promise<bigint | undefined>;
|
|
21
21
|
}
|
|
22
22
|
/** Fires the marginal-price quote for one leg; `undefined` if it cannot be measured. */
|
|
23
|
-
declare function startProbe(args: {
|
|
23
|
+
export declare function startProbe(args: {
|
|
24
24
|
basket: Asset[];
|
|
25
25
|
tokenOut: Address;
|
|
26
26
|
oracle: IPriceOracleContract;
|
|
@@ -30,7 +30,7 @@ declare function startProbe(args: {
|
|
|
30
30
|
* In `PERCENTAGE_FACTOR_1KK` (1_000_000 = 100%), negative for a loss. A base
|
|
31
31
|
* that is not positive falls back to the routed output.
|
|
32
32
|
*/
|
|
33
|
-
declare function lossRate(args: {
|
|
33
|
+
export declare function lossRate(args: {
|
|
34
34
|
lossUnd: bigint;
|
|
35
35
|
expectedUnd: bigint;
|
|
36
36
|
totalValue: bigint;
|
|
@@ -42,12 +42,11 @@ declare function lossRate(args: {
|
|
|
42
42
|
* All or nothing: a partial sum would understate the loss and draw a better
|
|
43
43
|
* price than the route offers.
|
|
44
44
|
*/
|
|
45
|
-
declare function collectPriceImpact(probes: LegProbe[], ctx: {
|
|
45
|
+
export declare function collectPriceImpact(probes: LegProbe[], ctx: {
|
|
46
46
|
totalValue: bigint;
|
|
47
47
|
netValue: bigint;
|
|
48
48
|
/** Oracle conversion rounded up, as in safeConvert. */
|
|
49
49
|
toUnderlying: (from: Address, amount: bigint) => bigint;
|
|
50
50
|
toUnderlyingAmount: (value: bigint) => TokenAmount;
|
|
51
51
|
}): Promise<PathLossRate | undefined>;
|
|
52
|
-
//#endregion
|
|
53
|
-
export { LegProbe, collectPriceImpact, lossRate, startProbe };
|
|
52
|
+
//#endregion
|
|
@@ -22,9 +22,8 @@ interface Quota {
|
|
|
22
22
|
limit: bigint;
|
|
23
23
|
isActive: boolean;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
assetsAfter: Asset[];
|
|
25
|
+
/** The market inputs every quota sizing reads. */
|
|
26
|
+
interface QuotaSizingProps {
|
|
28
27
|
initialQuotas: Array<InitialQuota> | readonly InitialQuota[];
|
|
29
28
|
quotaReserve: number | undefined;
|
|
30
29
|
underlyingToken: Address;
|
|
@@ -33,6 +32,16 @@ interface GetQuotasForUpdateProps {
|
|
|
33
32
|
maxDebt: bigint;
|
|
34
33
|
convert: ConvertFn;
|
|
35
34
|
}
|
|
35
|
+
interface GetQuotasForUpdateProps extends QuotaSizingProps {
|
|
36
|
+
assetsBefore: Asset[] | readonly Asset[];
|
|
37
|
+
assetsAfter: Asset[];
|
|
38
|
+
}
|
|
39
|
+
export interface ResizedQuotaProps extends QuotaSizingProps {
|
|
40
|
+
/** The one token whose quota is sized. */
|
|
41
|
+
token: Address;
|
|
42
|
+
/** What the account holds; `token`'s balance is what the quota is sized to. */
|
|
43
|
+
assets: Asset[] | readonly Asset[];
|
|
44
|
+
}
|
|
36
45
|
interface QuotaIncreaseLimitProps {
|
|
37
46
|
suite: CreditSuite;
|
|
38
47
|
token: Address;
|
|
@@ -41,7 +50,16 @@ interface QuotaIncreaseLimitProps {
|
|
|
41
50
|
quotaReserve?: number;
|
|
42
51
|
rwaAsset?: Address;
|
|
43
52
|
}
|
|
44
|
-
declare function getQuotasForUpdate(
|
|
53
|
+
export declare function getQuotasForUpdate(props: GetQuotasForUpdateProps): QuotaUpdateState;
|
|
54
|
+
/**
|
|
55
|
+
* The update that sizes one token's quota to the balance the account holds of
|
|
56
|
+
* it, whatever moved.
|
|
57
|
+
*
|
|
58
|
+
* Sits beside {@link getQuotasForUpdate} because that one only resizes what an
|
|
59
|
+
* operation spent or obtained, and an operation that changes a quota alone
|
|
60
|
+
* moves no balance at all.
|
|
61
|
+
*/
|
|
62
|
+
export declare function resizedQuota(props: ResizedQuotaProps): QuotaUpdateState;
|
|
45
63
|
/**
|
|
46
64
|
* The update that leaves the account holding no quota at all.
|
|
47
65
|
*
|
|
@@ -53,13 +71,13 @@ declare function getQuotasForUpdate({ assetsBefore, assetsAfter, initialQuotas,
|
|
|
53
71
|
* `MIN_INT96` is the protocol's "reset" sentinel, which is how a decrease says
|
|
54
72
|
* "all of it" instead of naming an amount that interest may have moved.
|
|
55
73
|
*/
|
|
56
|
-
declare function clearedQuotas(initialQuotas: Array<InitialQuota> | readonly InitialQuota[]): QuotaUpdateState;
|
|
74
|
+
export declare function clearedQuotas(initialQuotas: Array<InitialQuota> | readonly InitialQuota[]): QuotaUpdateState;
|
|
57
75
|
/**
|
|
58
76
|
* Raises `directTransfer`'s quota to at least {@link DIRECT_TRANSFERS_QUOTA};
|
|
59
77
|
* skips a token absent from the credit manager, one the pool can't quote, or
|
|
60
78
|
* one the account has no free enabled token slot for.
|
|
61
79
|
*/
|
|
62
|
-
declare function withDirectTransferQuota(update: QuotaUpdateState, directTransfer: Address | undefined, initialQuotas: Array<InitialQuota> | readonly InitialQuota[], quotas: AddressMap<Quota>, maxEnabledTokens: number, collateralTokens: readonly Address[]): QuotaUpdateState;
|
|
80
|
+
export declare function withDirectTransferQuota(update: QuotaUpdateState, directTransfer: Address | undefined, initialQuotas: Array<InitialQuota> | readonly InitialQuota[], quotas: AddressMap<Quota>, maxEnabledTokens: number, collateralTokens: readonly Address[]): QuotaUpdateState;
|
|
63
81
|
/**
|
|
64
82
|
* The quotas the account stands at once an update lands: the ones it came with,
|
|
65
83
|
* with the ones the update names written over them.
|
|
@@ -69,8 +87,8 @@ declare function withDirectTransferQuota(update: QuotaUpdateState, directTransfe
|
|
|
69
87
|
* so the update alone is not the account's quota set. Quotas that end at zero
|
|
70
88
|
* are dropped: a token with no quota is a token the account is not quoted for.
|
|
71
89
|
*/
|
|
72
|
-
declare function quotasAfterUpdate(initialQuotas: Array<InitialQuota> | readonly InitialQuota[], desiredQuota: Record<Address, Asset>): Record<Address, Asset>;
|
|
90
|
+
export declare function quotasAfterUpdate(initialQuotas: Array<InitialQuota> | readonly InitialQuota[], desiredQuota: Record<Address, Asset>): Record<Address, Asset>;
|
|
73
91
|
/** Largest additional underlying amount whose purchase fits this token's quota. */
|
|
74
|
-
declare function quotaIncreaseLimit({ suite, token, balance, initialQuotas, quotaReserve, rwaAsset }: QuotaIncreaseLimitProps): SafeValue<bigint | undefined, UnpriceableTokenError>;
|
|
92
|
+
export declare function quotaIncreaseLimit({ suite, token, balance, initialQuotas, quotaReserve, rwaAsset }: QuotaIncreaseLimitProps): SafeValue<bigint | undefined, UnpriceableTokenError>;
|
|
75
93
|
//#endregion
|
|
76
|
-
export {
|
|
94
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { LegProbe } from "./price-impact.js";
|
|
|
7
7
|
import { Address } from "viem";
|
|
8
8
|
//#region src/onchain/accounts/intents/utils/router-path.d.ts
|
|
9
9
|
/** One routed conversion leg. */
|
|
10
|
-
interface SwapLeg {
|
|
10
|
+
export interface SwapLeg {
|
|
11
11
|
/** Expected output amount. */
|
|
12
12
|
amount: bigint;
|
|
13
13
|
/** Conservative output — the pathfinder floor after slippage. */
|
|
@@ -23,13 +23,13 @@ interface SwapLeg {
|
|
|
23
23
|
probe: LegProbe | undefined;
|
|
24
24
|
}
|
|
25
25
|
/** A routed leg that also projects the balances it leaves behind. */
|
|
26
|
-
interface OpenStrategyLeg extends SwapLeg {
|
|
26
|
+
export interface OpenStrategyLeg extends SwapLeg {
|
|
27
27
|
/** Expected balances after the swap, per token. */
|
|
28
28
|
balances: Record<Address, bigint>;
|
|
29
29
|
/** Floor balances after slippage. */
|
|
30
30
|
minBalances: Record<Address, bigint>;
|
|
31
31
|
}
|
|
32
|
-
interface RouterPaths {
|
|
32
|
+
export interface RouterPaths {
|
|
33
33
|
/**
|
|
34
34
|
* Spends exactly `amount` of `tokenIn`.
|
|
35
35
|
*
|
|
@@ -67,7 +67,7 @@ interface RouterPaths {
|
|
|
67
67
|
* The engine's only door to the pathfinder, and the only quoter whose legs can
|
|
68
68
|
* be sent. {@link createOraclePaths} is the twin for a walk that only projects.
|
|
69
69
|
*/
|
|
70
|
-
declare function createRouterPaths(args: {
|
|
70
|
+
export declare function createRouterPaths(args: {
|
|
71
71
|
sdk: OnchainSDK;
|
|
72
72
|
creditAccount: CreditAccountSlice;
|
|
73
73
|
slippage: number;
|
|
@@ -82,9 +82,8 @@ declare function createRouterPaths(args: {
|
|
|
82
82
|
* all a projection days out can honestly be — and the walk yields a state
|
|
83
83
|
* rather than a transaction.
|
|
84
84
|
*/
|
|
85
|
-
declare function createOraclePaths(args: {
|
|
85
|
+
export declare function createOraclePaths(args: {
|
|
86
86
|
sdk: OnchainSDK;
|
|
87
87
|
creditAccount: CreditAccountSlice;
|
|
88
88
|
}): RouterPaths;
|
|
89
|
-
//#endregion
|
|
90
|
-
export { OpenStrategyLeg, RouterPaths, SwapLeg, createOraclePaths, createRouterPaths };
|
|
89
|
+
//#endregion
|
|
@@ -10,6 +10,5 @@ import { AccountView } from "./plan.js";
|
|
|
10
10
|
* TVL uses the market oracle: an unpriceable token contributes 0n rather
|
|
11
11
|
* than throwing.
|
|
12
12
|
*/
|
|
13
|
-
declare function accountView(creditAccount: CreditAccountSlice, sdk: OnchainSDK): AccountView;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { accountView };
|
|
13
|
+
export declare function accountView(creditAccount: CreditAccountSlice, sdk: OnchainSDK): AccountView;
|
|
14
|
+
//#endregion
|
|
@@ -3,7 +3,7 @@ import { CreditAccountSlice, WithdrawCeilings } from "./types.js";
|
|
|
3
3
|
import "../../index.js";
|
|
4
4
|
import { Address } from "viem";
|
|
5
5
|
//#region src/onchain/accounts/intents/withdraw-limits.d.ts
|
|
6
|
-
interface WithdrawLimitsProps {
|
|
6
|
+
export interface WithdrawLimitsProps {
|
|
7
7
|
creditAccount: CreditAccountSlice;
|
|
8
8
|
sdk: OnchainSDK;
|
|
9
9
|
/**
|
|
@@ -32,8 +32,8 @@ interface WithdrawLimitsProps {
|
|
|
32
32
|
* collateral the withdrawal would be funded from
|
|
33
33
|
* @returns The three limits, see {@link WithdrawCeilings}
|
|
34
34
|
**/
|
|
35
|
-
declare function withdrawLimits(props: WithdrawLimitsProps): WithdrawCeilings;
|
|
36
|
-
interface MaxSafeWithdrawalProps {
|
|
35
|
+
export declare function withdrawLimits(props: WithdrawLimitsProps): WithdrawCeilings;
|
|
36
|
+
export interface MaxSafeWithdrawalProps {
|
|
37
37
|
creditAccount: CreditAccountSlice;
|
|
38
38
|
sdk: OnchainSDK;
|
|
39
39
|
/**
|
|
@@ -82,6 +82,5 @@ interface MaxSafeWithdrawalProps {
|
|
|
82
82
|
* when the account already sits below `targetHF` at safe prices, and only the
|
|
83
83
|
* exit is left
|
|
84
84
|
**/
|
|
85
|
-
declare function maxSafeWithdrawal(props: MaxSafeWithdrawalProps): bigint;
|
|
86
|
-
//#endregion
|
|
87
|
-
export { MaxSafeWithdrawalProps, WithdrawLimitsProps, maxSafeWithdrawal, withdrawLimits };
|
|
85
|
+
export declare function maxSafeWithdrawal(props: MaxSafeWithdrawalProps): bigint;
|
|
86
|
+
//#endregion
|