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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/MIGRATION-v5-to-v6.md +201 -0
  2. package/README.md +62 -40
  3. package/lib/cjs/abis.d.ts +543 -0
  4. package/lib/cjs/abis.js +738 -0
  5. package/lib/cjs/actions/blue/borrow.d.ts +62 -58
  6. package/lib/cjs/actions/blue/borrow.js +48 -80
  7. package/lib/cjs/actions/blue/common.d.ts +99 -0
  8. package/lib/cjs/actions/blue/common.js +318 -0
  9. package/lib/cjs/actions/blue/refinance.d.ts +72 -107
  10. package/lib/cjs/actions/blue/refinance.js +97 -197
  11. package/lib/cjs/actions/blue/repay.d.ts +72 -68
  12. package/lib/cjs/actions/blue/repay.js +56 -118
  13. package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +85 -90
  14. package/lib/cjs/actions/blue/repayWithdrawCollateral.js +148 -137
  15. package/lib/cjs/actions/blue/supply.d.ts +62 -45
  16. package/lib/cjs/actions/blue/supply.js +94 -70
  17. package/lib/cjs/actions/blue/supplyCollateral.d.ts +63 -40
  18. package/lib/cjs/actions/blue/supplyCollateral.js +52 -69
  19. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +82 -86
  20. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +133 -119
  21. package/lib/cjs/actions/blue/withdraw.d.ts +68 -78
  22. package/lib/cjs/actions/blue/withdraw.js +101 -97
  23. package/lib/cjs/actions/blue/withdrawCollateral.d.ts +56 -28
  24. package/lib/cjs/actions/blue/withdrawCollateral.js +45 -50
  25. package/lib/cjs/actions/index.d.ts +1 -1
  26. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
  27. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +60 -19
  28. package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
  29. package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +207 -0
  30. package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
  31. package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.js +72 -0
  32. package/lib/cjs/actions/requirements/blue/index.d.ts +2 -0
  33. package/lib/cjs/actions/requirements/blue/index.js +2 -0
  34. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
  35. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +30 -5
  36. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
  37. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +7 -2
  38. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
  39. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +33 -6
  40. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
  41. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +123 -0
  42. package/lib/cjs/actions/requirements/encode/index.d.ts +1 -0
  43. package/lib/cjs/actions/requirements/encode/index.js +1 -0
  44. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
  45. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -4
  46. package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -4
  47. package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +1 -0
  48. package/lib/cjs/actions/signatures/getTokenRequirementActions.js +4 -0
  49. package/lib/cjs/blue/types.d.ts +3 -1
  50. package/lib/cjs/blue/utils.d.ts +3 -1
  51. package/lib/cjs/blue/utils.js +1 -0
  52. package/lib/cjs/bundler/actions.d.ts +6 -4
  53. package/lib/cjs/bundler/actions.js +6 -4
  54. package/lib/cjs/bundler/types.d.ts +10 -1
  55. package/lib/cjs/client/morphoViemExtension.d.ts +2 -1
  56. package/lib/cjs/client/morphoViemExtension.js +2 -1
  57. package/lib/cjs/entities/blue/blue.d.ts +817 -360
  58. package/lib/cjs/entities/blue/blue.js +455 -698
  59. package/lib/cjs/entities/index.d.ts +1 -0
  60. package/lib/cjs/entities/vaultV1/vaultV1.js +4 -12
  61. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +18 -3
  62. package/lib/cjs/entities/vaultV1ReallocationData.js +11 -1
  63. package/lib/cjs/entities/vaultV2/vaultV2.js +6 -18
  64. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +7 -10
  65. package/lib/cjs/helpers/computeVaultV1Reallocations.js +7 -10
  66. package/lib/cjs/helpers/validate.d.ts +16 -23
  67. package/lib/cjs/helpers/validate.js +32 -48
  68. package/lib/cjs/helpers/validateRequirementSpender.d.ts +2 -1
  69. package/lib/cjs/helpers/validateRequirementSpender.js +2 -0
  70. package/lib/cjs/types/action.d.ts +146 -162
  71. package/lib/cjs/types/action.js +29 -2
  72. package/lib/cjs/types/client.d.ts +9 -0
  73. package/lib/cjs/types/error.d.ts +173 -18
  74. package/lib/cjs/types/error.js +230 -25
  75. package/lib/cjs/types/sharedLiquidity.d.ts +20 -4
  76. package/lib/cjs/types.d.ts +3 -1
  77. package/lib/cjs/utils.d.ts +3 -1
  78. package/lib/cjs/utils.js +1 -0
  79. package/lib/esm/abis.d.ts +543 -0
  80. package/lib/esm/abis.js +737 -0
  81. package/lib/esm/actions/blue/borrow.d.ts +62 -58
  82. package/lib/esm/actions/blue/borrow.js +48 -80
  83. package/lib/esm/actions/blue/common.d.ts +99 -0
  84. package/lib/esm/actions/blue/common.js +306 -0
  85. package/lib/esm/actions/blue/refinance.d.ts +72 -107
  86. package/lib/esm/actions/blue/refinance.js +98 -198
  87. package/lib/esm/actions/blue/repay.d.ts +72 -68
  88. package/lib/esm/actions/blue/repay.js +56 -118
  89. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +85 -90
  90. package/lib/esm/actions/blue/repayWithdrawCollateral.js +149 -138
  91. package/lib/esm/actions/blue/supply.d.ts +62 -45
  92. package/lib/esm/actions/blue/supply.js +94 -70
  93. package/lib/esm/actions/blue/supplyCollateral.d.ts +63 -40
  94. package/lib/esm/actions/blue/supplyCollateral.js +52 -69
  95. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +82 -86
  96. package/lib/esm/actions/blue/supplyCollateralBorrow.js +134 -120
  97. package/lib/esm/actions/blue/withdraw.d.ts +68 -78
  98. package/lib/esm/actions/blue/withdraw.js +100 -96
  99. package/lib/esm/actions/blue/withdrawCollateral.d.ts +56 -28
  100. package/lib/esm/actions/blue/withdrawCollateral.js +45 -50
  101. package/lib/esm/actions/index.d.ts +1 -1
  102. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
  103. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +63 -22
  104. package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
  105. package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +203 -0
  106. package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
  107. package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.js +68 -0
  108. package/lib/esm/actions/requirements/blue/index.d.ts +2 -0
  109. package/lib/esm/actions/requirements/blue/index.js +2 -0
  110. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
  111. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +31 -6
  112. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
  113. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +8 -3
  114. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
  115. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +34 -7
  116. package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
  117. package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +119 -0
  118. package/lib/esm/actions/requirements/encode/index.d.ts +1 -0
  119. package/lib/esm/actions/requirements/encode/index.js +1 -0
  120. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
  121. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -4
  122. package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -4
  123. package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +1 -0
  124. package/lib/esm/actions/signatures/getTokenRequirementActions.js +5 -1
  125. package/lib/esm/blue/types.d.ts +3 -1
  126. package/lib/esm/blue/utils.d.ts +3 -1
  127. package/lib/esm/blue/utils.js +3 -1
  128. package/lib/esm/bundler/actions.d.ts +6 -4
  129. package/lib/esm/bundler/actions.js +6 -4
  130. package/lib/esm/bundler/types.d.ts +10 -1
  131. package/lib/esm/client/morphoViemExtension.d.ts +2 -1
  132. package/lib/esm/client/morphoViemExtension.js +2 -1
  133. package/lib/esm/entities/blue/blue.d.ts +817 -360
  134. package/lib/esm/entities/blue/blue.js +461 -704
  135. package/lib/esm/entities/index.d.ts +1 -0
  136. package/lib/esm/entities/vaultV1/vaultV1.js +4 -12
  137. package/lib/esm/entities/vaultV1ReallocationData.d.ts +18 -3
  138. package/lib/esm/entities/vaultV1ReallocationData.js +13 -2
  139. package/lib/esm/entities/vaultV2/vaultV2.js +7 -19
  140. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +7 -10
  141. package/lib/esm/helpers/computeVaultV1Reallocations.js +7 -10
  142. package/lib/esm/helpers/validate.d.ts +16 -23
  143. package/lib/esm/helpers/validate.js +32 -48
  144. package/lib/esm/helpers/validateRequirementSpender.d.ts +2 -1
  145. package/lib/esm/helpers/validateRequirementSpender.js +2 -0
  146. package/lib/esm/types/action.d.ts +146 -162
  147. package/lib/esm/types/action.js +28 -2
  148. package/lib/esm/types/client.d.ts +9 -0
  149. package/lib/esm/types/error.d.ts +173 -18
  150. package/lib/esm/types/error.js +216 -21
  151. package/lib/esm/types/sharedLiquidity.d.ts +20 -4
  152. package/lib/esm/types.d.ts +3 -1
  153. package/lib/esm/utils.d.ts +3 -1
  154. package/lib/esm/utils.js +3 -1
  155. package/package.json +7 -6
  156. package/lib/cjs/actions/blue/buildAssetFundingActions.d.ts +0 -47
  157. package/lib/cjs/actions/blue/buildAssetFundingActions.js +0 -63
  158. package/lib/cjs/actions/blue/buildReallocationActions.d.ts +0 -69
  159. package/lib/cjs/actions/blue/buildReallocationActions.js +0 -141
  160. package/lib/cjs/actions/blue/resolveRepayFunding.d.ts +0 -66
  161. package/lib/cjs/actions/blue/resolveRepayFunding.js +0 -85
  162. package/lib/esm/actions/blue/buildAssetFundingActions.d.ts +0 -47
  163. package/lib/esm/actions/blue/buildAssetFundingActions.js +0 -59
  164. package/lib/esm/actions/blue/buildReallocationActions.d.ts +0 -69
  165. package/lib/esm/actions/blue/buildReallocationActions.js +0 -135
  166. package/lib/esm/actions/blue/resolveRepayFunding.d.ts +0 -66
  167. package/lib/esm/actions/blue/resolveRepayFunding.js +0 -81
