@morpho-org/morpho-sdk 6.0.0-next.2 → 6.0.0-next.4

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 (277) hide show
  1. package/MIGRATION-v5-to-v6.md +88 -32
  2. package/README.md +9 -7
  3. package/lib/cjs/abis.d.ts +7 -2844
  4. package/lib/cjs/abis.js +3 -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 +31 -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 +7 -5
  45. package/lib/cjs/actions/vaultV1/inKindRedeem.js +11 -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 +7 -5
  51. package/lib/cjs/actions/vaultV2/inKindRedeem.js +11 -7
  52. package/lib/cjs/augment/AccrualPosition.d.ts +1 -0
  53. package/lib/cjs/augment.d.ts +0 -1
  54. package/lib/cjs/augment.js +0 -1
  55. package/lib/cjs/blue/abis.d.ts +5 -5
  56. package/lib/cjs/blue/abis.js +3 -7
  57. package/lib/cjs/blue/entities.d.ts +10 -8
  58. package/lib/cjs/blue/entities.js +3 -3
  59. package/lib/cjs/blue/errors.d.ts +4 -2
  60. package/lib/cjs/blue/errors.js +3 -1
  61. package/lib/cjs/blue/fetch.d.ts +5 -3
  62. package/lib/cjs/blue/fetch.js +3 -3
  63. package/lib/cjs/blue/types.d.ts +2 -4
  64. package/lib/cjs/blue/utils.d.ts +6 -4
  65. package/lib/cjs/blue/utils.js +3 -3
  66. package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
  67. package/lib/cjs/client/morphoViemExtension.js +1 -1
  68. package/lib/cjs/constants.d.ts +3 -37
  69. package/lib/cjs/constants.js +1 -39
  70. package/lib/cjs/entities/blue/blue.d.ts +30 -265
  71. package/lib/cjs/entities/blue/blue.js +1 -205
  72. package/lib/cjs/entities/index.d.ts +11 -66
  73. package/lib/cjs/entities/index.js +3 -21
  74. package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -2
  75. package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +8 -3
  76. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +13 -5
  77. package/lib/cjs/entities/vaultV1/vaultV1.js +16 -10
  78. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +40 -19
  79. package/lib/cjs/entities/vaultV2/vaultV2.js +57 -26
  80. package/lib/cjs/entities/vaultV2BlueReallocationData.js +4 -21
  81. package/lib/cjs/errors.d.ts +5 -47
  82. package/lib/cjs/errors.js +4 -46
  83. package/lib/cjs/fetch.d.ts +5 -17
  84. package/lib/cjs/fetch.js +3 -17
  85. package/lib/cjs/helpers/constant.d.ts +0 -2
  86. package/lib/cjs/helpers/constant.js +0 -2
  87. package/lib/cjs/helpers/index.d.ts +2 -3
  88. package/lib/cjs/helpers/index.js +1 -9
  89. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +11 -5
  90. package/lib/cjs/helpers/slippage.d.ts +1 -103
  91. package/lib/cjs/helpers/slippage.js +0 -150
  92. package/lib/cjs/helpers/utilization.d.ts +12 -10
  93. package/lib/cjs/helpers/utilization.js +27 -12
  94. package/lib/cjs/helpers/validate.d.ts +1 -24
  95. package/lib/cjs/helpers/validate.js +2 -49
  96. package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
  97. package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
  98. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +48 -15
  99. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +48 -15
  100. package/lib/cjs/midnight/errors.d.ts +1 -1
  101. package/lib/cjs/midnight/errors.js +2 -1
  102. package/lib/cjs/types/action.d.ts +17 -65
  103. package/lib/cjs/types/action.js +11 -4
  104. package/lib/cjs/types/error.d.ts +50 -381
  105. package/lib/cjs/types/error.js +64 -395
  106. package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
  107. package/lib/cjs/types.d.ts +2 -18
  108. package/lib/cjs/utils.d.ts +10 -35
  109. package/lib/cjs/utils.js +4 -36
  110. package/lib/esm/abis.d.ts +7 -2844
  111. package/lib/esm/abis.js +7 -1950
  112. package/lib/esm/actions/blue/borrow.d.ts +3 -2
  113. package/lib/esm/actions/blue/borrow.js +3 -2
  114. package/lib/esm/actions/blue/common.js +1 -9
  115. package/lib/esm/actions/blue/refinance.d.ts +2 -2
  116. package/lib/esm/actions/blue/refinance.js +2 -2
  117. package/lib/esm/actions/blue/repay.d.ts +1 -1
  118. package/lib/esm/actions/blue/repay.js +1 -1
  119. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +2 -2
  120. package/lib/esm/actions/blue/repayWithdrawCollateral.js +2 -2
  121. package/lib/esm/actions/blue/supply.d.ts +2 -2
  122. package/lib/esm/actions/blue/supply.js +2 -2
  123. package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -2
  124. package/lib/esm/actions/blue/supplyCollateral.js +2 -2
  125. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -2
  126. package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -2
  127. package/lib/esm/actions/blue/withdraw.d.ts +3 -3
  128. package/lib/esm/actions/blue/withdraw.js +3 -3
  129. package/lib/esm/actions/blue/withdrawCollateral.d.ts +2 -2
  130. package/lib/esm/actions/blue/withdrawCollateral.js +2 -2
  131. package/lib/esm/actions/bundles/common.d.ts +6 -2
  132. package/lib/esm/actions/bundles/common.js +32 -6
  133. package/lib/esm/actions/index.d.ts +0 -1
  134. package/lib/esm/actions/index.js +0 -1
  135. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -8
  136. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +12 -17
  137. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
  138. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
  139. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  140. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +4 -5
  141. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
  142. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +6 -11
  143. package/lib/esm/actions/requirements/encode/index.d.ts +0 -1
  144. package/lib/esm/actions/requirements/encode/index.js +0 -1
  145. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -6
  146. package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -6
  147. package/lib/esm/actions/requirements/index.d.ts +0 -1
  148. package/lib/esm/actions/requirements/index.js +0 -1
  149. package/lib/esm/actions/vaultV1/deposit.d.ts +1 -2
  150. package/lib/esm/actions/vaultV1/deposit.js +1 -2
  151. package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +7 -5
  152. package/lib/esm/actions/vaultV1/inKindRedeem.js +11 -7
  153. package/lib/esm/actions/vaultV2/deposit.d.ts +1 -2
  154. package/lib/esm/actions/vaultV2/deposit.js +1 -2
  155. package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +1 -1
  156. package/lib/esm/actions/vaultV2/forceWithdraw.js +3 -3
  157. package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +7 -5
  158. package/lib/esm/actions/vaultV2/inKindRedeem.js +11 -7
  159. package/lib/esm/augment/AccrualPosition.d.ts +1 -0
  160. package/lib/esm/augment.d.ts +0 -1
  161. package/lib/esm/augment.js +0 -1
  162. package/lib/esm/blue/abis.d.ts +5 -5
  163. package/lib/esm/blue/abis.js +5 -5
  164. package/lib/esm/blue/entities.d.ts +10 -8
  165. package/lib/esm/blue/entities.js +5 -3
  166. package/lib/esm/blue/errors.d.ts +4 -2
  167. package/lib/esm/blue/errors.js +4 -2
  168. package/lib/esm/blue/fetch.d.ts +5 -3
  169. package/lib/esm/blue/fetch.js +5 -3
  170. package/lib/esm/blue/types.d.ts +2 -4
  171. package/lib/esm/blue/utils.d.ts +6 -4
  172. package/lib/esm/blue/utils.js +6 -4
  173. package/lib/esm/client/morphoViemExtension.d.ts +1 -1
  174. package/lib/esm/client/morphoViemExtension.js +1 -1
  175. package/lib/esm/constants.d.ts +3 -37
  176. package/lib/esm/constants.js +3 -37
  177. package/lib/esm/entities/blue/blue.d.ts +30 -265
  178. package/lib/esm/entities/blue/blue.js +4 -208
  179. package/lib/esm/entities/index.d.ts +11 -66
  180. package/lib/esm/entities/index.js +5 -18
  181. package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -2
  182. package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +8 -3
  183. package/lib/esm/entities/vaultV1/vaultV1.d.ts +13 -5
  184. package/lib/esm/entities/vaultV1/vaultV1.js +19 -13
  185. package/lib/esm/entities/vaultV2/vaultV2.d.ts +40 -19
  186. package/lib/esm/entities/vaultV2/vaultV2.js +61 -30
  187. package/lib/esm/entities/vaultV2BlueReallocationData.js +2 -19
  188. package/lib/esm/errors.d.ts +5 -47
  189. package/lib/esm/errors.js +5 -47
  190. package/lib/esm/fetch.d.ts +5 -17
  191. package/lib/esm/fetch.js +5 -17
  192. package/lib/esm/helpers/constant.d.ts +0 -2
  193. package/lib/esm/helpers/constant.js +0 -2
  194. package/lib/esm/helpers/index.d.ts +2 -3
  195. package/lib/esm/helpers/index.js +2 -3
  196. package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +11 -5
  197. package/lib/esm/helpers/slippage.d.ts +1 -103
  198. package/lib/esm/helpers/slippage.js +1 -147
  199. package/lib/esm/helpers/utilization.d.ts +12 -10
  200. package/lib/esm/helpers/utilization.js +26 -11
  201. package/lib/esm/helpers/validate.d.ts +1 -24
  202. package/lib/esm/helpers/validate.js +2 -48
  203. package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
  204. package/lib/esm/helpers/validateRequirementSpender.js +1 -3
  205. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +48 -15
  206. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +48 -15
  207. package/lib/esm/midnight/errors.d.ts +1 -1
  208. package/lib/esm/midnight/errors.js +1 -1
  209. package/lib/esm/types/action.d.ts +17 -65
  210. package/lib/esm/types/action.js +12 -5
  211. package/lib/esm/types/error.d.ts +50 -381
  212. package/lib/esm/types/error.js +58 -377
  213. package/lib/esm/types/sharedLiquidity.d.ts +1 -117
  214. package/lib/esm/types.d.ts +2 -18
  215. package/lib/esm/utils.d.ts +10 -35
  216. package/lib/esm/utils.js +9 -34
  217. package/package.json +6 -17
  218. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
  219. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -88
  220. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  221. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -152
  222. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
  223. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -53
  224. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  225. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -74
  226. package/lib/cjs/actions/requirements/generalAdapter/index.d.ts +0 -3
  227. package/lib/cjs/actions/requirements/generalAdapter/index.js +0 -19
  228. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  229. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.js +0 -48
  230. package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  231. package/lib/cjs/actions/signatures/getTokenRequirementActions.js +0 -119
  232. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
  233. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -45
  234. package/lib/cjs/actions/signatures/index.d.ts +0 -3
  235. package/lib/cjs/actions/signatures/index.js +0 -19
  236. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
  237. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +0 -8
  238. package/lib/cjs/bundler/actions.d.ts +0 -797
  239. package/lib/cjs/bundler/actions.js +0 -1371
  240. package/lib/cjs/bundler/index.d.ts +0 -2
  241. package/lib/cjs/bundler/index.js +0 -18
  242. package/lib/cjs/bundler/types.d.ts +0 -235
  243. package/lib/cjs/bundler/types.js +0 -2
  244. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +0 -332
  245. package/lib/cjs/entities/vaultV1ReallocationData.js +0 -557
  246. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -80
  247. package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -245
  248. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
  249. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -84
  250. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  251. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -148
  252. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
  253. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -49
  254. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  255. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -70
  256. package/lib/esm/actions/requirements/generalAdapter/index.d.ts +0 -3
  257. package/lib/esm/actions/requirements/generalAdapter/index.js +0 -3
  258. package/lib/esm/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  259. package/lib/esm/actions/signatures/getBlueAuthorizationAction.js +0 -44
  260. package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  261. package/lib/esm/actions/signatures/getTokenRequirementActions.js +0 -115
  262. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
  263. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -41
  264. package/lib/esm/actions/signatures/index.d.ts +0 -3
  265. package/lib/esm/actions/signatures/index.js +0 -3
  266. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
  267. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -7
  268. package/lib/esm/bundler/actions.d.ts +0 -797
  269. package/lib/esm/bundler/actions.js +0 -1368
  270. package/lib/esm/bundler/index.d.ts +0 -2
  271. package/lib/esm/bundler/index.js +0 -2
  272. package/lib/esm/bundler/types.d.ts +0 -235
  273. package/lib/esm/bundler/types.js +0 -1
  274. package/lib/esm/entities/vaultV1ReallocationData.d.ts +0 -332
  275. package/lib/esm/entities/vaultV1ReallocationData.js +0 -559
  276. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -80
  277. package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -241
