@morpho-org/morpho-sdk 10.5.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 (192) hide show
  1. package/README.md +44 -1
  2. package/lib/cjs/abis.d.ts +794 -1
  3. package/lib/cjs/abis.js +815 -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/requirements/blue/encodeLeverageAuthorization.d.ts +39 -0
  16. package/lib/cjs/actions/requirements/blue/encodeLeverageAuthorization.js +59 -0
  17. package/lib/cjs/actions/requirements/blue/getLeverageRequirements.d.ts +104 -0
  18. package/lib/cjs/actions/requirements/blue/getLeverageRequirements.js +193 -0
  19. package/lib/cjs/actions/requirements/blue/getLeverageRequirementsApproval.d.ts +45 -0
  20. package/lib/cjs/actions/requirements/blue/getLeverageRequirementsApproval.js +66 -0
  21. package/lib/cjs/actions/requirements/blue/index.d.ts +3 -0
  22. package/lib/cjs/actions/requirements/blue/index.js +17 -0
  23. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +2 -2
  24. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +3 -2
  25. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +11 -6
  26. package/lib/cjs/actions/requirements/getRequirementsApproval.js +29 -5
  27. package/lib/cjs/addresses.d.ts +1 -1
  28. package/lib/cjs/addresses.js +6 -1
  29. package/lib/cjs/blue/abis.d.ts +1 -1
  30. package/lib/cjs/blue/abis.js +5 -1
  31. package/lib/cjs/blue/addresses.d.ts +1 -1
  32. package/lib/cjs/blue/addresses.js +6 -1
  33. package/lib/cjs/blue/entities.d.ts +4 -4
  34. package/lib/cjs/blue/entities.js +3 -1
  35. package/lib/cjs/blue/errors.d.ts +2 -2
  36. package/lib/cjs/blue/errors.js +5 -1
  37. package/lib/cjs/blue/fetch.d.ts +2 -2
  38. package/lib/cjs/blue/fetch.js +3 -1
  39. package/lib/cjs/blue/utils.d.ts +1 -1
  40. package/lib/cjs/blue/utils.js +2 -1
  41. package/lib/cjs/constants.d.ts +1 -1
  42. package/lib/cjs/constants.js +6 -2
  43. package/lib/cjs/entities/blue/blue.d.ts +486 -2
  44. package/lib/cjs/entities/blue/blue.js +529 -34
  45. package/lib/cjs/entities/index.d.ts +5 -5
  46. package/lib/cjs/entities/index.js +3 -1
  47. package/lib/cjs/entities/requirements/assertContractCode.d.ts +0 -23
  48. package/lib/cjs/entities/requirements/assertContractCode.js +3 -28
  49. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +34 -8
  50. package/lib/cjs/entities/vaultV2/vaultV2.js +39 -1
  51. package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +120 -2
  52. package/lib/cjs/entities/vaultV2BlueReallocationData.js +232 -4
  53. package/lib/cjs/errors.d.ts +4 -4
  54. package/lib/cjs/errors.js +7 -5
  55. package/lib/cjs/fetch.d.ts +2 -2
  56. package/lib/cjs/fetch.js +3 -1
  57. package/lib/cjs/helpers/constant.d.ts +34 -0
  58. package/lib/cjs/helpers/constant.js +35 -1
  59. package/lib/cjs/helpers/deadShares.js +3 -0
  60. package/lib/cjs/helpers/getZeroExLeverageBundle.d.ts +13 -0
  61. package/lib/cjs/helpers/getZeroExLeverageBundle.js +27 -0
  62. package/lib/cjs/helpers/index.d.ts +4 -1
  63. package/lib/cjs/helpers/index.js +28 -1
  64. package/lib/cjs/helpers/leverage/index.d.ts +1 -0
  65. package/lib/cjs/helpers/leverage/index.js +11 -0
  66. package/lib/cjs/helpers/leverage/limits.d.ts +472 -0
  67. package/lib/cjs/helpers/leverage/limits.js +715 -0
  68. package/lib/cjs/helpers/leverage/positionMarket.d.ts +17 -0
  69. package/lib/cjs/helpers/leverage/positionMarket.js +28 -0
  70. package/lib/cjs/helpers/leverage/reallocations.d.ts +159 -0
  71. package/lib/cjs/helpers/leverage/reallocations.js +276 -0
  72. package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
  73. package/lib/cjs/helpers/validateRequirementSpender.js +4 -0
  74. package/lib/cjs/helpers/zeroExQuote.d.ts +250 -0
  75. package/lib/cjs/helpers/zeroExQuote.js +763 -0
  76. package/lib/cjs/index.d.ts +1 -0
  77. package/lib/cjs/index.js +5 -2
  78. package/lib/cjs/midnight/errors.d.ts +2 -1
  79. package/lib/cjs/midnight/errors.js +5 -4
  80. package/lib/cjs/reads/assertContractCode.d.ts +25 -0
  81. package/lib/cjs/reads/assertContractCode.js +30 -0
  82. package/lib/cjs/reads/fetchZeroExQuote.d.ts +123 -0
  83. package/lib/cjs/reads/fetchZeroExQuote.js +330 -0
  84. package/lib/cjs/types/action.d.ts +130 -1
  85. package/lib/cjs/types/error.d.ts +59 -0
  86. package/lib/cjs/types/error.js +82 -3
  87. package/lib/cjs/types/index.d.ts +2 -0
  88. package/lib/cjs/types/index.js +2 -0
  89. package/lib/cjs/types/leverageError.d.ts +1552 -0
  90. package/lib/cjs/types/leverageError.js +1711 -0
  91. package/lib/cjs/types/zeroEx.d.ts +171 -0
  92. package/lib/cjs/types/zeroEx.js +2 -0
  93. package/lib/cjs/utils.d.ts +2 -2
  94. package/lib/cjs/utils.js +4 -2
  95. package/lib/cjs/version.d.ts +1 -1
  96. package/lib/cjs/version.js +1 -1
  97. package/lib/esm/abis.d.ts +794 -1
  98. package/lib/esm/abis.js +810 -1
  99. package/lib/esm/actions/blue/close.d.ts +169 -0
  100. package/lib/esm/actions/blue/close.js +266 -0
  101. package/lib/esm/actions/blue/common.js +3 -3
  102. package/lib/esm/actions/blue/delever.d.ts +156 -0
  103. package/lib/esm/actions/blue/delever.js +219 -0
  104. package/lib/esm/actions/blue/index.d.ts +3 -0
  105. package/lib/esm/actions/blue/index.js +3 -0
  106. package/lib/esm/actions/blue/lever.d.ts +184 -0
  107. package/lib/esm/actions/blue/lever.js +268 -0
  108. package/lib/esm/actions/blue/leverageIntent.d.ts +65 -0
  109. package/lib/esm/actions/blue/leverageIntent.js +96 -0
  110. package/lib/esm/actions/requirements/blue/encodeLeverageAuthorization.d.ts +39 -0
  111. package/lib/esm/actions/requirements/blue/encodeLeverageAuthorization.js +55 -0
  112. package/lib/esm/actions/requirements/blue/getLeverageRequirements.d.ts +104 -0
  113. package/lib/esm/actions/requirements/blue/getLeverageRequirements.js +189 -0
  114. package/lib/esm/actions/requirements/blue/getLeverageRequirementsApproval.d.ts +45 -0
  115. package/lib/esm/actions/requirements/blue/getLeverageRequirementsApproval.js +62 -0
  116. package/lib/esm/actions/requirements/blue/index.d.ts +3 -0
  117. package/lib/esm/actions/requirements/blue/index.js +3 -0
  118. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +2 -2
  119. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +3 -2
  120. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +11 -6
  121. package/lib/esm/actions/requirements/getRequirementsApproval.js +29 -5
  122. package/lib/esm/addresses.d.ts +1 -1
  123. package/lib/esm/addresses.js +1 -1
  124. package/lib/esm/blue/abis.d.ts +1 -1
  125. package/lib/esm/blue/abis.js +1 -1
  126. package/lib/esm/blue/addresses.d.ts +1 -1
  127. package/lib/esm/blue/addresses.js +1 -1
  128. package/lib/esm/blue/entities.d.ts +4 -4
  129. package/lib/esm/blue/entities.js +2 -2
  130. package/lib/esm/blue/errors.d.ts +2 -2
  131. package/lib/esm/blue/errors.js +2 -2
  132. package/lib/esm/blue/fetch.d.ts +2 -2
  133. package/lib/esm/blue/fetch.js +2 -2
  134. package/lib/esm/blue/utils.d.ts +1 -1
  135. package/lib/esm/blue/utils.js +1 -1
  136. package/lib/esm/constants.d.ts +1 -1
  137. package/lib/esm/constants.js +1 -1
  138. package/lib/esm/entities/blue/blue.d.ts +486 -2
  139. package/lib/esm/entities/blue/blue.js +501 -6
  140. package/lib/esm/entities/index.d.ts +5 -5
  141. package/lib/esm/entities/index.js +2 -2
  142. package/lib/esm/entities/requirements/assertContractCode.d.ts +0 -23
  143. package/lib/esm/entities/requirements/assertContractCode.js +1 -25
  144. package/lib/esm/entities/vaultV2/vaultV2.d.ts +34 -8
  145. package/lib/esm/entities/vaultV2/vaultV2.js +40 -2
  146. package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +120 -2
  147. package/lib/esm/entities/vaultV2BlueReallocationData.js +233 -5
  148. package/lib/esm/errors.d.ts +4 -4
  149. package/lib/esm/errors.js +4 -4
  150. package/lib/esm/fetch.d.ts +2 -2
  151. package/lib/esm/fetch.js +2 -2
  152. package/lib/esm/helpers/constant.d.ts +34 -0
  153. package/lib/esm/helpers/constant.js +34 -0
  154. package/lib/esm/helpers/deadShares.js +4 -1
  155. package/lib/esm/helpers/getZeroExLeverageBundle.d.ts +13 -0
  156. package/lib/esm/helpers/getZeroExLeverageBundle.js +23 -0
  157. package/lib/esm/helpers/index.d.ts +4 -1
  158. package/lib/esm/helpers/index.js +4 -1
  159. package/lib/esm/helpers/leverage/index.d.ts +1 -0
  160. package/lib/esm/helpers/leverage/index.js +1 -0
  161. package/lib/esm/helpers/leverage/limits.d.ts +472 -0
  162. package/lib/esm/helpers/leverage/limits.js +705 -0
  163. package/lib/esm/helpers/leverage/positionMarket.d.ts +17 -0
  164. package/lib/esm/helpers/leverage/positionMarket.js +24 -0
  165. package/lib/esm/helpers/leverage/reallocations.d.ts +159 -0
  166. package/lib/esm/helpers/leverage/reallocations.js +271 -0
  167. package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
  168. package/lib/esm/helpers/validateRequirementSpender.js +5 -1
  169. package/lib/esm/helpers/zeroExQuote.d.ts +250 -0
  170. package/lib/esm/helpers/zeroExQuote.js +754 -0
  171. package/lib/esm/index.d.ts +1 -0
  172. package/lib/esm/index.js +1 -0
  173. package/lib/esm/midnight/errors.d.ts +2 -1
  174. package/lib/esm/midnight/errors.js +2 -1
  175. package/lib/esm/reads/assertContractCode.d.ts +25 -0
  176. package/lib/esm/reads/assertContractCode.js +26 -0
  177. package/lib/esm/reads/fetchZeroExQuote.d.ts +123 -0
  178. package/lib/esm/reads/fetchZeroExQuote.js +326 -0
  179. package/lib/esm/types/action.d.ts +130 -1
  180. package/lib/esm/types/error.d.ts +59 -0
  181. package/lib/esm/types/error.js +76 -0
  182. package/lib/esm/types/index.d.ts +2 -0
  183. package/lib/esm/types/index.js +2 -0
  184. package/lib/esm/types/leverageError.d.ts +1552 -0
  185. package/lib/esm/types/leverageError.js +1660 -0
  186. package/lib/esm/types/zeroEx.d.ts +171 -0
  187. package/lib/esm/types/zeroEx.js +1 -0
  188. package/lib/esm/utils.d.ts +2 -2
  189. package/lib/esm/utils.js +2 -2
  190. package/lib/esm/version.d.ts +1 -1
  191. package/lib/esm/version.js +1 -1
  192. package/package.json +7 -7
