@morpho-org/morpho-sdk 6.0.0-next.1 → 6.0.0-next.3

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 (305) hide show
  1. package/MIGRATION-v5-to-v6.md +199 -34
  2. package/README.md +23 -15
  3. package/lib/cjs/abis.d.ts +3 -2829
  4. package/lib/cjs/abis.js +1 -1938
  5. package/lib/cjs/actions/blue/borrow.d.ts +3 -2
  6. package/lib/cjs/actions/blue/borrow.js +3 -2
  7. package/lib/cjs/actions/blue/common.js +6 -35
  8. package/lib/cjs/actions/blue/refinance.d.ts +2 -2
  9. package/lib/cjs/actions/blue/refinance.js +2 -2
  10. package/lib/cjs/actions/blue/repay.d.ts +1 -1
  11. package/lib/cjs/actions/blue/repay.js +1 -1
  12. package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +2 -2
  13. package/lib/cjs/actions/blue/repayWithdrawCollateral.js +2 -2
  14. package/lib/cjs/actions/blue/supply.d.ts +2 -2
  15. package/lib/cjs/actions/blue/supply.js +4 -9
  16. package/lib/cjs/actions/blue/supplyCollateral.d.ts +2 -2
  17. package/lib/cjs/actions/blue/supplyCollateral.js +2 -2
  18. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +3 -2
  19. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +3 -2
  20. package/lib/cjs/actions/blue/withdraw.d.ts +3 -3
  21. package/lib/cjs/actions/blue/withdraw.js +3 -3
  22. package/lib/cjs/actions/blue/withdrawCollateral.d.ts +2 -2
  23. package/lib/cjs/actions/blue/withdrawCollateral.js +2 -2
  24. package/lib/cjs/actions/bundles/common.d.ts +38 -4
  25. package/lib/cjs/actions/bundles/common.js +91 -35
  26. package/lib/cjs/actions/index.d.ts +0 -1
  27. package/lib/cjs/actions/index.js +0 -1
  28. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +9 -8
  29. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +17 -26
  30. package/lib/cjs/actions/requirements/blue/index.d.ts +0 -1
  31. package/lib/cjs/actions/requirements/blue/index.js +0 -1
  32. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +20 -14
  33. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +24 -25
  34. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  35. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +4 -5
  36. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +21 -12
  37. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +39 -38
  38. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +4 -2
  39. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +14 -9
  40. package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +9 -6
  41. package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +22 -17
  42. package/lib/cjs/actions/requirements/encode/index.d.ts +0 -1
  43. package/lib/cjs/actions/requirements/encode/index.js +0 -1
  44. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -6
  45. package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -6
  46. package/lib/cjs/actions/requirements/index.d.ts +0 -1
  47. package/lib/cjs/actions/requirements/index.js +0 -1
  48. package/lib/cjs/actions/vaultV1/deposit.d.ts +1 -2
  49. package/lib/cjs/actions/vaultV1/deposit.js +1 -2
  50. package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +6 -4
  51. package/lib/cjs/actions/vaultV1/inKindRedeem.js +12 -8
  52. package/lib/cjs/actions/vaultV2/deposit.d.ts +1 -2
  53. package/lib/cjs/actions/vaultV2/deposit.js +1 -2
  54. package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +58 -39
  55. package/lib/cjs/actions/vaultV2/forceWithdraw.js +87 -60
  56. package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +6 -4
  57. package/lib/cjs/actions/vaultV2/inKindRedeem.js +12 -8
  58. package/lib/cjs/augment.d.ts +0 -1
  59. package/lib/cjs/augment.js +0 -1
  60. package/lib/cjs/blue/abis.d.ts +1 -1
  61. package/lib/cjs/blue/abis.js +1 -5
  62. package/lib/cjs/blue/entities.d.ts +2 -2
  63. package/lib/cjs/blue/entities.js +1 -2
  64. package/lib/cjs/blue/errors.d.ts +1 -1
  65. package/lib/cjs/blue/errors.js +2 -1
  66. package/lib/cjs/blue/fetch.d.ts +1 -1
  67. package/lib/cjs/blue/fetch.js +1 -2
  68. package/lib/cjs/blue/types.d.ts +2 -4
  69. package/lib/cjs/blue/utils.d.ts +1 -3
  70. package/lib/cjs/blue/utils.js +1 -3
  71. package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
  72. package/lib/cjs/client/morphoViemExtension.js +1 -1
  73. package/lib/cjs/constants.d.ts +3 -37
  74. package/lib/cjs/constants.js +1 -39
  75. package/lib/cjs/entities/blue/blue.d.ts +38 -264
  76. package/lib/cjs/entities/blue/blue.js +2 -203
  77. package/lib/cjs/entities/index.d.ts +3 -60
  78. package/lib/cjs/entities/index.js +1 -20
  79. package/lib/cjs/entities/midnight/midnight.js +20 -24
  80. package/lib/cjs/entities/requirements/getBundlesTokenRequirements.d.ts +7 -6
  81. package/lib/cjs/entities/requirements/getBundlesTokenRequirements.js +19 -14
  82. package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +3 -3
  83. package/lib/cjs/entities/requirements/index.d.ts +1 -0
  84. package/lib/cjs/entities/requirements/index.js +1 -0
  85. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +18 -6
  86. package/lib/cjs/entities/vaultV1/vaultV1.js +25 -8
  87. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +154 -35
  88. package/lib/cjs/entities/vaultV2/vaultV2.js +249 -23
  89. package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +8 -1
  90. package/lib/cjs/entities/vaultV2BlueReallocationData.js +50 -34
  91. package/lib/cjs/errors.d.ts +2 -46
  92. package/lib/cjs/errors.js +2 -46
  93. package/lib/cjs/fetch.d.ts +1 -15
  94. package/lib/cjs/fetch.js +1 -16
  95. package/lib/cjs/helpers/constant.d.ts +0 -2
  96. package/lib/cjs/helpers/constant.js +0 -2
  97. package/lib/cjs/helpers/index.d.ts +4 -3
  98. package/lib/cjs/helpers/index.js +10 -9
  99. package/lib/cjs/helpers/metadata.d.ts +3 -5
  100. package/lib/cjs/helpers/metadata.js +4 -6
  101. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
  102. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +164 -0
  103. package/lib/cjs/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
  104. package/lib/cjs/helpers/previewVaultV2InKindRedeem.js +2 -0
  105. package/lib/cjs/helpers/slippage.d.ts +34 -90
  106. package/lib/cjs/helpers/slippage.js +52 -137
  107. package/lib/cjs/helpers/utilization.d.ts +12 -10
  108. package/lib/cjs/helpers/utilization.js +27 -12
  109. package/lib/cjs/helpers/validate.d.ts +66 -32
  110. package/lib/cjs/helpers/validate.js +84 -57
  111. package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
  112. package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
  113. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
  114. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +369 -0
  115. package/lib/cjs/types/action.d.ts +102 -68
  116. package/lib/cjs/types/action.js +11 -4
  117. package/lib/cjs/types/error.d.ts +332 -385
  118. package/lib/cjs/types/error.js +369 -412
  119. package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
  120. package/lib/cjs/types.d.ts +2 -18
  121. package/lib/cjs/utils.d.ts +8 -35
  122. package/lib/cjs/utils.js +11 -36
  123. package/lib/esm/abis.d.ts +3 -2829
  124. package/lib/esm/abis.js +3 -1935
  125. package/lib/esm/actions/blue/borrow.d.ts +3 -2
  126. package/lib/esm/actions/blue/borrow.js +3 -2
  127. package/lib/esm/actions/blue/common.js +8 -37
  128. package/lib/esm/actions/blue/refinance.d.ts +2 -2
  129. package/lib/esm/actions/blue/refinance.js +2 -2
  130. package/lib/esm/actions/blue/repay.d.ts +1 -1
  131. package/lib/esm/actions/blue/repay.js +1 -1
  132. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +2 -2
  133. package/lib/esm/actions/blue/repayWithdrawCollateral.js +2 -2
  134. package/lib/esm/actions/blue/supply.d.ts +2 -2
  135. package/lib/esm/actions/blue/supply.js +6 -11
  136. package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -2
  137. package/lib/esm/actions/blue/supplyCollateral.js +2 -2
  138. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -2
  139. package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -2
  140. package/lib/esm/actions/blue/withdraw.d.ts +3 -3
  141. package/lib/esm/actions/blue/withdraw.js +3 -3
  142. package/lib/esm/actions/blue/withdrawCollateral.d.ts +2 -2
  143. package/lib/esm/actions/blue/withdrawCollateral.js +2 -2
  144. package/lib/esm/actions/bundles/common.d.ts +38 -4
  145. package/lib/esm/actions/bundles/common.js +91 -36
  146. package/lib/esm/actions/index.d.ts +0 -1
  147. package/lib/esm/actions/index.js +0 -1
  148. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +9 -8
  149. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +20 -29
  150. package/lib/esm/actions/requirements/blue/index.d.ts +0 -1
  151. package/lib/esm/actions/requirements/blue/index.js +0 -1
  152. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +20 -14
  153. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +25 -26
  154. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  155. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +4 -5
  156. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +21 -12
  157. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +40 -39
  158. package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +4 -2
  159. package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +14 -9
  160. package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +9 -6
  161. package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +22 -17
  162. package/lib/esm/actions/requirements/encode/index.d.ts +0 -1
  163. package/lib/esm/actions/requirements/encode/index.js +0 -1
  164. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -6
  165. package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -6
  166. package/lib/esm/actions/requirements/index.d.ts +0 -1
  167. package/lib/esm/actions/requirements/index.js +0 -1
  168. package/lib/esm/actions/vaultV1/deposit.d.ts +1 -2
  169. package/lib/esm/actions/vaultV1/deposit.js +1 -2
  170. package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +6 -4
  171. package/lib/esm/actions/vaultV1/inKindRedeem.js +12 -8
  172. package/lib/esm/actions/vaultV2/deposit.d.ts +1 -2
  173. package/lib/esm/actions/vaultV2/deposit.js +1 -2
  174. package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +58 -39
  175. package/lib/esm/actions/vaultV2/forceWithdraw.js +89 -62
  176. package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +6 -4
  177. package/lib/esm/actions/vaultV2/inKindRedeem.js +12 -8
  178. package/lib/esm/augment.d.ts +0 -1
  179. package/lib/esm/augment.js +0 -1
  180. package/lib/esm/blue/abis.d.ts +1 -1
  181. package/lib/esm/blue/abis.js +1 -1
  182. package/lib/esm/blue/entities.d.ts +2 -2
  183. package/lib/esm/blue/entities.js +1 -1
  184. package/lib/esm/blue/errors.d.ts +1 -1
  185. package/lib/esm/blue/errors.js +1 -1
  186. package/lib/esm/blue/fetch.d.ts +1 -1
  187. package/lib/esm/blue/fetch.js +1 -1
  188. package/lib/esm/blue/types.d.ts +2 -4
  189. package/lib/esm/blue/utils.d.ts +1 -3
  190. package/lib/esm/blue/utils.js +1 -3
  191. package/lib/esm/client/morphoViemExtension.d.ts +1 -1
  192. package/lib/esm/client/morphoViemExtension.js +1 -1
  193. package/lib/esm/constants.d.ts +3 -37
  194. package/lib/esm/constants.js +3 -37
  195. package/lib/esm/entities/blue/blue.d.ts +38 -264
  196. package/lib/esm/entities/blue/blue.js +5 -206
  197. package/lib/esm/entities/index.d.ts +3 -60
  198. package/lib/esm/entities/index.js +1 -16
  199. package/lib/esm/entities/midnight/midnight.js +20 -24
  200. package/lib/esm/entities/requirements/getBundlesTokenRequirements.d.ts +7 -6
  201. package/lib/esm/entities/requirements/getBundlesTokenRequirements.js +20 -15
  202. package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +3 -3
  203. package/lib/esm/entities/requirements/index.d.ts +1 -0
  204. package/lib/esm/entities/requirements/index.js +1 -0
  205. package/lib/esm/entities/vaultV1/vaultV1.d.ts +18 -6
  206. package/lib/esm/entities/vaultV1/vaultV1.js +29 -12
  207. package/lib/esm/entities/vaultV2/vaultV2.d.ts +154 -35
  208. package/lib/esm/entities/vaultV2/vaultV2.js +256 -30
  209. package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +8 -1
  210. package/lib/esm/entities/vaultV2BlueReallocationData.js +48 -32
  211. package/lib/esm/errors.d.ts +2 -46
  212. package/lib/esm/errors.js +2 -46
  213. package/lib/esm/fetch.d.ts +1 -15
  214. package/lib/esm/fetch.js +1 -15
  215. package/lib/esm/helpers/constant.d.ts +0 -2
  216. package/lib/esm/helpers/constant.js +0 -2
  217. package/lib/esm/helpers/index.d.ts +4 -3
  218. package/lib/esm/helpers/index.js +4 -3
  219. package/lib/esm/helpers/metadata.d.ts +3 -5
  220. package/lib/esm/helpers/metadata.js +4 -6
  221. package/lib/esm/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
  222. package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +161 -0
  223. package/lib/esm/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
  224. package/lib/esm/helpers/previewVaultV2InKindRedeem.js +2 -0
  225. package/lib/esm/helpers/slippage.d.ts +34 -90
  226. package/lib/esm/helpers/slippage.js +52 -134
  227. package/lib/esm/helpers/utilization.d.ts +12 -10
  228. package/lib/esm/helpers/utilization.js +26 -11
  229. package/lib/esm/helpers/validate.d.ts +66 -32
  230. package/lib/esm/helpers/validate.js +83 -57
  231. package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
  232. package/lib/esm/helpers/validateRequirementSpender.js +1 -3
  233. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
  234. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +362 -0
  235. package/lib/esm/types/action.d.ts +102 -68
  236. package/lib/esm/types/action.js +12 -5
  237. package/lib/esm/types/error.d.ts +332 -385
  238. package/lib/esm/types/error.js +355 -392
  239. package/lib/esm/types/sharedLiquidity.d.ts +1 -117
  240. package/lib/esm/types.d.ts +2 -18
  241. package/lib/esm/utils.d.ts +8 -35
  242. package/lib/esm/utils.js +7 -34
  243. package/package.json +7 -15
  244. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -42
  245. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -83
  246. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  247. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -151
  248. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -37
  249. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -50
  250. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  251. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -74
  252. package/lib/cjs/actions/requirements/generalAdapter/index.d.ts +0 -3
  253. package/lib/cjs/actions/requirements/generalAdapter/index.js +0 -19
  254. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  255. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.js +0 -48
  256. package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  257. package/lib/cjs/actions/signatures/getTokenRequirementActions.js +0 -119
  258. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -44
  259. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -43
  260. package/lib/cjs/actions/signatures/index.d.ts +0 -3
  261. package/lib/cjs/actions/signatures/index.js +0 -19
  262. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -8
  263. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +0 -8
  264. package/lib/cjs/bundler/actions.d.ts +0 -797
  265. package/lib/cjs/bundler/actions.js +0 -1371
  266. package/lib/cjs/bundler/index.d.ts +0 -2
  267. package/lib/cjs/bundler/index.js +0 -18
  268. package/lib/cjs/bundler/types.d.ts +0 -235
  269. package/lib/cjs/bundler/types.js +0 -2
  270. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +0 -326
  271. package/lib/cjs/entities/vaultV1ReallocationData.js +0 -542
  272. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -78
  273. package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -243
  274. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -42
  275. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -79
  276. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  277. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -147
  278. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -37
  279. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -46
  280. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  281. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -70
  282. package/lib/esm/actions/requirements/generalAdapter/index.d.ts +0 -3
  283. package/lib/esm/actions/requirements/generalAdapter/index.js +0 -3
  284. package/lib/esm/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  285. package/lib/esm/actions/signatures/getBlueAuthorizationAction.js +0 -44
  286. package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  287. package/lib/esm/actions/signatures/getTokenRequirementActions.js +0 -115
  288. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -44
  289. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -39
  290. package/lib/esm/actions/signatures/index.d.ts +0 -3
  291. package/lib/esm/actions/signatures/index.js +0 -3
  292. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -8
  293. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -5
  294. package/lib/esm/bundler/actions.d.ts +0 -797
  295. package/lib/esm/bundler/actions.js +0 -1368
  296. package/lib/esm/bundler/index.d.ts +0 -2
  297. package/lib/esm/bundler/index.js +0 -2
  298. package/lib/esm/bundler/types.d.ts +0 -235
  299. package/lib/esm/bundler/types.js +0 -1
  300. package/lib/esm/entities/vaultV1ReallocationData.d.ts +0 -326
  301. package/lib/esm/entities/vaultV1ReallocationData.js +0 -544
  302. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -78
  303. package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -239
  304. /package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.d.ts +0 -0
  305. /package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.d.ts +0 -0
