@morpho-org/morpho-sdk 6.0.0-next.2 → 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 (257) hide show
  1. package/MIGRATION-v5-to-v6.md +83 -29
  2. package/README.md +9 -7
  3. package/lib/cjs/abis.d.ts +3 -2844
  4. package/lib/cjs/abis.js +1 -1951
  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 +1 -9
  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 +2 -2
  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 +6 -2
  25. package/lib/cjs/actions/bundles/common.js +23 -5
  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 +6 -8
  29. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +11 -16
  30. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
  31. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
  32. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  33. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +4 -5
  34. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
  35. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +6 -11
  36. package/lib/cjs/actions/requirements/encode/index.d.ts +0 -1
  37. package/lib/cjs/actions/requirements/encode/index.js +0 -1
  38. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -6
  39. package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -6
  40. package/lib/cjs/actions/requirements/index.d.ts +0 -1
  41. package/lib/cjs/actions/requirements/index.js +0 -1
  42. package/lib/cjs/actions/vaultV1/deposit.d.ts +1 -2
  43. package/lib/cjs/actions/vaultV1/deposit.js +1 -2
  44. package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +6 -5
  45. package/lib/cjs/actions/vaultV1/inKindRedeem.js +10 -7
  46. package/lib/cjs/actions/vaultV2/deposit.d.ts +1 -2
  47. package/lib/cjs/actions/vaultV2/deposit.js +1 -2
  48. package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +1 -1
  49. package/lib/cjs/actions/vaultV2/forceWithdraw.js +3 -3
  50. package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +6 -5
  51. package/lib/cjs/actions/vaultV2/inKindRedeem.js +10 -7
  52. package/lib/cjs/augment.d.ts +0 -1
  53. package/lib/cjs/augment.js +0 -1
  54. package/lib/cjs/blue/abis.d.ts +1 -5
  55. package/lib/cjs/blue/abis.js +1 -7
  56. package/lib/cjs/blue/entities.d.ts +2 -8
  57. package/lib/cjs/blue/entities.js +1 -3
  58. package/lib/cjs/blue/fetch.d.ts +1 -3
  59. package/lib/cjs/blue/fetch.js +1 -3
  60. package/lib/cjs/blue/types.d.ts +2 -4
  61. package/lib/cjs/blue/utils.d.ts +1 -3
  62. package/lib/cjs/blue/utils.js +1 -3
  63. package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
  64. package/lib/cjs/client/morphoViemExtension.js +1 -1
  65. package/lib/cjs/constants.d.ts +3 -37
  66. package/lib/cjs/constants.js +1 -39
  67. package/lib/cjs/entities/blue/blue.d.ts +30 -265
  68. package/lib/cjs/entities/blue/blue.js +1 -205
  69. package/lib/cjs/entities/index.d.ts +3 -66
  70. package/lib/cjs/entities/index.js +1 -21
  71. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +9 -2
  72. package/lib/cjs/entities/vaultV1/vaultV1.js +12 -7
  73. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +22 -9
  74. package/lib/cjs/entities/vaultV2/vaultV2.js +28 -15
  75. package/lib/cjs/entities/vaultV2BlueReallocationData.js +4 -21
  76. package/lib/cjs/errors.d.ts +2 -46
  77. package/lib/cjs/errors.js +1 -46
  78. package/lib/cjs/fetch.d.ts +1 -17
  79. package/lib/cjs/fetch.js +1 -17
  80. package/lib/cjs/helpers/constant.d.ts +0 -2
  81. package/lib/cjs/helpers/constant.js +0 -2
  82. package/lib/cjs/helpers/index.d.ts +2 -3
  83. package/lib/cjs/helpers/index.js +1 -9
  84. package/lib/cjs/helpers/slippage.d.ts +1 -103
  85. package/lib/cjs/helpers/slippage.js +0 -150
  86. package/lib/cjs/helpers/utilization.d.ts +12 -10
  87. package/lib/cjs/helpers/utilization.js +27 -12
  88. package/lib/cjs/helpers/validate.d.ts +1 -24
  89. package/lib/cjs/helpers/validate.js +2 -49
  90. package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
  91. package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
  92. package/lib/cjs/types/action.d.ts +17 -65
  93. package/lib/cjs/types/action.js +11 -4
  94. package/lib/cjs/types/error.d.ts +50 -381
  95. package/lib/cjs/types/error.js +64 -395
  96. package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
  97. package/lib/cjs/types.d.ts +2 -18
  98. package/lib/cjs/utils.d.ts +6 -35
  99. package/lib/cjs/utils.js +2 -36
  100. package/lib/esm/abis.d.ts +3 -2844
  101. package/lib/esm/abis.js +3 -1950
  102. package/lib/esm/actions/blue/borrow.d.ts +3 -2
  103. package/lib/esm/actions/blue/borrow.js +3 -2
  104. package/lib/esm/actions/blue/common.js +1 -9
  105. package/lib/esm/actions/blue/refinance.d.ts +2 -2
  106. package/lib/esm/actions/blue/refinance.js +2 -2
  107. package/lib/esm/actions/blue/repay.d.ts +1 -1
  108. package/lib/esm/actions/blue/repay.js +1 -1
  109. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +2 -2
  110. package/lib/esm/actions/blue/repayWithdrawCollateral.js +2 -2
  111. package/lib/esm/actions/blue/supply.d.ts +2 -2
  112. package/lib/esm/actions/blue/supply.js +2 -2
  113. package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -2
  114. package/lib/esm/actions/blue/supplyCollateral.js +2 -2
  115. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -2
  116. package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -2
  117. package/lib/esm/actions/blue/withdraw.d.ts +3 -3
  118. package/lib/esm/actions/blue/withdraw.js +3 -3
  119. package/lib/esm/actions/blue/withdrawCollateral.d.ts +2 -2
  120. package/lib/esm/actions/blue/withdrawCollateral.js +2 -2
  121. package/lib/esm/actions/bundles/common.d.ts +6 -2
  122. package/lib/esm/actions/bundles/common.js +24 -6
  123. package/lib/esm/actions/index.d.ts +0 -1
  124. package/lib/esm/actions/index.js +0 -1
  125. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -8
  126. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +12 -17
  127. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
  128. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
  129. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  130. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +4 -5
  131. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
  132. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +6 -11
  133. package/lib/esm/actions/requirements/encode/index.d.ts +0 -1
  134. package/lib/esm/actions/requirements/encode/index.js +0 -1
  135. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -6
  136. package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -6
  137. package/lib/esm/actions/requirements/index.d.ts +0 -1
  138. package/lib/esm/actions/requirements/index.js +0 -1
  139. package/lib/esm/actions/vaultV1/deposit.d.ts +1 -2
  140. package/lib/esm/actions/vaultV1/deposit.js +1 -2
  141. package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +6 -5
  142. package/lib/esm/actions/vaultV1/inKindRedeem.js +10 -7
  143. package/lib/esm/actions/vaultV2/deposit.d.ts +1 -2
  144. package/lib/esm/actions/vaultV2/deposit.js +1 -2
  145. package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +1 -1
  146. package/lib/esm/actions/vaultV2/forceWithdraw.js +3 -3
  147. package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +6 -5
  148. package/lib/esm/actions/vaultV2/inKindRedeem.js +10 -7
  149. package/lib/esm/augment.d.ts +0 -1
  150. package/lib/esm/augment.js +0 -1
  151. package/lib/esm/blue/abis.d.ts +1 -5
  152. package/lib/esm/blue/abis.js +1 -5
  153. package/lib/esm/blue/entities.d.ts +2 -8
  154. package/lib/esm/blue/entities.js +1 -3
  155. package/lib/esm/blue/fetch.d.ts +1 -3
  156. package/lib/esm/blue/fetch.js +1 -3
  157. package/lib/esm/blue/types.d.ts +2 -4
  158. package/lib/esm/blue/utils.d.ts +1 -3
  159. package/lib/esm/blue/utils.js +1 -3
  160. package/lib/esm/client/morphoViemExtension.d.ts +1 -1
  161. package/lib/esm/client/morphoViemExtension.js +1 -1
  162. package/lib/esm/constants.d.ts +3 -37
  163. package/lib/esm/constants.js +3 -37
  164. package/lib/esm/entities/blue/blue.d.ts +30 -265
  165. package/lib/esm/entities/blue/blue.js +4 -208
  166. package/lib/esm/entities/index.d.ts +3 -66
  167. package/lib/esm/entities/index.js +1 -18
  168. package/lib/esm/entities/vaultV1/vaultV1.d.ts +9 -2
  169. package/lib/esm/entities/vaultV1/vaultV1.js +15 -10
  170. package/lib/esm/entities/vaultV2/vaultV2.d.ts +22 -9
  171. package/lib/esm/entities/vaultV2/vaultV2.js +32 -19
  172. package/lib/esm/entities/vaultV2BlueReallocationData.js +2 -19
  173. package/lib/esm/errors.d.ts +2 -46
  174. package/lib/esm/errors.js +2 -46
  175. package/lib/esm/fetch.d.ts +1 -17
  176. package/lib/esm/fetch.js +1 -17
  177. package/lib/esm/helpers/constant.d.ts +0 -2
  178. package/lib/esm/helpers/constant.js +0 -2
  179. package/lib/esm/helpers/index.d.ts +2 -3
  180. package/lib/esm/helpers/index.js +2 -3
  181. package/lib/esm/helpers/slippage.d.ts +1 -103
  182. package/lib/esm/helpers/slippage.js +1 -147
  183. package/lib/esm/helpers/utilization.d.ts +12 -10
  184. package/lib/esm/helpers/utilization.js +26 -11
  185. package/lib/esm/helpers/validate.d.ts +1 -24
  186. package/lib/esm/helpers/validate.js +2 -48
  187. package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
  188. package/lib/esm/helpers/validateRequirementSpender.js +1 -3
  189. package/lib/esm/types/action.d.ts +17 -65
  190. package/lib/esm/types/action.js +12 -5
  191. package/lib/esm/types/error.d.ts +50 -381
  192. package/lib/esm/types/error.js +58 -377
  193. package/lib/esm/types/sharedLiquidity.d.ts +1 -117
  194. package/lib/esm/types.d.ts +2 -18
  195. package/lib/esm/utils.d.ts +6 -35
  196. package/lib/esm/utils.js +5 -34
  197. package/package.json +5 -13
  198. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
  199. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -88
  200. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  201. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -152
  202. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
  203. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -53
  204. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  205. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -74
  206. package/lib/cjs/actions/requirements/generalAdapter/index.d.ts +0 -3
  207. package/lib/cjs/actions/requirements/generalAdapter/index.js +0 -19
  208. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  209. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.js +0 -48
  210. package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  211. package/lib/cjs/actions/signatures/getTokenRequirementActions.js +0 -119
  212. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
  213. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -45
  214. package/lib/cjs/actions/signatures/index.d.ts +0 -3
  215. package/lib/cjs/actions/signatures/index.js +0 -19
  216. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
  217. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +0 -8
  218. package/lib/cjs/bundler/actions.d.ts +0 -797
  219. package/lib/cjs/bundler/actions.js +0 -1371
  220. package/lib/cjs/bundler/index.d.ts +0 -2
  221. package/lib/cjs/bundler/index.js +0 -18
  222. package/lib/cjs/bundler/types.d.ts +0 -235
  223. package/lib/cjs/bundler/types.js +0 -2
  224. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +0 -332
  225. package/lib/cjs/entities/vaultV1ReallocationData.js +0 -557
  226. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -80
  227. package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -245
  228. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
  229. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -84
  230. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  231. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -148
  232. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
  233. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -49
  234. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  235. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -70
  236. package/lib/esm/actions/requirements/generalAdapter/index.d.ts +0 -3
  237. package/lib/esm/actions/requirements/generalAdapter/index.js +0 -3
  238. package/lib/esm/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  239. package/lib/esm/actions/signatures/getBlueAuthorizationAction.js +0 -44
  240. package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  241. package/lib/esm/actions/signatures/getTokenRequirementActions.js +0 -115
  242. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
  243. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -41
  244. package/lib/esm/actions/signatures/index.d.ts +0 -3
  245. package/lib/esm/actions/signatures/index.js +0 -3
  246. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
  247. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -7
  248. package/lib/esm/bundler/actions.d.ts +0 -797
  249. package/lib/esm/bundler/actions.js +0 -1368
  250. package/lib/esm/bundler/index.d.ts +0 -2
  251. package/lib/esm/bundler/index.js +0 -2
  252. package/lib/esm/bundler/types.d.ts +0 -235
  253. package/lib/esm/bundler/types.js +0 -1
  254. package/lib/esm/entities/vaultV1ReallocationData.d.ts +0 -332
  255. package/lib/esm/entities/vaultV1ReallocationData.js +0 -559
  256. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -80
  257. package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -241