@@ -1,6 +1,7 @@
1
1
  import type { InputMarketParams } from "@morpho-org/blue-sdk";
2
2
  import type { CollateralTransfer as MidnightCollateralTransfer, GroupCancellation as MidnightGroupCancellation } from "@morpho-org/midnight-sdk";
3
3
  import type { Address, Hex, TypedDataDefinition, WalletClient } from "viem";
4
+ import type { LeverageActionOracleDeviation } from "../helpers/leverage/limits.js";
4
5
  import type { Deallocation } from "./deallocation.js";
5
6
  export type { CollateralTransfer as MidnightCollateralTransfer, GroupCancellation as MidnightGroupCancellation, } from "@morpho-org/midnight-sdk";
6
7
  /**
@@ -354,6 +355,36 @@ export interface BlueWithdrawCollateralAction extends BaseAction<"blueWithdrawCo
354
355
  /** Metadata for a direct BlueBundlesV1 repay and/or collateral withdrawal. */
355
356
  export interface BlueRepayWithdrawCollateralAction extends BaseAction<"blueRepayWithdrawCollateral", BlueRepayWithdrawCollateralActionArgs> {
356
357
  }
358
+ /**
359
+ * Path a ZeroExLeverageBundlesV1 Close took: `keepCollateral` sells collateral for the debt plus its interest
360
+ * buffer and returns whatever collateral the swap does not sell, which can be none when the fill reaches
361
+ * `maxCollateralIn` and that equals the whole position. A position without debt has no Close.
362
+ */
363
+ export type BlueCloseMode = "keepCollateral";
364
+ /** Metadata for a ZeroExLeverageBundlesV1 Close, with its signed bounds. */
365
+ export interface BlueCloseAction extends BaseAction<"blueClose", {
366
+ readonly market: Hex;
367
+ readonly onBehalf: Address;
368
+ readonly mode: BlueCloseMode;
369
+ /** Most collateral the swap may sell. */
370
+ readonly maxCollateralIn: bigint;
371
+ /** Least loan token the swap must return. */
372
+ readonly minLoanOut: bigint;
373
+ /** 0x Settler the swap runs through. */
374
+ readonly settler: Address;
375
+ /**
376
+ * Worst fill against the oracle (`computeLeverageOracleDeviation`): `"measured"` with the deviation, positive
377
+ * when it costs the user. Reported, never refused.
378
+ */
379
+ readonly oracleDeviation: LeverageActionOracleDeviation;
380
+ readonly deadline: bigint;
381
+ /** Leverage data block the bounds were computed at. */
382
+ readonly block: {
383
+ readonly number: bigint;
384
+ readonly timestamp: bigint;
385
+ };
386
+ }> {
387
+ }
357
388
  /** Metadata for a direct BlueBundlesV1 full borrow-position migration. */