@@ -1,41 +1,5 @@
1
- import type { BigIntish, MarketId, MarketParams } from "@morpho-org/blue-sdk";
1
+ import type { BigIntish, MarketParams } from "@morpho-org/blue-sdk";
2
2
  import type { Address } from "viem";
3
- /**
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}.
8
- */
9
- export interface PublicAllocatorOptions {
10
- /** Whether public allocator reallocation discovery is enabled. */
11
- readonly enabled?: boolean;
12
- /**
13
- * Timestamp at which market interest and public allocator pending caps are evaluated.
14
- * Defaults to the target market's last update timestamp.
15
- */
16
- readonly timestamp?: BigIntish;
17
- /**
18
- * Vaults to consider for reallocation. They must have enabled the PublicAllocator.
19
- * Arrays, readonly arrays, sets, and other iterables are accepted.
20
- * Defaults to all vaults present in the reallocation data.
21
- */
22
- readonly reallocatableVaults?: Iterable<Address>;
23
- /**
24
- * The maximum utilization each source market may reach when withdrawing
25
- * shared liquidity, scaled by WAD.
26
- *
27
- * @deprecated Per-market source ceilings will be removed in the next major.
28
- * Use `defaultMaxWithdrawalUtilization` to configure one ceiling for every source.
29
- */
30
- readonly maxWithdrawalUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
31
- /**
32
- * The default maximum utilization source markets may reach when withdrawing
33
- * shared liquidity, scaled by WAD.
34
- *
35
- * @default 90% (900000000000000000n)
36
- */
37
- readonly defaultMaxWithdrawalUtilization?: bigint;
38
- }
39
3
  /** Options controlling Vault V2 BluePublicAllocator reallocation discovery. */
