@gearbox-protocol/sdk 17.13.0-next.4 → 17.13.0-next.6
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/model/errors/index.js +1 -0
- package/dist/cjs/model/errors/liquidation-errors.js +9 -0
- package/dist/cjs/model/index.js +1 -0
- package/dist/cjs/model/liquidations.schema.js +2 -1
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +0 -37
- package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +116 -20
- 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 +7 -11
- package/dist/cjs/onchain/base/TokensMeta.js +15 -0
- package/dist/cjs/onchain/index.js +2 -0
- package/dist/cjs/onchain/validation/bundles/checkLiquidationEligibility.js +7 -1
- package/dist/cjs/onchain/validation/bundles/checkLiquidationFunding.js +2 -1
- package/dist/cjs/onchain/validation/checkLiquidation.js +2 -1
- package/dist/cjs/onchain/validation/checks/checkPartiallyLiquidatable.js +13 -0
- package/dist/cjs/onchain/validation/checks/index.js +2 -0
- package/dist/cjs/onchain/validation/index.js +2 -0
- package/dist/cjs/sdk/liquidations/LiquidationsNamespace.js +14 -0
- package/dist/esm/dev/mint/index.js +1 -2
- package/dist/esm/model/errors/index.js +2 -2
- package/dist/esm/model/errors/liquidation-errors.js +9 -1
- package/dist/esm/model/index.js +2 -2
- package/dist/esm/model/liquidations.schema.js +2 -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/liquidations/LiquidationsService.js +116 -20
- 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 +7 -11
- package/dist/esm/onchain/base/TokensMeta.js +15 -0
- package/dist/esm/onchain/index.js +2 -1
- package/dist/esm/onchain/market/adapters/abi/midas/index.js +1 -2
- package/dist/esm/onchain/pools/index.js +1 -2
- package/dist/esm/onchain/utils/internal/index.js +1 -2
- package/dist/esm/onchain/validation/bundles/checkLiquidationEligibility.js +7 -1
- package/dist/esm/onchain/validation/bundles/checkLiquidationFunding.js +2 -1
- package/dist/esm/onchain/validation/checkLiquidation.js +2 -1
- package/dist/esm/onchain/validation/checks/checkPartiallyLiquidatable.js +12 -0
- package/dist/esm/onchain/validation/checks/index.js +2 -1
- package/dist/esm/onchain/validation/index.js +2 -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/preview/index.js +1 -2
- 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/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/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 +11 -12
- package/dist/types/model/analytics.schema.d.ts +13 -14
- 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 +2 -2
- package/dist/types/model/errors/liquidation-errors.d.ts +20 -8
- package/dist/types/model/errors/operation-errors.d.ts +44 -45
- 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 +2 -2
- package/dist/types/model/liquidations.d.ts +29 -18
- package/dist/types/model/liquidations.schema.d.ts +10 -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 +31 -32
- package/dist/types/model/opportunities.schema.d.ts +26 -27
- package/dist/types/model/positions.d.ts +29 -30
- package/dist/types/model/positions.schema.d.ts +22 -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 +2 -3
- package/dist/types/offchain/analytics/types.d.ts +3 -4
- 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 +8 -8
- 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 +5 -5
- 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 +28 -28
- package/dist/types/onchain/accounts/intents/plan.d.ts +18 -19
- package/dist/types/onchain/accounts/intents/realize.d.ts +4 -5
- package/dist/types/onchain/accounts/intents/resolveQuotaUpdate.d.ts +4 -5
- 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 +12 -13
- 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 +30 -31
- 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/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 +8 -8
- 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 +32 -15
- 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 +7 -8
- package/dist/types/onchain/accounts/liquidations/skipLiquidatableAccount.d.ts +2 -3
- package/dist/types/onchain/accounts/liquidations/types.d.ts +140 -27
- 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/math.d.ts +21 -22
- 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 +8 -7
- package/dist/types/onchain/market/MarketConfiguratorContract.d.ts +2 -2
- package/dist/types/onchain/market/MarketRegister.d.ts +4 -5
- package/dist/types/onchain/market/MarketSuite.d.ts +2 -3
- package/dist/types/onchain/market/ZapperRegister.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/actionAbi.d.ts +4 -5
- package/dist/types/onchain/market/adapters/abi/adapters/erc4626ReferralAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iBalancerV3WrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCamelotV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BaseRewardPoolAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iConvexV1BoosterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1StableNgAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_2AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_3AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iCurveV1_4AssetsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iDaiUsdsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iFluidDexAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiGatewayAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iInfinifiUnwindingGateway.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtDepositPool.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iKelpLrtWithdrawalManager.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iLidoV1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellow4626VaultAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowClaimerAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMellowWrapperAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasIssuanceVaultAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iMidasRedemptionVaultAdapterV310.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iPendleRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeOnRampAdapterV310.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iSecuritizeRedemptionGatewayAdapterV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iStakingRewardsAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iTraderJoeRouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV2Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV3Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iUniswapV4Adapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iUpshiftVaultAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/abi/adapters/iVelodromeV2RouterAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/iwstEthv1Adapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/adapters/mellowDvvAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbi.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/conctructorAbiPatterns.d.ts +12 -13
- package/dist/types/onchain/market/adapters/abi/midas/iMidasGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iBaseOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeOnRamp.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.d.ts +2 -3
- package/dist/types/onchain/market/adapters/abi/targetContractAbi.d.ts +29 -30
- package/dist/types/onchain/market/adapters/abi/utils.d.ts +7 -8
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +4 -5
- package/dist/types/onchain/market/adapters/contracts/AbstractCurveAdapter.d.ts +2 -3
- package/dist/types/onchain/market/adapters/contracts/AccountMigratorAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CamelotV3AdapterContract.d.ts +3 -3
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve2AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve3AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/Curve4AssetsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1AdapterStETHContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/DaiUsdsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/FluidDexAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/LidoV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowClaimerAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowDVVAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MellowWrapperAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/PendleRouterAdapterContract.d.ts +5 -5
- package/dist/types/onchain/market/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/StakingRewardsAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +4 -4
- package/dist/types/onchain/market/adapters/contracts/UniswapV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV3AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UniswapV4AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/UpshiftVaultAdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/VelodromeV2AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/contracts/WstETHV1AdapterContract.d.ts +2 -2
- package/dist/types/onchain/market/adapters/createAdapter.d.ts +3 -4
- package/dist/types/onchain/market/adapters/legacyAdapterOperations.d.ts +27 -28
- package/dist/types/onchain/market/adapters/transferHelpers.d.ts +10 -11
- package/dist/types/onchain/market/adapters/transfers.d.ts +2 -3
- package/dist/types/onchain/market/adapters/types.d.ts +9 -10
- package/dist/types/onchain/market/credit/CreditConfiguratorV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditFacadeV310BaseContract.d.ts +2 -2
- package/dist/types/onchain/market/credit/CreditFacadeV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditManagerV310Contract.d.ts +3 -3
- package/dist/types/onchain/market/credit/CreditSuite.d.ts +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 +3 -4
- 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 +5 -6
- 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 +3 -4
- 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/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 +3 -4
- package/dist/types/onchain/validation/checks/checkPartiallyLiquidatable.d.ts +15 -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 +3 -4
- package/dist/types/onchain/validation/checks/checkQuotaChange.d.ts +3 -4
- 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 +2 -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 +2 -1
- package/dist/types/onchain/validation/raise.d.ts +4 -5
- 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 +8 -9
- 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 +3 -4
- package/dist/types/sdk/prepare/types.d.ts +33 -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
|
@@ -27,9 +27,9 @@ import "../../index.js";
|
|
|
27
27
|
* The facade takes no multicall while it is paused or past its expiration, so
|
|
28
28
|
* every intent the engine previews would revert on arrival.
|
|
29
29
|
*/
|
|
30
|
-
declare function assertMarketOperable(suite: CreditSuite): void;
|
|
30
|
+
export declare function assertMarketOperable(suite: CreditSuite): void;
|
|
31
31
|
/** The pool has to be able to lend what the plan means to draw. */
|
|
32
|
-
declare function assertCanBorrow(sdk: OnchainSDK, suite: CreditSuite, amount: bigint, options?: OperationLimitOptions): void;
|
|
32
|
+
export declare function assertCanBorrow(sdk: OnchainSDK, suite: CreditSuite, amount: bigint, options?: OperationLimitOptions): void;
|
|
33
33
|
interface GrowthAllowedProps {
|
|
34
34
|
sdk: OnchainSDK;
|
|
35
35
|
suite: CreditSuite;
|
|
@@ -50,7 +50,7 @@ interface GrowthAllowedProps {
|
|
|
50
50
|
* The underlying answers to neither rule, and a phantom token is a redemption
|
|
51
51
|
* in flight rather than a holding.
|
|
52
52
|
*/
|
|
53
|
-
declare function assertGrowthAllowed(args: GrowthAllowedProps): void;
|
|
53
|
+
export declare function assertGrowthAllowed(args: GrowthAllowedProps): void;
|
|
54
54
|
/**
|
|
55
55
|
* The facade weighs the account against its debt at the end of every multicall
|
|
56
56
|
* and reverts if the collateral does not cover it, so a plan that lands the
|
|
@@ -81,7 +81,7 @@ declare function assertGrowthAllowed(args: GrowthAllowedProps): void;
|
|
|
81
81
|
* whose reserve feed the SDK cannot read keeps its main price, so a plan can
|
|
82
82
|
* still be refused on-chain after passing here.
|
|
83
83
|
*/
|
|
84
|
-
declare function assertCollateralised(healthFactorBps: number, safePrices: boolean, atSafePrices?: SafePriceEvidence): void;
|
|
84
|
+
export declare function assertCollateralised(healthFactorBps: number, safePrices: boolean, atSafePrices?: SafePriceEvidence): void;
|
|
85
85
|
/**
|
|
86
86
|
* What tells a reserve feed marking collateral down apart from a position that
|
|
87
87
|
* is simply too small, read only when the collateral check has already failed.
|
|
@@ -90,7 +90,7 @@ declare function assertCollateralised(healthFactorBps: number, safePrices: boole
|
|
|
90
90
|
* second time at the main feed, and the check solved for the amount that would
|
|
91
91
|
* still clear it.
|
|
92
92
|
*/
|
|
93
|
-
type SafePriceEvidence = () => {
|
|
93
|
+
export type SafePriceEvidence = () => {
|
|
94
94
|
/** The plan's end state weighed at the main feed. */
|
|
95
95
|
atMainPrices: Bps;
|
|
96
96
|
/** What the account can still take out, in the market's underlying. */
|
|
@@ -100,6 +100,6 @@ type SafePriceEvidence = () => {
|
|
|
100
100
|
* A quota can only be raised as far as the market still has room for: past the
|
|
101
101
|
* token's limit the keeper takes nothing more, whoever is asking.
|
|
102
102
|
*/
|
|
103
|
-
declare function assertQuotaAvailable(sdk: OnchainSDK, market: MarketSuite, increases: readonly Asset[], options?: OperationLimitOptions): void;
|
|
103
|
+
export declare function assertQuotaAvailable(sdk: OnchainSDK, market: MarketSuite, increases: readonly Asset[], options?: OperationLimitOptions): void;
|
|
104
104
|
//#endregion
|
|
105
|
-
export {
|
|
105
|
+
export {};
|
|
@@ -19,7 +19,7 @@ import { Address } from "viem";
|
|
|
19
19
|
* the same way, but the payload is its own: opening has no existing account, so
|
|
20
20
|
* there is no operation chain to report.
|
|
21
21
|
*/
|
|
22
|
-
type OpenStrategyPreviewResult = {
|
|
22
|
+
export type OpenStrategyPreviewResult = {
|
|
23
23
|
ok: true;
|
|
24
24
|
state: OpenStrategyState;
|
|
25
25
|
} | SDKError<RefusedIntent<OpenStrategyState>>;
|
|
@@ -27,7 +27,7 @@ type OpenStrategyPreviewResult = {
|
|
|
27
27
|
* Borrow preview outcome, shaped like {@link OpenStrategyPreviewResult}: both
|
|
28
28
|
* open an account, so neither has an operation chain to report.
|
|
29
29
|
*/
|
|
30
|
-
type BorrowPreviewResult = {
|
|
30
|
+
export type BorrowPreviewResult = {
|
|
31
31
|
ok: true;
|
|
32
32
|
state: BorrowState;
|
|
33
33
|
} | SDKError<RefusedIntent<BorrowState>>;
|
|
@@ -36,7 +36,7 @@ type BorrowPreviewResult = {
|
|
|
36
36
|
* that holds nothing has no state to project — only the market's own refusal
|
|
37
37
|
* to open one at all.
|
|
38
38
|
*/
|
|
39
|
-
type EmptyAccountPreviewResult = {
|
|
39
|
+
export type EmptyAccountPreviewResult = {
|
|
40
40
|
ok: true;
|
|
41
41
|
} | SDKError<IntentValidationError>;
|
|
42
42
|
/** An intent plus everything previewing it needs. */
|
|
@@ -50,7 +50,7 @@ type StartProps = StartIntentProps & {
|
|
|
50
50
|
* steps with pure arithmetic, `realize.ts` turns the steps into router-backed
|
|
51
51
|
* operations. This class only picks the planner and wraps the outcome.
|
|
52
52
|
*/
|
|
53
|
-
declare class CreditAccountOperationsService extends SDKConstruct {
|
|
53
|
+
export declare class CreditAccountOperationsService extends SDKConstruct {
|
|
54
54
|
#private;
|
|
55
55
|
/**
|
|
56
56
|
* Previews an operation on an existing account.
|
|
@@ -281,4 +281,4 @@ declare class CreditAccountOperationsService extends SDKConstruct {
|
|
|
281
281
|
borrowIntent(props: BorrowProps): Promise<BorrowPreviewResult>;
|
|
282
282
|
}
|
|
283
283
|
//#endregion
|
|
284
|
-
export { type AccountCalculatorOperation, type AddCollateralIntent, type AdjustLeverageIntent,
|
|
284
|
+
export { type AccountCalculatorOperation, type AddCollateralIntent, type AdjustLeverageIntent, type BorrowProps, type BorrowState, type ClaimRemainder, type CreditAccountSlice, type DelayableIntent, type DelayedRoute, type DelayedStart, type DelayedStartResult, type DepositStrategyIntent, type ExecutionCost, type FinishIntentProps, type FinishIntentResult, type InstantRoute, type IntentPreviewResult, type IntentRoutesResult, type LeverageBand, type OpenStrategyProps, type OpenStrategyState, type OperationState, type PathLossRate, type RefusedIntent, type RepayStrategyIntent, type ResumableIntent, type RouteErrors, type StartIntent, type UpdateQuotaIntent, type WithPartialState, type WithdrawAssetIntent, type WithdrawCeilings, type WithdrawStrategyIntent, fetchCreditAccountSlice, isPhantomToken, toCreditAccountSlice };
|
|
@@ -7,11 +7,11 @@ import "../../index.js";
|
|
|
7
7
|
import { Address } from "viem";
|
|
8
8
|
//#region src/onchain/accounts/intents/leverage-band.d.ts
|
|
9
9
|
/** The leverages a position of a given size can be opened at, or moved to. */
|
|
10
|
-
interface LeverageBand {
|
|
10
|
+
export interface LeverageBand {
|
|
11
11
|
readonly min: Leverage;
|
|
12
12
|
readonly max: Leverage;
|
|
13
13
|
}
|
|
14
|
-
interface LeverageBandProps {
|
|
14
|
+
export interface LeverageBandProps {
|
|
15
15
|
readonly sdk: OnchainSDK;
|
|
16
16
|
/** Credit manager the position lives in; every limit is read off it. */
|
|
17
17
|
readonly creditManager: Address;
|
|
@@ -55,6 +55,5 @@ interface LeverageBandProps {
|
|
|
55
55
|
* calcLeverageBand({ sdk, creditManager, collateral }) // { min: 1.1, max: 9 }
|
|
56
56
|
* ```
|
|
57
57
|
**/
|
|
58
|
-
declare function calcLeverageBand({ sdk, creditManager, collateral, targetHF, position }: LeverageBandProps): LeverageBand | undefined;
|
|
59
|
-
//#endregion
|
|
60
|
-
export { LeverageBand, LeverageBandProps, calcLeverageBand };
|
|
58
|
+
export declare function calcLeverageBand({ sdk, creditManager, collateral, targetHF, position }: LeverageBandProps): LeverageBand | undefined;
|
|
59
|
+
//#endregion
|
|
@@ -13,17 +13,17 @@ import { Address } from "viem";
|
|
|
13
13
|
* and `D = C · (L − 1)`.
|
|
14
14
|
*/
|
|
15
15
|
/** Debt and collateral of an account, both priced in the underlying. */
|
|
16
|
-
interface Position {
|
|
16
|
+
export interface Position {
|
|
17
17
|
debt: bigint;
|
|
18
18
|
collateral: bigint;
|
|
19
19
|
}
|
|
20
20
|
/** Facade `debtLimits`: a non-zero debt must sit in `[minDebt, maxDebt]`. */
|
|
21
|
-
interface DebtLimits {
|
|
21
|
+
export interface DebtLimits {
|
|
22
22
|
minDebt: bigint;
|
|
23
23
|
maxDebt: bigint;
|
|
24
24
|
}
|
|
25
25
|
/** Debt that realises `leverage` on `collateral`: `D = C · (L − 1)`. */
|
|
26
|
-
declare function debtForLeverage(collateral: bigint, leverage: bigint): bigint;
|
|
26
|
+
export declare function debtForLeverage(collateral: bigint, leverage: bigint): bigint;
|
|
27
27
|
/**
|
|
28
28
|
* Debt change that keeps leverage fixed while collateral moves by
|
|
29
29
|
* `collateralDelta`: `dD = D0 · dC / C0`.
|
|
@@ -31,7 +31,7 @@ declare function debtForLeverage(collateral: bigint, leverage: bigint): bigint;
|
|
|
31
31
|
* Computed on the ratio directly rather than by recovering `L` and reapplying
|
|
32
32
|
* it, so no rounding is introduced on the way.
|
|
33
33
|
*/
|
|
34
|
-
declare function proportionalDebt(position: Position, collateralDelta: bigint): bigint;
|
|
34
|
+
export declare function proportionalDebt(position: Position, collateralDelta: bigint): bigint;
|
|
35
35
|
/**
|
|
36
36
|
* Largest withdrawal (in underlying) that {@link proportionalDebt} can still
|
|
37
37
|
* pay for: the repayment it implies leaves debt at or above `minDebt` plus
|
|
@@ -41,9 +41,9 @@ declare function proportionalDebt(position: Position, collateralDelta: bigint):
|
|
|
41
41
|
*
|
|
42
42
|
* Solves `floor(D0 · W / C0) ≤ D0 − minDebt − margin` for `W`.
|
|
43
43
|
*/
|
|
44
|
-
declare function maxProportionalWithdrawal(position: Position, debtLimits: DebtLimits): bigint;
|
|
44
|
+
export declare function maxProportionalWithdrawal(position: Position, debtLimits: DebtLimits): bigint;
|
|
45
45
|
/** Total leverage cannot drop below 1x — that would be negative debt. */
|
|
46
|
-
declare function assertLeverageAtLeastOne(leverage: bigint): void;
|
|
46
|
+
export declare function assertLeverageAtLeastOne(leverage: bigint): void;
|
|
47
47
|
interface AssertDebtLimitsOptions extends OperationLimitOptions {
|
|
48
48
|
allowZero?: boolean;
|
|
49
49
|
maxBorrowAmount?: MaxBorrowAmount;
|
|
@@ -53,6 +53,6 @@ interface AssertDebtLimitsOptions extends OperationLimitOptions {
|
|
|
53
53
|
* `[minDebt, maxDebt]`. Zero is fine only `allowZero`-ing it: an adjustment
|
|
54
54
|
* may end owing nothing, an opening may not.
|
|
55
55
|
*/
|
|
56
|
-
declare function assertDebtLimits(sdk: OnchainSDK, debt: bigint, debtLimits: DebtLimits, underlying: Address, options?: AssertDebtLimitsOptions): void;
|
|
56
|
+
export declare function assertDebtLimits(sdk: OnchainSDK, debt: bigint, debtLimits: DebtLimits, underlying: Address, options?: AssertDebtLimitsOptions): void;
|
|
57
57
|
//#endregion
|
|
58
|
-
export {
|
|
58
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { OnchainSDK } from "../../OnchainSDK.js";
|
|
|
2
2
|
import "../../index.js";
|
|
3
3
|
import { Address } from "viem";
|
|
4
4
|
//#region src/onchain/accounts/intents/maxBorrow.d.ts
|
|
5
|
-
interface MaxBorrowProps {
|
|
5
|
+
export interface MaxBorrowProps {
|
|
6
6
|
sdk: OnchainSDK;
|
|
7
7
|
/** Credit manager the loan would be taken in. */
|
|
8
8
|
creditManager: Address;
|
|
@@ -51,6 +51,5 @@ interface MaxBorrowProps {
|
|
|
51
51
|
* shape exists at any size — a collateral that backs nothing at safe prices, a
|
|
52
52
|
* market with nothing left to lend, and a manager the SDK does not hold yet
|
|
53
53
|
**/
|
|
54
|
-
declare function maxBorrow(props: MaxBorrowProps): bigint;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { MaxBorrowProps, maxBorrow };
|
|
54
|
+
export declare function maxBorrow(props: MaxBorrowProps): bigint;
|
|
55
|
+
//#endregion
|
|
@@ -3,7 +3,7 @@ import { CreditAccountSlice } from "./types.js";
|
|
|
3
3
|
import "../../index.js";
|
|
4
4
|
import { Address } from "viem";
|
|
5
5
|
//#region src/onchain/accounts/intents/maxWithdrawCollateral.d.ts
|
|
6
|
-
interface MaxWithdrawCollateralProps {
|
|
6
|
+
export interface MaxWithdrawCollateralProps {
|
|
7
7
|
creditAccount: CreditAccountSlice;
|
|
8
8
|
sdk: OnchainSDK;
|
|
9
9
|
/** Collateral to withdraw. */
|
|
@@ -29,6 +29,5 @@ interface MaxWithdrawCollateralProps {
|
|
|
29
29
|
* including when the account is already below `targetHF`, or the target or the
|
|
30
30
|
* underlying has no price
|
|
31
31
|
**/
|
|
32
|
-
declare function maxWithdrawCollateral(props: MaxWithdrawCollateralProps): bigint;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { MaxWithdrawCollateralProps, maxWithdrawCollateral };
|
|
32
|
+
export declare function maxWithdrawCollateral(props: MaxWithdrawCollateralProps): bigint;
|
|
33
|
+
//#endregion
|
|
@@ -9,7 +9,7 @@ import "../../index.js";
|
|
|
9
9
|
import { Address } from "viem";
|
|
10
10
|
//#region src/onchain/accounts/intents/open-strategy.d.ts
|
|
11
11
|
/** Opening an account and putting a position on it in one transaction. */
|
|
12
|
-
interface OpenStrategyProps {
|
|
12
|
+
export interface OpenStrategyProps {
|
|
13
13
|
sdk: OnchainSDK;
|
|
14
14
|
/** Credit manager to open the account in. */
|
|
15
15
|
creditManager: Address;
|
|
@@ -45,7 +45,7 @@ interface OpenStrategyProps {
|
|
|
45
45
|
* hands back expected and floor balances from a single call, and `openCA` wants
|
|
46
46
|
* both `minQuota` and `averageQuota`, so there is nothing to gain by dropping one.
|
|
47
47
|
*/
|
|
48
|
-
interface OpenStrategyState extends Omit<AccountProjection, "assets" | "quotas">, SimulationPrices {
|
|
48
|
+
export interface OpenStrategyState extends Omit<AccountProjection, "assets" | "quotas">, SimulationPrices {
|
|
49
49
|
/** Expected post-open balances. */
|
|
50
50
|
averageAssets: TokenAmount[];
|
|
51
51
|
/** Floor post-open balances after slippage. */
|
|
@@ -84,6 +84,5 @@ interface OpenStrategyState extends Omit<AccountProjection, "assets" | "quotas">
|
|
|
84
84
|
* no operation list — the caller passes the numbers and calls straight to
|
|
85
85
|
* `sdk.accounts.openCA`.
|
|
86
86
|
*/
|
|
87
|
-
declare function buildOpenStrategyState(props: OpenStrategyProps): Promise<OpenStrategyState>;
|
|
88
|
-
//#endregion
|
|
89
|
-
export { OpenStrategyProps, OpenStrategyState, buildOpenStrategyState };
|
|
87
|
+
export declare function buildOpenStrategyState(props: OpenStrategyProps): Promise<OpenStrategyState>;
|
|
88
|
+
//#endregion
|
|
@@ -16,41 +16,41 @@ import { Address } from "viem";
|
|
|
16
16
|
* plus the quoted amounts the preview and the tests read, plus the RWA legs
|
|
17
17
|
* that come from their own assemblers rather than from `assembleCaOperations`.
|
|
18
18
|
*/
|
|
19
|
-
type AccountCalculatorOperation = AddCollateralOperation | IncreaseDebtOperation | DecreaseDebtOperation | SwapOperation | WithdrawCollateralOperation | QuotaUpdateOperation | WrapRwaCollateralOperation | UnwrapRwaCollateralOperation | StartDelayedWithdrawalOperation | ClaimDelayedWithdrawalOperation;
|
|
19
|
+
export type AccountCalculatorOperation = AddCollateralOperation | IncreaseDebtOperation | DecreaseDebtOperation | SwapOperation | WithdrawCollateralOperation | QuotaUpdateOperation | WrapRwaCollateralOperation | UnwrapRwaCollateralOperation | StartDelayedWithdrawalOperation | ClaimDelayedWithdrawalOperation;
|
|
20
20
|
/**
|
|
21
21
|
* Compile-time proof that the engine's operations really are the SDK's own
|
|
22
22
|
* encodable ones with the quoted amounts attached, so the two cannot drift into
|
|
23
23
|
* parallel vocabularies for the same facade calls.
|
|
24
24
|
*/
|
|
25
25
|
type Extends<A extends B, B> = A;
|
|
26
|
-
type _EngineOpsAreEncodable = Extends<Extract<AccountCalculatorOperation, {
|
|
26
|
+
export type _EngineOpsAreEncodable = Extends<Extract<AccountCalculatorOperation, {
|
|
27
27
|
type: EncodableCreditAccountOperation["type"];
|
|
28
28
|
}>, EncodableCreditAccountOperation>;
|
|
29
|
-
interface AddCollateralOperation {
|
|
29
|
+
export interface AddCollateralOperation {
|
|
30
30
|
type: "addCollateral";
|
|
31
31
|
token: Address;
|
|
32
32
|
amount: bigint;
|
|
33
33
|
value?: bigint;
|
|
34
34
|
calls: MultiCall[];
|
|
35
35
|
}
|
|
36
|
-
declare function buildAddCollateralOperation(input: {
|
|
36
|
+
export declare function buildAddCollateralOperation(input: {
|
|
37
37
|
token: Address;
|
|
38
38
|
amount: bigint;
|
|
39
39
|
value?: bigint;
|
|
40
40
|
creditAccount: CreditAccountSlice;
|
|
41
41
|
sdk: OnchainSDK;
|
|
42
42
|
}): AddCollateralOperation;
|
|
43
|
-
interface IncreaseDebtOperation {
|
|
43
|
+
export interface IncreaseDebtOperation {
|
|
44
44
|
type: "increaseDebt";
|
|
45
45
|
amount: bigint;
|
|
46
46
|
calls: MultiCall[];
|
|
47
47
|
}
|
|
48
|
-
declare function buildIncreaseDebtOperation(input: {
|
|
48
|
+
export declare function buildIncreaseDebtOperation(input: {
|
|
49
49
|
amount: bigint;
|
|
50
50
|
creditAccount: CreditAccountSlice;
|
|
51
51
|
sdk: OnchainSDK;
|
|
52
52
|
}): IncreaseDebtOperation;
|
|
53
|
-
interface DecreaseDebtOperation {
|
|
53
|
+
export interface DecreaseDebtOperation {
|
|
54
54
|
type: "decreaseDebt";
|
|
55
55
|
amount: bigint;
|
|
56
56
|
/**
|
|
@@ -62,13 +62,13 @@ interface DecreaseDebtOperation {
|
|
|
62
62
|
full?: boolean;
|
|
63
63
|
calls: MultiCall[];
|
|
64
64
|
}
|
|
65
|
-
declare function buildDecreaseDebtOperation(input: {
|
|
65
|
+
export declare function buildDecreaseDebtOperation(input: {
|
|
66
66
|
amount: bigint;
|
|
67
67
|
full?: boolean;
|
|
68
68
|
creditAccount: CreditAccountSlice;
|
|
69
69
|
sdk: OnchainSDK;
|
|
70
70
|
}): DecreaseDebtOperation;
|
|
71
|
-
interface WithdrawCollateralOperation {
|
|
71
|
+
export interface WithdrawCollateralOperation {
|
|
72
72
|
type: "withdrawCollateral";
|
|
73
73
|
token: Address;
|
|
74
74
|
amount: bigint;
|
|
@@ -82,7 +82,7 @@ interface WithdrawCollateralOperation {
|
|
|
82
82
|
all?: boolean;
|
|
83
83
|
calls: MultiCall[];
|
|
84
84
|
}
|
|
85
|
-
declare function buildWithdrawCollateralOperation(input: {
|
|
85
|
+
export declare function buildWithdrawCollateralOperation(input: {
|
|
86
86
|
token: Address;
|
|
87
87
|
amount: bigint;
|
|
88
88
|
to: Address;
|
|
@@ -91,7 +91,7 @@ declare function buildWithdrawCollateralOperation(input: {
|
|
|
91
91
|
sdk: OnchainSDK;
|
|
92
92
|
}): WithdrawCollateralOperation;
|
|
93
93
|
/** Routed conversion: one or more tokens in, one token out. */
|
|
94
|
-
interface SwapOperation {
|
|
94
|
+
export interface SwapOperation {
|
|
95
95
|
type: "swap";
|
|
96
96
|
from: Asset[];
|
|
97
97
|
tokenOut: Address;
|
|
@@ -99,7 +99,7 @@ interface SwapOperation {
|
|
|
99
99
|
calls: MultiCall[];
|
|
100
100
|
}
|
|
101
101
|
/** One routed leg, with the amounts it was quoted at. */
|
|
102
|
-
declare function buildSwapOperation(input: {
|
|
102
|
+
export declare function buildSwapOperation(input: {
|
|
103
103
|
tokenIn: Address;
|
|
104
104
|
amountIn: bigint;
|
|
105
105
|
tokenOut: Address;
|
|
@@ -110,21 +110,21 @@ declare function buildSwapOperation(input: {
|
|
|
110
110
|
* The many-to-one leg an exit routes: every balance listed goes in, and the
|
|
111
111
|
* underlying comes out.
|
|
112
112
|
*/
|
|
113
|
-
declare function buildCloseSwapOperation(input: {
|
|
113
|
+
export declare function buildCloseSwapOperation(input: {
|
|
114
114
|
from: Asset[];
|
|
115
115
|
tokenOut: Address;
|
|
116
116
|
amountOut: bigint;
|
|
117
117
|
calls: MultiCall[];
|
|
118
118
|
}): SwapOperation;
|
|
119
|
-
interface QuotaUpdateOperation {
|
|
119
|
+
export interface QuotaUpdateOperation {
|
|
120
120
|
type: "changeQuota";
|
|
121
121
|
desiredQuota: Record<Address, Asset>;
|
|
122
122
|
quotaIncrease: Asset[];
|
|
123
123
|
quotaDecrease: Asset[];
|
|
124
124
|
calls: MultiCall[];
|
|
125
125
|
}
|
|
126
|
-
type QuotaUpdateState = ReturnType<typeof calcQuotaUpdate>;
|
|
127
|
-
interface QuotaUpdateOperationInput {
|
|
126
|
+
export type QuotaUpdateState = ReturnType<typeof calcQuotaUpdate>;
|
|
127
|
+
export interface QuotaUpdateOperationInput {
|
|
128
128
|
update: QuotaUpdateState;
|
|
129
129
|
creditAccount: CreditAccountSlice;
|
|
130
130
|
sdk: OnchainSDK;
|
|
@@ -134,8 +134,8 @@ interface QuotaUpdateOperationInput {
|
|
|
134
134
|
*/
|
|
135
135
|
minQuota?: Asset[];
|
|
136
136
|
}
|
|
137
|
-
declare function buildQuotaUpdateOperation(input: QuotaUpdateOperationInput): QuotaUpdateOperation;
|
|
138
|
-
interface WrapRwaCollateralOperation {
|
|
137
|
+
export declare function buildQuotaUpdateOperation(input: QuotaUpdateOperationInput): QuotaUpdateOperation;
|
|
138
|
+
export interface WrapRwaCollateralOperation {
|
|
139
139
|
type: "wrapRwaCollateral";
|
|
140
140
|
/** Amount of RWA asset wrapped. */
|
|
141
141
|
amount: bigint;
|
|
@@ -146,7 +146,7 @@ interface WrapRwaCollateralOperation {
|
|
|
146
146
|
amountOut: bigint;
|
|
147
147
|
calls: MultiCall[];
|
|
148
148
|
}
|
|
149
|
-
interface UnwrapRwaCollateralOperation {
|
|
149
|
+
export interface UnwrapRwaCollateralOperation {
|
|
150
150
|
type: "unwrapRwaCollateral";
|
|
151
151
|
/** Amount of wrapped underlying unwrapped. */
|
|
152
152
|
amount: bigint;
|
|
@@ -157,7 +157,7 @@ interface UnwrapRwaCollateralOperation {
|
|
|
157
157
|
amountOut: bigint;
|
|
158
158
|
calls: MultiCall[];
|
|
159
159
|
}
|
|
160
|
-
interface RwaLegInput {
|
|
160
|
+
export interface RwaLegInput {
|
|
161
161
|
tokenIn: Address;
|
|
162
162
|
amountIn: bigint;
|
|
163
163
|
tokenOut: Address;
|
|
@@ -166,16 +166,16 @@ interface RwaLegInput {
|
|
|
166
166
|
sdk: OnchainSDK;
|
|
167
167
|
}
|
|
168
168
|
/** Wraps an RWA asset into the market underlying. */
|
|
169
|
-
declare function buildWrapRwaCollateralOperation(input: RwaLegInput): Promise<WrapRwaCollateralOperation>;
|
|
169
|
+
export declare function buildWrapRwaCollateralOperation(input: RwaLegInput): Promise<WrapRwaCollateralOperation>;
|
|
170
170
|
/** Unwraps the market underlying back into its RWA asset. */
|
|
171
|
-
declare function buildUnwrapRwaCollateralOperation(input: RwaLegInput & {
|
|
171
|
+
export declare function buildUnwrapRwaCollateralOperation(input: RwaLegInput & {
|
|
172
172
|
all?: boolean;
|
|
173
173
|
}): Promise<UnwrapRwaCollateralOperation>;
|
|
174
174
|
/**
|
|
175
175
|
* The request that starts a redemption: spends the source token and receives
|
|
176
176
|
* the phantom token standing in for the claim until it matures.
|
|
177
177
|
*/
|
|
178
|
-
interface StartDelayedWithdrawalOperation {
|
|
178
|
+
export interface StartDelayedWithdrawalOperation {
|
|
179
179
|
type: "startDelayedWithdrawal";
|
|
180
180
|
/** Source token the redemption is requested from. */
|
|
181
181
|
token: Address;
|
|
@@ -187,7 +187,7 @@ interface StartDelayedWithdrawalOperation {
|
|
|
187
187
|
settlement: "instant" | "delayed";
|
|
188
188
|
calls: MultiCall[];
|
|
189
189
|
}
|
|
190
|
-
declare function buildStartDelayedWithdrawalOperation(input: {
|
|
190
|
+
export declare function buildStartDelayedWithdrawalOperation(input: {
|
|
191
191
|
preview: RequestableWithdrawal;
|
|
192
192
|
creditAccount: CreditAccountSlice;
|
|
193
193
|
sdk: OnchainSDK;
|
|
@@ -196,7 +196,7 @@ declare function buildStartDelayedWithdrawalOperation(input: {
|
|
|
196
196
|
* The claim of a matured delayed withdrawal: burns the phantom and credits the
|
|
197
197
|
* outputs the compressor reports.
|
|
198
198
|
*/
|
|
199
|
-
interface ClaimDelayedWithdrawalOperation {
|
|
199
|
+
export interface ClaimDelayedWithdrawalOperation {
|
|
200
200
|
type: "claimDelayedWithdrawal";
|
|
201
201
|
/** Source token the delayed withdrawal was requested from. */
|
|
202
202
|
token: Address;
|
|
@@ -206,7 +206,7 @@ interface ClaimDelayedWithdrawalOperation {
|
|
|
206
206
|
outputs: WithdrawalOutput[];
|
|
207
207
|
calls: MultiCall[];
|
|
208
208
|
}
|
|
209
|
-
declare function buildClaimDelayedWithdrawalOperation(input: {
|
|
209
|
+
export declare function buildClaimDelayedWithdrawalOperation(input: {
|
|
210
210
|
claimable: ClaimableWithdrawal;
|
|
211
211
|
creditAccount: CreditAccountSlice;
|
|
212
212
|
sdk: OnchainSDK;
|
|
@@ -215,9 +215,9 @@ declare function buildClaimDelayedWithdrawalOperation(input: {
|
|
|
215
215
|
* What a request or a claim puts on the account right away, as opposed to what
|
|
216
216
|
* only the phantom token represents.
|
|
217
217
|
*/
|
|
218
|
-
declare function instantOutput(outputs: WithdrawalOutput[], token?: Address): {
|
|
218
|
+
export declare function instantOutput(outputs: WithdrawalOutput[], token?: Address): {
|
|
219
219
|
token: Address;
|
|
220
220
|
amount: bigint;
|
|
221
221
|
} | undefined;
|
|
222
222
|
//#endregion
|
|
223
|
-
export {
|
|
223
|
+
export {};
|
|
@@ -23,13 +23,13 @@ import { Address } from "viem";
|
|
|
23
23
|
* what lets one planner cover every "S is / is not the underlying" shape.
|
|
24
24
|
*/
|
|
25
25
|
/** Amount of a step: fixed, or whatever the previous step produced. */
|
|
26
|
-
type Amount = bigint | {
|
|
26
|
+
export type Amount = bigint | {
|
|
27
27
|
raised: true;
|
|
28
28
|
max?: bigint;
|
|
29
29
|
};
|
|
30
30
|
/** Whatever the previous convert produced. */
|
|
31
|
-
declare const RAISED: Amount;
|
|
32
|
-
type Step = {
|
|
31
|
+
export declare const RAISED: Amount;
|
|
32
|
+
export type Step = {
|
|
33
33
|
kind: "add";
|
|
34
34
|
token: Address;
|
|
35
35
|
amount: bigint;
|
|
@@ -110,7 +110,7 @@ type Step = {
|
|
|
110
110
|
quota: bigint | undefined;
|
|
111
111
|
};
|
|
112
112
|
/** What a planner is allowed to know about the account. */
|
|
113
|
-
interface AccountView {
|
|
113
|
+
export interface AccountView {
|
|
114
114
|
limits?: OperationLimitOptions;
|
|
115
115
|
underlying: Address;
|
|
116
116
|
/** The attached SDK, for the guards that inline a token into a refusal. */
|
|
@@ -128,13 +128,13 @@ interface AccountView {
|
|
|
128
128
|
fattest(exclude?: Address[]): Address | undefined;
|
|
129
129
|
}
|
|
130
130
|
/** Intent 5: the token lands as is; debt is untouched. */
|
|
131
|
-
declare function planAddCollateral(intent: Omit<AddCollateralIntent, "type">): Step[];
|
|
131
|
+
export declare function planAddCollateral(intent: Omit<AddCollateralIntent, "type">): Step[];
|
|
132
132
|
/** Intent 4: one asset out at fixed debt. */
|
|
133
|
-
declare function planWithdrawAsset(intent: Omit<WithdrawAssetIntent, "type">, view: AccountView): Step[];
|
|
133
|
+
export declare function planWithdrawAsset(intent: Omit<WithdrawAssetIntent, "type">, view: AccountView): Step[];
|
|
134
134
|
/** Intent 6: collateral fixed, debt retargeted to `C0 · (L1 − 1)`. */
|
|
135
|
-
declare function planAdjustLeverage(intent: Omit<AdjustLeverageIntent, "type">, view: AccountView): Step[];
|
|
135
|
+
export declare function planAdjustLeverage(intent: Omit<AdjustLeverageIntent, "type">, view: AccountView): Step[];
|
|
136
136
|
/** Intents 1.1 / 1.2: collateral grows by `a`, debt grows to match. */
|
|
137
|
-
declare function planDeposit(intent: Omit<DepositStrategyIntent, "type">, view: AccountView): Step[];
|
|
137
|
+
export declare function planDeposit(intent: Omit<DepositStrategyIntent, "type">, view: AccountView): Step[];
|
|
138
138
|
/**
|
|
139
139
|
* Intent 3: funding comes in from the wallet and goes straight into the debt.
|
|
140
140
|
* Collateral never moves, so the whole plan is the funding's way to `U`.
|
|
@@ -148,19 +148,19 @@ declare function planDeposit(intent: Omit<DepositStrategyIntent, "type">, view:
|
|
|
148
148
|
* still to come, since the facade is told to repay everything outstanding
|
|
149
149
|
* rather than the amount quoted here.
|
|
150
150
|
*/
|
|
151
|
-
declare function planRepay(intent: Omit<RepayStrategyIntent, "type">, view: AccountView): Step[];
|
|
151
|
+
export declare function planRepay(intent: Omit<RepayStrategyIntent, "type">, view: AccountView): Step[];
|
|
152
152
|
/**
|
|
153
153
|
* One token's quota changes; no balance moves and debt is untouched.
|
|
154
154
|
*
|
|
155
155
|
* Only a token the account holds can be quoted here, and only on an account
|
|
156
156
|
* that owes something: the facade refuses any quota change at zero debt.
|
|
157
157
|
*/
|
|
158
|
-
declare function planUpdateQuota(intent: Omit<UpdateQuotaIntent, "type">, view: AccountView): Step[];
|
|
158
|
+
export declare function planUpdateQuota(intent: Omit<UpdateQuotaIntent, "type">, view: AccountView): Step[];
|
|
159
159
|
/**
|
|
160
160
|
* Intent 2.1: `W` of value leaves, debt shrinks by `D0 · W / C0` so leverage
|
|
161
161
|
* holds. Both are funded by the source `S`.
|
|
162
162
|
*/
|
|
163
|
-
declare function planWithdraw(intent: Omit<WithdrawStrategyIntent, "type">, view: AccountView): Step[];
|
|
163
|
+
export declare function planWithdraw(intent: Omit<WithdrawStrategyIntent, "type">, view: AccountView): Step[];
|
|
164
164
|
/**
|
|
165
165
|
* Intent 2.1 against a source that cannot be sold on a DEX.
|
|
166
166
|
*
|
|
@@ -178,7 +178,7 @@ declare function planWithdraw(intent: Omit<WithdrawStrategyIntent, "type">, view
|
|
|
178
178
|
* it arrived in, known. An exit records {@link planFinishCloseAccount}'s intent
|
|
179
179
|
* instead, and rebuilds itself from the account rather than from the request.
|
|
180
180
|
*/
|
|
181
|
-
declare function planWithdrawDelayed(intent: Omit<WithdrawStrategyIntent, "type">, view: AccountView): Step[];
|
|
181
|
+
export declare function planWithdrawDelayed(intent: Omit<WithdrawStrategyIntent, "type">, view: AccountView): Step[];
|
|
182
182
|
/**
|
|
183
183
|
* Intent 6.2 against a position token that only redeems through its issuer.
|
|
184
184
|
*
|
|
@@ -186,9 +186,9 @@ declare function planWithdrawDelayed(intent: Omit<WithdrawStrategyIntent, "type"
|
|
|
186
186
|
* which settle at once. The request covers whatever idle underlying does not
|
|
187
187
|
* already, and the tail repays from the claim.
|
|
188
188
|
*/
|
|
189
|
-
declare function planAdjustLeverageDelayed(intent: Omit<AdjustLeverageIntent, "type">, view: AccountView): Step[];
|
|
189
|
+
export declare function planAdjustLeverageDelayed(intent: Omit<AdjustLeverageIntent, "type">, view: AccountView): Step[];
|
|
190
190
|
/** Everything claimed goes into the debt. */
|
|
191
|
-
declare function planFinishDecreaseLeverage(claimable: ClaimableWithdrawal, claimed: {
|
|
191
|
+
export declare function planFinishDecreaseLeverage(claimable: ClaimableWithdrawal, claimed: {
|
|
192
192
|
token: Address;
|
|
193
193
|
amount: bigint;
|
|
194
194
|
}, view: AccountView): Step[];
|
|
@@ -198,7 +198,7 @@ declare function planFinishDecreaseLeverage(claimable: ClaimableWithdrawal, clai
|
|
|
198
198
|
* bad quote shows as leverage a touch above target rather than as a wallet paid
|
|
199
199
|
* less than it was promised.
|
|
200
200
|
*/
|
|
201
|
-
declare function planFinishWithdraw(intent: {
|
|
201
|
+
export declare function planFinishWithdraw(intent: {
|
|
202
202
|
withdrawToken: Address;
|
|
203
203
|
withdrawAmount: bigint;
|
|
204
204
|
debtRepaid: bigint;
|
|
@@ -217,13 +217,12 @@ declare function planFinishWithdraw(intent: {
|
|
|
217
217
|
* builds for an instant exit is rebuilt here against the account as it stands
|
|
218
218
|
* now, which is the only state that can name these amounts.
|
|
219
219
|
*/
|
|
220
|
-
declare function planFinishCloseAccount(intent: {
|
|
220
|
+
export declare function planFinishCloseAccount(intent: {
|
|
221
221
|
to: Address;
|
|
222
222
|
}, claimable: ClaimableWithdrawal, claimed: {
|
|
223
223
|
token: Address;
|
|
224
224
|
amount: bigint;
|
|
225
225
|
}, view: AccountView): Step[];
|
|
226
226
|
/** Nothing is owed beyond the claim: the tokens land and quotas catch up. */
|
|
227
|
-
declare function planFinishClaimOnly(claimable: ClaimableWithdrawal): Step[];
|
|
228
|
-
//#endregion
|
|
229
|
-
export { AccountView, Amount, RAISED, Step, planAddCollateral, planAdjustLeverage, planAdjustLeverageDelayed, planDeposit, planFinishClaimOnly, planFinishCloseAccount, planFinishDecreaseLeverage, planFinishWithdraw, planRepay, planUpdateQuota, planWithdraw, planWithdrawAsset, planWithdrawDelayed };
|
|
227
|
+
export declare function planFinishClaimOnly(claimable: ClaimableWithdrawal): Step[];
|
|
228
|
+
//#endregion
|
|
@@ -8,7 +8,7 @@ import "../../index.js";
|
|
|
8
8
|
import { Step } from "./plan.js";
|
|
9
9
|
import { RouterPaths } from "./utils/router-path.js";
|
|
10
10
|
//#region src/onchain/accounts/intents/realize.d.ts
|
|
11
|
-
interface RealizeProps {
|
|
11
|
+
export interface RealizeProps {
|
|
12
12
|
limits?: OperationLimitOptions;
|
|
13
13
|
creditAccount: CreditAccountSlice;
|
|
14
14
|
sdk: OnchainSDK;
|
|
@@ -28,7 +28,7 @@ interface RealizeProps {
|
|
|
28
28
|
*/
|
|
29
29
|
draft?: Partial<OperationState>;
|
|
30
30
|
}
|
|
31
|
-
interface Realized {
|
|
31
|
+
export interface Realized {
|
|
32
32
|
operations: AccountCalculatorOperation[];
|
|
33
33
|
state: OperationState;
|
|
34
34
|
calls: MultiCall[];
|
|
@@ -45,6 +45,5 @@ interface Realized {
|
|
|
45
45
|
* exceeds the underlying actually raised. Once the walk is done the projected
|
|
46
46
|
* balances yield the quota update and the reported state.
|
|
47
47
|
*/
|
|
48
|
-
declare function realize(steps: Step[], props: RealizeProps): Promise<Realized>;
|
|
49
|
-
//#endregion
|
|
50
|
-
export { RealizeProps, Realized, realize };
|
|
48
|
+
export declare function realize(steps: Step[], props: RealizeProps): Promise<Realized>;
|
|
49
|
+
//#endregion
|
|
@@ -6,7 +6,7 @@ import { QuotaUpdateState } from "./operations.js";
|
|
|
6
6
|
import { CreditAccountSlice } from "./types.js";
|
|
7
7
|
import { Address } from "viem";
|
|
8
8
|
//#region src/onchain/accounts/intents/resolveQuotaUpdate.d.ts
|
|
9
|
-
interface ResolveQuotaUpdateProps {
|
|
9
|
+
export interface ResolveQuotaUpdateProps {
|
|
10
10
|
sdk: OnchainSDK;
|
|
11
11
|
creditAccount: Pick<CreditAccountSlice, "creditManager"> & {
|
|
12
12
|
tokens: ReadonlyArray<Pick<CreditAccountSlice["tokens"][number], "token" | "balance" | "quota">>;
|
|
@@ -17,7 +17,7 @@ interface ResolveQuotaUpdateProps {
|
|
|
17
17
|
quotaReserve: number | undefined;
|
|
18
18
|
limits?: OperationLimitOptions;
|
|
19
19
|
}
|
|
20
|
-
interface ResolvedQuotaUpdate {
|
|
20
|
+
export interface ResolvedQuotaUpdate {
|
|
21
21
|
update: QuotaUpdateState;
|
|
22
22
|
/** Passed to the facade as the quota the token must end at or above. */
|
|
23
23
|
minQuota: Asset[];
|
|
@@ -34,6 +34,5 @@ interface ResolvedQuotaUpdate {
|
|
|
34
34
|
* at the pool's available quota, and `minQuota` accepts a partial fill so long as the
|
|
35
35
|
* token stays enabled.
|
|
36
36
|
*/
|
|
37
|
-
declare function resolveQuotaUpdate(props: ResolveQuotaUpdateProps): ResolvedQuotaUpdate;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { ResolveQuotaUpdateProps, ResolvedQuotaUpdate, resolveQuotaUpdate };
|
|
37
|
+
export declare function resolveQuotaUpdate(props: ResolveQuotaUpdateProps): ResolvedQuotaUpdate;
|
|
38
|
+
//#endregion
|
|
@@ -28,6 +28,6 @@ interface LeverageLimitsProps extends AccountLimitsProps, AdjustLeverageIntent {
|
|
|
28
28
|
}
|
|
29
29
|
type StrategyLimitsProps = OpenLimitsProps | DepositLimitsProps | LeverageLimitsProps;
|
|
30
30
|
/** Independent input bounds supplied to debt, liquidity and quota errors. */
|
|
31
|
-
declare function strategyLimits(props: StrategyLimitsProps): OperationLimitOptions;
|
|
31
|
+
export declare function strategyLimits(props: StrategyLimitsProps): OperationLimitOptions;
|
|
32
32
|
//#endregion
|
|
33
|
-
export {
|
|
33
|
+
export {};
|
|
@@ -8,7 +8,7 @@ import "../../index.js";
|
|
|
8
8
|
import { AccountView, Step } from "./plan.js";
|
|
9
9
|
//#region src/onchain/accounts/intents/tail.d.ts
|
|
10
10
|
/** The steps a claim leads to, and what it left behind for a later one. */
|
|
11
|
-
interface TailPlan {
|
|
11
|
+
export interface TailPlan {
|
|
12
12
|
steps: Step[];
|
|
13
13
|
/** {@inheritDoc ClaimRemainder} */
|
|
14
14
|
remainder: ClaimRemainder | undefined;
|
|
@@ -25,7 +25,7 @@ interface TailPlan {
|
|
|
25
25
|
* see {@link partialTail}: the intent's withdrawal and its repayment are cut to the
|
|
26
26
|
* share that arrived, and the rest of both is handed to the next claim.
|
|
27
27
|
*/
|
|
28
|
-
declare function planTail(args: {
|
|
28
|
+
export declare function planTail(args: {
|
|
29
29
|
intent: ResumableIntent;
|
|
30
30
|
claimable: ClaimableWithdrawal;
|
|
31
31
|
view: AccountView;
|
|
@@ -58,9 +58,9 @@ interface ProjectTailProps {
|
|
|
58
58
|
* that would strand the account is refused before it is sent rather than
|
|
59
59
|
* discovered days later.
|
|
60
60
|
*/
|
|
61
|
-
declare function projectTail(args: ProjectTailProps): Promise<{
|
|
61
|
+
export declare function projectTail(args: ProjectTailProps): Promise<{
|
|
62
62
|
state: OperationState;
|
|
63
63
|
operations: AccountCalculatorOperation[];
|
|
64
64
|
}>;
|
|
65
65
|
//#endregion
|
|
66
|
-
export {
|
|
66
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { ANY, MarketSdkExtras, RWA_ASSET, UND } from "./market.js";
|
|
|
7
7
|
import { Address } from "viem";
|
|
8
8
|
//#region src/onchain/accounts/intents/testing/delayed.d.ts
|
|
9
9
|
declare const FIXTURE_PHANTOM: Address;
|
|
10
|
-
interface TailCase {
|
|
10
|
+
export interface TailCase {
|
|
11
11
|
claimedToken: Address;
|
|
12
12
|
claimedAmount: bigint;
|
|
13
13
|
postClaimTotalValue: bigint;
|
|
@@ -47,4 +47,4 @@ declare function buildFinishProps<T extends ResumableIntent>(args: {
|
|
|
47
47
|
slippage: undefined;
|
|
48
48
|
};
|
|
49
49
|
//#endregion
|
|
50
|
-
export { ANY, RWA_ASSET,
|
|
50
|
+
export { ANY, RWA_ASSET, UND };
|