358
389
  export interface BlueRefinanceAction extends BaseAction<"blueRefinance", {
359
390
  readonly sourceMarket: Hex;
@@ -368,6 +399,47 @@ export interface BlueRefinanceAction extends BaseAction<"blueRefinance", {
368
399
  readonly deadline: bigint;
369
400
  }> {
370
401
  }
402
+ /**
403
+ * Metadata for a ZeroExLeverageBundlesV1 Lever: the signed bounds, the swap's Settler and the leverage data
404
+ * block the bounds were computed at.
405
+ */
406
+ export interface BlueLeverAction extends BaseAction<"blueLever", {
407
+ readonly market: Hex;
408
+ readonly onBehalf: Address;
409
+ /** Collateral pulled from the user and supplied. */
410
+ readonly collateralAssets: bigint;
411
+ /** Loan assets pulled from the user and swapped. */
412
+ readonly loanAssets: bigint;
413
+ /** Collateral the swap must deliver: the exact-output quote's `buyAmount`. */
414
+ readonly minCollateralToBuy: bigint;
415
+ /** Assets borrowed on Blue for the user. */
416
+ readonly maxBorrowAssets: bigint;
417
+ /** Swap input cap the bundle allows: `loanAssets + maxBorrowAssets - penaltyAssets`. */
418
+ readonly maxSwapIn: bigint;
419
+ /** LTV the bundle checks after the Lever, WAD-scaled. */
420
+ readonly maxLtv: bigint;
421
+ /** Number of BluePublicAllocator reallocations executed before the borrow. */
422
+ readonly reallocations: number;
423
+ /** Loan-token assets donated as BluePublicAllocator penalties. */
424
+ readonly penaltyAssets: bigint;
425
+ /** 0x Settler the swap runs through. */
426
+ readonly settler: Address;
427
+ /**
428
+ * Worst price against the oracle (`computeLeverageOracleDeviation`), always `"measured"`: the deviation is
429
+ * positive when it costs the user, and at most 15% above the oracle.
430
+ */
431
+ readonly oracleDeviation: Extract<LeverageActionOracleDeviation, {
432
+ readonly status: "measured";
433
+ }>;
434
+ /** Execution deadline in Unix seconds. */
435
+ readonly deadline: bigint;
436
+ /** Leverage data block the bounds were computed at. */
437
+ readonly block: {
438
+ readonly number: bigint;
439
+ readonly timestamp: bigint;
440
+ };
441
+ }> {
442
+ }
371
443
  /**
372
444
  * Enforces that exactly one of `assets` / `shares` is provided.
373
445
  *
@@ -556,12 +628,46 @@ export interface MidnightCancelOffersAction extends BaseAction<"midnightCancelOf
556
628
  readonly onBehalf: Address;
557
629
  }> {
558
630
  }
631
+ /**
632
+ * Metadata for a ZeroExLeverageBundlesV1 Delever (pay back with collateral): the signed bounds, the 0x Settler
633
+ * the swap runs through and the data block the bounds were priced at.
634
+ */
635
+ export interface BlueDeleverAction extends BaseAction<"blueDelever", {
636
+ readonly market: Hex;
637
+ readonly onBehalf: Address;
638
+ /** Collateral withdrawn: the most the swap may sell; the bundle supplies any unsold part back. */
639
+ readonly maxCollateralToSell: bigint;
640
+ /** Exact debt repaid first; the swap's output floor. */
641
+ readonly minRepayAssets: bigint;
642
+ /**
643
+ * WAD-scaled LTV cap checked after the action: the position's LTV with its debt accrued to the deadline,
644
+ * at the data block's price. It exceeds the data-block LTV on a market that accrues interest.
645
+ */
646
+ readonly maxLtv: bigint;
647
+ /** Unix-seconds deadline: the data block timestamp plus one hour. */
648
+ readonly deadline: bigint;
649
+ /** 0x Settler the swap calldata calls. */
650
+ readonly settler: Address;
651
+ /**
652
+ * Worst fill against the oracle (`computeLeverageOracleDeviation`), always `"measured"`: the deviation is
653
+ * positive when it costs the user. Reported, never refused.
654
+ */
655
+ readonly oracleDeviation: Extract<LeverageActionOracleDeviation, {
656
+ readonly status: "measured";
657
+ }>;
658
+ /** Leverage data block the bounds were priced at. */
659
+ readonly block: {
660
+ readonly number: bigint;
661
+ readonly timestamp: bigint;
662
+ };
663
+ }> {
664
+ }
559
665
  /**
560
666
  * Enumerates every action a {@link Transaction} can describe across the VaultV1,
561
667
  * VaultV2, Blue, and Midnight flows. The `type` tag discriminates the union so
562
668
  * consumers can `switch` exhaustively on it.
563
669
  */
564
- export type TransactionAction = ERC20ApprovalAction | VaultV2DepositAction | VaultV2WithdrawAction | VaultV2RedeemAction | VaultV2InKindRedeemAction | VaultV2ForceWithdrawAction | VaultV2ForceRedeemAction | VaultV1DepositAction | VaultV1WithdrawAction | VaultV1RedeemAction | VaultV1InKindRedeemAction | VaultV1MigrateToV2Action | BlueSupplyAction | BlueSupplyCollateralAction | BlueBorrowAction | BlueSupplyCollateralBorrowAction | BlueRepayAction | BlueWithdrawCollateralAction | BlueRepayWithdrawCollateralAction | BlueWithdrawAction | BlueWithdrawBuyCallbackAction | BlueRefinanceAction | BlueAuthorizationAction | MidnightAuthorizationAction | MidnightTakeLendAction | MidnightTakeBorrowAction | MidnightTakeWithdrawAction | MidnightSupplyCollateralTakeBorrowAction | MidnightSupplyCollateralAction | MidnightSupplyCollateralWithNativeAction | MidnightSupplyCollateralBatchAction | MidnightWithdrawCollateralAction | MidnightWithdrawCollateralBatchAction | MidnightRedeemAction | MidnightTakeRepayWithdrawCollateralAction | MidnightRepayWithdrawCollateralAction | MidnightCancelAndMakeAction | MidnightCancelOffersAction;
670
+ export type TransactionAction = ERC20ApprovalAction | VaultV2DepositAction | VaultV2WithdrawAction | VaultV2RedeemAction | VaultV2InKindRedeemAction | VaultV2ForceWithdrawAction | VaultV2ForceRedeemAction | VaultV1DepositAction | VaultV1WithdrawAction | VaultV1RedeemAction | VaultV1InKindRedeemAction | VaultV1MigrateToV2Action | BlueSupplyAction | BlueSupplyCollateralAction | BlueBorrowAction | BlueSupplyCollateralBorrowAction | BlueRepayAction | BlueWithdrawCollateralAction | BlueRepayWithdrawCollateralAction | BlueWithdrawAction | BlueWithdrawBuyCallbackAction | BlueRefinanceAction | BlueLeverAction | BlueDeleverAction | BlueCloseAction | BlueAuthorizationAction | MidnightAuthorizationAction | MidnightTakeLendAction | MidnightTakeBorrowAction | MidnightTakeWithdrawAction | MidnightSupplyCollateralTakeBorrowAction | MidnightSupplyCollateralAction | MidnightSupplyCollateralWithNativeAction | MidnightSupplyCollateralBatchAction | MidnightWithdrawCollateralAction | MidnightWithdrawCollateralBatchAction | MidnightRedeemAction | MidnightTakeRepayWithdrawCollateralAction | MidnightRepayWithdrawCollateralAction | MidnightCancelAndMakeAction | MidnightCancelOffersAction;
565
671
  /**
566
672
  * Describes a single, immutable, deep-frozen transaction to submit on-chain:
567
673
  * the target `to`, native `value`, encoded call `data`, and the originating
@@ -774,6 +880,29 @@ interface ActionRequirementsParams {
774
880
  */
775
881
  readonly useSimplePermit?: boolean;
776
882
  }