40
4
  export interface VaultV2BluePublicAllocatorOptions {
41
5
  /** Whether Vault V2 public allocator discovery is enabled. */
@@ -64,48 +28,6 @@ export interface VaultV2BluePublicAllocatorOptions {
64
28
  */
65
29
  readonly maxPenalty?: bigint;
66
30
  }
67
- /**
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}.
72
- */
73
- export interface PublicReallocation {
74
- /** Source market id to withdraw from. */
75
- readonly id: MarketId;
76
- /** Vault that can perform the public allocator reallocation. */
77
- readonly vault: Address;
78
- /** Assets to withdraw from the source market. */
79
- readonly assets: bigint;
80
- }
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
- */
87
- export interface ReallocationWithdrawal {
88
- /** Source market parameters to pass to the public allocator. */
89
- readonly marketParams: MarketParams;
90
- /** Asset amount to withdraw from the source market. */
91
- readonly amount: bigint;
92
- }
93
- /**
94
- * A computed reallocation for a single vault.
95
- *
96
- * Maps 1:1 to a `PublicAllocator.reallocateTo()` call.
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}.
101
- */
102
- export interface VaultV1Reallocation {
103
- readonly vault: Address;
104
- /** Fee in native token (ETH) paid to the PublicAllocator for this vault. */
105
- readonly fee: bigint;
106
- /** Source markets to withdraw from before supplying to the target market. */
107
- readonly withdrawals: readonly ReallocationWithdrawal[];
108
- }
109
31
  /** Source of a Vault V2 BluePublicAllocator reallocation. */
110
32
  export type VaultV2BlueReallocationSource = {
111
33
  /** Reallocate from a Morpho Blue market. */
@@ -137,41 +59,3 @@ export interface VaultV2BlueReallocation {
137
59
  /** Vault-configured WAD-scaled penalty rate passed to the allocator. */
138
60
  readonly penalty: bigint;
139
61
  }
140
- /**
141
- * Deprecated name for a Vault V1 reallocation.
142
- *
143
- * @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
144
- * {@link VaultV2BlueReallocation}.
145
- */
146
- export type VaultReallocation = VaultV1Reallocation;
147
- /**
148
- * Options for computing vault reallocations via the public allocator.
149
- *
150
- * Extends {@link PublicAllocatorOptions} with supply-side utilization targets
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}.
155
- */
156
- export interface ReallocationComputeOptions extends PublicAllocatorOptions {
157
- /**
158
- * Per-market target utilization above which the shared liquidity algorithm
159
- * is triggered (scaled by WAD). Overrides `defaultSupplyTargetUtilization`
160
- * for the specified market.
161
- *
162
- * @deprecated The supply-target trigger is fixed at 90%
163
- * ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
164
- * in the next major. Per-market overrides are still honored for now.
165
- */
166
- readonly supplyTargetUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
167
- /**
168
- * The default target utilization above which the shared liquidity algorithm
169
- * is triggered (scaled by WAD).
170
- *
171
- * @default 90% (900000000000000000n)
172
- * @deprecated The supply-target trigger is fixed at 90%
173
- * ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
174
- * in the next major. Overrides are still honored for now.
175
- */
176
- readonly defaultSupplyTargetUtilization?: bigint;
177
- }
@@ -1,21 +1,5 @@
1
- export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams as BlueInputMarketParams,
2
- /** @deprecated Use `BlueInputMarketParams` or the raw `/blue/types` subpath. */
3
- InputMarketParams, IPermit2Allowance, Loadable, MarketId as BlueMarketId,
4
- /** @deprecated Use `BlueMarketId` or the raw `/blue/types` subpath. */
5
- MarketId, MaxBorrowOptions as BlueMaxBorrowOptions,
6
- /** @deprecated Use `BlueMaxBorrowOptions` or the raw `/blue/types` subpath. */
7
- MaxBorrowOptions, MaxPositionCapacities as BlueMaxPositionCapacities,
8
- /** @deprecated Use `BlueMaxPositionCapacities` or the raw `/blue/types` subpath. */
9
- MaxPositionCapacities, MaxWithdrawCollateralOptions as BlueMaxWithdrawCollateralOptions,
10
- /** @deprecated Use `BlueMaxWithdrawCollateralOptions` or the raw `/blue/types` subpath. */
11
- MaxWithdrawCollateralOptions, Pending, Permit2Allowance, } from "@morpho-org/blue-sdk";
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,
15
- /** @deprecated Use `BlueDeploylessFetchParameters` or the raw `/blue/types` subpath. */
16
- DeploylessFetchParameters, FetchParameters as BlueFetchParameters,
17
- /** @deprecated Use `BlueFetchParameters` or the raw `/blue/types` subpath. */
18
- FetchParameters, InputAllocation as BlueInputAllocation, MetaMorphoCall as BlueMetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs as PermitTypedDataArgs, } from "@morpho-org/blue-sdk-viem";
1
+ export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams as BlueInputMarketParams, Loadable, MarketId as BlueMarketId, MaxBorrowOptions as BlueMaxBorrowOptions, MaxPositionCapacities as BlueMaxPositionCapacities, MaxWithdrawCollateralOptions as BlueMaxWithdrawCollateralOptions, Pending, } from "@morpho-org/blue-sdk";
2
+ export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs, DeploylessFetchParameters as BlueDeploylessFetchParameters, FetchParameters as BlueFetchParameters, InputAllocation as BlueInputAllocation, MetaMorphoCall as BlueMetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs as PermitTypedDataArgs, } from "@morpho-org/blue-sdk-viem";
19
3
  export type { BuildFixedRateOfferChainParams as MidnightBuildFixedRateOfferChainParams, DecodedEcrecoverRatifierData as MidnightDecodedEcrecoverRatifierData, DecodedSetterRatifierData as MidnightDecodedSetterRatifierData, DeploylessFetchParameters as MidnightDeploylessFetchParameters, EcrecoverRatificationTypedData as MidnightEcrecoverRatificationTypedData, EcrecoverRatifierDataDigestParams as MidnightEcrecoverRatifierDataDigestParams, EcrecoverRatifierDataParams as MidnightEcrecoverRatifierDataParams, EcrecoverRatifierDataVerificationParams as MidnightEcrecoverRatifierDataVerificationParams, EcrecoverRatifierRatifyParams as MidnightEcrecoverRatifierRatifyParams, EcrecoverRatifierRootDigestParams as MidnightEcrecoverRatifierRootDigestParams, EcrecoverRatifierTypedDataParams as MidnightEcrecoverRatifierTypedDataParams, EcrecoverSignatureInput as MidnightEcrecoverSignatureInput, FixedRateOfferChainLeg as MidnightFixedRateOfferChainLeg, GetRatifierInfoParams as MidnightGetRatifierInfoParams, MidnightCallParameters, MidnightFetchParams, RatifierInfo as MidnightRatifierInfo, SetterRatifierDataParams as MidnightSetterRatifierDataParams, SetterRatifierDataVerificationParams as MidnightSetterRatifierDataVerificationParams, VerifiedEcrecoverRatifierData as MidnightVerifiedEcrecoverRatifierData, } from "@morpho-org/midnight-sdk";
