@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
@@ -2,8 +2,11 @@
2
2
 
3
3
  Version 6 keeps the Blue entity at `client.morpho.blue(marketParams, chainId)` and preserves its
4
4
  write-method names while routing them through five direct BlueBundlesV1 entrypoints. Blue reads and
5
- versioned reallocation-data helpers remain on the same entity. There is no parallel BlueBundlesV1
6
- extension or automatic fallback to the v5 route.
5
+ the Vault V2 reallocation-data helper remain on the same entity. There is no parallel
6
+ extension or automatic fallback to the v5 route. Version 6 also reshapes Vault V2 `forceWithdraw`
7
+ to route through the standalone `VaultExitBundlesV1` periphery. This guide covers the Blue write
8
+ rerouting and the Vault V2 `forceWithdraw` route replacement alongside the other v6 breaks
9
+ documented in the sections below.
7
10
 
8
11
  ## Vault V1 and Vault V2 deposits
9
12
 
@@ -209,10 +212,10 @@ it alongside the added fields.
209
212
  transaction sender and sends proceeds and refunds back to that sender; `userAddress` must be the
210
213
  eventual sender used to resolve requirements and position snapshots.
211
214
  - Replace PublicAllocator V1 or mixed-version reallocation write inputs with Vault V2
212
- `VaultV2BlueReallocation` inputs. All Vault V1 reallocation planning, data, input, validation,
213
- and explicit low-level Bundler3-composition surfaces remain available only as deprecated
214
- compatibility surfaces and will be removed in the next major; the high-level Blue writes do not
215
- accept their outputs.
215
+ `VaultV2BlueReallocation` inputs. Vault V1 reallocation planning, data, input, validation, and
216
+ explicit low-level Bundler3-composition surfaces are removed in v6. Direct Vault V1 vault
217
+ operations (`deposit`, `withdraw`, `redeem`, `migrateToV2`, `inKindRedeem`) remain; allocator-specific
218
+ raw exports are gone.
216
219
  - Provide the BlueBundlesV1 execution deadline and any optional referral-fee configuration through
217
220
  the new typed method inputs. Share-mode repayment deadlines are limited to two hours so the SDK's
218
221
  derived `maxRepayAssets` remains sufficient through execution.
@@ -234,11 +237,12 @@ The destinations are different:
234
237
 
235
238
  - Classic ERC-20 approvals and ERC-2612 permits now authorize BlueBundlesV1.
236
239
  - Permit2 keeps its ERC-20 approval on canonical Permit2, but the SignatureTransfer payload names
237
- BlueBundlesV1 as spender. Explicit Permit2 nonces are now required — see the subsection below.
240
+ BlueBundlesV1 as spender. The SDK resolves the lowest unused Permit2 nonce by default — see the
241
+ subsection below.
238
242
  - Morpho authorization now grants BlueBundlesV1 operator rights instead of GeneralAdapter1.
239
- - Without signature support, saturated full-repay requirements use the token's reusable maximum
240
- allowance so a later bounded debt quote remains covered; BlueBundlesV1 still refunds unused
241
- transaction funding.
243
+ - Without signature support, full-repay requirements approve exactly the derived `maxRepayAssets`
244
+ funding cap; pass `approvalAmount` to `getRequirements()` to keep a reusable allowance.
245
+ BlueBundlesV1 still refunds unused transaction funding.
242
246
  - The built transaction's `to` is BlueBundlesV1, not Bundler3, and calldata contains one fixed
243
247
  BlueBundlesV1 entrypoint rather than a `BundlerAction[]` multicall.
244
248
 
@@ -246,23 +250,56 @@ Update simulations and analytics for the v6 action-field changes. Do not assert
246
250
  Bundler3/GeneralAdapter1 destinations or inspect Bundler3 sub-actions for these
247
251
  high-level writes.
248
252
 
249
- ### Permit2 SignatureTransfer requires an explicit nonce
253
+ ### Permit2 SignatureTransfer resolves the nonce automatically
250
254
 