883
+ /**
884
+ * Lazy entity result of a ZeroExLeverageBundlesV1 action (Lever, Delever, Close).
885
+ *
886
+ * Send `getRequirements()` first (ERC-20 approvals for a Lever, then the Morpho authorization of the bundle),
887
+ * then the transaction `buildTx()` returns. For the ZeroExLeverageBundlesV1 that morpho-ts ships, the approvals
888
+ * are unlimited (capped per token) and persist after the action; for a bundle registered with
889
+ * `registerCustomAddresses`, each approval is exactly the pulled amount, which the action spends. The
890
+ * authorization persists in both cases.
891
+ *
892
+ * @example
893
+ * ```ts
894
+ * import type { LeverageActionOutput, TransactionAction } from "@morpho-org/morpho-sdk";
895
+ *
896
+ * declare const action: LeverageActionOutput<TransactionAction>;
897
+ * const calls = [...(await action.getRequirements()), action.buildTx()];
898
+ * ```
899
+ */
900
+ export interface LeverageActionOutput<TAction extends BaseAction> {
901
+ /** Resolves the missing ERC-20 approvals and the Morpho authorization of the bundle, in submission order. */
902
+ readonly getRequirements: () => Promise<readonly Readonly<Transaction<ERC20ApprovalAction | BlueAuthorizationAction>>[]>;
903
+ /** Returns the deep-frozen leverage transaction; synchronous and identical on every call. */
904
+ readonly buildTx: () => Readonly<Transaction<TAction>>;
905
+ }
777
906
  /** Lazy entity result exposing prerequisite resolution and synchronous transaction building. */