@@ -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, and VaultExitBundlesV1 addresses when
9
- * configured.
8
+ * GeneralAdapter1, Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, 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
@@ -18,13 +18,14 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
18
18
  * and token approval caps.
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
- * may be `MAX_UINT_160` for Permit2 prerequisites).
21
+ * may be `maxUint256` for reusable Permit2 or saturated-share-repay approvals).
22
22
  * @param params.args.spender - Address that will be granted the approval. Must be GeneralAdapter1,
23
- * Permit2, Midnight, MidnightBundles, or VaultExitBundlesV1 for `chainId`.
23
+ * Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, or BlueBundlesV1 for `chainId`.
24
24
  * @param params.allowances - The user's current allowance of `address` for `spender`.
25
25
  * @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
26
26
  * followed by the new approval. Empty when no approval is needed.
27
27
  * @throws {ApprovalAmountLessThanSpendAmountError} when `approvalAmount < spendAmount`.
28
+ * @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
28
29
  * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not a supported SDK spender for `chainId`.
29
30
  * @example
30
31
  * ```ts
@@ -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, and VaultExitBundlesV1 addresses when
11
- * configured.
10
+ * GeneralAdapter1, Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, 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
@@ -20,13 +20,14 @@ import { encodeErc20Approval } from "./encode/encodeErc20Approval.js";
20
20
  * and token approval caps.
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
- * may be `MAX_UINT_160` for Permit2 prerequisites).
23
+ * may be `maxUint256` for reusable Permit2 or saturated-share-repay approvals).
24
24
  * @param params.args.spender - Address that will be granted the approval. Must be GeneralAdapter1,
25
- * Permit2, Midnight, MidnightBundles, or VaultExitBundlesV1 for `chainId`.
25
+ * Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, or BlueBundlesV1 for `chainId`.
26
26
  * @param params.allowances - The user's current allowance of `address` for `spender`.
27
27
  * @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
28
28
  * followed by the new approval. Empty when no approval is needed.
29
29
  * @throws {ApprovalAmountLessThanSpendAmountError} when `approvalAmount < spendAmount`.
30
+ * @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
30
31
  * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not a supported SDK spender for `chainId`.
31
32
  * @example
32
33
  * ```ts