251
- SignatureTransfer consumes an owner-global unordered nonce rather than an allowance, so the SDK no
252
- longer allocates one implicitly. For a client with `supportSignature: true`, the default supply
253
- requirement path selects Permit2 and `supply(...).getRequirements()` now throws
254
- `MissingPermit2SignatureTransferNonceError` when no nonce is supplied. Pass an unused nonce explicitly:
255
+ SignatureTransfer consumes an owner-global unordered nonce rather than an allowance. For a client
256
+ with `supportSignature: true`, the default supply requirement path selects Permit2 and
257
+ `supply(...).getRequirements()` resolves the lowest unused nonce for `userAddress` automatically — no
258
+ nonce argument is required:
255
259
 
256
260
  ```ts
257
261
  const requirements = await market
258
262
  .supply({ userAddress, assets, deadline })
259
- .getRequirements({ permit2Nonce });
263
+ .getRequirements();
260
264
  ```
261
265
 
262
- Allocate any `uint256` whose Permit2 `nonceBitmap` bit is still unset for `userAddress` (each nonce
263
- is single-use; a consumed one throws `Permit2SignatureTransferNonceAlreadyUsedError`). To skip Permit2
264
- for ERC-2612 tokens, pass `getRequirements({ useSimplePermit: true })`, which prefers a one-signature
265
- ERC-2612 permit and needs no nonce.
266
+ Pass `getRequirements({ permit2Nonce })` to pin an explicit `uint256` whose Permit2 `nonceBitmap` bit
267
+ is still unset for `userAddress` (each nonce is single-use; a consumed one throws
268
+ `Permit2SignatureTransferNonceAlreadyUsedError`). An owner whose every nonce at or after the scan
269
+ start is consumed throws `NoUnusedPermit2NonceError`. To skip Permit2 for ERC-2612 tokens, pass
270
+ `getRequirements({ useSimplePermit: true })`, which prefers a one-signature ERC-2612 permit and needs
271
+ no nonce.
272
+
273
+ ### Signature requirements expose `action.typedData`; low-level encoders take `owner`
274
+
275
+ Every signable requirement action (`PermitAction`, `Permit2SignatureTransferAction`,
276
+ `AuthorizationAction`, `MidnightOfferRootSignatureAction`) now carries the deep-frozen EIP-712
277
+ payload that `sign()` signs, so it can be inspected or displayed before signing:
278
+
279
+ ```ts
280
+ const requirement = (await output.getRequirements()).find(isRequirementSignature);
281
+ if (requirement == null) return; // nothing to sign (only on-chain approvals, or none)
282
+
283
+ const typedData = requirement.action.typedData; // exact EIP-712 payload `sign()` will sign
284
+ const signed = await requirement.sign(walletClient, owner);
285
+ const tx = output.buildTx([signed]); // Midnight outputs take the single signature instead
286
+ ```
287
+
288
+ `requirement.action.typedData` is typed as required on a `Requirement`, so no null check is needed.
289
+ It is the exact `TypedDataDefinition` that `sign()` signs; signing itself still goes through
290
+ `Requirement.sign(client, userAddress)`.
291
+
292
+ Because the permit and authorization payloads embed the owner and are built eagerly, two exported
293
+ low-level encoders take a new required `owner` parameter. Their `sign(client, userAddress)` rejects
294
+ a `userAddress` different from `owner` with `AddressMismatchError`.
295
+
296
+ | v5 call | v6 call |
297
+ | --- | --- |
298
+ | `encodeErc20Permit(client, { token, spender, amount, chainId, nonce })` | `encodeErc20Permit(client, { token, owner, spender, amount, chainId, nonce })` |
299
+ | `encodeBlueSignatureAuthorization(client, { authorized, isAuthorized, chainId, nonce })` | `encodeBlueSignatureAuthorization(client, { owner, authorized, isAuthorized, chainId, nonce })` |
300
+
301
+ High-level entity flows (`client.morpho.blue(...)`, vault deposits, Midnight) already supply the
302
+ owner and need no changes.
266
303
 
267
304
  ## Blue refinance
268
305
 
@@ -307,13 +344,12 @@ Stay on v5 if the product requires partial or collateral-only refinance behavior
307
344
 