778
907
  export interface ActionOutput<TAction extends BaseAction = TransactionAction, TSignatures = RequirementSignature, TRequirementsParams = ActionRequirementsParams> {
779
908
  readonly buildTx: (signatures?: TSignatures) => Readonly<Transaction<TAction>>;
@@ -23,6 +23,25 @@ export declare class NegativeInputError extends Error {
23
23
  */
24
24
  constructor(field: string, value: bigint);
25
25
  }
26
+ /**
27
+ * Thrown when a morpho-sdk input that must be a boolean is missing or of another type, such as a truthy string.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * import { NonBooleanInputError } from "@morpho-org/morpho-sdk";
32
+ *
33
+ * const error = new NonBooleanInputError("reallocation.fromIdle", "false");
34
+ * ```
35
+ */
36
+ export declare class NonBooleanInputError extends Error {
37
+ readonly field: string;
38
+ readonly value: unknown;
39
+ /**
40
+ * @param field - Public input field whose value is invalid.
41
+ * @param value - Value supplied for the field.
42
+ */
43
+ constructor(field: string, value: unknown);
44
+ }
26
45
  /**
27
46
  * Thrown when a morpho-sdk input that must be positive is zero or negative.
28
47
  *
@@ -97,6 +116,28 @@ export declare class ExpiredDeadlineError extends Error {
97
116
  */
98
117
  constructor(deadline: bigint, timestamp: bigint);
99
118
  }
119
+ /**
120
+ * Thrown when a leverage action's deadline, the leverage data block plus one hour, has passed. The caller
121
+ * cannot choose that deadline: read the leverage data again first. For a Lever or a Delever, fetch a new 0x
122
+ * quote and rebuild. For a Close, do the same if the position still has debt; if only collateral is left, for
123
+ * example because the debt was repaid while the Close was pending, a Close refuses with
124
+ * `LeverageCloseWithoutDebtError`, so withdraw the collateral with `withdrawCollateral` instead. It extends
125
+ * {@link ExpiredDeadlineError}, so a catch of that class still catches it.
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * import { ExpiredLeverageDeadlineError } from "@morpho-org/morpho-sdk";
130
+ *
131
+ * const error = new ExpiredLeverageDeadlineError(1_700_003_600n, 1_700_003_601n);
132
+ * ```
133
+ */
134
+ export declare class ExpiredLeverageDeadlineError extends ExpiredDeadlineError {
135
+ /**
136
+ * @param deadline - Leverage deadline: the leverage data block timestamp plus one hour.
137
+ * @param timestamp - Current timestamp used for validation.
138
+ */
139
+ constructor(deadline: bigint, timestamp: bigint);
140
+ }
100
141
  /**
101
142
  * Thrown when a VaultExitBundlesV1 Vault V2 exit targets a vault without exactly one adapter.
102
143
  *
@@ -657,6 +698,24 @@ export declare class UnsupportedAuthorizationOperatorError extends Error {
657
698
  */
658
699
  constructor(authorized: Address, chainId: number);
659
700
  }
701
+ /**
702
+ * Thrown when a leverage requirement is requested for a malformed input: a missing operation, an
703
+ * operation tag other than `lever`, `delever` or `close`, a Lever amount, approval amount or
704
+ * allowance that is not a bigint, or a user or token address that is not an address.
705
+ */
706
+ export declare class InvalidLeverageOperationError extends Error {
707
+ readonly field: string;
708
+ /** The rejected value when it is a string, such as an unknown operation tag; `undefined` otherwise. */
709
+ readonly value: string | undefined;
710
+ /** The `typeof` of the rejected value, or `"null"` for `null`. */
711
+ readonly valueType: string;
712
+ /**
713
+ * @param field - The field rejected: `operation`, `type`, a Lever amount, `amount`, `allowance`,
714
+ * `userAddress`, `marketParams.loanToken` or `marketParams.collateralToken`.
715
+ * @param input - The rejected value, as received.
716
+ */
717
+ constructor(field: string, input: unknown);
718
+ }
660
719
  /** Thrown when reallocations are attached to a combined call with no borrow leg. */
