@morpho-org/morpho-sdk 5.8.0 → 6.0.0-next.0

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.
Files changed (167) hide show
  1. package/MIGRATION-v5-to-v6.md +201 -0
  2. package/README.md +62 -40
  3. package/lib/cjs/abis.d.ts +543 -0
  4. package/lib/cjs/abis.js +738 -0
  5. package/lib/cjs/actions/blue/borrow.d.ts +62 -58
  6. package/lib/cjs/actions/blue/borrow.js +48 -80
  7. package/lib/cjs/actions/blue/common.d.ts +99 -0
  8. package/lib/cjs/actions/blue/common.js +318 -0
  9. package/lib/cjs/actions/blue/refinance.d.ts +72 -107
  10. package/lib/cjs/actions/blue/refinance.js +97 -197
  11. package/lib/cjs/actions/blue/repay.d.ts +72 -68
  12. package/lib/cjs/actions/blue/repay.js +56 -118
  13. package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +85 -90
  14. package/lib/cjs/actions/blue/repayWithdrawCollateral.js +148 -137
  15. package/lib/cjs/actions/blue/supply.d.ts +62 -45
  16. package/lib/cjs/actions/blue/supply.js +94 -70
  17. package/lib/cjs/actions/blue/supplyCollateral.d.ts +63 -40
  18. package/lib/cjs/actions/blue/supplyCollateral.js +52 -69
  19. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +82 -86
  20. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +133 -119
  21. package/lib/cjs/actions/blue/withdraw.d.ts +68 -78
  22. package/lib/cjs/actions/blue/withdraw.js +101 -97
  23. package/lib/cjs/actions/blue/withdrawCollateral.d.ts +56 -28
  24. package/lib/cjs/actions/blue/withdrawCollateral.js +45 -50
  25. package/lib/cjs/actions/index.d.ts +1 -1
  26. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
  27. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +60 -19
  28. package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
  29. package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +207 -0
  30. package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
  31. package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.js +72 -0
  32. package/lib/cjs/actions/requirements/blue/index.d.ts +2 -0
  33. package/lib/cjs/actions/requirements/blue/index.js +2 -0
  34. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
  35. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +30 -5
  36. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
  37. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +7 -2
  38. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
  39. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +33 -6
  40. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
  41. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +123 -0
  42. package/lib/cjs/actions/requirements/encode/index.d.ts +1 -0
  43. package/lib/cjs/actions/requirements/encode/index.js +1 -0
  44. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
  45. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -4
  46. package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -4
  47. package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +1 -0
  48. package/lib/cjs/actions/signatures/getTokenRequirementActions.js +4 -0
  49. package/lib/cjs/blue/types.d.ts +3 -1
  50. package/lib/cjs/blue/utils.d.ts +3 -1
  51. package/lib/cjs/blue/utils.js +1 -0
  52. package/lib/cjs/bundler/actions.d.ts +6 -4
  53. package/lib/cjs/bundler/actions.js +6 -4
  54. package/lib/cjs/bundler/types.d.ts +10 -1
  55. package/lib/cjs/client/morphoViemExtension.d.ts +2 -1
  56. package/lib/cjs/client/morphoViemExtension.js +2 -1
  57. package/lib/cjs/entities/blue/blue.d.ts +817 -360
  58. package/lib/cjs/entities/blue/blue.js +455 -698
  59. package/lib/cjs/entities/index.d.ts +1 -0
  60. package/lib/cjs/entities/vaultV1/vaultV1.js +4 -12
  61. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +18 -3
  62. package/lib/cjs/entities/vaultV1ReallocationData.js +11 -1
  63. package/lib/cjs/entities/vaultV2/vaultV2.js +6 -18
  64. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +7 -10
  65. package/lib/cjs/helpers/computeVaultV1Reallocations.js +7 -10
  66. package/lib/cjs/helpers/validate.d.ts +16 -23
  67. package/lib/cjs/helpers/validate.js +32 -48
  68. package/lib/cjs/helpers/validateRequirementSpender.d.ts +2 -1
  69. package/lib/cjs/helpers/validateRequirementSpender.js +2 -0
  70. package/lib/cjs/types/action.d.ts +146 -162
  71. package/lib/cjs/types/action.js +29 -2
  72. package/lib/cjs/types/client.d.ts +9 -0
  73. package/lib/cjs/types/error.d.ts +173 -18
  74. package/lib/cjs/types/error.js +230 -25
  75. package/lib/cjs/types/sharedLiquidity.d.ts +20 -4
  76. package/lib/cjs/types.d.ts +3 -1
  77. package/lib/cjs/utils.d.ts +3 -1
  78. package/lib/cjs/utils.js +1 -0
  79. package/lib/esm/abis.d.ts +543 -0
  80. package/lib/esm/abis.js +737 -0
  81. package/lib/esm/actions/blue/borrow.d.ts +62 -58
  82. package/lib/esm/actions/blue/borrow.js +48 -80
  83. package/lib/esm/actions/blue/common.d.ts +99 -0
  84. package/lib/esm/actions/blue/common.js +306 -0
  85. package/lib/esm/actions/blue/refinance.d.ts +72 -107
  86. package/lib/esm/actions/blue/refinance.js +98 -198
  87. package/lib/esm/actions/blue/repay.d.ts +72 -68
  88. package/lib/esm/actions/blue/repay.js +56 -118
  89. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +85 -90
  90. package/lib/esm/actions/blue/repayWithdrawCollateral.js +149 -138
  91. package/lib/esm/actions/blue/supply.d.ts +62 -45
  92. package/lib/esm/actions/blue/supply.js +94 -70
  93. package/lib/esm/actions/blue/supplyCollateral.d.ts +63 -40
  94. package/lib/esm/actions/blue/supplyCollateral.js +52 -69
  95. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +82 -86
  96. package/lib/esm/actions/blue/supplyCollateralBorrow.js +134 -120
  97. package/lib/esm/actions/blue/withdraw.d.ts +68 -78
  98. package/lib/esm/actions/blue/withdraw.js +100 -96
  99. package/lib/esm/actions/blue/withdrawCollateral.d.ts +56 -28
  100. package/lib/esm/actions/blue/withdrawCollateral.js +45 -50
  101. package/lib/esm/actions/index.d.ts +1 -1
  102. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
  103. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +63 -22
  104. package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
  105. package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +203 -0
  106. package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
  107. package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.js +68 -0
  108. package/lib/esm/actions/requirements/blue/index.d.ts +2 -0
  109. package/lib/esm/actions/requirements/blue/index.js +2 -0
  110. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
  111. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +31 -6
  112. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
  113. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +8 -3
  114. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
  115. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +34 -7
  116. package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
  117. package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +119 -0
  118. package/lib/esm/actions/requirements/encode/index.d.ts +1 -0
  119. package/lib/esm/actions/requirements/encode/index.js +1 -0
  120. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
  121. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -4
  122. package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -4
  123. package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +1 -0
  124. package/lib/esm/actions/signatures/getTokenRequirementActions.js +5 -1
  125. package/lib/esm/blue/types.d.ts +3 -1
  126. package/lib/esm/blue/utils.d.ts +3 -1
  127. package/lib/esm/blue/utils.js +3 -1
  128. package/lib/esm/bundler/actions.d.ts +6 -4
  129. package/lib/esm/bundler/actions.js +6 -4
  130. package/lib/esm/bundler/types.d.ts +10 -1
  131. package/lib/esm/client/morphoViemExtension.d.ts +2 -1
  132. package/lib/esm/client/morphoViemExtension.js +2 -1
  133. package/lib/esm/entities/blue/blue.d.ts +817 -360
  134. package/lib/esm/entities/blue/blue.js +461 -704
  135. package/lib/esm/entities/index.d.ts +1 -0
  136. package/lib/esm/entities/vaultV1/vaultV1.js +4 -12
  137. package/lib/esm/entities/vaultV1ReallocationData.d.ts +18 -3
  138. package/lib/esm/entities/vaultV1ReallocationData.js +13 -2
  139. package/lib/esm/entities/vaultV2/vaultV2.js +7 -19
  140. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +7 -10
  141. package/lib/esm/helpers/computeVaultV1Reallocations.js +7 -10
  142. package/lib/esm/helpers/validate.d.ts +16 -23
  143. package/lib/esm/helpers/validate.js +32 -48
  144. package/lib/esm/helpers/validateRequirementSpender.d.ts +2 -1
  145. package/lib/esm/helpers/validateRequirementSpender.js +2 -0
  146. package/lib/esm/types/action.d.ts +146 -162
  147. package/lib/esm/types/action.js +28 -2
  148. package/lib/esm/types/client.d.ts +9 -0
  149. package/lib/esm/types/error.d.ts +173 -18
  150. package/lib/esm/types/error.js +216 -21
  151. package/lib/esm/types/sharedLiquidity.d.ts +20 -4
  152. package/lib/esm/types.d.ts +3 -1
  153. package/lib/esm/utils.d.ts +3 -1
  154. package/lib/esm/utils.js +3 -1
  155. package/package.json +7 -6
  156. package/lib/cjs/actions/blue/buildAssetFundingActions.d.ts +0 -47
  157. package/lib/cjs/actions/blue/buildAssetFundingActions.js +0 -63
  158. package/lib/cjs/actions/blue/buildReallocationActions.d.ts +0 -69
  159. package/lib/cjs/actions/blue/buildReallocationActions.js +0 -141
  160. package/lib/cjs/actions/blue/resolveRepayFunding.d.ts +0 -66
  161. package/lib/cjs/actions/blue/resolveRepayFunding.js +0 -85
  162. package/lib/esm/actions/blue/buildAssetFundingActions.d.ts +0 -47
  163. package/lib/esm/actions/blue/buildAssetFundingActions.js +0 -59
  164. package/lib/esm/actions/blue/buildReallocationActions.d.ts +0 -69
  165. package/lib/esm/actions/blue/buildReallocationActions.js +0 -135
  166. package/lib/esm/actions/blue/resolveRepayFunding.d.ts +0 -66
  167. package/lib/esm/actions/blue/resolveRepayFunding.js +0 -81
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.ApprovalAmountLessThanSpendAmountError = exports.MissingClientPropertyError = exports.CryptoUnavailableError = exports.ChainIdMismatchError = exports.AddressMismatchError = exports.UnexpectedRequirementSignatureError = exports.AmbiguousRequirementSignaturesError = exports.BundlerErrors = exports.NegativeMaxRepaySharePriceError = exports.NegativeBorrowSharesError = exports.NegativeMinSharePriceError = exports.NegativeWithdrawMinSharePriceError = exports.NegativeSupplyMaxSharePriceError = exports.NegativeSupplyAmountError = exports.NonPositiveMinBorrowSharePriceError = exports.NegativeReallocationFeeError = exports.NegativeNativeAmountError = exports.NegativeSlippageToleranceError = exports.NonPositiveWithdrawAmountError = exports.ZeroSupplyAmountError = exports.NonPositiveWithdrawCollateralAmountError = exports.NonPositiveRepayMaxSharePriceError = exports.NonPositiveRepayAmountError = exports.NonPositiveReallocationAmountError = exports.ZeroCollateralAmountError = exports.NonPositiveBorrowAmountError = exports.ZeroDepositAmountError = exports.NonPositiveMaxSharePriceError = exports.NonPositiveSharesAmountError = exports.NonPositiveAssetAmountError = exports.VaultExitBundlesV1PermitMismatchError = exports.VaultIsBlueFeeRecipientError = exports.VaultMorphoMismatchError = exports.InsufficientBlueBalanceForInKindRedeemError = exports.InKindRedeemCoverageError = exports.InKindRedeemZeroDeallocationError = exports.UnsupportedInKindAdapterError = exports.AdapterNotPartOfVaultError = exports.InKindRedeemRequiresSingleAdapterError = exports.ExpiredDeadlineError = exports.EmptyMarketParamsListError = exports.InputExceedsMaxError = exports.NonPositiveInputError = exports.NegativeInputError = void 0;
4
- exports.MidnightMarketAddressMismatchError = exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightOfferMakerMismatchError = exports.MidnightOfferSideMismatchError = exports.EmptyMidnightTakeableOffersError = exports.MidnightAmountExceedsMaxOfferCapError = exports.ReallocationAdapterSupplySharesUnderflowError = exports.ReallocationAllocationUnderflowError = exports.UnknownReallocationAdapterError = exports.UnknownReallocationMarketPublicAllocatorConfigError = exports.UnknownReallocationActiveAdaptersError = exports.UnknownReallocationPublicAllocatorConfigError = exports.UnknownReallocationAllocationError = exports.UnknownReallocationPositionError = exports.UnknownReallocationVaultMarketConfigError = exports.UnknownReallocationVaultError = exports.UnknownReallocationMarketError = exports.InsufficientSharedLiquidityError = exports.DisabledReallocationMarketError = exports.MissingPublicAllocatorConfigError = exports.RepaySharesExceedDebtError = exports.InvalidSignatureError = exports.RepayExceedsDebtError = exports.ShareDivideByZeroError = exports.WithdrawMakesPositionUnhealthyError = exports.WithdrawExceedsCollateralError = exports.MutuallyExclusiveRepayAmountsError = exports.TransferAmountNotEqualToAssetsError = exports.UnsortedReallocationWithdrawalsError = exports.InconsistentReallocationPenaltyError = exports.InvalidReallocationSourceTypeError = exports.InvalidReallocationAddressError = exports.MixedReallocationVersionsError = exports.InvalidReallocationShapeError = exports.ReallocationWithdrawalOnTargetMarketError = exports.EmptyReallocationWithdrawalsError = exports.AccrualPositionUserMismatchError = exports.MarketIdMismatchError = exports.MissingMarketPriceError = exports.BorrowExceedsSafeLtvError = exports.NativeAmountOnNonWNativeCollateralError = exports.NativeAmountOnNonWNativeAssetError = exports.VaultAddressMismatchError = exports.ChainWNativeMissingError = exports.NativeAmountOnNonWNativeVaultError = exports.Permit2ExpirationMissingError = exports.DepositSpenderMismatchError = exports.DepositOwnerMismatchError = exports.DepositAssetMismatchError = void 0;
5
- exports.RefinanceSharesMissingBorrowAssetsError = exports.RefinanceExceedsBorrowAssetsError = exports.RefinanceExceedsBorrowSharesError = exports.RefinanceExceedsCollateralError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.BorrowAmountAndSharesExclusiveError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = exports.MutuallyExclusiveWithdrawAmountsError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.UnpreparedMidnightOfferRootSignatureError = exports.MidnightOfferRootOfferCountMismatchError = exports.MidnightOfferRootRatifierMismatchError = exports.MidnightOfferRootOwnerMismatchError = exports.MidnightOfferRootMismatchError = exports.MissingMidnightOfferRootSignatureError = exports.UnknownMidnightRatifierError = exports.MidnightTakeableOfferMarketMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = void 0;
3
+ exports.AddressMismatchError = exports.UnexpectedRequirementSignatureError = exports.AmbiguousRequirementSignaturesError = exports.BundlerErrors = exports.NegativeMaxRepaySharePriceError = exports.NegativeBorrowSharesError = exports.NegativeMinSharePriceError = exports.NegativeWithdrawMinSharePriceError = exports.NegativeSupplyMaxSharePriceError = exports.NegativeSupplyAmountError = exports.NonPositiveMinBorrowSharePriceError = exports.NegativeReallocationFeeError = exports.NegativeNativeAmountError = exports.NegativeSlippageToleranceError = exports.NonPositiveWithdrawAmountError = exports.ZeroSupplyAmountError = exports.NonPositiveWithdrawCollateralAmountError = exports.NonPositiveRepayMaxSharePriceError = exports.NonPositiveRepayAmountError = exports.NonPositiveReallocationAmountError = exports.ZeroCollateralAmountError = exports.NonPositiveBorrowAmountError = exports.ZeroDepositAmountError = exports.NonPositiveMaxSharePriceError = exports.NonPositiveSharesAmountError = exports.NonPositiveAssetAmountError = exports.MaxRepayAssetsBelowRepayAssetsError = exports.ReallocationsRequireBorrowError = exports.UnsupportedAuthorizationOperatorError = exports.ReallocationLoanTokenMismatchError = exports.MissingReferralFeeRecipientError = exports.NativeFundingAmountMismatchError = exports.NoUnusedPermit2NonceError = exports.Permit2TransferFromNonceAlreadyUsedError = exports.MissingPermit2TransferFromNonceError = exports.BlueBundlesV1RequirementSignatureMismatchError = exports.VaultExitBundlesV1PermitMismatchError = exports.VaultIsBlueFeeRecipientError = exports.VaultMorphoMismatchError = exports.InsufficientBlueBalanceForInKindRedeemError = exports.InKindRedeemCoverageError = exports.InKindRedeemZeroDeallocationError = exports.UnsupportedInKindAdapterError = exports.AdapterNotPartOfVaultError = exports.InKindRedeemRequiresSingleAdapterError = exports.ExpiredDeadlineError = exports.EmptyMarketParamsListError = exports.InputExceedsMaxError = exports.NonPositiveInputError = exports.NegativeInputError = void 0;
4
+ exports.UnknownReallocationMarketPublicAllocatorConfigError = exports.UnknownReallocationActiveAdaptersError = exports.UnknownReallocationPublicAllocatorConfigError = exports.UnknownReallocationAllocationError = exports.UnknownReallocationPositionError = exports.UnknownReallocationVaultMarketConfigError = exports.UnknownReallocationVaultError = exports.UnknownReallocationMarketError = exports.InsufficientSharedLiquidityError = exports.DisabledReallocationMarketError = exports.MissingPublicAllocatorConfigError = exports.RepaySharesExceedDebtError = exports.InvalidSignatureError = exports.RepayExceedsDebtError = exports.ShareDivideByZeroError = exports.WithdrawMakesPositionUnhealthyError = exports.WithdrawExceedsCollateralError = exports.MutuallyExclusiveRepayAmountsError = exports.TransferAmountNotEqualToAssetsError = exports.UnsortedReallocationWithdrawalsError = exports.InconsistentReallocationPenaltyError = exports.InvalidReallocationSourceTypeError = exports.InvalidReallocationAddressError = exports.MixedReallocationVersionsError = exports.InvalidReallocationShapeError = exports.ReallocationWithdrawalOnTargetMarketError = exports.EmptyReallocationWithdrawalsError = exports.AccrualPositionUserMismatchError = exports.MarketIdMismatchError = exports.MissingMarketPriceError = exports.BorrowExceedsSafeLtvError = exports.NativeAmountOnNonWNativeCollateralError = exports.NativeAmountOnNonWNativeAssetError = exports.VaultAddressMismatchError = exports.ChainWNativeMissingError = exports.NativeAmountOnNonWNativeVaultError = exports.Permit2ExpirationMissingError = exports.DepositSpenderMismatchError = exports.DepositOwnerMismatchError = exports.DepositAssetMismatchError = exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.ApprovalAmountLessThanSpendAmountError = exports.MissingClientPropertyError = exports.CryptoUnavailableError = exports.ChainIdMismatchError = void 0;
5
+ exports.RefinanceSharesMissingBorrowAssetsError = exports.RefinanceExceedsBorrowAssetsError = exports.RefinanceExceedsBorrowSharesError = exports.RefinanceExceedsCollateralError = exports.BorrowAmountAndSharesExclusiveError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = exports.MutuallyExclusiveWithdrawAmountsError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.UnpreparedMidnightOfferRootSignatureError = exports.MidnightOfferRootOfferCountMismatchError = exports.MidnightOfferRootRatifierMismatchError = exports.MidnightOfferRootOwnerMismatchError = exports.MidnightOfferRootMismatchError = exports.MissingMidnightOfferRootSignatureError = exports.UnknownMidnightRatifierError = exports.MidnightTakeableOfferMarketMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = exports.MidnightMarketAddressMismatchError = exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightOfferMakerMismatchError = exports.MidnightOfferSideMismatchError = exports.EmptyMidnightTakeableOffersError = exports.MidnightAmountExceedsMaxOfferCapError = exports.ReallocationAdapterSupplySharesUnderflowError = exports.ReallocationAllocationUnderflowError = exports.UnknownReallocationAdapterError = void 0;
6
6
  const blue_sdk_1 = require("@morpho-org/blue-sdk");