308
345
  The partial-migration error classes `BorrowAmountAndSharesExclusiveError`,
309
346
  `RefinanceExceedsCollateralError`, `RefinanceExceedsBorrowSharesError`,
310
- `RefinanceExceedsBorrowAssetsError`, and `RefinanceSharesMissingBorrowAssetsError` are **deprecated,
311
- not removed**: they stay exported through v6 (marked `@deprecated`) for consumers pattern-matching on
312
- the v5 surface, are never thrown by the full-position route, and are removed in the next major. The
313
- full-position route validates snapshot ownership and token/market compatibility, accounts for
314
- reallocation penalties in destination debt, then checks the combined destination position against
315
- the buffered LLTV (`BorrowExceedsSafeLtvError`); `RefinanceSameMarketError` and
316
- `RefinanceTokenMismatchError` stay.
347
+ `RefinanceExceedsBorrowAssetsError`, and `RefinanceSharesMissingBorrowAssetsError` are removed. They
348
+ were never thrown by the full-position route. This removal did not receive a published deprecation
349
+ window; remove pattern-matching branches for these errors or stay on v5. The full-position route
350
+ validates snapshot ownership and token/market compatibility, accounts for reallocation penalties in
351
+ destination debt, then checks the combined destination position against the buffered LLTV
352
+ (`BorrowExceedsSafeLtvError`); `RefinanceSameMarketError` and `RefinanceTokenMismatchError` stay.
317
353
 
318
354
  ## Removed action-output field: `reallocationFee`
319
355
 
@@ -326,8 +362,130 @@ reallocations.
326
362
  ## Removed type: `BlueReallocationPlan`
327
363
 
328
364
  The `BlueReallocationPlan` union is removed. High-level Blue write inputs accept
