@morpho-org/morpho-sdk 10.5.0-next.0 → 10.6.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 (170) hide show
  1. package/README.md +44 -1
  2. package/lib/cjs/abis.d.ts +793 -0
  3. package/lib/cjs/abis.js +811 -1
  4. package/lib/cjs/actions/blue/close.d.ts +169 -0
  5. package/lib/cjs/actions/blue/close.js +270 -0
  6. package/lib/cjs/actions/blue/common.js +2 -2
  7. package/lib/cjs/actions/blue/delever.d.ts +156 -0
  8. package/lib/cjs/actions/blue/delever.js +223 -0
  9. package/lib/cjs/actions/blue/index.d.ts +3 -0
  10. package/lib/cjs/actions/blue/index.js +3 -0
  11. package/lib/cjs/actions/blue/lever.d.ts +184 -0
  12. package/lib/cjs/actions/blue/lever.js +272 -0
  13. package/lib/cjs/actions/blue/leverageIntent.d.ts +65 -0
  14. package/lib/cjs/actions/blue/leverageIntent.js +103 -0
  15. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +16 -11
  16. package/lib/cjs/actions/midnight/takeBorrow.js +14 -8
  17. package/lib/cjs/actions/midnight/takeLend.js +15 -9
  18. package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.js +19 -13
  19. package/lib/cjs/actions/midnight/takeWithdraw.js +14 -8
  20. package/lib/cjs/actions/requirements/blue/encodeLeverageAuthorization.d.ts +39 -0
  21. package/lib/cjs/actions/requirements/blue/encodeLeverageAuthorization.js +59 -0
  22. package/lib/cjs/actions/requirements/blue/getLeverageRequirements.d.ts +104 -0
  23. package/lib/cjs/actions/requirements/blue/getLeverageRequirements.js +193 -0
  24. package/lib/cjs/actions/requirements/blue/getLeverageRequirementsApproval.d.ts +45 -0
  25. package/lib/cjs/actions/requirements/blue/getLeverageRequirementsApproval.js +66 -0
  26. package/lib/cjs/actions/requirements/blue/index.d.ts +3 -0
  27. package/lib/cjs/actions/requirements/blue/index.js +17 -0
  28. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +2 -2
  29. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +3 -2
  30. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +11 -6
  31. package/lib/cjs/actions/requirements/getRequirementsApproval.js +29 -5
  32. package/lib/cjs/addresses.d.ts +1 -1
  33. package/lib/cjs/addresses.js +6 -1
  34. package/lib/cjs/blue/addresses.d.ts +1 -1
  35. package/lib/cjs/blue/addresses.js +6 -1
  36. package/lib/cjs/constants.d.ts +1 -1
  37. package/lib/cjs/constants.js +7 -2
  38. package/lib/cjs/entities/blue/blue.d.ts +486 -2
  39. package/lib/cjs/entities/blue/blue.js +529 -34
  40. package/lib/cjs/entities/index.d.ts +1 -1
  41. package/lib/cjs/entities/midnight/midnight.d.ts +6 -0
  42. package/lib/cjs/entities/midnight/midnight.js +21 -2
  43. package/lib/cjs/entities/requirements/assertContractCode.d.ts +0 -23
  44. package/lib/cjs/entities/requirements/assertContractCode.js +3 -28
  45. package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +117 -0
  46. package/lib/cjs/entities/vaultV2BlueReallocationData.js +226 -2
  47. package/lib/cjs/helpers/constant.d.ts +41 -0
  48. package/lib/cjs/helpers/constant.js +42 -1
  49. package/lib/cjs/helpers/getZeroExLeverageBundle.d.ts +13 -0
  50. package/lib/cjs/helpers/getZeroExLeverageBundle.js +27 -0
  51. package/lib/cjs/helpers/index.d.ts +4 -1
  52. package/lib/cjs/helpers/index.js +29 -1
  53. package/lib/cjs/helpers/leverage/index.d.ts +1 -0
  54. package/lib/cjs/helpers/leverage/index.js +11 -0
  55. package/lib/cjs/helpers/leverage/limits.d.ts +472 -0
  56. package/lib/cjs/helpers/leverage/limits.js +715 -0
  57. package/lib/cjs/helpers/leverage/positionMarket.d.ts +17 -0
  58. package/lib/cjs/helpers/leverage/positionMarket.js +28 -0
  59. package/lib/cjs/helpers/leverage/reallocations.d.ts +159 -0
  60. package/lib/cjs/helpers/leverage/reallocations.js +276 -0
  61. package/lib/cjs/helpers/validate.d.ts +14 -0
  62. package/lib/cjs/helpers/validate.js +25 -1
  63. package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
  64. package/lib/cjs/helpers/validateRequirementSpender.js +4 -0
  65. package/lib/cjs/helpers/zeroExQuote.d.ts +250 -0
  66. package/lib/cjs/helpers/zeroExQuote.js +763 -0
  67. package/lib/cjs/index.d.ts +1 -0
  68. package/lib/cjs/index.js +5 -2
  69. package/lib/cjs/reads/assertContractCode.d.ts +25 -0
  70. package/lib/cjs/reads/assertContractCode.js +30 -0
  71. package/lib/cjs/reads/fetchZeroExQuote.d.ts +123 -0
  72. package/lib/cjs/reads/fetchZeroExQuote.js +330 -0
  73. package/lib/cjs/transactionPlan/midnight/takeBorrow.d.ts +4 -0
  74. package/lib/cjs/transactionPlan/midnight/takeBorrow.js +8 -2
  75. package/lib/cjs/types/action.d.ts +130 -1
  76. package/lib/cjs/types/error.d.ts +84 -0
  77. package/lib/cjs/types/error.js +110 -3
  78. package/lib/cjs/types/index.d.ts +2 -0
  79. package/lib/cjs/types/index.js +2 -0
  80. package/lib/cjs/types/leverageError.d.ts +1552 -0
  81. package/lib/cjs/types/leverageError.js +1711 -0
  82. package/lib/cjs/types/zeroEx.d.ts +171 -0
  83. package/lib/cjs/types/zeroEx.js +2 -0
  84. package/lib/cjs/version.d.ts +1 -1
  85. package/lib/cjs/version.js +1 -1
  86. package/lib/esm/abis.d.ts +793 -0
  87. package/lib/esm/abis.js +809 -0
  88. package/lib/esm/actions/blue/close.d.ts +169 -0
  89. package/lib/esm/actions/blue/close.js +266 -0
  90. package/lib/esm/actions/blue/common.js +3 -3
  91. package/lib/esm/actions/blue/delever.d.ts +156 -0
  92. package/lib/esm/actions/blue/delever.js +219 -0
  93. package/lib/esm/actions/blue/index.d.ts +3 -0
  94. package/lib/esm/actions/blue/index.js +3 -0
  95. package/lib/esm/actions/blue/lever.d.ts +184 -0
  96. package/lib/esm/actions/blue/lever.js +268 -0
  97. package/lib/esm/actions/blue/leverageIntent.d.ts +65 -0
  98. package/lib/esm/actions/blue/leverageIntent.js +96 -0
  99. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +16 -11
  100. package/lib/esm/actions/midnight/takeBorrow.js +14 -8
  101. package/lib/esm/actions/midnight/takeLend.js +15 -9
  102. package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.js +19 -13
  103. package/lib/esm/actions/midnight/takeWithdraw.js +14 -8
  104. package/lib/esm/actions/requirements/blue/encodeLeverageAuthorization.d.ts +39 -0
  105. package/lib/esm/actions/requirements/blue/encodeLeverageAuthorization.js +55 -0
  106. package/lib/esm/actions/requirements/blue/getLeverageRequirements.d.ts +104 -0
  107. package/lib/esm/actions/requirements/blue/getLeverageRequirements.js +189 -0
  108. package/lib/esm/actions/requirements/blue/getLeverageRequirementsApproval.d.ts +45 -0
  109. package/lib/esm/actions/requirements/blue/getLeverageRequirementsApproval.js +62 -0
  110. package/lib/esm/actions/requirements/blue/index.d.ts +3 -0
  111. package/lib/esm/actions/requirements/blue/index.js +3 -0
  112. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +2 -2
  113. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +3 -2
  114. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +11 -6
  115. package/lib/esm/actions/requirements/getRequirementsApproval.js +29 -5
  116. package/lib/esm/addresses.d.ts +1 -1
  117. package/lib/esm/addresses.js +1 -1
  118. package/lib/esm/blue/addresses.d.ts +1 -1
  119. package/lib/esm/blue/addresses.js +1 -1
  120. package/lib/esm/constants.d.ts +1 -1
  121. package/lib/esm/constants.js +1 -1
  122. package/lib/esm/entities/blue/blue.d.ts +486 -2
  123. package/lib/esm/entities/blue/blue.js +501 -6
  124. package/lib/esm/entities/index.d.ts +1 -1
  125. package/lib/esm/entities/midnight/midnight.d.ts +6 -0
  126. package/lib/esm/entities/midnight/midnight.js +21 -2
  127. package/lib/esm/entities/requirements/assertContractCode.d.ts +0 -23
  128. package/lib/esm/entities/requirements/assertContractCode.js +1 -25
  129. package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +117 -0
  130. package/lib/esm/entities/vaultV2BlueReallocationData.js +227 -3
  131. package/lib/esm/helpers/constant.d.ts +41 -0
  132. package/lib/esm/helpers/constant.js +41 -0
  133. package/lib/esm/helpers/getZeroExLeverageBundle.d.ts +13 -0
  134. package/lib/esm/helpers/getZeroExLeverageBundle.js +23 -0
  135. package/lib/esm/helpers/index.d.ts +4 -1
  136. package/lib/esm/helpers/index.js +4 -1
  137. package/lib/esm/helpers/leverage/index.d.ts +1 -0
  138. package/lib/esm/helpers/leverage/index.js +1 -0
  139. package/lib/esm/helpers/leverage/limits.d.ts +472 -0
  140. package/lib/esm/helpers/leverage/limits.js +705 -0
  141. package/lib/esm/helpers/leverage/positionMarket.d.ts +17 -0
  142. package/lib/esm/helpers/leverage/positionMarket.js +24 -0
  143. package/lib/esm/helpers/leverage/reallocations.d.ts +159 -0
  144. package/lib/esm/helpers/leverage/reallocations.js +271 -0
  145. package/lib/esm/helpers/validate.d.ts +14 -0
  146. package/lib/esm/helpers/validate.js +25 -2
  147. package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
  148. package/lib/esm/helpers/validateRequirementSpender.js +5 -1
  149. package/lib/esm/helpers/zeroExQuote.d.ts +250 -0
  150. package/lib/esm/helpers/zeroExQuote.js +754 -0
  151. package/lib/esm/index.d.ts +1 -0
  152. package/lib/esm/index.js +1 -0
  153. package/lib/esm/reads/assertContractCode.d.ts +25 -0
  154. package/lib/esm/reads/assertContractCode.js +26 -0
  155. package/lib/esm/reads/fetchZeroExQuote.d.ts +123 -0
  156. package/lib/esm/reads/fetchZeroExQuote.js +326 -0
  157. package/lib/esm/transactionPlan/midnight/takeBorrow.d.ts +4 -0
  158. package/lib/esm/transactionPlan/midnight/takeBorrow.js +9 -3
  159. package/lib/esm/types/action.d.ts +130 -1
  160. package/lib/esm/types/error.d.ts +84 -0
  161. package/lib/esm/types/error.js +103 -0
  162. package/lib/esm/types/index.d.ts +2 -0
  163. package/lib/esm/types/index.js +2 -0
  164. package/lib/esm/types/leverageError.d.ts +1552 -0
  165. package/lib/esm/types/leverageError.js +1660 -0
  166. package/lib/esm/types/zeroEx.d.ts +171 -0
  167. package/lib/esm/types/zeroEx.js +1 -0
  168. package/lib/esm/version.d.ts +1 -1
  169. package/lib/esm/version.js +1 -1
  170. package/package.json +7 -7