661
720
  export declare class ReallocationsRequireBorrowError extends Error {
662
721
  constructor();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.MissingClientPropertyError = exports.CryptoUnavailableError = exports.ChainIdMismatchError = exports.AddressMismatchError = exports.UnsupportedRequirementSignatureError = exports.UnexpectedRequirementSignatureError = exports.AmbiguousRequirementSignaturesError = exports.MaxRepayAssetsBelowRepayAssetsError = exports.ReallocationsRequireBorrowError = exports.UnsupportedAuthorizationOperatorError = exports.ReallocationLoanTokenMismatchError = exports.SameVaultMigrationError = exports.AmountAndSharesExclusiveError = exports.MixedBundlesFundingError = exports.MidnightReferralFeePctExceededError = exports.ReferralFeePctExceededError = exports.ReferralFeeRecipientMissingError = exports.NativeFundingAmountMismatchError = exports.NoUnusedPermit2NonceError = exports.Permit2SignatureTransferNonceAlreadyUsedError = exports.BundlesRequirementSignatureMismatchError = exports.BundlesPermitMismatchError = exports.VaultIsBlueFeeRecipientError = exports.VaultMorphoMismatchError = exports.InsufficientBlueBalanceForInKindRedeemError = exports.InKindRedeemCoverageError = exports.InKindRedeemZeroDeallocationError = exports.VaultV2ForceWithdrawFeeSharesExceedBurnError = exports.VaultV2ForceWithdrawSharePriceBelowFloorError = exports.VaultV2ForceWithdrawZeroSharePriceError = exports.VaultV2ForceWithdrawZeroWithdrawalError = exports.VaultV2ForceWithdrawCoverageError = exports.VaultV2UndecodableLiquidityDataError = exports.VaultV2UnsupportedLiquidityAdapterError = exports.VaultV2UnsupportedExitAdapterError = exports.AdapterNotPartOfVaultError = exports.VaultV2SingleAdapterRequiredError = exports.ExpiredDeadlineError = exports.EmptyMarketParamsListError = exports.InputExceedsMaxError = exports.InvalidMidnightNativeAmountTypeError = exports.InvalidBigIntInputError = exports.NonPositiveInputError = exports.NegativeInputError = void 0;
4
- exports.MidnightZeroReceiverError = exports.MidnightRepayExceedsDebtError = exports.MidnightContinuousFeeAboveMaxError = exports.MidnightTakeTargetUnreachableError = exports.MidnightTakeableOffersNotFillableError = exports.UnboundedMidnightTakeInputError = exports.MidnightOfferSellerReceiverMismatchError = exports.MidnightOfferContinuousFeeCapError = exports.MidnightOfferMakerMismatchError = exports.MidnightOfferReduceOnlyError = exports.MidnightOfferSideMismatchError = exports.EmptyMidnightTakeableOffersError = exports.DuplicateMidnightGroupCancellationError = exports.DuplicateMidnightCollateralIndexError = exports.EmptyMidnightCollateralWithdrawalsError = exports.EmptyMidnightCollateralSuppliesError = exports.EmptyMidnightGroupCancellationsError = exports.ReallocationAdapterSupplySharesUnderflowError = exports.ReallocationAllocationUnderflowError = exports.UnknownReallocationAdapterError = exports.UnknownReallocationMarketPublicAllocatorConfigError = exports.UnknownReallocationActiveAdaptersError = exports.UnknownReallocationPublicAllocatorConfigError = exports.UnknownReallocationAllocationError = exports.UnknownReallocationVaultError = exports.UnknownReallocationMarketError = exports.InsufficientSharedLiquidityError = exports.RepaySharesExceedDebtError = exports.MalformedSignatureError = exports.InvalidSignatureError = exports.RepayExceedsDebtError = exports.WithdrawMakesPositionUnhealthyError = exports.WithdrawExceedsCollateralError = exports.MutuallyExclusiveRepayAmountsError = exports.InconsistentReallocationPenaltyError = exports.InvalidReallocationSourceTypeError = exports.InvalidReallocationAddressError = exports.InvalidVaultV2BlueReallocationShapeError = exports.ReallocationWithdrawalOnTargetMarketError = exports.AccrualPositionUserMismatchError = exports.MarketIdMismatchError = exports.MissingMarketPriceError = exports.BorrowExceedsSafeLtvError = exports.NativeAmountOnNonWNativeAssetError = exports.VaultAddressMismatchError = exports.ChainWNativeMissingError = exports.NativeAmountOnNonWNativeVaultError = exports.DepositSpenderMismatchError = exports.DepositOwnerMismatchError = exports.DepositAssetMismatchError = void 0;
5
- exports.MidnightCalldataEncodingError = exports.MidnightZeroAccountError = exports.MissingContractCodeError = exports.MidnightOfferNotReduceOnlyError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.BlueBuyCallbackUnauthorizedError = exports.BlueBuyCallbackOwnerMismatchError = exports.NotBlueBuyCallbackError = exports.InsufficientBlueLiquidityError = exports.EmptyBlueSupplyPositionError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = exports.MutuallyExclusiveWithdrawAmountsError = exports.MidnightInvalidAccountAddressError = exports.InvalidMidnightHexInputError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.MidnightReplacementGroupCancelledError = exports.MidnightOfferRatifierMismatchError = exports.MidnightTakeableOfferZeroSellerReceiverError = exports.MidnightTakeableOfferMarketMismatchError = exports.MissingDeadSharesDataError = exports.InsufficientDeadSharesError = exports.ZeroBlueParkingSharesError = exports.EmptyBlueParkingMarketError = exports.MidnightOfferCallbackDataMismatchError = exports.MidnightOfferCallbackMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = exports.MidnightMarketAddressMismatchError = exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightBorrowTooCloseToMaturityError = exports.MidnightTakeDeadlineTooFarError = exports.MidnightContractReceiverError = exports.MidnightZeroOnBehalfError = void 0;
3
+ exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.MissingClientPropertyError = exports.CryptoUnavailableError = exports.ChainIdMismatchError = exports.AddressMismatchError = exports.UnsupportedRequirementSignatureError = exports.UnexpectedRequirementSignatureError = exports.AmbiguousRequirementSignaturesError = exports.MaxRepayAssetsBelowRepayAssetsError = exports.ReallocationsRequireBorrowError = exports.InvalidLeverageOperationError = exports.UnsupportedAuthorizationOperatorError = exports.ReallocationLoanTokenMismatchError = exports.SameVaultMigrationError = exports.AmountAndSharesExclusiveError = exports.MixedBundlesFundingError = exports.MidnightReferralFeePctExceededError = exports.ReferralFeePctExceededError = exports.ReferralFeeRecipientMissingError = exports.NativeFundingAmountMismatchError = exports.NoUnusedPermit2NonceError = exports.Permit2SignatureTransferNonceAlreadyUsedError = exports.BundlesRequirementSignatureMismatchError = exports.BundlesPermitMismatchError = exports.VaultIsBlueFeeRecipientError = exports.VaultMorphoMismatchError = exports.InsufficientBlueBalanceForInKindRedeemError = exports.InKindRedeemCoverageError = exports.InKindRedeemZeroDeallocationError = exports.VaultV2ForceWithdrawFeeSharesExceedBurnError = exports.VaultV2ForceWithdrawSharePriceBelowFloorError = exports.VaultV2ForceWithdrawZeroSharePriceError = exports.VaultV2ForceWithdrawZeroWithdrawalError = exports.VaultV2ForceWithdrawCoverageError = exports.VaultV2UndecodableLiquidityDataError = exports.VaultV2UnsupportedLiquidityAdapterError = exports.VaultV2UnsupportedExitAdapterError = exports.AdapterNotPartOfVaultError = exports.VaultV2SingleAdapterRequiredError = exports.ExpiredLeverageDeadlineError = exports.ExpiredDeadlineError = exports.EmptyMarketParamsListError = exports.InputExceedsMaxError = exports.InvalidMidnightNativeAmountTypeError = exports.InvalidBigIntInputError = exports.NonPositiveInputError = exports.NonBooleanInputError = exports.NegativeInputError = void 0;
4
+ exports.MidnightTakeTargetUnreachableError = exports.MidnightTakeableOffersNotFillableError = exports.UnboundedMidnightTakeInputError = exports.MidnightOfferSellerReceiverMismatchError = exports.MidnightOfferContinuousFeeCapError = exports.MidnightOfferMakerMismatchError = exports.MidnightOfferReduceOnlyError = exports.MidnightOfferSideMismatchError = exports.EmptyMidnightTakeableOffersError = exports.DuplicateMidnightGroupCancellationError = exports.DuplicateMidnightCollateralIndexError = exports.EmptyMidnightCollateralWithdrawalsError = exports.EmptyMidnightCollateralSuppliesError = exports.EmptyMidnightGroupCancellationsError = exports.ReallocationAdapterSupplySharesUnderflowError = exports.ReallocationAllocationUnderflowError = exports.UnknownReallocationAdapterError = exports.UnknownReallocationMarketPublicAllocatorConfigError = exports.UnknownReallocationActiveAdaptersError = exports.UnknownReallocationPublicAllocatorConfigError = exports.UnknownReallocationAllocationError = exports.UnknownReallocationVaultError = exports.UnknownReallocationMarketError = exports.InsufficientSharedLiquidityError = exports.RepaySharesExceedDebtError = exports.MalformedSignatureError = exports.InvalidSignatureError = exports.RepayExceedsDebtError = exports.WithdrawMakesPositionUnhealthyError = exports.WithdrawExceedsCollateralError = exports.MutuallyExclusiveRepayAmountsError = exports.InconsistentReallocationPenaltyError = exports.InvalidReallocationSourceTypeError = exports.InvalidReallocationAddressError = exports.InvalidVaultV2BlueReallocationShapeError = exports.ReallocationWithdrawalOnTargetMarketError = exports.AccrualPositionUserMismatchError = exports.MarketIdMismatchError = exports.MissingMarketPriceError = exports.BorrowExceedsSafeLtvError = exports.NativeAmountOnNonWNativeAssetError = exports.VaultAddressMismatchError = exports.ChainWNativeMissingError = exports.NativeAmountOnNonWNativeVaultError = exports.DepositSpenderMismatchError = exports.DepositOwnerMismatchError = exports.DepositAssetMismatchError = exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = void 0;
5
+ exports.MidnightCalldataEncodingError = exports.MidnightZeroAccountError = exports.MissingContractCodeError = exports.MidnightOfferNotReduceOnlyError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.BlueBuyCallbackUnauthorizedError = exports.BlueBuyCallbackOwnerMismatchError = exports.NotBlueBuyCallbackError = exports.InsufficientBlueLiquidityError = exports.EmptyBlueSupplyPositionError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = exports.MutuallyExclusiveWithdrawAmountsError = exports.MidnightInvalidAccountAddressError = exports.InvalidMidnightHexInputError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.MidnightReplacementGroupCancelledError = exports.MidnightOfferRatifierMismatchError = exports.MidnightTakeableOfferZeroSellerReceiverError = exports.MidnightTakeableOfferMarketMismatchError = exports.MissingDeadSharesDataError = exports.InsufficientDeadSharesError = exports.ZeroBlueParkingSharesError = exports.EmptyBlueParkingMarketError = exports.MidnightOfferCallbackDataMismatchError = exports.MidnightOfferCallbackMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = exports.MidnightMarketAddressMismatchError = exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightBorrowTooCloseToMaturityError = exports.MidnightTakeDeadlineTooFarError = exports.MidnightContractReceiverError = exports.MidnightZeroOnBehalfError = exports.MidnightZeroReceiverError = exports.MidnightRepayExceedsDebtError = exports.MidnightContinuousFeeAboveMaxError = void 0;
6
6
  const blue_sdk_1 = require("@morpho-org/blue-sdk");
7
7
  const midnight_sdk_1 = require("@morpho-org/midnight-sdk");
8
8
  const constant_js_1 = require("../helpers/constant.js");
@@ -34,6 +34,31 @@ class NegativeInputError extends Error {
34
34
  }
35
35
  }