@@ -25,6 +25,7 @@ interface GetTokenRequirementActionsParams {
25
25
  * @returns Bundler `Action`s needed to pull the token.
26
26
  * @throws {DepositAssetMismatchError} when the signed asset differs from `asset`.
27
27
  * @throws {DepositAmountMismatchError} when the signed amount differs from `amount`.
28
+ * @throws {UnexpectedRequirementSignatureError} when passed a BlueBundlesV1-only SignatureTransfer result.
28
29
  * @throws {Permit2ExpirationMissingError} when `action.type === "permit2"` but `args.expiration` is missing.
29
30
  * @example
30
31
  * ```ts
@@ -1,5 +1,5 @@
1
1
  import { isAddressEqual } from "viem";
2
- import { DepositAmountMismatchError, DepositAssetMismatchError, Permit2ExpirationMissingError, } from "../../types/index.js";
2
+ import { DepositAmountMismatchError, DepositAssetMismatchError, isPermit2TransferFromSignature, Permit2ExpirationMissingError, UnexpectedRequirementSignatureError, } from "../../types/index.js";
3
3
  /**
4
4
  * Encodes the bundler actions that pull the asset to `recipient`, optionally consuming a
5
5
  * pre-signed permit / permit2 requirement first.
@@ -18,6 +18,7 @@ import { DepositAmountMismatchError, DepositAssetMismatchError, Permit2Expiratio
18
18
  * @returns Bundler `Action`s needed to pull the token.
19
19
  * @throws {DepositAssetMismatchError} when the signed asset differs from `asset`.
20
20
  * @throws {DepositAmountMismatchError} when the signed amount differs from `amount`.
21
+ * @throws {UnexpectedRequirementSignatureError} when passed a BlueBundlesV1-only SignatureTransfer result.
21
22
  * @throws {Permit2ExpirationMissingError} when `action.type === "permit2"` but `args.expiration` is missing.
22
23
  * @example
23
24
  * ```ts
@@ -55,6 +56,9 @@ export const getTokenRequirementActions = ({ asset, amount, recipient, requireme
55
56
  },
56
57
  ];
57
58
  }