@@ -1,5 +1,22 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.getBlueAuthorizationRequirement = void 0;
18
+ __exportStar(require("./encodeLeverageAuthorization.js"), exports);
4
19
  var getBlueAuthorizationRequirement_js_1 = require("./getBlueAuthorizationRequirement.js");
5
20
  Object.defineProperty(exports, "getBlueAuthorizationRequirement", { enumerable: true, get: function () { return getBlueAuthorizationRequirement_js_1.getBlueAuthorizationRequirement; } });
21
+ __exportStar(require("./getLeverageRequirements.js"), exports);
22
+ __exportStar(require("./getLeverageRequirementsApproval.js"), exports);
@@ -24,8 +24,8 @@ export declare const parseErc20Approval: (params: EncodeErc20ApprovalParams) =>
24
24
  * @param params - Encoding parameters.
25
25
  * @param params.token - ERC-20 token address to approve.
26
26
  * @param params.spender - Address granted the allowance. Must be Permit2, Midnight,
27
- * MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for
28
- * the chain.
27
+ * MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, BlueBundlesV1, or
28
+ * ZeroExLeverageBundlesV1 for the chain.
29
29
  * @param params.amount - Allowance amount before per-token cap.
30
30
  * @param params.chainId - The chain the transaction targets (used to resolve supported spenders and the per-token cap).