@@ -1,49 +0,0 @@
1
- import { getChainAddresses } from "@morpho-org/blue-sdk";
2
- import { encodeErc20Permit } from "../encode/index.js";
3
- /**
4
- * Computes the EIP-2612 permit `Requirement` an integrator must sign so that `GeneralAdapter1`
5
- * can pull `amount` of `token`.
6
- *
7
- * @param viemClient - Connected viem `Client` (used by the returned `Requirement.sign()`).
8
- * @param params.token - ERC-20 token address (must support EIP-2612).
9
- * @param params.owner - Account that owns the tokens and signs the permit.
10
- * @param params.chainId - The chain the bundle targets.
11
- * @param params.args.amount - Required token amount.
12
- * @param params.nonce - The owner's current EIP-2612 nonce on `token`.
13
- * @param params.supportDeployless - Whether to fetch token metadata via deployless multicall.
14
- * @returns A single-element array containing the exact-amount `Requirement` to sign.
15
- * @example
16
- * ```ts
17
- * import { createWalletClient, http } from "viem";
18
- * import { mainnet } from "viem/chains";
19
- * import { getGeneralAdapterRequirementsPermit } from "@morpho-org/morpho-sdk";
20
- *
21
- * const client = createWalletClient({ chain: mainnet, transport: http() });
22
- * const reqs = await getGeneralAdapterRequirementsPermit(client, {
23
- * token: USDC, // an ERC-2612-compatible token; DAI is excluded by getGeneralAdapterRequirements
24
- * owner,
25
- * chainId: 1,
26
- * args: { amount: 1_000_000n },
27
- * nonce: 0n,
28
- * });
29
- * // reqs satisfies Requirement[]
30
- * ```
31
- */
32
- export const getGeneralAdapterRequirementsPermit = async (viemClient, params) => {
33
- const { token, owner, chainId, args: { amount }, nonce, supportDeployless, } = params;
34
- const { bundler3: { generalAdapter1 }, } = getChainAddresses(chainId);
35
- // Existing direct ERC-20 allowance is intentionally not an input here. ERC-2612 overwrites the
36
- // allowance with the signed amount, and the bundle spends exactly `amount`, leaving no residual
37
- // allowance after inclusion.
38
- return [
39
- await encodeErc20Permit(viemClient, {
40
- token,
41
- owner,
42
- spender: generalAdapter1,
43
- amount,
44
- chainId,
45
- nonce,
46
- supportDeployless,
47
- }),
48
- ];
49
- };
@@ -1,57 +0,0 @@
1
- import { type Address } from "@morpho-org/blue-sdk";
2
- import type { Bundler3TokenSignatureRequirement, ERC20ApprovalAction, Transaction } from "../../../types/index.js";
3
- interface GeneralAdapterPermit2Erc20Allowances {
4
- readonly permit2: bigint;
5
- }
6
- /**
7
- * Computes the Permit2 prerequisites for `GeneralAdapter1` to pull `amount` of `address`.
8
- *
9
- * Emits two ordered prerequisites:
10
- *
11
- * 1. A classic ERC-20 approval to the Permit2 contract (infinite, if not already in place).
12
- * 2. A Permit2 `Requirement` signed against `GeneralAdapter1`.
13
- *
14
- * The Permit2 signature is always requested for the exact transfer amount when this path is
15
- * selected. Permit2 allowance signatures overwrite the existing allowance, so relying on
16
- * residual Permit2-managed allowance would make the final transfer path depend on stale state and
17
- * could leave allowance behind after a partial spend.
18
- *
19
- * @param params.address - ERC-20 token address.
20
- * @param params.chainId - The chain the bundle targets.
21
- * @param params.permit2 - The Permit2 contract address for the chain.
22
- * @param params.args.amount - Required token amount.
23
- * @param params.erc20Allowances - Current ERC-20 allowances keyed by spender contract name.
24
- * @param params.permit2Nonce - Current Permit2 nonce for the token owner / token / GeneralAdapter1 tuple.
25
- * @returns Ordered list of approval transactions and/or `Requirement` objects to satisfy before
26
- * bundling.
27
- * @throws {ApprovalAmountLessThanSpendAmountError} from the inner approval helper when its
28
- * bookkeeping invariants break (should not happen with the values this function passes).
29
- * @example
30
- * ```ts
31
- * import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
32
- * import { getGeneralAdapterRequirementsPermit2 } from "@morpho-org/morpho-sdk";
33
- *
34
- * const { permit2 } = getChainAddresses(1);
35
- * if (!permit2) throw new Error("Permit2 not configured for this chain");
36
- * const requirements = getGeneralAdapterRequirementsPermit2({
37
- * address: USDC,
38
- * chainId: 1,
39
- * permit2,
40
- * args: { amount: 1_000_000n },
41
- * erc20Allowances: { permit2: 0n },
42
- * permit2Nonce: 0n,
43
- * });
44
- * // requirements satisfies (Readonly<Transaction<ERC20ApprovalAction> | Bundler3TokenSignatureRequirement>)[]
45
- * ```
46
- */
47
- export declare const getGeneralAdapterRequirementsPermit2: (params: {
48
- address: Address;
49
- chainId: number;
50
- permit2: Address;
51
- args: {
52
- amount: bigint;
53
- };
54
- erc20Allowances: GeneralAdapterPermit2Erc20Allowances;
55
- permit2Nonce: bigint;
56
- }) => Readonly<Transaction<ERC20ApprovalAction> | Bundler3TokenSignatureRequirement>[];
57
- export {};
@@ -1,70 +0,0 @@
1
- import { MathLib } from "@morpho-org/blue-sdk";
2
- import { encodeErc20Permit2Approve } from "../encode/encodeErc20Permit2Approve.js";
3
- import { getRequirementsApproval } from "../getRequirementsApproval.js";
4
- /**
5
- * Computes the Permit2 prerequisites for `GeneralAdapter1` to pull `amount` of `address`.
6
- *
7
- * Emits two ordered prerequisites:
8
- *
9
- * 1. A classic ERC-20 approval to the Permit2 contract (infinite, if not already in place).
10
- * 2. A Permit2 `Requirement` signed against `GeneralAdapter1`.
11
- *
12
- * The Permit2 signature is always requested for the exact transfer amount when this path is
13
- * selected. Permit2 allowance signatures overwrite the existing allowance, so relying on
14
- * residual Permit2-managed allowance would make the final transfer path depend on stale state and
15
- * could leave allowance behind after a partial spend.
16
- *
17
- * @param params.address - ERC-20 token address.
18
- * @param params.chainId - The chain the bundle targets.
19
- * @param params.permit2 - The Permit2 contract address for the chain.
20
- * @param params.args.amount - Required token amount.
21
- * @param params.erc20Allowances - Current ERC-20 allowances keyed by spender contract name.
22
- * @param params.permit2Nonce - Current Permit2 nonce for the token owner / token / GeneralAdapter1 tuple.
23
- * @returns Ordered list of approval transactions and/or `Requirement` objects to satisfy before
24
- * bundling.
25
- * @throws {ApprovalAmountLessThanSpendAmountError} from the inner approval helper when its
26
- * bookkeeping invariants break (should not happen with the values this function passes).
27
- * @example
28
- * ```ts
29
- * import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
30
- * import { getGeneralAdapterRequirementsPermit2 } from "@morpho-org/morpho-sdk";
31
- *
32
- * const { permit2 } = getChainAddresses(1);
33
- * if (!permit2) throw new Error("Permit2 not configured for this chain");
34
- * const requirements = getGeneralAdapterRequirementsPermit2({
35
- * address: USDC,
36
- * chainId: 1,
37
- * permit2,
38
- * args: { amount: 1_000_000n },
39
- * erc20Allowances: { permit2: 0n },
40
- * permit2Nonce: 0n,
41
- * });
42
- * // requirements satisfies (Readonly<Transaction<ERC20ApprovalAction> | Bundler3TokenSignatureRequirement>)[]
43
- * ```
44
- */
45
- export const getGeneralAdapterRequirementsPermit2 = (params) => {
46
- const { address, chainId, permit2, args: { amount }, erc20Allowances, permit2Nonce, } = params;
47
- const requirements = [];
48
- const approvalRequirements = getRequirementsApproval({
49
- address,
50
- chainId,
51
- args: {
52
- approvalAmount: MathLib.MAX_UINT_160, // Always approve infinite.
53
- spendAmount: amount,
54
- spender: permit2,
55
- },
56
- allowances: erc20Allowances.permit2,
57
- });
58
- requirements.push(...approvalRequirements);
59
- // Existing Permit2-managed allowance is intentionally not checked for sufficiency. Permit2
60
- // overwrites the allowance with this signed amount, and the bundle spends exactly `amount`,
61
- // leaving no residual Permit2 allowance after inclusion.
62
- requirements.push(encodeErc20Permit2Approve({
63
- token: address,
64
- amount,
65
- chainId,
66
- nonce: permit2Nonce,
67
- expiration: MathLib.MAX_UINT_48, // Always approve indefinitely.
68
- }));
69
- return requirements;
70
- };
@@ -1,3 +0,0 @@
1
- export * from "./getGeneralAdapterRequirements.js";
2
- export * from "./getGeneralAdapterRequirementsPermit.js";
3
- export * from "./getGeneralAdapterRequirementsPermit2.js";
@@ -1,3 +0,0 @@
1
- export * from "./getGeneralAdapterRequirements.js";
2
- export * from "./getGeneralAdapterRequirementsPermit.js";
3
- export * from "./getGeneralAdapterRequirementsPermit2.js";
@@ -1,29 +0,0 @@
1
- import type { Action } from "../../bundler/index.js";
2
- import { type AuthorizationRequirementSignature } from "../../types/index.js";
3
- /**
4
- * Encodes the bundler action that consumes a signed Morpho authorization, granting
5
- * `authorized` (GeneralAdapter1) operator rights on behalf of the signer via
6
- * `setAuthorizationWithSig` — replacing a standalone `setAuthorization` transaction.
7
- *
8
- * The signature's `authorized` is pinned to the chain's `GeneralAdapter1`: an authorization
9
- * targeting any other account is rejected so the bundle can never hand operator rights over the
10
- * user's Morpho position to an unintended address. The action is emitted with `skipRevert: false`
11
- * so a rejected or stale authorization fails the whole bundle rather than letting a later
12
- * on-behalf Morpho call revert opaquely.
13
- *
14
- * @param chainId - Chain whose `GeneralAdapter1` the signature must authorize.
15
- * @param signature - The signed authorization produced by `Requirement.sign()`.
16
- * @returns A single `morphoSetAuthorizationWithSig` bundler `Action`.
17
- * @throws {BundlerErrors.UnexpectedSignature} when `signature.args.authorized` is not the chain's
18
- * `GeneralAdapter1`.
19
- * @example
20
- * ```ts
21
- * import { getBlueAuthorizationAction } from "@morpho-org/morpho-sdk";
22
- *
23
- * // `requirement` comes from `getBlueAuthorizationRequirement` with `supportSignature: true`.
24
- * const signed = await requirement.sign(walletClient, borrower);
25
- * const action = getBlueAuthorizationAction(1, signed);
26
- * // action satisfies { type: "morphoSetAuthorizationWithSig"; args: [...] }
27
- * ```
28
- */
29
- export declare const getBlueAuthorizationAction: (chainId: number, signature: AuthorizationRequirementSignature) => Action;
@@ -1,44 +0,0 @@
1
- import { getChainAddresses } from "@morpho-org/blue-sdk";
2
- import { isAddressEqual } from "viem";
3
- import { BundlerErrors, } from "../../types/index.js";
4
- /**
5
- * Encodes the bundler action that consumes a signed Morpho authorization, granting
6
- * `authorized` (GeneralAdapter1) operator rights on behalf of the signer via
7
- * `setAuthorizationWithSig` — replacing a standalone `setAuthorization` transaction.
8
- *
9
- * The signature's `authorized` is pinned to the chain's `GeneralAdapter1`: an authorization
10
- * targeting any other account is rejected so the bundle can never hand operator rights over the
11
- * user's Morpho position to an unintended address. The action is emitted with `skipRevert: false`
12
- * so a rejected or stale authorization fails the whole bundle rather than letting a later
13
- * on-behalf Morpho call revert opaquely.
14
- *
15
- * @param chainId - Chain whose `GeneralAdapter1` the signature must authorize.
16
- * @param signature - The signed authorization produced by `Requirement.sign()`.
17
- * @returns A single `morphoSetAuthorizationWithSig` bundler `Action`.
18
- * @throws {BundlerErrors.UnexpectedSignature} when `signature.args.authorized` is not the chain's
19
- * `GeneralAdapter1`.
20
- * @example
21
- * ```ts
22
- * import { getBlueAuthorizationAction } from "@morpho-org/morpho-sdk";
23
- *
24
- * // `requirement` comes from `getBlueAuthorizationRequirement` with `supportSignature: true`.
25
- * const signed = await requirement.sign(walletClient, borrower);
26
- * const action = getBlueAuthorizationAction(1, signed);
27
- * // action satisfies { type: "morphoSetAuthorizationWithSig"; args: [...] }
28
- * ```
29
- */
30
- export const getBlueAuthorizationAction = (chainId, signature) => {
31
- const { owner, authorized, isAuthorized, nonce, deadline } = signature.args;
32
- const { bundler3: { generalAdapter1 }, } = getChainAddresses(chainId);
33
- if (!isAddressEqual(authorized, generalAdapter1)) {
34
- throw new BundlerErrors.UnexpectedSignature(authorized);
35
- }
36
- return {
37
- type: "morphoSetAuthorizationWithSig",
38
- args: [
39
- { authorizer: owner, authorized, isAuthorized, nonce, deadline },
40
- signature.args.signature,
41
- false /* skipRevert */,
42
- ],
43
- };
44
- };
@@ -1,58 +0,0 @@
1
- import { type Address } from "viem";
2
- import type { Action } from "../../bundler/index.js";
3
- import { type PermitRequirementSignature } from "../../types/index.js";
4
- interface GetTokenRequirementActionsParams {
5
- asset: Address;
6
- amount: bigint;
7
- recipient: Address;
8
- requirementSignature?: PermitRequirementSignature;
9
- }
10
- /**
11
- * Encodes the bundler actions that pull the asset to `recipient`, optionally consuming a
12
- * pre-signed permit / permit2 requirement first.
13
- *
14
- * Permit2 path emits `approve2` + `transferFrom2`; classic permit path emits `permit` +
15
- * `erc20TransferFrom`. When no signature is provided, the function emits a plain
16
- * `erc20TransferFrom` against an existing ERC-20 allowance.
17
- *
18
- * The signed `asset` and `amount` must match the pulled `asset` and `amount` exactly, otherwise
19
- * the function throws so the caller does not silently spend a wider-than-expected approval.
20
- *
21
- * @param params.asset - The ERC-20 to pull.
22
- * @param params.amount - The amount to pull, in the asset's smallest unit.
23
- * @param params.recipient - The address that receives the transfer.
24
- * @param params.requirementSignature - Optional signed permit / permit2 to apply before the transfer.
25
- * @returns Bundler `Action`s needed to pull the token.
26
- * @throws {DepositAssetMismatchError} when the signed asset differs from `asset`.
27
- * @throws {DepositAmountMismatchError} when the signed amount differs from `amount`.
28
- * @throws {UnexpectedRequirementSignatureError} when passed a BlueBundlesV1-only SignatureTransfer result.
29
- * @throws {Permit2ExpirationMissingError} when `action.type === "permit2"` but `args.expiration` is missing.
30
- * @example
31
- * ```ts
32
- * import { createWalletClient, http } from "viem";
33
- * import { mainnet } from "viem/chains";
34
- * import { getTokenRequirementActions } from "@morpho-org/morpho-sdk";
35
- *
36
- * const walletClient = createWalletClient({
37
- * chain: mainnet,
38
- * transport: http(),
39
- * account: borrower,
40
- * });
41
- *
42
- * // `requirement` comes from a requirement helper; signing produces a `RequirementSignature`.
43
- * const requirementSignature = await requirement.sign(walletClient, borrower);
44
- *
45
- * const actions = getTokenRequirementActions({
46
- * asset: loanToken,
47
- * amount: 1_000_000n,
48
- * recipient: generalAdapter1,
49
- * requirementSignature,
50
- * });
51
- * // actions satisfies Action[]
52
- * // - permit2 path: [{ type: "approve2", ... }, { type: "transferFrom2", ... }]
53
- * // - classic permit path: [{ type: "permit", ... }, { type: "erc20TransferFrom", ... }]
54
- * // - no signature: [{ type: "erc20TransferFrom", ... }]
55
- * ```
56
- */
57
- export declare const getTokenRequirementActions: ({ asset, amount, recipient, requirementSignature, }: GetTokenRequirementActionsParams) => Action[];
58
- export {};
@@ -1,115 +0,0 @@
1
- import { isAddressEqual } from "viem";
2
- import { DepositAmountMismatchError, DepositAssetMismatchError, isPermit2SignatureTransferSignature, Permit2ExpirationMissingError, UnexpectedRequirementSignatureError, } from "../../types/index.js";
3
- /**
4
- * Encodes the bundler actions that pull the asset to `recipient`, optionally consuming a
5
- * pre-signed permit / permit2 requirement first.
6
- *
7
- * Permit2 path emits `approve2` + `transferFrom2`; classic permit path emits `permit` +
8
- * `erc20TransferFrom`. When no signature is provided, the function emits a plain
9
- * `erc20TransferFrom` against an existing ERC-20 allowance.
10
- *
11
- * The signed `asset` and `amount` must match the pulled `asset` and `amount` exactly, otherwise
12
- * the function throws so the caller does not silently spend a wider-than-expected approval.
13
- *
14
- * @param params.asset - The ERC-20 to pull.
15
- * @param params.amount - The amount to pull, in the asset's smallest unit.
16
- * @param params.recipient - The address that receives the transfer.
17
- * @param params.requirementSignature - Optional signed permit / permit2 to apply before the transfer.
18
- * @returns Bundler `Action`s needed to pull the token.
19
- * @throws {DepositAssetMismatchError} when the signed asset differs from `asset`.
20
- * @throws {DepositAmountMismatchError} when the signed amount differs from `amount`.
21
- * @throws {UnexpectedRequirementSignatureError} when passed a BlueBundlesV1-only SignatureTransfer result.
22
- * @throws {Permit2ExpirationMissingError} when `action.type === "permit2"` but `args.expiration` is missing.
23
- * @example
24
- * ```ts
25
- * import { createWalletClient, http } from "viem";
26
- * import { mainnet } from "viem/chains";
27
- * import { getTokenRequirementActions } from "@morpho-org/morpho-sdk";
28
- *
29
- * const walletClient = createWalletClient({
30
- * chain: mainnet,
31
- * transport: http(),
32
- * account: borrower,
33
- * });
34
- *
35
- * // `requirement` comes from a requirement helper; signing produces a `RequirementSignature`.
36
- * const requirementSignature = await requirement.sign(walletClient, borrower);
37
- *
38
- * const actions = getTokenRequirementActions({
39
- * asset: loanToken,
40
- * amount: 1_000_000n,
41
- * recipient: generalAdapter1,
42
- * requirementSignature,
43
- * });
44
- * // actions satisfies Action[]
45
- * // - permit2 path: [{ type: "approve2", ... }, { type: "transferFrom2", ... }]
46
- * // - classic permit path: [{ type: "permit", ... }, { type: "erc20TransferFrom", ... }]
47
- * // - no signature: [{ type: "erc20TransferFrom", ... }]
48
- * ```
49
- */
50
- export const getTokenRequirementActions = ({ asset, amount, recipient, requirementSignature, }) => {
51
- if (requirementSignature == null) {
52
- return [
53
- {
54
- type: "erc20TransferFrom",
55
- args: [asset, amount, recipient, false /* skipRevert */],
56
- },
57
- ];
58
- }
59
- if (isPermit2SignatureTransferSignature(requirementSignature)) {
60
- throw new UnexpectedRequirementSignatureError("permit2SignatureTransfer");
61
- }
62
- if (!isAddressEqual(requirementSignature.args.asset, asset)) {
63
- throw new DepositAssetMismatchError(asset, requirementSignature.args.asset);
64
- }
65
- // Permit2 and ERC-2612 overwrite the previous allowance with the signed amount.
66
- // It must exactly cover the transfer: less would fail, more would leave residual allowance.
67
- if (requirementSignature.args.amount !== amount) {
68
- throw new DepositAmountMismatchError(amount, requirementSignature.args.amount);
69
- }
70
- if (requirementSignature.action.type === "permit2") {
71
- if (!("expiration" in requirementSignature.args)) {
72
- throw new Permit2ExpirationMissingError();
73
- }
74
- return [
75
- {
76
- type: "approve2",
77
- args: [
78
- requirementSignature.args.owner,
79
- {
80
- details: {
81
- token: requirementSignature.args.asset,
82
- amount: requirementSignature.args.amount,
83
- nonce: Number(requirementSignature.args.nonce),
84
- expiration: Number(requirementSignature.args.expiration),
85
- },
86
- sigDeadline: requirementSignature.args.deadline,
87
- },
88
- requirementSignature.args.signature,
89
- false /* skipRevert */,
90
- ],
91
- },
92
- {
93
- type: "transferFrom2",
94
- args: [asset, amount, recipient, false /* skipRevert */],
95
- },
96
- ];
97
- }
98
- return [
99
- {
100
- type: "permit",
101
- args: [
102
- requirementSignature.args.owner,
103
- requirementSignature.args.asset,
104
- requirementSignature.args.amount,
105
- requirementSignature.args.deadline,
106
- requirementSignature.args.signature,
107
- false /* skipRevert */,
108
- ],
109
- },
110
- {
111
- type: "erc20TransferFrom",
112
- args: [asset, amount, recipient, false /* skipRevert */],
113
- },
114
- ];
115
- };
@@ -1,50 +0,0 @@
1
- import type { Address } from "viem";
2
- import { type PermitRequirementSignature } from "../../types/index.js";
3
- import { type BundleSharesPermit } from "../bundles/common.js";
4
- /**
5
- * Compatibility alias for the canonical {@link BundleSharesPermit} tuple consumed by VaultExitBundlesV1.
6
- *
7
- * @deprecated Use {@link BundleSharesPermit}.
8
- */
9
- export type VaultExitBundlesV1PermitStruct = BundleSharesPermit;
10
- /**
11
- * Parameters for {@link getVaultExitBundlesV1PermitStruct}.
12
- *
13
- * @deprecated Use the parameters of `getBundlesSharesPermit`.
14
- */
15
- export interface GetVaultExitBundlesV1PermitStructParams {
16
- /** Vault share token authorized by the permit. */
17
- readonly vault: Address;
18
- /** Bundle deadline used by the empty-permit sentinel. */
19
- readonly deadline: bigint;
20
- /** Optional expected owner of the signed permit. */
21
- readonly owner?: Address;
22
- /** Optional expected spender of the signed permit. */
23
- readonly spender?: Address;
24
- /** Optional signed bounded ERC-2612 requirement. */
25
- readonly requirementSignature?: PermitRequirementSignature;
26
- }
27
- /**
28
- * Compatibility wrapper for the former VaultExitBundlesV1-specific permit reshaper.
29
- *
30
- * @param params.vault - Vault share token authorized by the permit.
31
- * @param params.deadline - Bundle deadline used by the empty-permit sentinel.
32
- * @param params.owner - Optional expected owner of the signed permit.
33
- * @param params.spender - Optional expected spender of the signed permit.
34
- * @param params.requirementSignature - Optional signed ERC-2612 vault-share requirement.
35
- * @returns The shared bundles share-permit tuple.
36
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement is incompatible.
37
- * @deprecated Use `getBundlesSharesPermit`; this wrapper preserves the legacy error identity.
38
- * @example
39
- * ```ts
40
- * import { getVaultExitBundlesV1PermitStruct } from "@morpho-org/morpho-sdk";
41
- * import { zeroAddress } from "viem";
42
- *
43
- * const permit = getVaultExitBundlesV1PermitStruct({
44
- * vault: zeroAddress,
45
- * deadline: 1_900_000_000n,
46
- * });
47
- * // permit.value === 0n
48
- * ```
49
- */
50
- export declare const getVaultExitBundlesV1PermitStruct: (params: GetVaultExitBundlesV1PermitStructParams) => VaultExitBundlesV1PermitStruct;
@@ -1,41 +0,0 @@
1
- import { BundlesPermitMismatchError, VaultExitBundlesV1PermitMismatchError, } from "../../types/index.js";
2
- import { getBundlesSharesPermit, } from "../bundles/common.js";
3
- /**
4
- * Compatibility wrapper for the former VaultExitBundlesV1-specific permit reshaper.
5
- *
6
- * @param params.vault - Vault share token authorized by the permit.
7
- * @param params.deadline - Bundle deadline used by the empty-permit sentinel.
8
- * @param params.owner - Optional expected owner of the signed permit.
9
- * @param params.spender - Optional expected spender of the signed permit.
10
- * @param params.requirementSignature - Optional signed ERC-2612 vault-share requirement.
11
- * @returns The shared bundles share-permit tuple.
12
- * @throws {VaultExitBundlesV1PermitMismatchError} when the requirement is incompatible.
13
- * @deprecated Use `getBundlesSharesPermit`; this wrapper preserves the legacy error identity.
14
- * @example
15
- * ```ts
16
- * import { getVaultExitBundlesV1PermitStruct } from "@morpho-org/morpho-sdk";
17
- * import { zeroAddress } from "viem";
18
- *
19
- * const permit = getVaultExitBundlesV1PermitStruct({
20
- * vault: zeroAddress,
21
- * deadline: 1_900_000_000n,
22
- * });
23
- * // permit.value === 0n
24
- * ```
25
- */
26
- export const getVaultExitBundlesV1PermitStruct = (params) => {
27
- try {
28
- return getBundlesSharesPermit(params);
29
- }
30
- catch (cause) {
31
- if (cause instanceof BundlesPermitMismatchError) {
32
- throw new VaultExitBundlesV1PermitMismatchError({
33
- field: cause.field,
34
- expected: cause.expected,
35
- actual: cause.actual,
36
- cause,
37
- });
38
- }
39
- throw cause;
40
- }
41
- };
@@ -1,3 +0,0 @@
1
- export * from "./getBlueAuthorizationAction.js";
2
- export * from "./getTokenRequirementActions.js";
3
- export * from "./getVaultExitBundlesV1PermitStruct.js";
@@ -1,3 +0,0 @@
1
- export * from "./getBlueAuthorizationAction.js";
2
- export * from "./getTokenRequirementActions.js";
3
- export * from "./getVaultExitBundlesV1PermitStruct.js";
@@ -1,11 +0,0 @@
1
- import { VaultMarketPublicAllocatorConfig as BlueVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk";
2
- import { fetchVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk-viem";
3
- declare module "@morpho-org/blue-sdk" {
4
- namespace VaultMarketPublicAllocatorConfig {
5
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `fetchVaultV2BlueMarketPublicAllocatorConfig` from `@morpho-org/morpho-sdk/fetch`. */
6
- let fetch: typeof fetchVaultMarketPublicAllocatorConfig;
7
- }
8
- }
9
- export {
10
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `VaultV2BlueMarketPublicAllocatorConfig` from `@morpho-org/morpho-sdk/entities`. */
11
- BlueVaultMarketPublicAllocatorConfig as VaultMarketPublicAllocatorConfig, };
@@ -1,7 +0,0 @@
1
- import { VaultMarketPublicAllocatorConfig as BlueVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk";
2
- import { fetchVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk-viem";
3
- BlueVaultMarketPublicAllocatorConfig.fetch =
4
- fetchVaultMarketPublicAllocatorConfig;
5
- export {
6
- /** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `VaultV2BlueMarketPublicAllocatorConfig` from `@morpho-org/morpho-sdk/entities`. */
7
- BlueVaultMarketPublicAllocatorConfig as VaultMarketPublicAllocatorConfig, };