59
+ if (isPermit2TransferFromSignature(requirementSignature)) {
60
+ throw new UnexpectedRequirementSignatureError("permit2TransferFrom");
61
+ }
58
62
  if (!isAddressEqual(requirementSignature.args.asset, asset)) {
59
63
  throw new DepositAssetMismatchError(asset, requirementSignature.args.asset);
60
64
  }
@@ -1,2 +1,4 @@
1
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, DaiPermitArgs, DeploylessFetchParameters, FetchParameters, InputAllocation, MetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs, } from "@morpho-org/blue-sdk-viem";
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,3 +1,5 @@
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, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
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";
@@ -1,2 +1,4 @@
1
1
  export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
2
- export { decodeBytes32String, getAuthorizationTypedData, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
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";
@@ -622,6 +622,8 @@ export declare namespace BundlerAction {
622
622
  * @param skipRevert - Whether Bundler3 should tolerate a revert.
623
623
  * @returns Encoded Bundler3 calls.
624
624
  * @throws {BundlerErrors.UnexpectedAction} when the PublicAllocator is unavailable on the chain.
625
+ * @deprecated Vault V1 PublicAllocator composition will be removed in the next major. Use
626
+ * `vaultV2BluePublicAllocatorReallocate` or `vaultV2BluePublicAllocatorAllocateFromIdle`.
625
627
  *
626
628
  * @example
627
629
  * ```ts
@@ -653,8 +655,8 @@ export declare namespace BundlerAction {
653
655
  /**
654
656
  * Encodes a Vault V2 Blue Public Allocator market-to-market reallocation.
655
657
  *
656
- * @remarks Bundler3 must already hold the computed penalty assets. The
657
- * high-level Blue builders add the corresponding GeneralAdapter1 transfer.
658
+ * @remarks Bundler3 must already hold the computed penalty assets. Explicit low-level
659
+ * composition must add the corresponding GeneralAdapter1 transfer.
658
660
  *
659
661
  * @param chainId - Chain whose canonical Blue Public Allocator is called.
660
662
  * @param vault - Vault whose liquidity is reallocated.
@@ -718,8 +720,8 @@ export declare namespace BundlerAction {
718
720
  /**
719
721
  * Encodes a Vault V2 Blue Public Allocator allocation from vault idle liquidity.
720
722
  *
721
- * @remarks Bundler3 must already hold the computed penalty assets. The
722
- * high-level Blue builders add the corresponding GeneralAdapter1 transfer.
723
+ * @remarks Bundler3 must already hold the computed penalty assets. Explicit low-level
724
+ * composition must add the corresponding GeneralAdapter1 transfer.
723
725
  *
724
726
  * @param chainId - Chain whose canonical Blue Public Allocator is called.
725
727
  * @param vault - Vault whose idle liquidity is allocated.
@@ -1072,6 +1072,8 @@ export var BundlerAction;
1072
1072
  * @param skipRevert - Whether Bundler3 should tolerate a revert.
1073
1073
  * @returns Encoded Bundler3 calls.
1074
1074
  * @throws {BundlerErrors.UnexpectedAction} when the PublicAllocator is unavailable on the chain.
1075
+ * @deprecated Vault V1 PublicAllocator composition will be removed in the next major. Use
1076
+ * `vaultV2BluePublicAllocatorReallocate` or `vaultV2BluePublicAllocatorAllocateFromIdle`.
1075
1077
  *
1076
1078
  * @example
1077
1079
  * ```ts
@@ -1123,8 +1125,8 @@ export var BundlerAction;
1123
1125
  /**
1124
1126
  * Encodes a Vault V2 Blue Public Allocator market-to-market reallocation.
1125
1127
  *
1126
- * @remarks Bundler3 must already hold the computed penalty assets. The
1127
- * high-level Blue builders add the corresponding GeneralAdapter1 transfer.
1128
+ * @remarks Bundler3 must already hold the computed penalty assets. Explicit low-level
1129
+ * composition must add the corresponding GeneralAdapter1 transfer.
1128
1130
  *
1129
1131
  * @param chainId - Chain whose canonical Blue Public Allocator is called.
1130
1132
  * @param vault - Vault whose liquidity is reallocated.
@@ -1234,8 +1236,8 @@ export var BundlerAction;
1234
1236
  /**
1235
1237
  * Encodes a Vault V2 Blue Public Allocator allocation from vault idle liquidity.
1236
1238
  *
1237
- * @remarks Bundler3 must already hold the computed penalty assets. The
1238
- * high-level Blue builders add the corresponding GeneralAdapter1 transfer.
1239
+ * @remarks Bundler3 must already hold the computed penalty assets. Explicit low-level
1240
+ * composition must add the corresponding GeneralAdapter1 transfer.
1239
1241
  *
1240
1242
  * @param chainId - Chain whose canonical Blue Public Allocator is called.
1241
1243
  * @param vault - Vault whose idle liquidity is allocated.
@@ -18,6 +18,9 @@ export interface Authorization {
18
18
  }
19
19
  /**
20
20
  * Public allocator withdrawal input used by a `reallocateTo` Bundler3 action.
21
+ *
22
+ * @deprecated Vault V1 PublicAllocator composition will be removed in the next major. Use Vault V2
23
+ * BluePublicAllocator actions.
21
24
  */
22
25
  export interface InputReallocation {
23
26
  /** Market to withdraw liquidity from. */
@@ -172,7 +175,13 @@ export interface ActionArgs {
172
175
  receiver: Address,
173
176
  skipRevert?: boolean
174
177
  ];
175
- /** PublicAllocator reallocation to `supplyMarket` from `vault` withdrawals while paying `fee`; `skipRevert` controls Bundler3 revert handling. */
178
+ /**
179
+ * PublicAllocator reallocation to `supplyMarket` from `vault` withdrawals while paying `fee`;
180
+ * `skipRevert` controls Bundler3 revert handling.
181
+ *
182
+ * @deprecated Vault V1 PublicAllocator composition will be removed in the next major. Use Vault V2
183
+ * BluePublicAllocator actions.
184
+ */
176
185
  readonly reallocateTo: [
177
186
  vault: Address,
178
187
  fee: bigint,
@@ -12,7 +12,8 @@ import { type Metadata, type MorphoClientType } from "../types/index.js";
12
12
  * @param _options.metadata - Optional analytics metadata applied to every transaction the
13
13
  * `morpho` namespace builds.
14
14
  * @param _options.supportSignature - Whether the integrator can collect EIP-712 signatures for
15
- * permit / permit2. Defaults to `false` (classic approvals only).
15
+ * ERC-2612, Permit2 AllowanceTransfer or SignatureTransfer, and Morpho authorization.
16
+ * Defaults to `false` (standalone approvals and authorization calls only).
16
17
  * @param _options.supportDeployless - Whether entity fetchers may use deployless multicall.
17
18
  * @returns A viem extension function — `client.extend(morphoViemExtension(...))` adds
18
19
  * `client.morpho`.
@@ -52,7 +52,8 @@ function createMorphoNamespace(viemClient, options) {
52
52
  * @param _options.metadata - Optional analytics metadata applied to every transaction the
53
53
  * `morpho` namespace builds.
54
54
  * @param _options.supportSignature - Whether the integrator can collect EIP-712 signatures for
55
- * permit / permit2. Defaults to `false` (classic approvals only).
55
+ * ERC-2612, Permit2 AllowanceTransfer or SignatureTransfer, and Morpho authorization.
56
+ * Defaults to `false` (standalone approvals and authorization calls only).
56
57
  * @param _options.supportDeployless - Whether entity fetchers may use deployless multicall.
57
58
  * @returns A viem extension function — `client.extend(morphoViemExtension(...))` adds
58
59
  * `client.morpho`.