31
31
  * @returns A deep-frozen `Transaction<ERC20ApprovalAction>` with the capped approval amount.
@@ -24,6 +24,7 @@ const parseErc20Approval = (params) => {
24
24
  "vaultExitBundlesV1",
25
25
  "vaultBundlesV1",
26
26
  "blueBundlesV1",
27
+ "zeroExLeverageBundlesV1",
27
28
  ],
28
29
  });
29
30
  return {
@@ -41,8 +42,8 @@ exports.parseErc20Approval = parseErc20Approval;
41
42
  * @param params - Encoding parameters.
42
43
  * @param params.token - ERC-20 token address to approve.
43
44
  * @param params.spender - Address granted the allowance. Must be Permit2, Midnight,
44
- * MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for
45
- * the chain.
45
+ * MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, BlueBundlesV1, or
46
+ * ZeroExLeverageBundlesV1 for the chain.
46
47
  * @param params.amount - Allowance amount before per-token cap.
47
48
  * @param params.chainId - The chain the transaction targets (used to resolve supported spenders and the per-token cap).
48
49
  * @returns A deep-frozen `Transaction<ERC20ApprovalAction>` with the capped approval amount.
@@ -1,5 +1,5 @@
1
- import type { Address } from "@morpho-org/blue-sdk";
2
- import type { ERC20ApprovalAction, Transaction } from "../../types/index.js";
1
+ import { type Address } from "@morpho-org/blue-sdk";
2
+ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js";
3
3
  import { type Erc20ApprovalInput } from "./encode/encodeErc20Approval.js";
4
4
  /** Complete raw approval requirement invocation. @internal */
5
5
  interface RequirementsApprovalParams {
@@ -25,11 +25,12 @@ export declare const parseRequirementsApproval: (params: RequirementsApprovalPar
25
25
  * allowance.
26
26
  *
27
27
  * The operation constructor validates the spender before constructing approval inputs. Supported
28
- * spenders are the chain's Permit2, Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, and BlueBundlesV1
29
- * addresses when configured.
28
+ * spenders are the chain's Permit2, Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, BlueBundlesV1, and
29
+ * ZeroExLeverageBundlesV1 addresses when configured.
30
30
  *
31
31
  * When `allowances < spendAmount`, requests an approval for `maxUint256`, capped per token by
32
- * `MAX_TOKEN_APPROVALS`. For tokens in `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) with a non-zero
32
+ * `MAX_TOKEN_APPROVALS`. A ZeroExLeverageBundlesV1 the SDK does not ship, one registered with
33
+ * `registerCustomAddresses`, falls back to the default rule and is approved exactly `spendAmount`. For tokens in `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) with a non-zero
33
34
  * allowance, prepends an `approve(spender, 0)` reset before re-approving. No approval is emitted
34
35
  * when `allowances >= spendAmount`.
35
36
  *
@@ -38,12 +39,16 @@ export declare const parseRequirementsApproval: (params: RequirementsApprovalPar
38
39
  * and token approval caps.
39
40
  * @param params.args.spendAmount - The amount the bundle will actually pull.
40
41
  * @param params.args.spender - Address that will be granted the approval. Must be Permit2,
41
- * Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
42
+ * Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, BlueBundlesV1, or
43
+ * ZeroExLeverageBundlesV1 for `chainId`.
42
44
  * @param params.allowances - The user's current allowance of `address` for `spender`.
43
45
  * @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
44
46
  * followed by the new approval. Empty when `allowances >= spendAmount`.
45
47
  * @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
46
48
  * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not a supported SDK spender for `chainId`.
49
+ * @throws {InvalidBigIntInputError} when an exact approval is due and `spendAmount` is not a bigint.
50
+ * @throws {NegativeInputError} when an exact approval is due and `spendAmount` is negative.
51
+ * @throws {InputExceedsMaxError} when an exact approval is due and `spendAmount` exceeds `uint256`.
47
52
  * @example
48
53
  * ```ts
49
54
  * import { getRequirementsApproval } from "@morpho-org/morpho-sdk";
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getParsedRequirementsApproval = exports.getRequirementsApproval = exports.parseRequirementsApproval = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ const morpho_ts_1 = require("@morpho-org/morpho-ts");
6
+ const viem_1 = require("viem");
4
7
  const tokenApproval_js_1 = require("../../helpers/tokenApproval.js");
8
+ const validate_js_1 = require("../../helpers/validate.js");
9
+ const index_js_1 = require("../../types/index.js");
5
10
  const encodeErc20Approval_js_1 = require("./encode/encodeErc20Approval.js");
6
11
  const requirementsApprovalInput = Symbol("RequirementsApprovalInput");
7
12
  /** Owns no-op and token/spender error precedence for direct callers. @internal */
@@ -22,11 +27,25 @@ const parseRequirementsApproval = (params) => {
22
27
  allowance: input.allowances,
23
28
  spendAmount: input.args.spendAmount,
24
29
  });
30
+ const leverageBundle = amounts.length > 0 && (0, blue_sdk_1.isZeroExLeverageChain)(input.chainId)
31
+ ? (0, blue_sdk_1.getChainAddresses)(input.chainId).bundles?.zeroExLeverageBundlesV1
32
+ : undefined;
33
+ // The unlimited-approval exception covers only the leverage bundle the SDK ships.
34
+ const exact = leverageBundle != null &&
35
+ (0, viem_1.isAddressEqual)(input.args.spender, leverageBundle) &&
36
+ !(0, morpho_ts_1.isShippedZeroExLeverageBundle)(input.chainId, input.args.spender);
37
+ if (exact) {
38
+ // The exact approval is spendAmount itself, so it must be a uint256 the token can hold, not a capped maximum.
39
+ if (typeof input.args.spendAmount !== "bigint") {
40
+ throw new index_js_1.InvalidBigIntInputError("spendAmount", input.args.spendAmount);
41
+ }
42
+ (0, validate_js_1.validateUint256Field)("spendAmount", input.args.spendAmount);
43
+ }
25
44
  const approvals = amounts.map((amount) => (0, encodeErc20Approval_js_1.parseErc20Approval)({
26
45
  token: input.address,
27
46
  spender: input.args.spender,
28
47
  chainId: input.chainId,
29
- amount,
48
+ amount: exact && amount !== 0n ? input.args.spendAmount : amount,
30
49
  }));
31
50
  return {
32
51
  ...input,
@@ -41,11 +60,12 @@ exports.parseRequirementsApproval = parseRequirementsApproval;
41
60
  * allowance.
42
61
  *
43
62
  * The operation constructor validates the spender before constructing approval inputs. Supported
44
- * spenders are the chain's Permit2, Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, and BlueBundlesV1
45
- * addresses when configured.
63
+ * spenders are the chain's Permit2, Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, BlueBundlesV1, and
64
+ * ZeroExLeverageBundlesV1 addresses when configured.
46
65
  *
47
66
  * When `allowances < spendAmount`, requests an approval for `maxUint256`, capped per token by
48
- * `MAX_TOKEN_APPROVALS`. For tokens in `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) with a non-zero
67
+ * `MAX_TOKEN_APPROVALS`. A ZeroExLeverageBundlesV1 the SDK does not ship, one registered with
68
+ * `registerCustomAddresses`, falls back to the default rule and is approved exactly `spendAmount`. For tokens in `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) with a non-zero
49
69
  * allowance, prepends an `approve(spender, 0)` reset before re-approving. No approval is emitted
50
70
  * when `allowances >= spendAmount`.
51
71
  *
@@ -54,12 +74,16 @@ exports.parseRequirementsApproval = parseRequirementsApproval;
54
74
  * and token approval caps.
55
75
  * @param params.args.spendAmount - The amount the bundle will actually pull.
56
76
  * @param params.args.spender - Address that will be granted the approval. Must be Permit2,
57
- * Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
77
+ * Midnight, MidnightBundlesV2, VaultExitBundlesV1, VaultBundlesV1, BlueBundlesV1, or
78
+ * ZeroExLeverageBundlesV1 for `chainId`.
58
79
  * @param params.allowances - The user's current allowance of `address` for `spender`.
59
80
  * @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
60
81
  * followed by the new approval. Empty when `allowances >= spendAmount`.
61
82
  * @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
62
83
  * @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not a supported SDK spender for `chainId`.
84
+ * @throws {InvalidBigIntInputError} when an exact approval is due and `spendAmount` is not a bigint.
85
+ * @throws {NegativeInputError} when an exact approval is due and `spendAmount` is negative.
86
+ * @throws {InputExceedsMaxError} when an exact approval is due and `spendAmount` exceeds `uint256`.
63
87
  * @example
64
88
  * ```ts
65
89
  * import { getRequirementsApproval } from "@morpho-org/morpho-sdk";
@@ -1,2 +1,2 @@
1
1
  export type { AddressLabel, AddressRegistry, ChainAddresses, ChainDeployments, DeploymentRegistry, } from "@morpho-org/blue-sdk";
2
- export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddress, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, } from "@morpho-org/blue-sdk";
2
+ export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddress, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, isZeroExLeverageChain as isBlueZeroExLeverageChain, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, ZERO_EX_ALLOWANCE_HOLDER_ADDRESS, ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS, ZERO_EX_SETTLER_REGISTRY_ADDRESS, ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE, } from "@morpho-org/blue-sdk";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unwrappedTokensMapping = exports.registerCustomAddresses = exports.permissionedWrapperTokens = exports.permissionedCoinbaseTokens = exports.permissionedBackedTokens = exports.NATIVE_ADDRESS = exports.getUnwrappedToken = exports.getPermissionedCoinbaseTokens = exports.getChainAddresses = exports.getChainAddress = exports.erc20WrapperTokens = exports.deployments = exports.convexWrapperTokens = exports.addressesRegistry = exports.addresses = void 0;
3
+ exports.ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE = exports.ZERO_EX_SETTLER_REGISTRY_ADDRESS = exports.ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS = exports.ZERO_EX_ALLOWANCE_HOLDER_ADDRESS = exports.unwrappedTokensMapping = exports.registerCustomAddresses = exports.permissionedWrapperTokens = exports.permissionedCoinbaseTokens = exports.permissionedBackedTokens = exports.NATIVE_ADDRESS = exports.isBlueZeroExLeverageChain = exports.getUnwrappedToken = exports.getPermissionedCoinbaseTokens = exports.getChainAddresses = exports.getChainAddress = exports.erc20WrapperTokens = exports.deployments = exports.convexWrapperTokens = exports.addressesRegistry = exports.addresses = void 0;
4
4
  var blue_sdk_1 = require("@morpho-org/blue-sdk");