36
36
  exports.NegativeInputError = NegativeInputError;
37
+ /**
38
+ * Thrown when a morpho-sdk input that must be a boolean is missing or of another type, such as a truthy string.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import { NonBooleanInputError } from "@morpho-org/morpho-sdk";
43
+ *
44
+ * const error = new NonBooleanInputError("reallocation.fromIdle", "false");
45
+ * ```
46
+ */
47
+ class NonBooleanInputError extends Error {
48
+ field;
49
+ value;
50
+ /**
51
+ * @param field - Public input field whose value is invalid.
52
+ * @param value - Value supplied for the field.
53
+ */
54
+ constructor(field, value) {
55
+ super(`Input "${field}" must be a boolean, got a value of type "${typeof value}". Pass it as a boolean.`);
56
+ this.field = field;
57
+ this.value = value;
58
+ this.name = "NonBooleanInputError";
59
+ }
60
+ }
61
+ exports.NonBooleanInputError = NonBooleanInputError;
37
62
  /**
38
63
  * Thrown when a morpho-sdk input that must be positive is zero or negative.
39
64
  *
@@ -138,6 +163,33 @@ class ExpiredDeadlineError extends Error {
138
163
  }
139
164
  }
140
165
  exports.ExpiredDeadlineError = ExpiredDeadlineError;
166
+ /**
167
+ * Thrown when a leverage action's deadline, the leverage data block plus one hour, has passed. The caller
168
+ * cannot choose that deadline: read the leverage data again first. For a Lever or a Delever, fetch a new 0x
169
+ * quote and rebuild. For a Close, do the same if the position still has debt; if only collateral is left, for
170
+ * example because the debt was repaid while the Close was pending, a Close refuses with
171
+ * `LeverageCloseWithoutDebtError`, so withdraw the collateral with `withdrawCollateral` instead. It extends
172
+ * {@link ExpiredDeadlineError}, so a catch of that class still catches it.
173
+ *
174
+ * @example
175
+ * ```ts
176
+ * import { ExpiredLeverageDeadlineError } from "@morpho-org/morpho-sdk";
177
+ *
178
+ * const error = new ExpiredLeverageDeadlineError(1_700_003_600n, 1_700_003_601n);
179
+ * ```
180
+ */
181
+ class ExpiredLeverageDeadlineError extends ExpiredDeadlineError {
182
+ /**
183
+ * @param deadline - Leverage deadline: the leverage data block timestamp plus one hour.
184
+ * @param timestamp - Current timestamp used for validation.
185
+ */
186
+ constructor(deadline, timestamp) {
187
+ super(deadline, timestamp);
188
+ this.message = `Leverage deadline "${deadline}" (the leverage data block plus one hour) has expired at timestamp "${timestamp}". Read the leverage data again with getLeverageData and rebuild, fetching a new 0x quote only if the action swaps.`;
189
+ this.name = "ExpiredLeverageDeadlineError";
190
+ }
191
+ }
192
+ exports.ExpiredLeverageDeadlineError = ExpiredLeverageDeadlineError;
141
193
  /**
142
194
  * Thrown when a VaultExitBundlesV1 Vault V2 exit targets a vault without exactly one adapter.
143
195
  *
@@ -824,6 +876,33 @@ class UnsupportedAuthorizationOperatorError extends Error {
824
876
  }
825
877
  }
826
878
  exports.UnsupportedAuthorizationOperatorError = UnsupportedAuthorizationOperatorError;
879
+ /**
880
+ * Thrown when a leverage requirement is requested for a malformed input: a missing operation, an
881
+ * operation tag other than `lever`, `delever` or `close`, a Lever amount, approval amount or
882
+ * allowance that is not a bigint, or a user or token address that is not an address.
883
+ */
884
+ class InvalidLeverageOperationError extends Error {
885
+ field;
886
+ /** The rejected value when it is a string, such as an unknown operation tag; `undefined` otherwise. */
887
+ value;
888
+ /** The `typeof` of the rejected value, or `"null"` for `null`. */
889
+ valueType;
890
+ /**
891
+ * @param field - The field rejected: `operation`, `type`, a Lever amount, `amount`, `allowance`,
892
+ * `userAddress`, `marketParams.loanToken` or `marketParams.collateralToken`.
893
+ * @param input - The rejected value, as received.
894
+ */
895
+ constructor(field, input) {
896
+ const value = typeof input === "string" ? input : undefined;
897
+ const valueType = input === null ? "null" : typeof input;
898
+ super(`Leverage input field "${field}" is invalid, got ${value === undefined ? `a value of type "${valueType}"` : `"${value}"`}. Pass type "lever", "delever" or "close", bigint amounts and allowances, and valid addresses.`);
899
+ this.field = field;
900
+ this.value = value;
901
+ this.valueType = valueType;
902
+ this.name = "InvalidLeverageOperationError";
903
+ }
904
+ }
905
+ exports.InvalidLeverageOperationError = InvalidLeverageOperationError;
827
906
  /** Thrown when reallocations are attached to a combined call with no borrow leg. */
828
907
  class ReallocationsRequireBorrowError extends Error {
829
908
  constructor() {
@@ -3,6 +3,8 @@ export * from "./client.js";
3
3
  export * from "./deallocation.js";
4
4
  export * from "./entity.js";
5
5
  export * from "./error.js";
6
+ export * from "./leverageError.js";
6
7
  export * from "./metadata.js";
7
8
  export * from "./midnightPublicationError.js";
8
9
  export * from "./sharedLiquidity.js";
10
+ export * from "./zeroEx.js";
@@ -19,6 +19,8 @@ __exportStar(require("./client.js"), exports);
19
19
  __exportStar(require("./deallocation.js"), exports);
20
20
  __exportStar(require("./entity.js"), exports);
21
21
  __exportStar(require("./error.js"), exports);
22
+ __exportStar(require("./leverageError.js"), exports);
22
23
  __exportStar(require("./metadata.js"), exports);
23
24
  __exportStar(require("./midnightPublicationError.js"), exports);
24
25
  __exportStar(require("./sharedLiquidity.js"), exports);
26
+ __exportStar(require("./zeroEx.js"), exports);