@@ -4,9 +4,8 @@ import { signAndVerifyTypedData } from "../../../helpers/signAndVerifyTypedData.
4
4
  import { validateDeadline, validateUserAddress, } from "../../../helpers/validate.js";
5
5
  import { ChainIdMismatchError, ExpiredDeadlineError, } from "../../../types/index.js";
6
6
  /**
7
- * Builds a Morpho authorization `Requirement` that, once signed, lets `authorized` operate on
8
- * Morpho on the signer's behalf. Bundler3 consumes the result through `setAuthorizationWithSig`;
9
- * BlueBundlesV1 embeds the same signed authorization in its direct-call struct.
7
+ * Builds a Morpho authorization `Requirement` that, once signed, lets BlueBundlesV1 operate on
8
+ * Morpho on the signer's behalf.
10
9
  *
11
10
  * The returned `Requirement.sign()` produces the EIP-712 signature over Morpho's `Authorization`
12
11
  * typed data, verifies it against the connected account, and returns a deep-frozen
@@ -17,7 +16,7 @@ import { ChainIdMismatchError, ExpiredDeadlineError, } from "../../../types/inde
17
16
  * @param viemClient - Connected viem `Client` whose `chain.id` matches `params.chainId`.
18
17
  * @param params - Authorization encoding parameters.
19
18
  * @param params.owner - Account granting the authorization and signing it (the Morpho `authorizer`).
20
- * @param params.authorized - Operator to authorize, such as GeneralAdapter1 or BlueBundlesV1.
19
+ * @param params.authorized - BlueBundlesV1 operator to authorize.
21
20
  * @param params.chainId - Target chain id.
22
21
  * @param params.nonce - The owner's current Morpho authorization nonce.
23
22
  * @param params.isAuthorized - Grant (`true`, default) or revoke (`false`).
@@ -41,7 +40,7 @@ import { ChainIdMismatchError, ExpiredDeadlineError, } from "../../../types/inde
41
40
  * const client = createWalletClient({ chain: mainnet, transport: http() });
42
41
  * const requirement = await encodeBlueSignatureAuthorization(client, {
43
42
  * owner,
44
- * authorized: generalAdapter1,
43
+ * authorized: blueBundlesV1,
45
44
  * chainId: 1,
46
45
  * nonce: 0n,
47
46
  * });
@@ -11,12 +11,12 @@ interface EncodeErc20ApprovalParams {
11
11
  * Encodes a deep-frozen ERC-20 approval transaction for a supported SDK spender.
12
12
  *
13
13
  * Caps `amount` at the per-chain, per-token maximum from `MAX_TOKEN_APPROVALS` (defaults to
14
- * `maxUint256`). Used by {@link getRequirementsApproval} and {@link getGeneralAdapterRequirementsPermit2}.
14
+ * `maxUint256`). Used by {@link getRequirementsApproval}.
15
15
  *
16
16
  * @param params - Encoding parameters.
17
17
  * @param params.token - ERC-20 token address to approve.
18
- * @param params.spender - Address granted the allowance. Must be GeneralAdapter1, Permit2,
19
- * Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for the chain.
18
+ * @param params.spender - Address granted the allowance. Must be Permit2, Midnight,
19
+ * MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for the chain.
20
20
  * @param params.amount - Allowance amount before per-token cap.
21
21
  * @param params.chainId - The chain the transaction targets (used to resolve supported spenders and the per-token cap).
22
22
  * @returns A deep-frozen `Transaction<ERC20ApprovalAction>` with the capped approval amount.
@@ -28,7 +28,7 @@ interface EncodeErc20ApprovalParams {
28
28
  *
29
29
  * const tx = encodeErc20Approval({
30
30
  * token: USDC,
31
- * spender: generalAdapter1,
31
+ * spender: blueBundlesV1,
32
32
  * amount: 1_000_000n,
33
33
  * chainId: 1,
34
34
  * });
@@ -7,12 +7,12 @@ import { validateRequirementSpender } from "../../../helpers/validateRequirement
7
7
  * Encodes a deep-frozen ERC-20 approval transaction for a supported SDK spender.
8
8
  *
9
9
  * Caps `amount` at the per-chain, per-token maximum from `MAX_TOKEN_APPROVALS` (defaults to
10
- * `maxUint256`). Used by {@link getRequirementsApproval} and {@link getGeneralAdapterRequirementsPermit2}.
10
+ * `maxUint256`). Used by {@link getRequirementsApproval}.
11
11
  *
12
12
  * @param params - Encoding parameters.
13
13
  * @param params.token - ERC-20 token address to approve.
14
- * @param params.spender - Address granted the allowance. Must be GeneralAdapter1, Permit2,
15
- * Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for the chain.
14
+ * @param params.spender - Address granted the allowance. Must be Permit2, Midnight,
15
+ * MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for the chain.
16
16
  * @param params.amount - Allowance amount before per-token cap.
17
17
  * @param params.chainId - The chain the transaction targets (used to resolve supported spenders and the per-token cap).
18
18
  * @returns A deep-frozen `Transaction<ERC20ApprovalAction>` with the capped approval amount.
@@ -24,7 +24,7 @@ import { validateRequirementSpender } from "../../../helpers/validateRequirement
24
24
  *
25
25
  * const tx = encodeErc20Approval({
26
26
  * token: USDC,
27
- * spender: generalAdapter1,
27
+ * spender: blueBundlesV1,
28
28
  * amount: 1_000_000n,
29
29
  * chainId: 1,
30
30
  * });
@@ -38,7 +38,6 @@ export const encodeErc20Approval = (params) => {
38
38
  chainId,
39
39
  spender,
40
40
  allowed: [
41
- "generalAdapter1",
42
41
  "permit2",
43
42
  "midnight",
44
43
  "midnightBundles",
@@ -27,8 +27,8 @@ interface EncodeErc20PermitParams {
27
27
  * @param params - Permit encoding parameters.
28
28
  * @param params.token - ERC-20 token address (must support EIP-2612).
29
29
  * @param params.owner - Account that owns the tokens and signs the permit.
30
- * @param params.spender - Permit spender. Must be GeneralAdapter1, MidnightBundles,
31
- * VaultBundlesV1, or BlueBundlesV1 for the chain.
30
+ * @param params.spender - Permit spender. Must be MidnightBundles, VaultBundlesV1, or
31
+ * BlueBundlesV1 for the chain.
32
32
  * @param params.amount - Permit allowance amount.
33
33
  * @param params.chainId - Target chain id.
34
34
  * @param params.nonce - The owner's current EIP-2612 nonce on `token`.
@@ -38,8 +38,8 @@ interface EncodeErc20PermitParams {
38
38
  * `sign(client, userAddress)` produces the deep-frozen signature.
39
39
  * @throws {ChainIdMismatchError} when `viemClient.chain?.id !== params.chainId`.
40
40
  * @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
41
- * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not GeneralAdapter1,
42
- * MidnightBundles, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
41
+ * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not MidnightBundles,
42
+ * VaultBundlesV1, or BlueBundlesV1 for `chainId`.
43
43
  * @throws {NonPositiveInputError} when an explicit `deadline` is not positive.
44
44
  * @throws {InputExceedsMaxError} when an explicit `deadline` exceeds `uint256`.
45
45
  * @throws {ExpiredDeadlineError} when an explicit `deadline` is positive but not in the future.
@@ -58,7 +58,7 @@ interface EncodeErc20PermitParams {
58
58
  * const requirement = await encodeErc20Permit(client, {
59
59
  * token: USDC, // Must implement standard ERC-2612. DAI is routed through Permit2 by requirement helpers.
60
60
  * owner,
61
- * spender: generalAdapter1,
61
+ * spender: blueBundlesV1,
62
62
  * amount: 1_000_000n,
63
63
  * chainId: 1,
64
64
  * nonce: 0n,
@@ -18,8 +18,8 @@ import { ChainIdMismatchError, ExpiredDeadlineError, } from "../../../types/inde
18
18
  * @param params - Permit encoding parameters.
19
19
  * @param params.token - ERC-20 token address (must support EIP-2612).
20
20
  * @param params.owner - Account that owns the tokens and signs the permit.
21
- * @param params.spender - Permit spender. Must be GeneralAdapter1, MidnightBundles,
22
- * VaultBundlesV1, or BlueBundlesV1 for the chain.
21
+ * @param params.spender - Permit spender. Must be MidnightBundles, VaultBundlesV1, or
22
+ * BlueBundlesV1 for the chain.
23
23
  * @param params.amount - Permit allowance amount.
24
24
  * @param params.chainId - Target chain id.
25
25
  * @param params.nonce - The owner's current EIP-2612 nonce on `token`.
@@ -29,8 +29,8 @@ import { ChainIdMismatchError, ExpiredDeadlineError, } from "../../../types/inde
29
29
  * `sign(client, userAddress)` produces the deep-frozen signature.
30
30
  * @throws {ChainIdMismatchError} when `viemClient.chain?.id !== params.chainId`.
31
31
  * @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
32
- * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not GeneralAdapter1,
33
- * MidnightBundles, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
32
+ * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not MidnightBundles,
33
+ * VaultBundlesV1, or BlueBundlesV1 for `chainId`.
34
34
  * @throws {NonPositiveInputError} when an explicit `deadline` is not positive.
35
35
  * @throws {InputExceedsMaxError} when an explicit `deadline` exceeds `uint256`.
36
36
  * @throws {ExpiredDeadlineError} when an explicit `deadline` is positive but not in the future.
@@ -49,7 +49,7 @@ import { ChainIdMismatchError, ExpiredDeadlineError, } from "../../../types/inde
49
49
  * const requirement = await encodeErc20Permit(client, {
50
50
  * token: USDC, // Must implement standard ERC-2612. DAI is routed through Permit2 by requirement helpers.
51
51
  * owner,
52
- * spender: generalAdapter1,
52
+ * spender: blueBundlesV1,
53
53
  * amount: 1_000_000n,
54
54
  * chainId: 1,
55
55
  * nonce: 0n,
@@ -67,12 +67,7 @@ export const encodeErc20Permit = async (viemClient, params) => {
67
67
  validateRequirementSpender({
68
68
  chainId,
69
69
  spender,
70
- allowed: [
71
- "generalAdapter1",
72
- "midnightBundles",
73
- "vaultBundlesV1",
74
- "blueBundlesV1",
75
- ],
70
+ allowed: ["midnightBundles", "vaultBundlesV1", "blueBundlesV1"],
76
71
  });
77
72
  const now = Time.timestamp();
78
73
  // Validate an explicit deadline before the token-metadata read: this exported encoder can be
@@ -1,6 +1,5 @@
1
1
  export * from "./encodeBlueSignatureAuthorization.js";
2
2
  export * from "./encodeErc20Approval.js";
3
3
  export * from "./encodeErc20Permit.js";
4
- export * from "./encodeErc20Permit2Approve.js";
5
4
  export * from "./encodeErc20Permit2SignatureTransfer.js";
6
5
  export * from "./encodeVaultSharesPermit.js";
@@ -1,6 +1,5 @@
1
1
  export * from "./encodeBlueSignatureAuthorization.js";
2
2
  export * from "./encodeErc20Approval.js";
3
3
  export * from "./encodeErc20Permit.js";
4
- export * from "./encodeErc20Permit2Approve.js";
5
4
  export * from "./encodeErc20Permit2SignatureTransfer.js";
6
5
  export * from "./encodeVaultSharesPermit.js";
@@ -5,8 +5,8 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
5
5
  * allowance.
6
6
  *
7
7
  * The spender is validated by {@link encodeErc20Approval}. Supported spenders are the chain's
8
- * GeneralAdapter1, Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, and
9
- * BlueBundlesV1 addresses when configured.
8
+ * Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, and BlueBundlesV1
9
+ * addresses when configured.
10
10
  *
11
11
  * Returns an empty array when the allowance already covers `spendAmount`. When the token is in
12
12
  * `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) and the existing allowance is non-zero, prepends a
@@ -19,9 +19,8 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
19
19
  * @param params.args.spendAmount - The amount the bundle will actually pull.
20
20
  * @param params.args.approvalAmount - The amount to approve (often equal to `spendAmount`, but
21
21
  * may be `maxUint256` for reusable Permit2 or saturated-share-repay approvals).
22
- * @param params.args.spender - Address that will be granted the approval. Must be GeneralAdapter1,
23
- * Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for
24
- * `chainId`.
22
+ * @param params.args.spender - Address that will be granted the approval. Must be Permit2,
23
+ * Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
25
24
  * @param params.allowances - The user's current allowance of `address` for `spender`.
26
25
  * @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
27
26
  * followed by the new approval. Empty when no approval is needed.
@@ -35,7 +34,7 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
35
34
  * const txs = getRequirementsApproval({
36
35
  * address: USDC,
37
36
  * chainId: 1,
38
- * args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender: generalAdapter1 },
37
+ * args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender: blueBundlesV1 },
39
38
  * allowances: 0n,
40
39
  * });
41
40
  * // txs satisfies Readonly<Transaction<ERC20ApprovalAction>>[]
@@ -7,8 +7,8 @@ import { encodeErc20Approval } from "./encode/encodeErc20Approval.js";
7
7
  * allowance.
8
8
  *
9
9
  * The spender is validated by {@link encodeErc20Approval}. Supported spenders are the chain's
10
- * GeneralAdapter1, Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, and
11
- * BlueBundlesV1 addresses when configured.
10
+ * Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, and BlueBundlesV1
11
+ * addresses when configured.
12
12
  *
13
13
  * Returns an empty array when the allowance already covers `spendAmount`. When the token is in
14
14
  * `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) and the existing allowance is non-zero, prepends a
@@ -21,9 +21,8 @@ import { encodeErc20Approval } from "./encode/encodeErc20Approval.js";
21
21
  * @param params.args.spendAmount - The amount the bundle will actually pull.
22
22
  * @param params.args.approvalAmount - The amount to approve (often equal to `spendAmount`, but
23
23
  * may be `maxUint256` for reusable Permit2 or saturated-share-repay approvals).
24
- * @param params.args.spender - Address that will be granted the approval. Must be GeneralAdapter1,
25
- * Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for
26
- * `chainId`.
24
+ * @param params.args.spender - Address that will be granted the approval. Must be Permit2,
25
+ * Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
27
26
  * @param params.allowances - The user's current allowance of `address` for `spender`.
28
27
  * @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
29
28
  * followed by the new approval. Empty when no approval is needed.
@@ -37,7 +36,7 @@ import { encodeErc20Approval } from "./encode/encodeErc20Approval.js";
37
36
  * const txs = getRequirementsApproval({
38
37
  * address: USDC,
39
38
  * chainId: 1,
40
- * args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender: generalAdapter1 },
39
+ * args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender: blueBundlesV1 },
41
40
  * allowances: 0n,
42
41
  * });
43
42
  * // txs satisfies Readonly<Transaction<ERC20ApprovalAction>>[]
@@ -1,5 +1,4 @@
1
1
  export * from "./blue/index.js";
2
2
  export * from "./encode/index.js";
3
- export * from "./generalAdapter/index.js";
4
3
  export * from "./getRequirementsApproval.js";
5
4
  export * from "./midnight/index.js";
@@ -1,5 +1,4 @@
1
1
  export * from "./blue/index.js";
2
2
  export * from "./encode/index.js";
3
- export * from "./generalAdapter/index.js";
4
3
  export * from "./getRequirementsApproval.js";
5
4
  export * from "./midnight/index.js";
@@ -52,8 +52,7 @@ export interface VaultV1DepositParams {
52
52
  * @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
53
53
  * {@link InputExceedsMaxError}, so either class catches it.
54
54
  * @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
55
- * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit or a
56
- * Permit2 AllowanceTransfer signature is supplied.
55
+ * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
57
56
  * @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
58
57
  * @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
59
58
  * @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
@@ -38,8 +38,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
38
38
  * @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
39
39
  * {@link InputExceedsMaxError}, so either class catches it.
40
40
  * @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
41
- * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit or a
42
- * Permit2 AllowanceTransfer signature is supplied.
41
+ * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
43
42
  * @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
44
43
  * @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
45
44
  * @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
@@ -27,20 +27,21 @@ export interface VaultV1InKindRedeemParams {
27
27
  * @param params.vault.address - Target Vault V1 address.
28
28
  * @param params.args.amount - Asset-denominated amount to exit.
29
29
  * @param params.args.marketParamsList - Ordered markets consumed greedily by the contract.
30
- * @param params.args.userAddress - Expected transaction sender, recorded in action metadata only.
31
- * VaultExitBundlesV1 burns `msg.sender`'s vault shares, so the submitting account must equal this
32
- * address.
30
+ * @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
31
+ * the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
32
+ * `msg.sender`'s vault shares, so the submitting account must equal this address.
33
33
  * @param params.args.deadline - Permit and bundle deadline.
34
34
  * @param params.args.requirementSignature - Optional bounded Vault V1 shares permit.
35
35
  * @param params.metadata - Optional analytics metadata.
36
36
  * @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
37
37
  * `data`, and the typed action discriminator.
38
38
  * @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
39
- * @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
39
+ * @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
40
40
  * @throws {EmptyMarketParamsListError} when no markets are supplied.
41
41
  * @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
42
42
  * @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
43
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement has the wrong permit kind, asset, or signature encoding.
43
+ * @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
44
+ * spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
44
45
  * @example
45
46
  * ```ts
46
47
  * import { vaultV1InKindRedeem } from "@morpho-org/morpho-sdk";
@@ -4,7 +4,7 @@ import { vaultExitBundlesV1Abi } from "../../abis.js";
4
4
  import { addTransactionMetadata } from "../../helpers/index.js";
5
5
  import { validateDeadline } from "../../helpers/validate.js";
6
6
  import { EmptyMarketParamsListError, NonPositiveInputError, } from "../../types/index.js";
7
- import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBundlesV1PermitStruct.js";
7
+ import { getBundlesSharesPermit } from "../bundles/common.js";
8
8
  /**
9
9
  * Prepares a Vault V1 in-kind redemption into Morpho Blue supply positions.
10
10
  *
@@ -16,20 +16,21 @@ import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBun
16
16
  * @param params.vault.address - Target Vault V1 address.
17
17
  * @param params.args.amount - Asset-denominated amount to exit.
18
18
  * @param params.args.marketParamsList - Ordered markets consumed greedily by the contract.
19
- * @param params.args.userAddress - Expected transaction sender, recorded in action metadata only.
20
- * VaultExitBundlesV1 burns `msg.sender`'s vault shares, so the submitting account must equal this
21
- * address.
19
+ * @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
20
+ * the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
21
+ * `msg.sender`'s vault shares, so the submitting account must equal this address.
22
22
  * @param params.args.deadline - Permit and bundle deadline.
23
23
  * @param params.args.requirementSignature - Optional bounded Vault V1 shares permit.
24
24
  * @param params.metadata - Optional analytics metadata.
25
25
  * @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
26
26
  * `data`, and the typed action discriminator.
27
27
  * @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
28
- * @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
28
+ * @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
29
29
  * @throws {EmptyMarketParamsListError} when no markets are supplied.
30
30
  * @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
31
31
  * @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
32
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement has the wrong permit kind, asset, or signature encoding.
32
+ * @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
33
+ * spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
33
34
  * @example
34
35
  * ```ts
35
36
  * import { vaultV1InKindRedeem } from "@morpho-org/morpho-sdk";
@@ -55,9 +56,11 @@ export const vaultV1InKindRedeem = ({ vault, args, metadata, }) => {
55
56
  irm: marketParams.irm,
56
57
  lltv: marketParams.lltv,
57
58
  }));
58
- const sharesPermit = getVaultExitBundlesV1PermitStruct({
59
+ const sharesPermit = getBundlesSharesPermit({
59
60
  vault: vault.address,
60
61
  deadline: args.deadline,
62
+ owner: args.userAddress,
63
+ spender: to,
61
64
  requirementSignature: args.requirementSignature,
62
65
  });
63
66
  let tx = {
@@ -52,8 +52,7 @@ export interface VaultV2DepositParams {
52
52
  * @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
53
53
  * {@link InputExceedsMaxError}, so either class catches it.
54
54
  * @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
55
- * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit or a
56
- * Permit2 AllowanceTransfer signature is supplied.
55
+ * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
57
56
  * @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
58
57
  * @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
59
58
  * @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
@@ -38,8 +38,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
38
38
  * @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
39
39
  * {@link InputExceedsMaxError}, so either class catches it.
40
40
  * @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
41
- * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit or a
42
- * Permit2 AllowanceTransfer signature is supplied.
41
+ * @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
43
42
  * @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
44
43
  * @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
45
44
  * @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
@@ -61,7 +61,7 @@ export interface VaultV2ForceWithdrawParams {
61
61
  * @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
62
62
  * @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
63
63
  * @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
64
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement has the wrong permit kind,
64
+ * @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind,
65
65
  * asset, owner, spender, or signature encoding.
66
66
  * @example
67
67
  * ```ts
@@ -4,7 +4,7 @@ import { vaultExitBundlesV1Abi } from "../../abis.js";
4
4
  import { addTransactionMetadata } from "../../helpers/index.js";
5
5
  import { validateDeadline, validateReferralFee, validateUint256Field, } from "../../helpers/validate.js";
6
6
  import { NonPositiveInputError, } from "../../types/index.js";
7
- import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBundlesV1PermitStruct.js";
7
+ import { getBundlesSharesPermit } from "../bundles/common.js";
8
8
  /**
9
9
  * Prepares a Vault V2 force withdrawal through VaultExitBundlesV1.
10
10
  *
@@ -48,7 +48,7 @@ import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBun
48
48
  * @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
49
49
  * @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
50
50
  * @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
51
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement has the wrong permit kind,
51
+ * @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind,
52
52
  * asset, owner, spender, or signature encoding.
53
53
  * @example
54
54
  * ```ts
@@ -72,7 +72,7 @@ export const vaultV2ForceWithdraw = ({ vault, args, metadata, }) => {
72
72
  validateUint256Field("minSharePriceE27", args.minSharePriceE27);
73
73
  const { referralFeePct, referralFeeRecipient } = validateReferralFee(args);
74
74
  const to = getChainAddress(vault.chainId, "bundles.vaultExitBundlesV1");
75
- const sharesPermit = getVaultExitBundlesV1PermitStruct({
75
+ const sharesPermit = getBundlesSharesPermit({
76
76
  vault: vault.address,
77
77
  deadline: args.deadline,
78
78
  owner: args.userAddress,
@@ -30,19 +30,20 @@ export interface VaultV2InKindRedeemParams {
30
30
  * @param params.args.amount - Penalty-inclusive, asset-denominated amount to exit.
31
31
  * @param params.args.marketParamsList - Ordered markets consumed greedily after idle assets. May be
32
32
  * empty when the vault's idle balance covers `amount`.
33
- * @param params.args.userAddress - Expected transaction sender, recorded in action metadata only.
34
- * VaultExitBundlesV1 burns `msg.sender`'s vault shares, so the submitting account must equal this
35
- * address.
33
+ * @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
34
+ * the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
35
+ * `msg.sender`'s vault shares, so the submitting account must equal this address.
36
36
  * @param params.args.deadline - Permit and bundle deadline.
37
37
  * @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
38
38
  * @param params.metadata - Optional analytics metadata.
39
39
  * @returns A deep-frozen `Readonly<Transaction<VaultV2InKindRedeemAction>>` with `to`, `value`,
40
40
  * `data`, and the typed action discriminator.
41
41
  * @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
42
- * @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
42
+ * @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
43
43
  * @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
44
44
  * @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
45
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement has the wrong permit kind, asset, or signature encoding.
45
+ * @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
46
+ * spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
46
47
  * @example
47
48
  * ```ts
48
49
  * import { vaultV2InKindRedeem } from "@morpho-org/morpho-sdk";
@@ -4,7 +4,7 @@ import { vaultExitBundlesV1Abi } from "../../abis.js";
4
4
  import { addTransactionMetadata } from "../../helpers/index.js";
5
5
  import { validateDeadline } from "../../helpers/validate.js";
6
6
  import { NonPositiveInputError, } from "../../types/index.js";
7
- import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBundlesV1PermitStruct.js";
7
+ import { getBundlesSharesPermit } from "../bundles/common.js";
8
8
  /**
9
9
  * Prepares a Vault V2 in-kind redemption into idle assets and Morpho Blue supply positions.
10
10
  *
@@ -18,19 +18,20 @@ import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBun
18
18
  * @param params.args.amount - Penalty-inclusive, asset-denominated amount to exit.
19
19
  * @param params.args.marketParamsList - Ordered markets consumed greedily after idle assets. May be
20
20
  * empty when the vault's idle balance covers `amount`.
21
- * @param params.args.userAddress - Expected transaction sender, recorded in action metadata only.
22
- * VaultExitBundlesV1 burns `msg.sender`'s vault shares, so the submitting account must equal this
23
- * address.
21
+ * @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
22
+ * the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
23
+ * `msg.sender`'s vault shares, so the submitting account must equal this address.
24
24
  * @param params.args.deadline - Permit and bundle deadline.
25
25
  * @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
26
26
  * @param params.metadata - Optional analytics metadata.
27
27
  * @returns A deep-frozen `Readonly<Transaction<VaultV2InKindRedeemAction>>` with `to`, `value`,
28
28
  * `data`, and the typed action discriminator.
29
29
  * @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
30
- * @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
30
+ * @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
31
31
  * @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
32
32
  * @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
33
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement has the wrong permit kind, asset, or signature encoding.
33
+ * @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
34
+ * spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
34
35
  * @example
35
36
  * ```ts
36
37
  * import { vaultV2InKindRedeem } from "@morpho-org/morpho-sdk";
@@ -54,9 +55,11 @@ export const vaultV2InKindRedeem = ({ vault, args, metadata, }) => {
54
55
  irm: marketParams.irm,
55
56
  lltv: marketParams.lltv,
56
57
  }));
57
- const sharesPermit = getVaultExitBundlesV1PermitStruct({
58
+ const sharesPermit = getBundlesSharesPermit({
58
59
  vault: vault.address,
59
60
  deadline: args.deadline,
61
+ owner: args.userAddress,
62
+ spender: to,
60
63
  requirementSignature: args.requirementSignature,
61
64
  });
62
65
  let tx = {
@@ -10,5 +10,4 @@ import "./augment/Vault.js";
10
10
  import "./augment/VaultConfig.js";
11
11
  import "./augment/VaultMarketAllocation.js";
12
12
  import "./augment/VaultMarketConfig.js";
13
- import "./augment/VaultMarketPublicAllocatorConfig.js";
14
13
  import "./augment/VaultUser.js";
@@ -10,5 +10,4 @@ import "./augment/Vault.js";
10
10
  import "./augment/VaultConfig.js";
11
11
  import "./augment/VaultMarketAllocation.js";
12
12
  import "./augment/VaultMarketConfig.js";
13
- import "./augment/VaultMarketPublicAllocatorConfig.js";
14
13
  import "./augment/VaultUser.js";
@@ -1,6 +1,2 @@
1
1
  export { marketParamsAbi } from "@morpho-org/blue-sdk";
2
- export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi,
3
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
4
- publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi,
5
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
6
- vaultV1PublicAllocatorAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
2
+ export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
@@ -1,6 +1,2 @@
1
1
  export { marketParamsAbi } from "@morpho-org/blue-sdk";
2
- export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi,
3
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
4
- publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi,
5
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
6
- vaultV1PublicAllocatorAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
2
+ export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
@@ -1,8 +1,2 @@
1
- export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket, IMarketParams, IPosition, IPreLiquidationParams, IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig,
2
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `IVaultV2BlueMarketPublicAllocatorConfig`. */
3
- IVaultMarketPublicAllocatorConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType,
4
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `IVaultV2BluePublicAllocatorConfig`. */
5
- VaultPublicAllocatorConfig, } from "@morpho-org/blue-sdk";
6
- export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig,
7
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `VaultV2BlueMarketPublicAllocatorConfig`. */
8
- VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
1
+ export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket, IMarketParams, IPosition, IPreLiquidationParams, IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, } from "@morpho-org/blue-sdk";
2
+ export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
@@ -1,3 +1 @@
1
- export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig,
2
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `VaultV2BlueMarketPublicAllocatorConfig`. */
3
- VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
1
+ export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
@@ -1,3 +1 @@
1
- export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig,
2
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `fetchVaultV2BlueMarketPublicAllocatorConfig`. */
3
- fetchVaultMarketPublicAllocatorConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
1
+ export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
@@ -1,3 +1 @@
1
- export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig,
2
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `fetchVaultV2BlueMarketPublicAllocatorConfig`. */
3
- fetchVaultMarketPublicAllocatorConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
1
+ export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
@@ -1,4 +1,2 @@
1
- export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams, IPermit2Allowance, Loadable, MarketId, MaxBorrowOptions, MaxPositionCapacities, MaxWithdrawCollateralOptions, Pending, Permit2Allowance, } from "@morpho-org/blue-sdk";
2
- export type { AuthorizationArgs,
3
- /** @deprecated Args for the deprecated getDaiPermitTypedData; scheduled for removal in the next major. */
4
- DaiPermitArgs, DeploylessFetchParameters, FetchParameters, InputAllocation, MetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs, } from "@morpho-org/blue-sdk-viem";
1
+ export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams, Loadable, MarketId, MaxBorrowOptions, MaxPositionCapacities, MaxWithdrawCollateralOptions, Pending, } from "@morpho-org/blue-sdk";
2
+ export type { AuthorizationArgs, DeploylessFetchParameters, FetchParameters, InputAllocation, MetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs, } from "@morpho-org/blue-sdk-viem";
@@ -1,5 +1,3 @@
1
1
  export type { CapacityLimit, RoundingDirection } from "@morpho-org/blue-sdk";
2
2
  export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
3
- export { decodeBytes32String, getAuthorizationTypedData,
4
- /** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
5
- getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
3
+ export { decodeBytes32String, getAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
@@ -1,4 +1,2 @@
1
1
  export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
2
- export { decodeBytes32String, getAuthorizationTypedData,
3
- /** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
4
- getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
2
+ export { decodeBytes32String, getAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";