7
7
  /**
8
8
  * Thrown when a morpho-sdk input that must be non-negative is negative.
@@ -91,7 +91,7 @@ class EmptyMarketParamsListError extends Error {
91
91
  }
92
92
  }
93
93
  exports.EmptyMarketParamsListError = EmptyMarketParamsListError;
94
- /** Thrown when an in-kind redemption deadline has already passed. */
94
+ /** Thrown when an SDK operation deadline has already passed. */
95
95
  class ExpiredDeadlineError extends Error {
96
96
  deadline;
97
97
  timestamp;
@@ -100,7 +100,7 @@ class ExpiredDeadlineError extends Error {
100
100
  * @param timestamp - Current timestamp used for validation.
101
101
  */
102
102
  constructor(deadline, timestamp) {
103
- super(`Deadline "${deadline}" has expired at timestamp "${timestamp}". Choose a future deadline and rebuild the exit.`);
103
+ super(`Deadline "${deadline}" has expired at timestamp "${timestamp}". Choose a future deadline and rebuild the operation.`);
104
104
  this.deadline = deadline;
105
105
  this.timestamp = timestamp;
106
106
  this.name = "ExpiredDeadlineError";
@@ -269,6 +269,154 @@ class VaultExitBundlesV1PermitMismatchError extends Error {
269
269
  }
270
270
  }
271
271
  exports.VaultExitBundlesV1PermitMismatchError = VaultExitBundlesV1PermitMismatchError;
272
+ /** Thrown when a signed requirement cannot be safely encoded for BlueBundlesV1. */
273
+ class BlueBundlesV1RequirementSignatureMismatchError extends Error {
274
+ /** Field whose signed value or encoding is invalid for the direct BlueBundlesV1 call. */
275
+ field;
276
+ /** Value required by BlueBundlesV1. */
277
+ expected;
278
+ /** Value supplied by the signed requirement. */
279
+ actual;
280
+ /**
281
+ * @param params - Signature mismatch details.
282
+ * @param params.field - Field rejected by the converter.
283
+ * @param params.expected - Value required by the direct route.
284
+ * @param params.actual - Value supplied by the requirement.
285
+ * @param params.cause - Original signature parser failure, when applicable.
286
+ */
287
+ constructor(params) {
288
+ super(`BlueBundlesV1 requirement ${params.field} mismatch: expected "${params.expected}", got "${params.actual}". Resolve and sign the requirements returned by this Blue action.`, { cause: params.cause });
289
+ this.field = params.field;
290
+ this.expected = params.expected;
291
+ this.actual = params.actual;
292
+ this.name = "BlueBundlesV1RequirementSignatureMismatchError";
293
+ }
294
+ }
295
+ exports.BlueBundlesV1RequirementSignatureMismatchError = BlueBundlesV1RequirementSignatureMismatchError;
296
+ /** Thrown when Permit2 SignatureTransfer is selected without an explicit unordered nonce. */
297
+ class MissingPermit2TransferFromNonceError extends Error {
298
+ constructor() {
299
+ super("Permit2 SignatureTransfer requires an explicit unused permit2Nonce. Generate a unique uint256 nonce, pass it to getRequirements(), and resolve the requirements again.");
300
+ this.name = "MissingPermit2TransferFromNonceError";
301
+ }
302
+ }
303
+ exports.MissingPermit2TransferFromNonceError = MissingPermit2TransferFromNonceError;
304
+ /** Thrown when an explicit Permit2 SignatureTransfer unordered nonce is already consumed. */
305
+ class Permit2TransferFromNonceAlreadyUsedError extends Error {
306
+ owner;
307
+ nonce;
308
+ /**
309
+ * @param owner - Permit2 token owner whose nonce is unavailable.
310
+ * @param nonce - Explicit unordered nonce that has already been consumed.
311
+ */
312
+ constructor(owner, nonce) {
313
+ super(`Permit2 nonce "${nonce}" is already used for owner "${owner}". Generate a different uint256 permit2Nonce and resolve the requirements again.`);
314
+ this.owner = owner;
315
+ this.nonce = nonce;
316
+ this.name = "Permit2TransferFromNonceAlreadyUsedError";
317
+ }
318
+ }
319
+ exports.Permit2TransferFromNonceAlreadyUsedError = Permit2TransferFromNonceAlreadyUsedError;
320
+ /** Thrown when no unused Permit2 unordered nonce exists at or after the requested start nonce. */
321
+ class NoUnusedPermit2NonceError extends Error {
322
+ owner;
323
+ startNonce;
324
+ /**
325
+ * @param owner - Permit2 token owner scanned for a free nonce.
326
+ * @param startNonce - Lowest nonce that was considered.
327
+ */
328
+ constructor(owner, startNonce) {
329
+ super(`No unused Permit2 nonce found for owner "${owner}" at or after "${startNonce}". Pass a lower startNonce.`);
330
+ this.owner = owner;
331
+ this.startNonce = startNonce;
332
+ this.name = "NoUnusedPermit2NonceError";
333
+ }
334
+ }
335
+ exports.NoUnusedPermit2NonceError = NoUnusedPermit2NonceError;
336
+ /** Thrown when native funding does not exactly match the contract's gross token pull. */
337
+ class NativeFundingAmountMismatchError extends Error {
338
+ nativeAmount;
339
+ requiredAmount;
340
+ /**
341
+ * @param nativeAmount - Native value supplied with the transaction.
342
+ * @param requiredAmount - Gross amount the BlueBundlesV1 entrypoint funds.
343
+ */
344
+ constructor(nativeAmount, requiredAmount) {
345
+ super(`Native funding must equal the full funded amount: expected "${requiredAmount}", got "${nativeAmount}". Use either native funding or ERC-20 funding, not both.`);
346
+ this.nativeAmount = nativeAmount;
347
+ this.requiredAmount = requiredAmount;
348
+ this.name = "NativeFundingAmountMismatchError";
349
+ }
350
+ }
351
+ exports.NativeFundingAmountMismatchError = NativeFundingAmountMismatchError;
352
+ /** Thrown when a positive referral fee has no recipient. */
353
+ class MissingReferralFeeRecipientError extends Error {
354
+ constructor() {
355
+ super("A positive referralFeePct requires referralFeeRecipient. Provide the recipient or set referralFeePct to zero.");
356
+ this.name = "MissingReferralFeeRecipientError";
357
+ }
358
+ }
359
+ exports.MissingReferralFeeRecipientError = MissingReferralFeeRecipientError;
360
+ /** Thrown when a BlueBundlesV1 reallocation source uses another loan token. */
361
+ class ReallocationLoanTokenMismatchError extends Error {
362
+ expected;
363
+ actual;
364
+ /**
365
+ * @param expected - Loan token of the operation's target market.
366
+ * @param actual - Loan token found in the reallocation source market.
367
+ */
368
+ constructor(expected, actual) {
369
+ super(`Reallocation source loan token "${actual}" does not match target loan token "${expected}". Recompute reallocations for the target market.`);
370
+ this.expected = expected;
371
+ this.actual = actual;
372
+ this.name = "ReallocationLoanTokenMismatchError";
373
+ }
374
+ }
375
+ exports.ReallocationLoanTokenMismatchError = ReallocationLoanTokenMismatchError;
376
+ /**
377
+ * Thrown when a Blue authorization operator is not one of the chain's registered Morpho operators
378
+ * (GeneralAdapter1 or BlueBundlesV1). Guards the exported authorization builder so a misconfigured
379
+ * `authorized` cannot grant an arbitrary address control over the user's Morpho positions.
380
+ */
381
+ class UnsupportedAuthorizationOperatorError extends Error {
382
+ authorized;
383
+ chainId;
384
+ /**
385
+ * @param authorized - The operator address rejected as unsupported.
386
+ * @param chainId - Chain whose registry was consulted for the supported operators.
387
+ */
388
+ constructor(authorized, chainId) {
389
+ super(`Authorization operator "${authorized}" is not a supported Morpho operator on chain ${chainId}. Pass the chain's registered GeneralAdapter1 or BlueBundlesV1 address, or omit \`authorized\` to default to GeneralAdapter1.`);
390
+ this.authorized = authorized;
391
+ this.chainId = chainId;
392
+ this.name = "UnsupportedAuthorizationOperatorError";
393
+ }
394
+ }
395
+ exports.UnsupportedAuthorizationOperatorError = UnsupportedAuthorizationOperatorError;
396
+ /** Thrown when reallocations are attached to a combined call with no borrow leg. */
397
+ class ReallocationsRequireBorrowError extends Error {
398
+ constructor() {
399
+ super("BlueBundlesV1 reallocations require a positive borrowAssets value. Remove the reallocations or add a borrow leg.");
400
+ this.name = "ReallocationsRequireBorrowError";
401
+ }
402
+ }
403
+ exports.ReallocationsRequireBorrowError = ReallocationsRequireBorrowError;
404
+ /** Thrown when repay funding cannot cover the requested assets and referral fee. */
405
+ class MaxRepayAssetsBelowRepayAssetsError extends Error {
406
+ maxRepayAssets;
407
+ repayAssets;
408
+ /**
409
+ * @param maxRepayAssets - Maximum loan-token funding supplied to the bundle.
410
+ * @param repayAssets - Minimum funding required for the repayment and referral fee.
411
+ */
412
+ constructor(maxRepayAssets, repayAssets) {
413
+ super(`maxRepayAssets "${maxRepayAssets}" cannot cover required repay funding "${repayAssets}". Increase maxRepayAssets to include the repayment and referral fee.`);
414
+ this.maxRepayAssets = maxRepayAssets;
415
+ this.repayAssets = repayAssets;
416
+ this.name = "MaxRepayAssetsBelowRepayAssetsError";
417
+ }
418
+ }
419
+ exports.MaxRepayAssetsBelowRepayAssetsError = MaxRepayAssetsBelowRepayAssetsError;
272
420
  /** @deprecated Use {@link NonPositiveInputError}. */
273
421
  exports.NonPositiveAssetAmountError = NonPositiveInputError;
274
422
  /** @deprecated Use {@link NonPositiveInputError}. */
@@ -631,7 +779,11 @@ class AccrualPositionUserMismatchError extends Error {
631
779
  }
632
780
  }
633
781
  exports.AccrualPositionUserMismatchError = AccrualPositionUserMismatchError;
634
- /** Thrown when a reallocation has no withdrawals. */
782
+ /**
783
+ * Thrown when a reallocation has no withdrawals.
784
+ *
785
+ * @deprecated Vault V1 PublicAllocator support will be removed in the next major.
786
+ */
635
787
  class EmptyReallocationWithdrawalsError extends Error {
636
788
  constructor(vault) {
637
789
  super(`Reallocation withdrawals list cannot be empty for vault: ${vault}`);
@@ -646,8 +798,9 @@ class ReallocationWithdrawalOnTargetMarketError extends Error {
646
798
  }
647
799
  exports.ReallocationWithdrawalOnTargetMarketError = ReallocationWithdrawalOnTargetMarketError;
648
800
  /**
649
- * Thrown when a Public Allocator reallocation does not match exactly one V1 or
650
- * V2 input shape.
801
+ * Thrown when a reallocation entry passed to a high-level Blue write is not a valid
802
+ * {@link VaultV2BlueReallocation}: a non-object entry, or an entry carrying Vault V1
803
+ * `withdrawals`/`fee` fields that high-level Blue writes no longer accept.
651
804
  *
652
805
  * @example
653
806
  * ```ts
@@ -658,7 +811,7 @@ exports.ReallocationWithdrawalOnTargetMarketError = ReallocationWithdrawalOnTarg
658
811
  */
659
812
  class InvalidReallocationShapeError extends Error {
660
813
  constructor() {
661
- super('Reallocation must contain either V1 "withdrawals" or V2 "from", but not both.');
814
+ super("Reallocation entry is not a valid Vault V2 reallocation. High-level Blue writes accept only VaultV2BlueReallocation entries (e.g. from getVaultV2BlueReallocations()); compose Vault V1 reallocations via low-level Bundler3 actions.");
662
815
  this.name = "InvalidReallocationShapeError";
663
816
  }
664
817
  }
@@ -666,6 +819,8 @@ exports.InvalidReallocationShapeError = InvalidReallocationShapeError;
666
819
  /**
667
820
  * Thrown when one reallocation plan contains both Vault V1 and Vault V2 entries.
668
821
  *
822
+ * @deprecated Vault V1/V2 mixed-plan support will be removed in the next major. Use Vault V2
823
+ * reallocations.
669
824
  * @example
670
825
  * ```ts
671
826
  * import { MixedReallocationVersionsError } from "@morpho-org/morpho-sdk";
@@ -776,7 +931,11 @@ class InconsistentReallocationPenaltyError extends Error {
776
931
  }
777
932
  }
778
933
  exports.InconsistentReallocationPenaltyError = InconsistentReallocationPenaltyError;
779
- /** Thrown when reallocation withdrawals within a vault are not strictly sorted by market id. */
934
+ /**
935
+ * Thrown when reallocation withdrawals within a vault are not strictly sorted by market id.
936
+ *
937
+ * @deprecated Vault V1 PublicAllocator support will be removed in the next major.
938
+ */
780
939
  class UnsortedReallocationWithdrawalsError extends Error {
781
940
  constructor(vault, marketId) {
782
941
  super(`Reallocation withdrawals must be strictly sorted by market ID for vault ${vault}. Market ${marketId} is out of order.`);
@@ -843,14 +1002,22 @@ class RepaySharesExceedDebtError extends Error {
843
1002
  }
844
1003
  }
845
1004
  exports.RepaySharesExceedDebtError = RepaySharesExceedDebtError;
846
- /** Thrown when a vault selected for reallocation has no configured `PublicAllocator`. */
1005
+ /**
1006
+ * Thrown when a vault selected for reallocation has no configured `PublicAllocator`.
1007
+ *
1008
+ * @deprecated Vault V1 PublicAllocator support will be removed in the next major.
1009
+ */
847
1010
  class MissingPublicAllocatorConfigError extends Error {
848
1011
  constructor(vault) {
849
1012
  super(`Vault ${vault} has no public allocator configured but was selected for reallocation`);
850
1013
  }
851
1014
  }
852
1015
  exports.MissingPublicAllocatorConfigError = MissingPublicAllocatorConfigError;
853
- /** Thrown when a reallocation attempts to use a disabled vault market. */
1016
+ /**
1017
+ * Thrown when a reallocation attempts to use a disabled vault market.
1018
+ *
1019
+ * @deprecated Vault V1 PublicAllocator support will be removed in the next major.
1020
+ */
854
1021
  class DisabledReallocationMarketError extends Error {
855
1022
  vault;
856
1023
  marketId;
@@ -900,7 +1067,11 @@ class UnknownReallocationVaultError extends blue_sdk_1.UnknownDataError {
900
1067
  }
901
1068
  }
902
1069
  exports.UnknownReallocationVaultError = UnknownReallocationVaultError;
903
- /** Thrown when reallocation state does not contain a requested vault-market config. */
1070
+ /**
1071
+ * Thrown when reallocation state does not contain a requested vault-market config.
1072
+ *
1073
+ * @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
1074
+ */
904
1075
  class UnknownReallocationVaultMarketConfigError extends blue_sdk_1.UnknownDataError {
905
1076
  vault;
906
1077
  marketId;
@@ -915,7 +1086,11 @@ class UnknownReallocationVaultMarketConfigError extends blue_sdk_1.UnknownDataEr
915
1086
  }
916
1087
  }
917
1088
  exports.UnknownReallocationVaultMarketConfigError = UnknownReallocationVaultMarketConfigError;
918
- /** Thrown when reallocation state does not contain a requested market position. */
1089
+ /**
1090
+ * Thrown when reallocation state does not contain a requested market position.
1091
+ *
1092
+ * @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
1093
+ */
919
1094
  class UnknownReallocationPositionError extends blue_sdk_1.UnknownDataError {
920
1095
  user;
921
1096
  marketId;
@@ -1189,13 +1364,6 @@ class VaultAssetMismatchError extends Error {
1189
1364
  }
1190
1365
  }
1191
1366
  exports.VaultAssetMismatchError = VaultAssetMismatchError;
1192
- /** Thrown when a refinance specifies both `borrowAssets` and `borrowShares` as non-zero (modes are mutually exclusive). */
1193
- class BorrowAmountAndSharesExclusiveError extends Error {
1194
- constructor(market) {
1195
- super(`Exactly one of borrowAssets or borrowShares must be non-zero for market: ${market}. Both were provided.`);
1196
- }
1197
- }
1198
- exports.BorrowAmountAndSharesExclusiveError = BorrowAmountAndSharesExclusiveError;
1199
1367
  /** Thrown when a refinance has identical source and target market ids (a refinance to the same market is a costly no-op). */
1200
1368
  class RefinanceSameMarketError extends Error {
1201
1369
  constructor(market) {
@@ -1210,7 +1378,26 @@ class RefinanceTokenMismatchError extends Error {
1210
1378
  }
1211
1379
  }
1212
1380
  exports.RefinanceTokenMismatchError = RefinanceTokenMismatchError;
1213
- /** Thrown when a refinance's `collateralAmount` exceeds the source position's available collateral. */
1381
+ /**
1382
+ * Thrown when a refinance specifies both `borrowAssets` and `borrowShares` as non-zero (modes are mutually exclusive).
1383
+ *
1384
+ * @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
1385
+ * partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
1386
+ * compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
1387
+ */
1388
+ class BorrowAmountAndSharesExclusiveError extends Error {
1389
+ constructor(market) {
1390
+ super(`Exactly one of borrowAssets or borrowShares must be non-zero for market: ${market}. Both were provided.`);
1391
+ }
1392
+ }
1393
+ exports.BorrowAmountAndSharesExclusiveError = BorrowAmountAndSharesExclusiveError;
1394
+ /**
1395
+ * Thrown when a refinance's `collateralAmount` exceeds the source position's available collateral.
1396
+ *
1397
+ * @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
1398
+ * partial collateral inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
1399
+ * compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
1400
+ */
1214
1401
  class RefinanceExceedsCollateralError extends Error {
1215
1402
  market;
1216
1403
  requested;
@@ -1223,7 +1410,13 @@ class RefinanceExceedsCollateralError extends Error {
1223
1410
  }
1224
1411
  }
1225
1412
  exports.RefinanceExceedsCollateralError = RefinanceExceedsCollateralError;
1226
- /** Thrown when a refinance's `borrowShares` exceeds the source position's outstanding borrow shares. */
1413
+ /**
1414
+ * Thrown when a refinance's `borrowShares` exceeds the source position's outstanding borrow shares.
1415
+ *
1416
+ * @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
1417
+ * partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
1418
+ * compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
1419
+ */
1227
1420
  class RefinanceExceedsBorrowSharesError extends Error {
1228
1421
  market;
1229
1422
  requested;
@@ -1236,7 +1429,13 @@ class RefinanceExceedsBorrowSharesError extends Error {
1236
1429
  }
1237
1430
  }
1238
1431
  exports.RefinanceExceedsBorrowSharesError = RefinanceExceedsBorrowSharesError;
1239
- /** Thrown when a refinance's `borrowAssets` exceeds the source position's outstanding debt assets. */
1432
+ /**
1433
+ * Thrown when a refinance's `borrowAssets` exceeds the source position's outstanding debt assets.
1434
+ *
1435
+ * @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
1436
+ * partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
1437
+ * compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
1438
+ */
1240
1439
  class RefinanceExceedsBorrowAssetsError extends Error {
1241
1440
  market;
1242
1441
  requested;
@@ -1249,7 +1448,13 @@ class RefinanceExceedsBorrowAssetsError extends Error {
1249
1448
  }
1250
1449
  }
1251
1450
  exports.RefinanceExceedsBorrowAssetsError = RefinanceExceedsBorrowAssetsError;
1252
- /** Thrown when a refinance in shares mode (`borrowShares > 0n`) omits the `borrowAssets` overshoot for the target borrow leg. */
1451
+ /**
1452
+ * Thrown when a refinance in shares mode (`borrowShares > 0n`) omits the `borrowAssets` overshoot for the target borrow leg.
1453
+ *
1454
+ * @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
1455
+ * partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
1456
+ * compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
1457
+ */
1253
1458
  class RefinanceSharesMissingBorrowAssetsError extends Error {
1254
1459
  constructor(market) {
1255
1460
  super(`Refinance shares mode requires a positive borrowAssets overshoot for the target borrow leg (market: ${market}).`);
@@ -2,6 +2,9 @@ import type { BigIntish, MarketId, MarketParams } from "@morpho-org/blue-sdk";
2
2
  import type { Address } from "viem";
3
3
  /**
4
4
  * Options controlling public allocator withdrawal discovery.
5
+ *
6
+ * @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
7
+ * {@link VaultV2BluePublicAllocatorOptions}.
5
8
  */
6
9
  export interface PublicAllocatorOptions {
7
10
  /** Whether public allocator reallocation discovery is enabled. */
@@ -63,6 +66,9 @@ export interface VaultV2BluePublicAllocatorOptions {
63
66
  }
64
67
  /**
65
68
  * A computed source-market withdrawal before it is grouped by vault.
69
+ *
70
+ * @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
71
+ * {@link VaultV2BlueReallocation}.
66
72
  */
67
73
  export interface PublicReallocation {
68
74
  /** Source market id to withdraw from. */
@@ -72,7 +78,12 @@ export interface PublicReallocation {
72
78
  /** Assets to withdraw from the source market. */
73
79
  readonly assets: bigint;
74
80
  }
75
- /** A single withdrawal from a source market within a vault reallocation. */
81
+ /**
82
+ * A single withdrawal from a source market within a vault reallocation.
83
+ *
84
+ * @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
85
+ * {@link VaultV2BlueReallocation}.
86
+ */
76
87
  export interface ReallocationWithdrawal {
77
88
  /** Source market parameters to pass to the public allocator. */
78
89
  readonly marketParams: MarketParams;
@@ -84,6 +95,9 @@ export interface ReallocationWithdrawal {
84
95
  *
85
96
  * Maps 1:1 to a `PublicAllocator.reallocateTo()` call.
86
97
  * Withdraws from source markets and supplies to the target market.
98
+ *
99
+ * @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
100
+ * {@link VaultV2BlueReallocation}.
87
101
  */
88
102
  export interface VaultV1Reallocation {
89
103
  readonly vault: Address;
@@ -123,12 +137,11 @@ export interface VaultV2BlueReallocation {
123
137
  /** Vault-configured WAD-scaled penalty rate passed to the allocator. */
124
138
  readonly penalty: bigint;
125
139
  }
126
- /** A homogeneous Blue action plan containing only Vault V1 or only Vault V2 reallocations. */
127
- export type BlueReallocationPlan = Iterable<VaultV1Reallocation> | Iterable<VaultV2BlueReallocation>;
128
140
  /**
129
141
  * Deprecated name for a Vault V1 reallocation.
130
142
  *
131
- * @deprecated Use {@link VaultV1Reallocation} instead.
143
+ * @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
144
+ * {@link VaultV2BlueReallocation}.
132
145
  */
133
146
  export type VaultReallocation = VaultV1Reallocation;
134
147
  /**
@@ -136,6 +149,9 @@ export type VaultReallocation = VaultV1Reallocation;
136
149
  *
137
150
  * Extends {@link PublicAllocatorOptions} with supply-side utilization targets
138
151
  * that determine when reallocation is triggered.
152
+ *
153
+ * @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
154
+ * {@link VaultV2BluePublicAllocatorOptions}.
139
155
  */
140
156
  export interface ReallocationComputeOptions extends PublicAllocatorOptions {
141
157
  /**
@@ -9,7 +9,9 @@ MaxBorrowOptions, MaxPositionCapacities as BlueMaxPositionCapacities,
9
9
  MaxPositionCapacities, MaxWithdrawCollateralOptions as BlueMaxWithdrawCollateralOptions,
10
10
  /** @deprecated Use `BlueMaxWithdrawCollateralOptions` or the raw `/blue/types` subpath. */
11
11
  MaxWithdrawCollateralOptions, Pending, Permit2Allowance, } from "@morpho-org/blue-sdk";
12
- export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs, DaiPermitArgs, DeploylessFetchParameters as BlueDeploylessFetchParameters,
12
+ export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs,
13
+ /** @deprecated Args for the deprecated getDaiPermitTypedData; scheduled for removal in the next major. */
14
+ DaiPermitArgs, DeploylessFetchParameters as BlueDeploylessFetchParameters,
13
15
  /** @deprecated Use `BlueDeploylessFetchParameters` or the raw `/blue/types` subpath. */
14
16
  DeploylessFetchParameters, FetchParameters as BlueFetchParameters,
15
17
  /** @deprecated Use `BlueFetchParameters` or the raw `/blue/types` subpath. */
@@ -8,7 +8,9 @@ MarketUtils, MathLib, SharesMath as BlueSharesMath,
8
8
  SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
9
9
  export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData,
10
10
  /** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
11
- getAuthorizationTypedData, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
11
+ getAuthorizationTypedData,
12
+ /** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
13
+ getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
12
14
  export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
13
15
  /** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
14
16
  EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
package/lib/cjs/utils.js CHANGED
@@ -25,6 +25,7 @@ Object.defineProperty(exports, "decodeBytes32String", { enumerable: true, get: f
25
25
  Object.defineProperty(exports, "getBlueAuthorizationTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getAuthorizationTypedData; } });
26
26
  /** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
27
27
  Object.defineProperty(exports, "getAuthorizationTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getAuthorizationTypedData; } });
28
+ /** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
28
29
  Object.defineProperty(exports, "getDaiPermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getDaiPermitTypedData; } });
29
30
  Object.defineProperty(exports, "getPermit2PermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermit2PermitTypedData; } });
30
31
  Object.defineProperty(exports, "getPermit2TransferFromTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermit2TransferFromTypedData; } });