5
5
  Object.defineProperty(exports, "addresses", { enumerable: true, get: function () { return blue_sdk_1.addresses; } });
6
6
  Object.defineProperty(exports, "addressesRegistry", { enumerable: true, get: function () { return blue_sdk_1.addressesRegistry; } });
@@ -11,9 +11,14 @@ Object.defineProperty(exports, "getChainAddress", { enumerable: true, get: funct
11
11
  Object.defineProperty(exports, "getChainAddresses", { enumerable: true, get: function () { return blue_sdk_1.getChainAddresses; } });
12
12
  Object.defineProperty(exports, "getPermissionedCoinbaseTokens", { enumerable: true, get: function () { return blue_sdk_1.getPermissionedCoinbaseTokens; } });
13
13
  Object.defineProperty(exports, "getUnwrappedToken", { enumerable: true, get: function () { return blue_sdk_1.getUnwrappedToken; } });
14
+ Object.defineProperty(exports, "isBlueZeroExLeverageChain", { enumerable: true, get: function () { return blue_sdk_1.isZeroExLeverageChain; } });
14
15
  Object.defineProperty(exports, "NATIVE_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.NATIVE_ADDRESS; } });
15
16
  Object.defineProperty(exports, "permissionedBackedTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedBackedTokens; } });
16
17
  Object.defineProperty(exports, "permissionedCoinbaseTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedCoinbaseTokens; } });
17
18
  Object.defineProperty(exports, "permissionedWrapperTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedWrapperTokens; } });
18
19
  Object.defineProperty(exports, "registerCustomAddresses", { enumerable: true, get: function () { return blue_sdk_1.registerCustomAddresses; } });
19
20
  Object.defineProperty(exports, "unwrappedTokensMapping", { enumerable: true, get: function () { return blue_sdk_1.unwrappedTokensMapping; } });
21
+ Object.defineProperty(exports, "ZERO_EX_ALLOWANCE_HOLDER_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_ALLOWANCE_HOLDER_ADDRESS; } });
22
+ Object.defineProperty(exports, "ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS; } });
23
+ Object.defineProperty(exports, "ZERO_EX_SETTLER_REGISTRY_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_SETTLER_REGISTRY_ADDRESS; } });
24
+ Object.defineProperty(exports, "ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE; } });
@@ -1,2 +1,2 @@
1
1
  export type { AddressLabel, AddressRegistry, ChainAddresses, ChainDeployments, DeploymentRegistry, } from "@morpho-org/blue-sdk";
2
- export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddress, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, } from "@morpho-org/blue-sdk";
2
+ export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddress, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, isZeroExLeverageChain, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, ZERO_EX_ALLOWANCE_HOLDER_ADDRESS, ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS, ZERO_EX_SETTLER_REGISTRY_ADDRESS, ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE, } from "@morpho-org/blue-sdk";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unwrappedTokensMapping = exports.registerCustomAddresses = exports.permissionedWrapperTokens = exports.permissionedCoinbaseTokens = exports.permissionedBackedTokens = exports.NATIVE_ADDRESS = exports.getUnwrappedToken = exports.getPermissionedCoinbaseTokens = exports.getChainAddresses = exports.getChainAddress = exports.erc20WrapperTokens = exports.deployments = exports.convexWrapperTokens = exports.addressesRegistry = exports.addresses = void 0;
3
+ exports.ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE = exports.ZERO_EX_SETTLER_REGISTRY_ADDRESS = exports.ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS = exports.ZERO_EX_ALLOWANCE_HOLDER_ADDRESS = exports.unwrappedTokensMapping = exports.registerCustomAddresses = exports.permissionedWrapperTokens = exports.permissionedCoinbaseTokens = exports.permissionedBackedTokens = exports.NATIVE_ADDRESS = exports.isZeroExLeverageChain = exports.getUnwrappedToken = exports.getPermissionedCoinbaseTokens = exports.getChainAddresses = exports.getChainAddress = exports.erc20WrapperTokens = exports.deployments = exports.convexWrapperTokens = exports.addressesRegistry = exports.addresses = void 0;
4
4
  var blue_sdk_1 = require("@morpho-org/blue-sdk");
5
5
  Object.defineProperty(exports, "addresses", { enumerable: true, get: function () { return blue_sdk_1.addresses; } });
6
6
  Object.defineProperty(exports, "addressesRegistry", { enumerable: true, get: function () { return blue_sdk_1.addressesRegistry; } });
@@ -11,9 +11,14 @@ Object.defineProperty(exports, "getChainAddress", { enumerable: true, get: funct
11
11
  Object.defineProperty(exports, "getChainAddresses", { enumerable: true, get: function () { return blue_sdk_1.getChainAddresses; } });
12
12
  Object.defineProperty(exports, "getPermissionedCoinbaseTokens", { enumerable: true, get: function () { return blue_sdk_1.getPermissionedCoinbaseTokens; } });
13
13
  Object.defineProperty(exports, "getUnwrappedToken", { enumerable: true, get: function () { return blue_sdk_1.getUnwrappedToken; } });
14
+ Object.defineProperty(exports, "isZeroExLeverageChain", { enumerable: true, get: function () { return blue_sdk_1.isZeroExLeverageChain; } });
14
15
  Object.defineProperty(exports, "NATIVE_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.NATIVE_ADDRESS; } });
15
16
  Object.defineProperty(exports, "permissionedBackedTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedBackedTokens; } });
16
17
  Object.defineProperty(exports, "permissionedCoinbaseTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedCoinbaseTokens; } });
17
18
  Object.defineProperty(exports, "permissionedWrapperTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedWrapperTokens; } });
18
19
  Object.defineProperty(exports, "registerCustomAddresses", { enumerable: true, get: function () { return blue_sdk_1.registerCustomAddresses; } });
19
20
  Object.defineProperty(exports, "unwrappedTokensMapping", { enumerable: true, get: function () { return blue_sdk_1.unwrappedTokensMapping; } });
21
+ Object.defineProperty(exports, "ZERO_EX_ALLOWANCE_HOLDER_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_ALLOWANCE_HOLDER_ADDRESS; } });
22
+ Object.defineProperty(exports, "ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_ALLOWANCE_HOLDER_CHAIN_IDS; } });
23
+ Object.defineProperty(exports, "ZERO_EX_SETTLER_REGISTRY_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_SETTLER_REGISTRY_ADDRESS; } });
24
+ Object.defineProperty(exports, "ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE", { enumerable: true, get: function () { return blue_sdk_1.ZERO_EX_TAKER_SUBMITTED_SETTLER_FEATURE; } });
@@ -1,4 +1,4 @@
1
1
  export { DEAD_ADDRESS, DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId as isBlueMarketId, LIQUIDATION_CURSOR as BLUE_LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR as BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE, SECONDS_PER_YEAR, TransactionType as BlueTransactionType, } from "@morpho-org/blue-sdk";
2
2
  export { CBP as MIDNIGHT_CBP, COLLATERAL_PARAMS_TYPEHASH as MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH, DEFAULT_TICK_SPACING as MIDNIGHT_DEFAULT_TICK_SPACING, EIP712_DOMAIN_TYPEHASH as MIDNIGHT_EIP712_DOMAIN_TYPEHASH, MARKET_TYPEHASH as MIDNIGHT_MARKET_TYPEHASH, MAX_COLLATERALS as MIDNIGHT_MAX_COLLATERALS, MAX_COLLATERALS_PER_BORROWER as MIDNIGHT_MAX_COLLATERALS_PER_BORROWER, MAX_CONTINUOUS_FEE as MIDNIGHT_MAX_CONTINUOUS_FEE, MAX_OFFER_CAP as MIDNIGHT_MAX_OFFER_CAP, MAX_SETTLEMENT_FEES as MIDNIGHT_MAX_SETTLEMENT_FEES, MAX_TICK as MIDNIGHT_MAX_TICK, MAX_TREE_HEIGHT as MIDNIGHT_MAX_TREE_HEIGHT, OFFER_TYPEHASH as MIDNIGHT_OFFER_TYPEHASH, PRICE_RATIFIER_V1_OFFER_TYPEHASH as MIDNIGHT_PRICE_RATIFIER_V1_OFFER_TYPEHASH, PRICE_ROUNDING_STEP as MIDNIGHT_PRICE_ROUNDING_STEP, RATE_RATIFIER_V1_OFFER_TYPEHASH as MIDNIGHT_RATE_RATIFIER_V1_OFFER_TYPEHASH, SETTLEMENT_FEE_BREAKPOINTS as MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS, TIME_TO_MAX_LIF as MIDNIGHT_TIME_TO_MAX_LIF, } from "@morpho-org/midnight-sdk";
3
3
  export { BLUE_API_BASE_URL, BLUE_API_GRAPHQL_URL, ChainId, ChainUtils, DOCS_BASE_URL, MORPHO_DOMAIN, REWARDS_BASE_URL, ZERO_ADDRESS, } from "@morpho-org/morpho-ts";
4
- export { APPROVE_ONLY_ONCE_TOKENS, DEFAULT_ALLOCATOR_CAP_HEADROOM, DEFAULT_CAP_ACCRUAL_BUFFER, DEFAULT_LLTV_BUFFER, DEFAULT_MAX_REALLOCATION_PENALTY, DEFAULT_SUPPLY_TARGET_UTILIZATION, DEFAULT_WITHDRAWAL_TARGET_UTILIZATION, MAX_ABSOLUTE_SHARE_PRICE, MAX_REALLOCATION_PENALTY, MAX_SLIPPAGE_TOLERANCE, MAX_TOKEN_APPROVALS, MIDNIGHT_TAKE_MAX_DEADLINE_SECONDS, MIN_DEAD_SHARES, MIN_VAULT_V2_DEAD_ASSETS, VAULT_DEPOSIT_MAX_DEADLINE_SECONDS, } from "./helpers/constant.js";
4
+ export { APPROVE_ONLY_ONCE_TOKENS, DEFAULT_ALLOCATOR_CAP_HEADROOM, DEFAULT_CAP_ACCRUAL_BUFFER, DEFAULT_LLTV_BUFFER, DEFAULT_MAX_REALLOCATION_PENALTY, DEFAULT_SUPPLY_TARGET_UTILIZATION, DEFAULT_WITHDRAWAL_TARGET_UTILIZATION, LEVERAGE_CLOSE_INTEREST_BUFFER_FACTOR, LEVERAGE_DEADLINE_WINDOW, LEVERAGE_MAX_EXECUTION_LOSS, LEVERAGE_MAX_ORACLE_DEVIATION, MAX_ABSOLUTE_SHARE_PRICE, MAX_REALLOCATION_PENALTY, MAX_SLIPPAGE_TOLERANCE, MAX_TOKEN_APPROVALS, MIDNIGHT_MIN_BORROW_TIME_TO_MATURITY, MIDNIGHT_TAKE_MAX_DEADLINE_SECONDS, MIN_DEAD_SHARES, MIN_VAULT_V2_DEAD_ASSETS, VAULT_DEPOSIT_MAX_DEADLINE_SECONDS, } from "./helpers/constant.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MIN_VAULT_V2_DEAD_ASSETS = exports.MIN_DEAD_SHARES = exports.MIDNIGHT_TAKE_MAX_DEADLINE_SECONDS = exports.MAX_TOKEN_APPROVALS = exports.MAX_SLIPPAGE_TOLERANCE = exports.MAX_REALLOCATION_PENALTY = exports.MAX_ABSOLUTE_SHARE_PRICE = exports.DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = exports.DEFAULT_SUPPLY_TARGET_UTILIZATION = exports.DEFAULT_MAX_REALLOCATION_PENALTY = exports.DEFAULT_LLTV_BUFFER = exports.DEFAULT_CAP_ACCRUAL_BUFFER = exports.DEFAULT_ALLOCATOR_CAP_HEADROOM = exports.APPROVE_ONLY_ONCE_TOKENS = exports.ZERO_ADDRESS = exports.REWARDS_BASE_URL = exports.MORPHO_DOMAIN = exports.DOCS_BASE_URL = exports.ChainUtils = exports.ChainId = exports.BLUE_API_GRAPHQL_URL = exports.BLUE_API_BASE_URL = exports.MIDNIGHT_TIME_TO_MAX_LIF = exports.MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS = exports.MIDNIGHT_RATE_RATIFIER_V1_OFFER_TYPEHASH = exports.MIDNIGHT_PRICE_ROUNDING_STEP = exports.MIDNIGHT_PRICE_RATIFIER_V1_OFFER_TYPEHASH = exports.MIDNIGHT_OFFER_TYPEHASH = exports.MIDNIGHT_MAX_TREE_HEIGHT = exports.MIDNIGHT_MAX_TICK = exports.MIDNIGHT_MAX_SETTLEMENT_FEES = exports.MIDNIGHT_MAX_OFFER_CAP = exports.MIDNIGHT_MAX_CONTINUOUS_FEE = exports.MIDNIGHT_MAX_COLLATERALS_PER_BORROWER = exports.MIDNIGHT_MAX_COLLATERALS = exports.MIDNIGHT_MARKET_TYPEHASH = exports.MIDNIGHT_EIP712_DOMAIN_TYPEHASH = exports.MIDNIGHT_DEFAULT_TICK_SPACING = exports.MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH = exports.MIDNIGHT_CBP = exports.BlueTransactionType = exports.SECONDS_PER_YEAR = exports.ORACLE_PRICE_SCALE = exports.BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR = exports.BLUE_LIQUIDATION_CURSOR = exports.isBlueMarketId = exports.ERC20_ALLOWANCE_RECIPIENTS = exports.EIP_712_FIELDS = exports.DEFAULT_SLIPPAGE_TOLERANCE = exports.DEAD_ADDRESS = void 0;
4
- exports.VAULT_DEPOSIT_MAX_DEADLINE_SECONDS = void 0;
3
+ exports.MAX_SLIPPAGE_TOLERANCE = exports.MAX_REALLOCATION_PENALTY = exports.MAX_ABSOLUTE_SHARE_PRICE = exports.LEVERAGE_MAX_ORACLE_DEVIATION = exports.LEVERAGE_MAX_EXECUTION_LOSS = exports.LEVERAGE_DEADLINE_WINDOW = exports.LEVERAGE_CLOSE_INTEREST_BUFFER_FACTOR = exports.DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = exports.DEFAULT_SUPPLY_TARGET_UTILIZATION = exports.DEFAULT_MAX_REALLOCATION_PENALTY = exports.DEFAULT_LLTV_BUFFER = exports.DEFAULT_CAP_ACCRUAL_BUFFER = exports.DEFAULT_ALLOCATOR_CAP_HEADROOM = exports.APPROVE_ONLY_ONCE_TOKENS = exports.ZERO_ADDRESS = exports.REWARDS_BASE_URL = exports.MORPHO_DOMAIN = exports.DOCS_BASE_URL = exports.ChainUtils = exports.ChainId = exports.BLUE_API_GRAPHQL_URL = exports.BLUE_API_BASE_URL = exports.MIDNIGHT_TIME_TO_MAX_LIF = exports.MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS = exports.MIDNIGHT_RATE_RATIFIER_V1_OFFER_TYPEHASH = exports.MIDNIGHT_PRICE_ROUNDING_STEP = exports.MIDNIGHT_PRICE_RATIFIER_V1_OFFER_TYPEHASH = exports.MIDNIGHT_OFFER_TYPEHASH = exports.MIDNIGHT_MAX_TREE_HEIGHT = exports.MIDNIGHT_MAX_TICK = exports.MIDNIGHT_MAX_SETTLEMENT_FEES = exports.MIDNIGHT_MAX_OFFER_CAP = exports.MIDNIGHT_MAX_CONTINUOUS_FEE = exports.MIDNIGHT_MAX_COLLATERALS_PER_BORROWER = exports.MIDNIGHT_MAX_COLLATERALS = exports.MIDNIGHT_MARKET_TYPEHASH = exports.MIDNIGHT_EIP712_DOMAIN_TYPEHASH = exports.MIDNIGHT_DEFAULT_TICK_SPACING = exports.MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH = exports.MIDNIGHT_CBP = exports.BlueTransactionType = exports.SECONDS_PER_YEAR = exports.ORACLE_PRICE_SCALE = exports.BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR = exports.BLUE_LIQUIDATION_CURSOR = exports.isBlueMarketId = exports.ERC20_ALLOWANCE_RECIPIENTS = exports.EIP_712_FIELDS = exports.DEFAULT_SLIPPAGE_TOLERANCE = exports.DEAD_ADDRESS = void 0;
4
+ exports.VAULT_DEPOSIT_MAX_DEADLINE_SECONDS = exports.MIN_VAULT_V2_DEAD_ASSETS = exports.MIN_DEAD_SHARES = exports.MIDNIGHT_TAKE_MAX_DEADLINE_SECONDS = exports.MIDNIGHT_MIN_BORROW_TIME_TO_MATURITY = exports.MAX_TOKEN_APPROVALS = void 0;
5
5
  var blue_sdk_1 = require("@morpho-org/blue-sdk");
6
6
  Object.defineProperty(exports, "DEAD_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.DEAD_ADDRESS; } });
7
7
  Object.defineProperty(exports, "DEFAULT_SLIPPAGE_TOLERANCE", { enumerable: true, get: function () { return blue_sdk_1.DEFAULT_SLIPPAGE_TOLERANCE; } });
@@ -49,10 +49,15 @@ Object.defineProperty(exports, "DEFAULT_LLTV_BUFFER", { enumerable: true, get: f
49
49
  Object.defineProperty(exports, "DEFAULT_MAX_REALLOCATION_PENALTY", { enumerable: true, get: function () { return constant_js_1.DEFAULT_MAX_REALLOCATION_PENALTY; } });
50
50
  Object.defineProperty(exports, "DEFAULT_SUPPLY_TARGET_UTILIZATION", { enumerable: true, get: function () { return constant_js_1.DEFAULT_SUPPLY_TARGET_UTILIZATION; } });
51
51
  Object.defineProperty(exports, "DEFAULT_WITHDRAWAL_TARGET_UTILIZATION", { enumerable: true, get: function () { return constant_js_1.DEFAULT_WITHDRAWAL_TARGET_UTILIZATION; } });
52
+ Object.defineProperty(exports, "LEVERAGE_CLOSE_INTEREST_BUFFER_FACTOR", { enumerable: true, get: function () { return constant_js_1.LEVERAGE_CLOSE_INTEREST_BUFFER_FACTOR; } });
53
+ Object.defineProperty(exports, "LEVERAGE_DEADLINE_WINDOW", { enumerable: true, get: function () { return constant_js_1.LEVERAGE_DEADLINE_WINDOW; } });
54
+ Object.defineProperty(exports, "LEVERAGE_MAX_EXECUTION_LOSS", { enumerable: true, get: function () { return constant_js_1.LEVERAGE_MAX_EXECUTION_LOSS; } });
55
+ Object.defineProperty(exports, "LEVERAGE_MAX_ORACLE_DEVIATION", { enumerable: true, get: function () { return constant_js_1.LEVERAGE_MAX_ORACLE_DEVIATION; } });
52
56
  Object.defineProperty(exports, "MAX_ABSOLUTE_SHARE_PRICE", { enumerable: true, get: function () { return constant_js_1.MAX_ABSOLUTE_SHARE_PRICE; } });
53
57
  Object.defineProperty(exports, "MAX_REALLOCATION_PENALTY", { enumerable: true, get: function () { return constant_js_1.MAX_REALLOCATION_PENALTY; } });
54
58
  Object.defineProperty(exports, "MAX_SLIPPAGE_TOLERANCE", { enumerable: true, get: function () { return constant_js_1.MAX_SLIPPAGE_TOLERANCE; } });
55
59
  Object.defineProperty(exports, "MAX_TOKEN_APPROVALS", { enumerable: true, get: function () { return constant_js_1.MAX_TOKEN_APPROVALS; } });
60
+ Object.defineProperty(exports, "MIDNIGHT_MIN_BORROW_TIME_TO_MATURITY", { enumerable: true, get: function () { return constant_js_1.MIDNIGHT_MIN_BORROW_TIME_TO_MATURITY; } });
56
61
  Object.defineProperty(exports, "MIDNIGHT_TAKE_MAX_DEADLINE_SECONDS", { enumerable: true, get: function () { return constant_js_1.MIDNIGHT_TAKE_MAX_DEADLINE_SECONDS; } });
57
62
  Object.defineProperty(exports, "MIN_DEAD_SHARES", { enumerable: true, get: function () { return constant_js_1.MIN_DEAD_SHARES; } });
58
63
  Object.defineProperty(exports, "MIN_VAULT_V2_DEAD_ASSETS", { enumerable: true, get: function () { return constant_js_1.MIN_VAULT_V2_DEAD_ASSETS; } });