20
4
  export type { ChainMetadata } from "@morpho-org/morpho-ts";
21
5
  export * from "./types/index.js";
@@ -1,39 +1,12 @@
1
1
  export type { CapacityLimit, RoundingDirection } from "@morpho-org/blue-sdk";
2
- export { AdaptiveCurveIrmLib as BlueAdaptiveCurveIrmLib,
3
- /** @deprecated Use BlueAdaptiveCurveIrmLib or the raw protocol subpath. */
4
- AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry as blueDefaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils,
5
- /** @deprecated Use BlueMarketUtils or the raw protocol subpath. */
6
- MarketUtils, MathLib, SharesMath as BlueSharesMath,
7
- /** @deprecated Use BlueSharesMath or the raw protocol subpath. */
8
- SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
9
- export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData,
10
- /** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
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";
14
- export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
15
- /** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
16
- EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
17
- /** @deprecated Use MidnightGroupUtils or the raw protocol subpath. */
18
- GroupUtils, MarketUtils as MidnightMarketUtils, OfferChainUtils as MidnightOfferChainUtils, OfferUtils as MidnightOfferUtils,
19
- /** @deprecated Use MidnightOfferUtils or the raw protocol subpath. */
20
- OfferUtils, Payload as MidnightPayload,
21
- /** @deprecated Use MidnightPayload or the raw protocol subpath. */
22
- Payload, PositionUtils as MidnightPositionUtils, RatifierUtils as MidnightRatifierUtils,
23
- /** @deprecated Use MidnightRatifierUtils or the raw protocol subpath. */
24
- RatifierUtils, SetterRatifierUtils as MidnightSetterRatifierUtils,
25
- /** @deprecated Use MidnightSetterRatifierUtils or the raw protocol subpath. */
26
- SetterRatifierUtils, TakeAmountsLib as MidnightTakeAmountsLib,
27
- /** @deprecated Use MidnightTakeAmountsLib or the raw protocol subpath. */
28
- TakeAmountsLib, TickLib as MidnightTickLib,
29
- /** @deprecated Use MidnightTickLib or the raw protocol subpath. */
30
- TickLib, TreeUtils as MidnightTreeUtils,
31
- /** @deprecated Use MidnightTreeUtils or the raw protocol subpath. */
32
- TreeUtils, } from "@morpho-org/midnight-sdk";
33
- export type { ArrayElementType, DeepPartial, DottedKeys, FieldType, PartialDottedKeys, WithId, WithIndex, } from "@morpho-org/morpho-ts";
2
+ export { AdaptiveCurveIrmLib as BlueAdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry as blueDefaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
3
+ export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
4
+ export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils, MarketUtils as MidnightMarketUtils, OfferChainUtils as MidnightOfferChainUtils, OfferUtils as MidnightOfferUtils, Payload as MidnightPayload, PositionUtils as MidnightPositionUtils, RatifierUtils as MidnightRatifierUtils, SetterRatifierUtils as MidnightSetterRatifierUtils, TakeAmountsLib as MidnightTakeAmountsLib, TickLib as MidnightTickLib, TreeUtils as MidnightTreeUtils, } from "@morpho-org/midnight-sdk";
5
+ export type { ArrayElementType, DeepPartial, DottedKeys, FieldType, PartialDottedKeys, } from "@morpho-org/morpho-ts";
34
6
  export { bigIntComparator, createGetValue, createHasValue, deepFreeze, entries, filterDefined, fromEntries, getLast, getLastDefined, getSubdomainBaseUrl, getValue, hasValue, isDefined, isNotNull, isNotUndefined, keys, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
35
- export { computeReallocations, computeVaultV1Reallocations, } from "./helpers/computeVaultV1Reallocations.js";
36
7
  export { addTransactionMetadata } from "./helpers/metadata.js";
8
+ export { type PreviewVaultV2ForceWithdrawParams, previewVaultV2ForceWithdraw, type VaultV2ForceWithdrawPreview, } from "./helpers/previewVaultV2ForceWithdraw.js";
37
9
  export { type PreviewVaultV2InKindRedeemParams, previewVaultV2InKindRedeem, type VaultV2InKindRedeemMarketPreview, } from "./helpers/previewVaultV2InKindRedeem.js";
38
- export { computeMaxRepaySharePrice, computeMinBorrowSharePrice, } from "./helpers/slippage.js";
39
- export { validateAccrualPosition, validateChainId, validateNativeAsset, validatePositionHealth, validatePositionHealthAfterWithdraw, validateReallocations, validateRepayAmount, validateRepayShares, validateSlippageTolerance, validateUserAddress, } from "./helpers/validate.js";
10
+ export { computeMinForceWithdrawSharePrice } from "./helpers/slippage.js";
11
+ export { validateAccrualPosition, validateChainId, validateNativeAsset, validatePositionHealth, validatePositionHealthAfterWithdraw, validateRepayAmount, validateRepayShares, validateSlippageTolerance, validateUserAddress, } from "./helpers/validate.js";
12
+ export { computeVaultV2ForceWithdrawFeeSharesMinted, computeVaultV2ForceWithdrawMinSharesBurnt, computeVaultV2ForceWithdrawPlan, computeVaultV2ForceWithdrawSharesBurnt, resolveVaultV2ForceWithdrawEligibility, type VaultV2ForceWithdrawEligibility, type VaultV2ForceWithdrawPlan, } from "./helpers/vaultV2ForceWithdrawPlan.js";
package/lib/cjs/utils.js CHANGED
@@ -1,21 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TreeUtils = exports.MidnightTreeUtils = exports.TickLib = exports.MidnightTickLib = exports.TakeAmountsLib = exports.MidnightTakeAmountsLib = exports.SetterRatifierUtils = exports.MidnightSetterRatifierUtils = exports.RatifierUtils = exports.MidnightRatifierUtils = exports.MidnightPositionUtils = exports.Payload = exports.MidnightPayload = exports.OfferUtils = exports.MidnightOfferUtils = exports.MidnightOfferChainUtils = exports.MidnightMarketUtils = exports.GroupUtils = exports.MidnightGroupUtils = exports.eip712Digest = exports.EcrecoverRatifierUtils = exports.MidnightEcrecoverRatifierUtils = exports.safeParseUnits = exports.safeParseNumber = exports.safeGetAddress = exports.restructure = exports.readContractRestructured = exports.optionalBoolean = exports.BlueMetaMorphoAction = exports.getPermitTypedData = exports.getPermit2TransferFromTypedData = exports.getPermit2PermitTypedData = exports.getDaiPermitTypedData = exports.getAuthorizationTypedData = exports.getBlueAuthorizationTypedData = exports.decodeBytes32String = exports.VaultV2Utils = exports.VaultV2BluePublicAllocatorConfigUtils = exports.VaultV2BlueMarketPublicAllocatorConfigUtils = exports.VaultUtils = exports.SharesMath = exports.BlueSharesMath = exports.MathLib = exports.MarketUtils = exports.BlueMarketUtils = exports.getBlueDefaultPreLiquidationParams = exports.blueDefaultPreLiquidationParamsRegistry = exports.CapacityLimitReason = exports.AdaptiveCurveIrmLib = exports.BlueAdaptiveCurveIrmLib = void 0;
4
- exports.validateUserAddress = exports.validateSlippageTolerance = exports.validateRepayShares = exports.validateRepayAmount = exports.validateReallocations = exports.validatePositionHealthAfterWithdraw = exports.validatePositionHealth = exports.validateNativeAsset = exports.validateChainId = exports.validateAccrualPosition = exports.computeMinBorrowSharePrice = exports.computeMaxRepaySharePrice = exports.previewVaultV2InKindRedeem = exports.addTransactionMetadata = exports.computeVaultV1Reallocations = exports.computeReallocations = exports.values = exports.transformValue = exports.Time = exports.retryPromiseLinearBackoff = exports.mergeEntries = exports.keys = exports.isNotUndefined = exports.isNotNull = exports.isDefined = exports.hasValue = exports.getValue = exports.getSubdomainBaseUrl = exports.getLastDefined = exports.getLast = exports.fromEntries = exports.filterDefined = exports.entries = exports.deepFreeze = exports.createHasValue = exports.createGetValue = exports.bigIntComparator = void 0;
3
+ exports.isNotNull = exports.isDefined = exports.hasValue = exports.getValue = exports.getSubdomainBaseUrl = exports.getLastDefined = exports.getLast = exports.fromEntries = exports.filterDefined = exports.entries = exports.deepFreeze = exports.createHasValue = exports.createGetValue = exports.bigIntComparator = exports.MidnightTreeUtils = exports.MidnightTickLib = exports.MidnightTakeAmountsLib = exports.MidnightSetterRatifierUtils = exports.MidnightRatifierUtils = exports.MidnightPositionUtils = exports.MidnightPayload = exports.MidnightOfferUtils = exports.MidnightOfferChainUtils = exports.MidnightMarketUtils = exports.MidnightGroupUtils = exports.eip712Digest = exports.MidnightEcrecoverRatifierUtils = exports.safeParseUnits = exports.safeParseNumber = exports.safeGetAddress = exports.restructure = exports.readContractRestructured = exports.optionalBoolean = exports.BlueMetaMorphoAction = exports.getPermitTypedData = exports.getPermit2TransferFromTypedData = exports.getPermit2PermitTypedData = exports.getBlueAuthorizationTypedData = exports.decodeBytes32String = exports.VaultV2Utils = exports.VaultV2BluePublicAllocatorConfigUtils = exports.VaultV2BlueMarketPublicAllocatorConfigUtils = exports.VaultUtils = exports.BlueSharesMath = exports.MathLib = exports.BlueMarketUtils = exports.getBlueDefaultPreLiquidationParams = exports.blueDefaultPreLiquidationParamsRegistry = exports.CapacityLimitReason = exports.BlueAdaptiveCurveIrmLib = void 0;
4
+ exports.resolveVaultV2ForceWithdrawEligibility = exports.computeVaultV2ForceWithdrawSharesBurnt = exports.computeVaultV2ForceWithdrawPlan = exports.computeVaultV2ForceWithdrawMinSharesBurnt = exports.computeVaultV2ForceWithdrawFeeSharesMinted = exports.validateUserAddress = exports.validateSlippageTolerance = exports.validateRepayShares = exports.validateRepayAmount = exports.validatePositionHealthAfterWithdraw = exports.validatePositionHealth = exports.validateNativeAsset = exports.validateChainId = exports.validateAccrualPosition = exports.computeMinForceWithdrawSharePrice = exports.previewVaultV2InKindRedeem = exports.previewVaultV2ForceWithdraw = exports.addTransactionMetadata = exports.values = exports.transformValue = exports.Time = exports.retryPromiseLinearBackoff = exports.mergeEntries = exports.keys = exports.isNotUndefined = void 0;
5
5
  var blue_sdk_1 = require("@morpho-org/blue-sdk");
6
6
  Object.defineProperty(exports, "BlueAdaptiveCurveIrmLib", { enumerable: true, get: function () { return blue_sdk_1.AdaptiveCurveIrmLib; } });
7
- /** @deprecated Use BlueAdaptiveCurveIrmLib or the raw protocol subpath. */
8
- Object.defineProperty(exports, "AdaptiveCurveIrmLib", { enumerable: true, get: function () { return blue_sdk_1.AdaptiveCurveIrmLib; } });
9
7
  Object.defineProperty(exports, "CapacityLimitReason", { enumerable: true, get: function () { return blue_sdk_1.CapacityLimitReason; } });
10
8
  Object.defineProperty(exports, "blueDefaultPreLiquidationParamsRegistry", { enumerable: true, get: function () { return blue_sdk_1.defaultPreLiquidationParamsRegistry; } });
11
9
  Object.defineProperty(exports, "getBlueDefaultPreLiquidationParams", { enumerable: true, get: function () { return blue_sdk_1.getDefaultPreLiquidationParams; } });
12
10
  Object.defineProperty(exports, "BlueMarketUtils", { enumerable: true, get: function () { return blue_sdk_1.MarketUtils; } });
13
- /** @deprecated Use BlueMarketUtils or the raw protocol subpath. */
14
- Object.defineProperty(exports, "MarketUtils", { enumerable: true, get: function () { return blue_sdk_1.MarketUtils; } });
15
11
  Object.defineProperty(exports, "MathLib", { enumerable: true, get: function () { return blue_sdk_1.MathLib; } });
16
12
  Object.defineProperty(exports, "BlueSharesMath", { enumerable: true, get: function () { return blue_sdk_1.SharesMath; } });
17
- /** @deprecated Use BlueSharesMath or the raw protocol subpath. */
18
- Object.defineProperty(exports, "SharesMath", { enumerable: true, get: function () { return blue_sdk_1.SharesMath; } });
19
13
  Object.defineProperty(exports, "VaultUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultUtils; } });
20
14
  Object.defineProperty(exports, "VaultV2BlueMarketPublicAllocatorConfigUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BlueMarketPublicAllocatorConfigUtils; } });
21
15
  Object.defineProperty(exports, "VaultV2BluePublicAllocatorConfigUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BluePublicAllocatorConfigUtils; } });
@@ -23,10 +17,6 @@ Object.defineProperty(exports, "VaultV2Utils", { enumerable: true, get: function
23
17
  var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
24
18
  Object.defineProperty(exports, "decodeBytes32String", { enumerable: true, get: function () { return blue_sdk_viem_1.decodeBytes32String; } });
25
19
  Object.defineProperty(exports, "getBlueAuthorizationTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getAuthorizationTypedData; } });
26
- /** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
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. */
29
- Object.defineProperty(exports, "getDaiPermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getDaiPermitTypedData; } });
30
20
  Object.defineProperty(exports, "getPermit2PermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermit2PermitTypedData; } });
31
21
  Object.defineProperty(exports, "getPermit2TransferFromTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermit2TransferFromTypedData; } });
32
22
  Object.defineProperty(exports, "getPermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermitTypedData; } });
@@ -39,36 +29,18 @@ Object.defineProperty(exports, "safeParseNumber", { enumerable: true, get: funct
39
29
  Object.defineProperty(exports, "safeParseUnits", { enumerable: true, get: function () { return blue_sdk_viem_1.safeParseUnits; } });
40
30
  var midnight_sdk_1 = require("@morpho-org/midnight-sdk");
41
31
  Object.defineProperty(exports, "MidnightEcrecoverRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.EcrecoverRatifierUtils; } });
42
- /** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
43
- Object.defineProperty(exports, "EcrecoverRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.EcrecoverRatifierUtils; } });
44
32
  Object.defineProperty(exports, "eip712Digest", { enumerable: true, get: function () { return midnight_sdk_1.eip712Digest; } });
45
33
  Object.defineProperty(exports, "MidnightGroupUtils", { enumerable: true, get: function () { return midnight_sdk_1.GroupUtils; } });
46
- /** @deprecated Use MidnightGroupUtils or the raw protocol subpath. */
47
- Object.defineProperty(exports, "GroupUtils", { enumerable: true, get: function () { return midnight_sdk_1.GroupUtils; } });
48
34
  Object.defineProperty(exports, "MidnightMarketUtils", { enumerable: true, get: function () { return midnight_sdk_1.MarketUtils; } });
49
35
  Object.defineProperty(exports, "MidnightOfferChainUtils", { enumerable: true, get: function () { return midnight_sdk_1.OfferChainUtils; } });
50
36
  Object.defineProperty(exports, "MidnightOfferUtils", { enumerable: true, get: function () { return midnight_sdk_1.OfferUtils; } });
51
- /** @deprecated Use MidnightOfferUtils or the raw protocol subpath. */
52
- Object.defineProperty(exports, "OfferUtils", { enumerable: true, get: function () { return midnight_sdk_1.OfferUtils; } });
53
37
  Object.defineProperty(exports, "MidnightPayload", { enumerable: true, get: function () { return midnight_sdk_1.Payload; } });
54
- /** @deprecated Use MidnightPayload or the raw protocol subpath. */
55
- Object.defineProperty(exports, "Payload", { enumerable: true, get: function () { return midnight_sdk_1.Payload; } });
56
38
  Object.defineProperty(exports, "MidnightPositionUtils", { enumerable: true, get: function () { return midnight_sdk_1.PositionUtils; } });
57
39
  Object.defineProperty(exports, "MidnightRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.RatifierUtils; } });
58
- /** @deprecated Use MidnightRatifierUtils or the raw protocol subpath. */
59
- Object.defineProperty(exports, "RatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.RatifierUtils; } });
60
40
  Object.defineProperty(exports, "MidnightSetterRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.SetterRatifierUtils; } });
61
- /** @deprecated Use MidnightSetterRatifierUtils or the raw protocol subpath. */
62
- Object.defineProperty(exports, "SetterRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.SetterRatifierUtils; } });
63
41
  Object.defineProperty(exports, "MidnightTakeAmountsLib", { enumerable: true, get: function () { return midnight_sdk_1.TakeAmountsLib; } });
64
- /** @deprecated Use MidnightTakeAmountsLib or the raw protocol subpath. */
65
- Object.defineProperty(exports, "TakeAmountsLib", { enumerable: true, get: function () { return midnight_sdk_1.TakeAmountsLib; } });
66
42
  Object.defineProperty(exports, "MidnightTickLib", { enumerable: true, get: function () { return midnight_sdk_1.TickLib; } });
67
- /** @deprecated Use MidnightTickLib or the raw protocol subpath. */
68
- Object.defineProperty(exports, "TickLib", { enumerable: true, get: function () { return midnight_sdk_1.TickLib; } });
69
43
  Object.defineProperty(exports, "MidnightTreeUtils", { enumerable: true, get: function () { return midnight_sdk_1.TreeUtils; } });
70
- /** @deprecated Use MidnightTreeUtils or the raw protocol subpath. */
71
- Object.defineProperty(exports, "TreeUtils", { enumerable: true, get: function () { return midnight_sdk_1.TreeUtils; } });
72
44
  var morpho_ts_1 = require("@morpho-org/morpho-ts");
73
45
  Object.defineProperty(exports, "bigIntComparator", { enumerable: true, get: function () { return morpho_ts_1.bigIntComparator; } });
74
46
  Object.defineProperty(exports, "createGetValue", { enumerable: true, get: function () { return morpho_ts_1.createGetValue; } });
@@ -91,24 +63,27 @@ Object.defineProperty(exports, "retryPromiseLinearBackoff", { enumerable: true,
91
63
  Object.defineProperty(exports, "Time", { enumerable: true, get: function () { return morpho_ts_1.Time; } });
92
64
  Object.defineProperty(exports, "transformValue", { enumerable: true, get: function () { return morpho_ts_1.transformValue; } });
93
65
  Object.defineProperty(exports, "values", { enumerable: true, get: function () { return morpho_ts_1.values; } });
94
- var computeVaultV1Reallocations_js_1 = require("./helpers/computeVaultV1Reallocations.js");
95
- Object.defineProperty(exports, "computeReallocations", { enumerable: true, get: function () { return computeVaultV1Reallocations_js_1.computeReallocations; } });
96
- Object.defineProperty(exports, "computeVaultV1Reallocations", { enumerable: true, get: function () { return computeVaultV1Reallocations_js_1.computeVaultV1Reallocations; } });
97
66
  var metadata_js_1 = require("./helpers/metadata.js");
98
67
  Object.defineProperty(exports, "addTransactionMetadata", { enumerable: true, get: function () { return metadata_js_1.addTransactionMetadata; } });
68
+ var previewVaultV2ForceWithdraw_js_1 = require("./helpers/previewVaultV2ForceWithdraw.js");
69
+ Object.defineProperty(exports, "previewVaultV2ForceWithdraw", { enumerable: true, get: function () { return previewVaultV2ForceWithdraw_js_1.previewVaultV2ForceWithdraw; } });
99
70
  var previewVaultV2InKindRedeem_js_1 = require("./helpers/previewVaultV2InKindRedeem.js");
100
71
  Object.defineProperty(exports, "previewVaultV2InKindRedeem", { enumerable: true, get: function () { return previewVaultV2InKindRedeem_js_1.previewVaultV2InKindRedeem; } });
101
72
  var slippage_js_1 = require("./helpers/slippage.js");
102
- Object.defineProperty(exports, "computeMaxRepaySharePrice", { enumerable: true, get: function () { return slippage_js_1.computeMaxRepaySharePrice; } });
103
- Object.defineProperty(exports, "computeMinBorrowSharePrice", { enumerable: true, get: function () { return slippage_js_1.computeMinBorrowSharePrice; } });
73
+ Object.defineProperty(exports, "computeMinForceWithdrawSharePrice", { enumerable: true, get: function () { return slippage_js_1.computeMinForceWithdrawSharePrice; } });
104
74
  var validate_js_1 = require("./helpers/validate.js");
105
75
  Object.defineProperty(exports, "validateAccrualPosition", { enumerable: true, get: function () { return validate_js_1.validateAccrualPosition; } });
106
76
  Object.defineProperty(exports, "validateChainId", { enumerable: true, get: function () { return validate_js_1.validateChainId; } });
107
77
  Object.defineProperty(exports, "validateNativeAsset", { enumerable: true, get: function () { return validate_js_1.validateNativeAsset; } });
108
78
  Object.defineProperty(exports, "validatePositionHealth", { enumerable: true, get: function () { return validate_js_1.validatePositionHealth; } });
109
79
  Object.defineProperty(exports, "validatePositionHealthAfterWithdraw", { enumerable: true, get: function () { return validate_js_1.validatePositionHealthAfterWithdraw; } });
110
- Object.defineProperty(exports, "validateReallocations", { enumerable: true, get: function () { return validate_js_1.validateReallocations; } });
111
80
  Object.defineProperty(exports, "validateRepayAmount", { enumerable: true, get: function () { return validate_js_1.validateRepayAmount; } });
112
81
  Object.defineProperty(exports, "validateRepayShares", { enumerable: true, get: function () { return validate_js_1.validateRepayShares; } });
113
82
  Object.defineProperty(exports, "validateSlippageTolerance", { enumerable: true, get: function () { return validate_js_1.validateSlippageTolerance; } });
114
83
  Object.defineProperty(exports, "validateUserAddress", { enumerable: true, get: function () { return validate_js_1.validateUserAddress; } });
84
+ var vaultV2ForceWithdrawPlan_js_1 = require("./helpers/vaultV2ForceWithdrawPlan.js");
85
+ Object.defineProperty(exports, "computeVaultV2ForceWithdrawFeeSharesMinted", { enumerable: true, get: function () { return vaultV2ForceWithdrawPlan_js_1.computeVaultV2ForceWithdrawFeeSharesMinted; } });
86
+ Object.defineProperty(exports, "computeVaultV2ForceWithdrawMinSharesBurnt", { enumerable: true, get: function () { return vaultV2ForceWithdrawPlan_js_1.computeVaultV2ForceWithdrawMinSharesBurnt; } });
87
+ Object.defineProperty(exports, "computeVaultV2ForceWithdrawPlan", { enumerable: true, get: function () { return vaultV2ForceWithdrawPlan_js_1.computeVaultV2ForceWithdrawPlan; } });
88
+ Object.defineProperty(exports, "computeVaultV2ForceWithdrawSharesBurnt", { enumerable: true, get: function () { return vaultV2ForceWithdrawPlan_js_1.computeVaultV2ForceWithdrawSharesBurnt; } });
89
+ Object.defineProperty(exports, "resolveVaultV2ForceWithdrawEligibility", { enumerable: true, get: function () { return vaultV2ForceWithdrawPlan_js_1.resolveVaultV2ForceWithdrawEligibility; } });