329
- `Iterable<VaultV2BlueReallocation>` directly; for explicit low-level Vault V1 composition, use
330
- `VaultV1Reallocation[]`.
365
+ `Iterable<VaultV2BlueReallocation>` directly. Stay on v5 if explicit PublicAllocator V1 planning or
366
+ Bundler3 composition is required.
367
+
368
+ ## Removed deprecated compatibility exports
369
+
370
+ Version 6 removes all deprecated compatibility exports, including names first deprecated only in a
371
+ v6 prerelease:
372
+
373
+ - Ambiguous unprefixed Blue and Midnight facade aliases are removed. Use the `Blue*` / `Midnight*`
374
+ names from shared facade subpaths or canonical names from `/blue/*` and `/midnight/*`.
375
+ - Operation-specific scalar and native-asset error aliases are removed. Pattern-match on the
376
+ current generic input errors and canonical native-asset error classes.
377
+ - `InvalidReallocationShapeError` is removed. Use `InvalidVaultV2BlueReallocationShapeError` for
378
+ malformed Vault V2 entries.
379
+ - Deprecated ABI, constant, typed-data helper, and utility-type aliases inherited from upstream
380
+ packages are removed. Import their canonical replacements from the same facade category.
381
+ - The deprecated `getDaiPermitTypedData` and `DaiPermitArgs` exports are removed from both the root
382
+ and raw `/blue` facades. Maintained action flows route DAI approvals through Permit2 or a classic
383
+ approval.
384
+ - PublicAllocator V1 addresses, ABIs, configs, fetchers, augmentation, planner, data, input,
385
+ validation, and Bundler3-composition symbols are removed.
386
+ Use `getVaultV2BlueReallocationData` and
387
+ `VaultV2BlueReallocationData.computeVaultV2BlueReallocations`.
388
+ - In-kind, fixed-bundles, referral-fee, and Permit2 compatibility errors are removed. Use
389
+ `VaultV2SingleAdapterRequiredError`, `VaultV2UnsupportedExitAdapterError`,
390
+ `BundlesPermitMismatchError`, `BundlesRequirementSignatureMismatchError`,
391
+ `Permit2SignatureTransferNonceAlreadyUsedError`, and `ReferralFeeRecipientMissingError`.
392
+ - `UnsupportedRequirementSignatureError` is thrown by `selectRequirementSignatures` and
393
+ `getBundlesTokenPermit` when a requirement signature carries an action type the v6 flows do not
394
+ support, such as a stale v5 `permit2` signature. `getBundlesTokenPermit` previously threw
395
+ `UnexpectedRequirementSignatureError("permit")` for that case.
396
+ - `getVaultExitBundlesV1PermitStruct` and its parameter/result types are removed. Use
397
+ `getBundlesSharesPermit` and `BundleSharesPermit`.
398
+
399
+ Direct Vault V1 actions remain. Vault V1 PublicAllocator compatibility does not.
400
+
401
+ Several compatibility names above, including the partial-refinance errors, did not complete a
402
+ published deprecation window. Their v6 removal is intentional; stay on v5 if migration cannot be
403
+ completed atomically.
404
+
405
+ ## Removed without a deprecation window
406
+
407
+ The stable low-level Bundler3 and migration-adapter surfaces, including their registry and ABI
408
+ re-exports, compatibility errors, signature helpers and types, the WDK requirement alias, and the
409
+ five v5 partial-refinance error classes were removed without a published deprecation window. This
410
+ is an intentional one-time lifecycle deviation; migrate to the standalone bundle actions and
411
+ canonical exports, or stay on v5.
412
+
413
+ ## Removed low-level Bundler3 and migration surfaces
414
+
415
+ Version 6 removes the low-level Bundler3 action composer, executor and adapter ABIs, Bundler3-only
416
+ requirements and signature helpers, and related action, signature, and error types. It also removes
417
+ the residual Aave and Compound migration-adapter ABIs left after `migration-sdk-viem` was retired,
418
+ plus the legacy MORPHO token-wrapper ABI entries. Use the fixed standalone BlueBundlesV1,
419
+ VaultBundlesV1, and VaultExitBundlesV1 actions for supported SDK workflows.
420
+
421
+ These low-level surfaces were not deprecated in a published v5 minor. Their removal is an
422
+ intentional one-time lifecycle deviation; integrations that still compose arbitrary Bundler3 calls
423
+ must stay on v5 or encode against the contracts independently.
424
+
425
+ ## Vault V2 `forceWithdraw`
426
+
427
+ `MorphoVaultV2.forceWithdraw` and the pure `vaultV2ForceWithdraw` action now route through the
428
+ standalone `VaultExitBundlesV1` periphery instead of a `VaultV2.multicall` of caller-supplied
429
+ `forceDeallocate` calls. The contract computes its own deallocations and bounds the realized exit
430
+ share price. `forceRedeem` is unchanged and stays on the vault multicall.
431
+
432
+ | Was (v5) | Now (v6) |
433
+ | --- | --- |
434
+ | `forceWithdraw({ deallocations, withdraw: { amount }, userAddress })` | `forceWithdraw({ exitAssets, vaultData, userAddress, adapter?, deadline?, slippageTolerance?, minSharePriceE27?, referralFeePct?, referralFeeRecipient? })` |
435
+ | Returns `{ buildTx }` | Returns an `ActionOutput` — `{ getRequirements(), buildTx(signatures?) }` (`buildTx` stays synchronous) |
436
+ | `withdraw.amount` was the net payout | `exitAssets` is **penalty-inclusive**; quote the split with the new `previewVaultV2ForceWithdraw` |
437
+ | `tx.to` is the vault | `tx.to` is `VaultExitBundlesV1` |
438
+ | No approval needed (the vault burned `msg.sender`'s own shares) | A vault-share allowance or ERC-2612 permit **to `VaultExitBundlesV1`** is now required |
439
+
440
+ ### Pure action
441
+
442
+ The pure action's call shape changes alongside the entity method:
443
+
444
+ ```ts
445
+ // v5
446
+ vaultV2ForceWithdraw({
447
+ vault: { address: vaultAddress },
448
+ args: {
449
+ deallocations: [{ adapter, marketParams, amount: 500_000n }],
450
+ withdraw: { amount: 500_000n, recipient },
451
+ onBehalf,
452
+ },
453
+ });
454
+
455
+ // v6
456
+ vaultV2ForceWithdraw({
457
+ vault: { chainId, address: vaultAddress },
458
+ args: {
459
+ adapter,
460
+ exitAssets: 500_000n,
461
+ minSharePriceE27,
462
+ userAddress,
463
+ deadline,
464
+ },
465
+ });
466
+ ```
467
+
468
+ `chainId` is now required so the action can resolve the registered periphery address and apply
469
+ `chainId` validation.
470
+
471
+ Migration steps:
472
+
473
+ - Fetch a `vaultData` snapshot (`vault.getData()`) and pass it in. The vault must have exactly one
474
+ `MorphoMarketV1AdapterV2` and route liquidity through that same adapter or none; multi-adapter and
475
+ legacy-adapter vaults must use `forceRedeem` or a plain `withdraw`.
476
+ - Convert your net-payout amount to a penalty-inclusive `exitAssets` and drop the caller-supplied
477
+ `deallocations` and market ordering — the contract derives them.
478
+ - Resolve `getRequirements()` before `buildTx()` to obtain the new vault-share approval or permit to
479
+ `VaultExitBundlesV1`, and make sure the vault's `receiveAssetsGate` allows that periphery.
480
+ - Update `VaultV2ForceWithdrawAction` decoding: `deallocations` and `withdraw` are gone; `adapter`,
481
+ `exitAssets`, `minSharePriceE27`, `referralFeePct`, `referralFeeRecipient`, and `deadline` are new.
482
+ - Stop batching exits: only one VaultExitBundlesV1 call can execute per transaction, because its
483
+ `initiator` guard is transient and never cleared.
484
+ - Replace `InKindRedeemRequiresSingleAdapterError` and `UnsupportedInKindAdapterError` with
485
+ `VaultV2SingleAdapterRequiredError` and `VaultV2UnsupportedExitAdapterError`.
486
+
487
+ See the [`TIB-2026-08-28-vault-exit-force-withdraw`](https://github.com/morpho-org/sdks/blob/main/docs/tibs/TIB-2026-08-28-vault-exit-force-withdraw.md)
488
+ decision record for the full rationale.
331
489
 
332
490
  ## Update Vault V1 and Vault V2 writes
333
491
 
@@ -337,7 +495,8 @@ ERC-4626 call or Bundler3 multicall.
337
495
 
338
496
  - Deposits accept exactly one of `amount` and `nativeAmount`. Split a former additive ETH + WETH
339
497
  deposit into two transactions. Classic approvals and ERC-2612 permits now authorize
340
- VaultBundlesV1; Permit2 uses SignatureTransfer and requires an explicit unused `permit2Nonce`.
498
+ VaultBundlesV1; Permit2 uses SignatureTransfer with a nonce the SDK resolves by default (pass
499
+ `permit2Nonce` to override).
341
500
  - Remove `recipient` from deposits and remove `recipient` and `onBehalf` from exits. VaultBundlesV1
342
501
  always operates for and pays `msg.sender`. `userAddress` now means the account that must submit the
343
502
  transaction. A connected builder account may prepare a transaction for a different submitter;
@@ -377,10 +536,16 @@ const transaction = withdrawal.buildTx(signatures);
377
536
  Stay on v5 if you need vault deposits or withdrawals on a chain without VaultBundlesV1.
378
537
  - Update every Blue write call using the table above; method names remain stable.
379
538
  - Remove Blue slippage and PublicAllocator V1 write inputs.
539
+ - Replace deprecated facade, error, and upstream aliases with their canonical exports.
540
+ - Remove low-level Bundler3 composers, migration-adapter ABIs, and legacy MORPHO wrapping imports.
380
541
  - Re-run approval and Morpho-authorization setup against the new spender/operator.
381
- - Update transaction decoding, simulation fixtures, and action metadata fields; discriminator
382
- names remain stable.
542
+ - Update transaction decoding, simulation fixtures, and action metadata fields; the `type`
543
+ discriminators remain stable, including `"vaultV2ForceWithdraw"`.
383
544
  - Test native funding, full repay, and full-position migration paths used by the application.
545
+ - Migrate Vault V2 `forceWithdraw` to the penalty-inclusive `exitAssets` + `vaultData` shape,
546
+ resolve its new `getRequirements()`, and authorize vault shares to `VaultExitBundlesV1`.
547
+ - Test the multi-adapter and legacy-adapter `forceWithdraw` fallbacks (`forceRedeem` / plain
548
+ `withdraw`) used by the application.
384
549
 
385
550
  ## Fixed-bundles token requirement APIs
386
551
 
@@ -396,8 +561,8 @@ BlueBundlesV1 and VaultBundlesV1.
396
561
  | `Permit2TransferFromAction` / `Permit2TransferFromRequirementSignature` | `Permit2SignatureTransferAction` / `Permit2SignatureTransferRequirementSignature` |
397
562
  | `isPermit2TransferFromSignature` | `isPermit2SignatureTransferSignature` |
398
563
  | `selectRequirementSignatures` option and result field `permit2TransferFrom` | `permit2SignatureTransfer` |
399
- | `MissingPermit2TransferFromNonceError` | `MissingPermit2SignatureTransferNonceError` (old name kept as a `@deprecated` alias) |
400
- | `Permit2TransferFromNonceAlreadyUsedError` | `Permit2SignatureTransferNonceAlreadyUsedError` (old name kept as a `@deprecated` alias) |
564
+ | `MissingPermit2TransferFromNonceError` | Removed — the nonce is resolved automatically; catch `NoUnusedPermit2NonceError` only if every nonce is consumed |
565
+ | `Permit2TransferFromNonceAlreadyUsedError` | `Permit2SignatureTransferNonceAlreadyUsedError` |
401
566
 
402
567
  Update call sites and `switch`/discriminated-union checks on `action.type` to the new
403
568
  `"permit2SignatureTransfer"` tag; the signed payload shape (`nonce`, `deadline`, `signature`) is
package/README.md CHANGED
@@ -9,6 +9,15 @@
9
9
 
10
10
  Build transactions for Morpho's **VaultV1** (MetaMorpho), **VaultV2**, **Blue**, and **Midnight** fixed-rate markets on chains with the required protocol and periphery deployments. Custom deployments can be added with `registerCustomAddresses` from `@morpho-org/morpho-sdk/addresses`.
11
11
 
12
+ ## Removed in v6
13
+
14
+ Vault V1 PublicAllocator APIs, low-level Bundler3 composition, migration adapters, and legacy
15
+ MORPHO wrapping were removed. Use Vault V2 BluePublicAllocator APIs:
16
+ `getVaultV2BlueReallocationData()` fetches the state and `getVaultV2BlueReallocations()` prepares a
17
+ plan for a Blue action.
18
+
19
+ General Vault V1 operations remain supported.
20
+
12
21
  ## Installation
13
22
 
14
23
  ```bash
@@ -28,7 +37,8 @@ BlueBundlesV1, and the remaining rows identify their destination.
28
37
  | **VaultV1** (MetaMorpho) | `deposit`, `withdraw`, `redeem`, `migrateToV2` | VaultBundlesV1 |
29
38
  | | `inKindRedeem` | VaultExitBundlesV1 |
30
39
  | **VaultV2** | `deposit`, `withdraw`, `redeem` | VaultBundlesV1 |
31
- | | `forceWithdraw`, `forceRedeem` | Vault multicall |
40
+ | | `forceWithdraw` | VaultExitBundlesV1 |
41
+ | | `forceRedeem` | Vault multicall |
32
42
  | | `inKindRedeem` | VaultExitBundlesV1 |
33
43
  | **Blue** | `supply`, `withdraw`, `supplyCollateral`, `borrow`, `supplyCollateralBorrow`, `repay`, `withdrawCollateral`, `repayWithdrawCollateral`, `refinance` | BlueBundlesV1 |
34
44
  | **Midnight** | `takeLend`, `takeBorrow`, `supplyCollateralTakeBorrow`, `repayWithdrawCollateral` | Midnight Bundles |
@@ -42,10 +52,13 @@ Robinhood Chain. Custom deployments can still be configured with `registerCustom
42
52
  ## How it works
43
53
 
44
54
  Actions that pull tokens or touch a position return `{ buildTx, getRequirements }`. All Blue
45
- writes use this lazy shape while still encoding one direct BlueBundlesV1 call. Vault deposits and
46
- exits use the same shape for token or exact share authorization. Vault `inKindRedeem` additionally
47
- checks live Blue liquidity. Calling `buildTx()` directly skips RPC-backed pre-flight checks.
48
- `forceWithdraw` and `forceRedeem` remain direct Vault V2 multicalls without prerequisites.
55
+ writes use this lazy shape while still encoding one direct BlueBundlesV1 call. Vault deposits,
56
+ `withdraw`, and `redeem` use the same shape for token or exact vault-share authorization to
57
+ VaultBundlesV1. Vault `inKindRedeem` and `forceWithdraw` use it so callers can await
58
+ `getRequirements()` to check share authorization to VaultExitBundlesV1 — and, for `inKindRedeem`,
59
+ live Blue liquidity — before invoking `buildTx()`. Calling `buildTx()` directly skips those
60
+ RPC-backed pre-flight checks. `forceRedeem` remains a direct Vault V2 multicall without
61
+ prerequisites.
49
62
 
50
63
  - **`getRequirements()`** — async; the on-chain prerequisites to satisfy first: ERC-20 approvals, permit / Permit2 signatures, Morpho authorization, or (for Midnight) operator authorization and offer-root signatures.
51
64
  - **`buildTx(signatures?)`** — synchronous; the final, deep-frozen viem transaction. Pass any signatures collected from the requirements.
@@ -208,17 +221,12 @@ borrowing. That path may also require Morpho authorization for BlueBundlesV1. Op
208
221
  instant liquidation. Blue writes do not accept `slippageTolerance`, `minSharePrice`, or
209
222
  `maxSharePrice` because BlueBundlesV1 has no share-price-bound inputs.
210
223
 
211
- > High-level Blue writes accept only `VaultV2BlueReallocation`. Vault V1 planning and explicit
212
- > low-level Bundler3 composition remain available only as deprecated compatibility surfaces and
213
- > will be removed in the next major.
214
-
215
- > All SDK surfaces for the Vault V1 shared-liquidity algorithm and its PublicAllocator Bundler3
216
- > composition are deprecated and will be removed in the next major. Use Vault V2
217
- > BluePublicAllocator reallocations.
224
+ > High-level Blue writes and shared-liquidity planning use Vault V2 only. Vault V1 allocator and
225
+ > low-level composition surfaces were removed in v6; direct Vault V1 flows remain.
218
226
 
219
227
  ### Midnight: take a fixed-rate offer
220
228
 
221
- Protocol-specific names are qualified in shared facades, for example `fetchBluePosition` and `fetchMidnightPosition` from `@morpho-org/morpho-sdk/fetch`. Raw upstream names remain available under `/blue/{abis,addresses,constants,entities,errors,fetch,types,utils}` and `/midnight/{abis,constants,entities,errors,fetch,types,utils}`.
229
+ Protocol-specific names are qualified in shared facades, for example `fetchBluePosition` and `fetchMidnightPosition` from `@morpho-org/morpho-sdk/fetch`. Canonical raw upstream names remain available under `/blue/{abis,addresses,constants,entities,errors,fetch,types,utils}` and `/midnight/{abis,constants,entities,errors,fetch,types,utils}`.
222
230
 
223
231
  ```typescript
224
232
  const midnight = client.morpho.midnight(8453);
@@ -280,8 +288,8 @@ graph LR
280
288
  V2W --> VBV1
281
289
  V2R --> VBV1
282
290
  V2IKR -->|direct call| VEB
283
- V2FW -->|multicall| V2C[VaultV2 Contract]
284
- V2FR -->|multicall| V2C
291
+ V2FW -->|direct call| VEB
292
+ V2FR -->|multicall| V2C[VaultV2 Contract]
285
293
  end
286
294
 
287
295
  subgraph Blue Flow