@morpho-org/morpho-sdk 7.1.0-next.1 → 8.1.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 (217) hide show
  1. package/MIGRATION-v7-to-v8.md +290 -0
  2. package/README.md +11 -6
  3. package/lib/cjs/abis.d.ts +1 -1
  4. package/lib/cjs/abis.js +1 -5
  5. package/lib/cjs/actions/bundles/resolveBundlesTokenRequirements.d.ts +2 -0
  6. package/lib/cjs/actions/bundles/resolveBundlesTokenRequirements.js +2 -0
  7. package/lib/cjs/actions/midnight/cancelAndMake.d.ts +17 -71
  8. package/lib/cjs/actions/midnight/cancelAndMake.js +41 -29
  9. package/lib/cjs/actions/midnight/redeem.d.ts +8 -1
  10. package/lib/cjs/actions/midnight/redeem.js +18 -1
  11. package/lib/cjs/actions/midnight/repayWithdrawCollateral.d.ts +19 -3
  12. package/lib/cjs/actions/midnight/repayWithdrawCollateral.js +24 -2
  13. package/lib/cjs/actions/midnight/supplyCollateral.d.ts +1 -0
  14. package/lib/cjs/actions/midnight/supplyCollateral.js +3 -0
  15. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.d.ts +21 -6
  16. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +49 -14
  17. package/lib/cjs/actions/midnight/takeBorrow.d.ts +18 -5
  18. package/lib/cjs/actions/midnight/takeBorrow.js +44 -12
  19. package/lib/cjs/actions/midnight/takeLend.d.ts +10 -5
  20. package/lib/cjs/actions/midnight/takeLend.js +27 -9
  21. package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.d.ts +22 -7
  22. package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.js +51 -27
  23. package/lib/cjs/actions/midnight/takeWithdraw.d.ts +14 -5
  24. package/lib/cjs/actions/midnight/takeWithdraw.js +40 -9
  25. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -2
  26. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +11 -6
  27. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +3 -0
  28. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +2 -1
  29. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +13 -2
  30. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +17 -6
  31. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +3 -0
  32. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +2 -1
  33. package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +5 -0
  34. package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +4 -1
  35. package/lib/cjs/actions/requirements/midnight/getMidnightApprovalRequirements.d.ts +3 -1
  36. package/lib/cjs/actions/requirements/midnight/getMidnightApprovalRequirements.js +5 -1
  37. package/lib/cjs/actions/requirements/midnight/getMidnightAuthorizationRequirement.d.ts +3 -1
  38. package/lib/cjs/actions/requirements/midnight/getMidnightAuthorizationRequirement.js +5 -1
  39. package/lib/cjs/actions/requirements/validateClientChainId.d.ts +26 -0
  40. package/lib/cjs/actions/requirements/validateClientChainId.js +34 -0
  41. package/lib/cjs/blue/abis.d.ts +1 -1
  42. package/lib/cjs/blue/abis.js +1 -5
  43. package/lib/cjs/blue/entities.d.ts +4 -4
  44. package/lib/cjs/blue/entities.js +1 -3
  45. package/lib/cjs/blue/errors.d.ts +2 -2
  46. package/lib/cjs/blue/errors.js +3 -5
  47. package/lib/cjs/blue/fetch.d.ts +2 -2
  48. package/lib/cjs/blue/fetch.js +1 -3
  49. package/lib/cjs/blue/types.d.ts +1 -1
  50. package/lib/cjs/blue/utils.d.ts +2 -2
  51. package/lib/cjs/blue/utils.js +5 -2
  52. package/lib/cjs/entities/blue/blue.d.ts +109 -27
  53. package/lib/cjs/entities/blue/blue.js +103 -28
  54. package/lib/cjs/entities/index.d.ts +5 -5
  55. package/lib/cjs/entities/index.js +1 -3
  56. package/lib/cjs/entities/midnight/deadline.d.ts +15 -0
  57. package/lib/cjs/entities/midnight/deadline.js +24 -0
  58. package/lib/cjs/entities/midnight/midnight.d.ts +427 -72
  59. package/lib/cjs/entities/midnight/midnight.js +864 -186
  60. package/lib/cjs/entities/midnight/publication.d.ts +134 -0
  61. package/lib/cjs/entities/midnight/publication.js +404 -0
  62. package/lib/cjs/entities/midnight/types.d.ts +26 -5
  63. package/lib/cjs/entities/requirements/assertContractCode.d.ts +49 -0
  64. package/lib/cjs/entities/requirements/assertContractCode.js +79 -0
  65. package/lib/cjs/entities/requirements/getBundlesTokenRequirements.d.ts +19 -4
  66. package/lib/cjs/entities/requirements/getBundlesTokenRequirements.js +45 -18
  67. package/lib/cjs/entities/requirements/getUnusedPermit2Nonce.d.ts +3 -2
  68. package/lib/cjs/entities/requirements/getUnusedPermit2Nonce.js +5 -2
  69. package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -1
  70. package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +8 -2
  71. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +63 -11
  72. package/lib/cjs/entities/vaultV1/vaultV1.js +52 -15
  73. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +62 -44
  74. package/lib/cjs/entities/vaultV2/vaultV2.js +53 -48
  75. package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +3 -5
  76. package/lib/cjs/entities/vaultV2BlueReallocationData.js +3 -9
  77. package/lib/cjs/errors.d.ts +4 -4
  78. package/lib/cjs/errors.js +7 -10
  79. package/lib/cjs/fetch.d.ts +2 -2
  80. package/lib/cjs/fetch.js +1 -3
  81. package/lib/cjs/helpers/constant.d.ts +5 -0
  82. package/lib/cjs/helpers/constant.js +6 -1
  83. package/lib/cjs/helpers/index.d.ts +1 -1
  84. package/lib/cjs/helpers/index.js +2 -1
  85. package/lib/cjs/helpers/validate.d.ts +163 -8
  86. package/lib/cjs/helpers/validate.js +179 -8
  87. package/lib/cjs/helpers/validateMidnightBounds.d.ts +47 -0
  88. package/lib/cjs/helpers/validateMidnightBounds.js +79 -0
  89. package/lib/cjs/helpers/validateMidnightPublication.d.ts +12 -0
  90. package/lib/cjs/helpers/validateMidnightPublication.js +144 -0
  91. package/lib/cjs/helpers/validateMidnightReceiver.d.ts +29 -0
  92. package/lib/cjs/helpers/validateMidnightReceiver.js +84 -0
  93. package/lib/cjs/helpers/validateMidnightTakeFeasibility.d.ts +102 -0
  94. package/lib/cjs/helpers/validateMidnightTakeFeasibility.js +231 -0
  95. package/lib/cjs/index.d.ts +1 -0
  96. package/lib/cjs/index.js +3 -0
  97. package/lib/cjs/midnight/errors.d.ts +1 -2
  98. package/lib/cjs/midnight/errors.js +4 -5
  99. package/lib/cjs/types/error.d.ts +197 -4
  100. package/lib/cjs/types/error.js +265 -5
  101. package/lib/cjs/types/index.d.ts +1 -0
  102. package/lib/cjs/types/index.js +1 -0
  103. package/lib/cjs/types/midnightCancelAndMake.d.ts +70 -0
  104. package/lib/cjs/types/midnightCancelAndMake.js +2 -0
  105. package/lib/cjs/types/midnightPublicationError.d.ts +332 -0
  106. package/lib/cjs/types/midnightPublicationError.js +376 -0
  107. package/lib/cjs/types.d.ts +1 -1
  108. package/lib/cjs/utils.d.ts +4 -3
  109. package/lib/cjs/utils.js +8 -4
  110. package/lib/esm/abis.d.ts +1 -1
  111. package/lib/esm/abis.js +1 -1
  112. package/lib/esm/actions/bundles/resolveBundlesTokenRequirements.d.ts +2 -0
  113. package/lib/esm/actions/bundles/resolveBundlesTokenRequirements.js +2 -0
  114. package/lib/esm/actions/midnight/cancelAndMake.d.ts +17 -71
  115. package/lib/esm/actions/midnight/cancelAndMake.js +42 -30
  116. package/lib/esm/actions/midnight/redeem.d.ts +8 -1
  117. package/lib/esm/actions/midnight/redeem.js +18 -1
  118. package/lib/esm/actions/midnight/repayWithdrawCollateral.d.ts +19 -3
  119. package/lib/esm/actions/midnight/repayWithdrawCollateral.js +24 -2
  120. package/lib/esm/actions/midnight/supplyCollateral.d.ts +1 -0
  121. package/lib/esm/actions/midnight/supplyCollateral.js +3 -0
  122. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.d.ts +21 -6
  123. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +52 -17
  124. package/lib/esm/actions/midnight/takeBorrow.d.ts +18 -5
  125. package/lib/esm/actions/midnight/takeBorrow.js +47 -15
  126. package/lib/esm/actions/midnight/takeLend.d.ts +10 -5
  127. package/lib/esm/actions/midnight/takeLend.js +27 -9
  128. package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.d.ts +22 -7
  129. package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.js +52 -28
  130. package/lib/esm/actions/midnight/takeWithdraw.d.ts +14 -5
  131. package/lib/esm/actions/midnight/takeWithdraw.js +41 -10
  132. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -2
  133. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +13 -8
  134. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +3 -0
  135. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +2 -1
  136. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +13 -2
  137. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +17 -6
  138. package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +3 -0
  139. package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +2 -1
  140. package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +5 -0
  141. package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +4 -1
  142. package/lib/esm/actions/requirements/midnight/getMidnightApprovalRequirements.d.ts +3 -1
  143. package/lib/esm/actions/requirements/midnight/getMidnightApprovalRequirements.js +5 -1
  144. package/lib/esm/actions/requirements/midnight/getMidnightAuthorizationRequirement.d.ts +3 -1
  145. package/lib/esm/actions/requirements/midnight/getMidnightAuthorizationRequirement.js +5 -1
  146. package/lib/esm/actions/requirements/validateClientChainId.d.ts +26 -0
  147. package/lib/esm/actions/requirements/validateClientChainId.js +30 -0
  148. package/lib/esm/blue/abis.d.ts +1 -1
  149. package/lib/esm/blue/abis.js +1 -1
  150. package/lib/esm/blue/entities.d.ts +4 -4
  151. package/lib/esm/blue/entities.js +2 -2
  152. package/lib/esm/blue/errors.d.ts +2 -2
  153. package/lib/esm/blue/errors.js +2 -2
  154. package/lib/esm/blue/fetch.d.ts +2 -2
  155. package/lib/esm/blue/fetch.js +2 -2
  156. package/lib/esm/blue/types.d.ts +1 -1
  157. package/lib/esm/blue/utils.d.ts +2 -2
  158. package/lib/esm/blue/utils.js +2 -2
  159. package/lib/esm/entities/blue/blue.d.ts +109 -27
  160. package/lib/esm/entities/blue/blue.js +104 -29
  161. package/lib/esm/entities/index.d.ts +5 -5
  162. package/lib/esm/entities/index.js +2 -2
  163. package/lib/esm/entities/midnight/deadline.d.ts +15 -0
  164. package/lib/esm/entities/midnight/deadline.js +20 -0
  165. package/lib/esm/entities/midnight/midnight.d.ts +427 -72
  166. package/lib/esm/entities/midnight/midnight.js +865 -187
  167. package/lib/esm/entities/midnight/publication.d.ts +134 -0
  168. package/lib/esm/entities/midnight/publication.js +397 -0
  169. package/lib/esm/entities/midnight/types.d.ts +26 -5
  170. package/lib/esm/entities/requirements/assertContractCode.d.ts +49 -0
  171. package/lib/esm/entities/requirements/assertContractCode.js +74 -0
  172. package/lib/esm/entities/requirements/getBundlesTokenRequirements.d.ts +19 -4
  173. package/lib/esm/entities/requirements/getBundlesTokenRequirements.js +47 -20
  174. package/lib/esm/entities/requirements/getUnusedPermit2Nonce.d.ts +3 -2
  175. package/lib/esm/entities/requirements/getUnusedPermit2Nonce.js +5 -2
  176. package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -1
  177. package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +8 -2
  178. package/lib/esm/entities/vaultV1/vaultV1.d.ts +63 -11
  179. package/lib/esm/entities/vaultV1/vaultV1.js +53 -16
  180. package/lib/esm/entities/vaultV2/vaultV2.d.ts +62 -44
  181. package/lib/esm/entities/vaultV2/vaultV2.js +54 -49
  182. package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +3 -5
  183. package/lib/esm/entities/vaultV2BlueReallocationData.js +3 -9
  184. package/lib/esm/errors.d.ts +4 -4
  185. package/lib/esm/errors.js +4 -4
  186. package/lib/esm/fetch.d.ts +2 -2
  187. package/lib/esm/fetch.js +2 -2
  188. package/lib/esm/helpers/constant.d.ts +5 -0
  189. package/lib/esm/helpers/constant.js +5 -0
  190. package/lib/esm/helpers/index.d.ts +1 -1
  191. package/lib/esm/helpers/index.js +1 -1
  192. package/lib/esm/helpers/validate.d.ts +163 -8
  193. package/lib/esm/helpers/validate.js +177 -7
  194. package/lib/esm/helpers/validateMidnightBounds.d.ts +47 -0
  195. package/lib/esm/helpers/validateMidnightBounds.js +72 -0
  196. package/lib/esm/helpers/validateMidnightPublication.d.ts +12 -0
  197. package/lib/esm/helpers/validateMidnightPublication.js +139 -0
  198. package/lib/esm/helpers/validateMidnightReceiver.d.ts +29 -0
  199. package/lib/esm/helpers/validateMidnightReceiver.js +80 -0
  200. package/lib/esm/helpers/validateMidnightTakeFeasibility.d.ts +102 -0
  201. package/lib/esm/helpers/validateMidnightTakeFeasibility.js +226 -0
  202. package/lib/esm/index.d.ts +1 -0
  203. package/lib/esm/index.js +1 -0
  204. package/lib/esm/midnight/errors.d.ts +1 -2
  205. package/lib/esm/midnight/errors.js +1 -2
  206. package/lib/esm/types/error.d.ts +197 -4
  207. package/lib/esm/types/error.js +253 -2
  208. package/lib/esm/types/index.d.ts +1 -0
  209. package/lib/esm/types/index.js +1 -0
  210. package/lib/esm/types/midnightCancelAndMake.d.ts +70 -0
  211. package/lib/esm/types/midnightCancelAndMake.js +1 -0
  212. package/lib/esm/types/midnightPublicationError.d.ts +332 -0
  213. package/lib/esm/types/midnightPublicationError.js +359 -0
  214. package/lib/esm/types.d.ts +1 -1
  215. package/lib/esm/utils.d.ts +4 -3
  216. package/lib/esm/utils.js +4 -3
  217. package/package.json +9 -8
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DepositOwnerMismatchError = exports.DepositAssetMismatchError = exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.ApprovalAmountLessThanSpendAmountError = 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.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.NonPositiveInputError = exports.NegativeInputError = void 0;
4
- exports.ZeroBlueParkingSharesError = exports.EmptyBlueParkingMarketError = exports.MidnightOfferCallbackDataMismatchError = exports.MidnightOfferCallbackMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = exports.MidnightMarketAddressMismatchError = exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightTakeDeadlineTooFarError = exports.MidnightZeroReceiverError = exports.UnboundedMidnightTakeInputError = exports.MidnightOfferSellerReceiverMismatchError = exports.MidnightOfferContinuousFeeCapError = exports.MidnightOfferMakerMismatchError = exports.MidnightOfferReduceOnlyError = exports.MidnightOfferSideMismatchError = exports.EmptyMidnightTakeableOffersError = exports.DuplicateMidnightGroupCancellationError = 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.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 = void 0;
5
- exports.MidnightOfferNotReduceOnlyError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = exports.MutuallyExclusiveWithdrawAmountsError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.MidnightReplacementGroupCancelledError = exports.MidnightOfferRatifierMismatchError = exports.MidnightTakeableOfferMarketMismatchError = void 0;
3
+ exports.DepositAssetMismatchError = exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.ApprovalAmountLessThanSpendAmountError = 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.NonPositiveInputError = exports.NegativeInputError = void 0;
4
+ exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightTakeDeadlineTooFarError = exports.MidnightContractReceiverError = 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.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.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 = void 0;
5
+ exports.MissingContractCodeError = exports.MidnightOfferNotReduceOnlyError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = exports.MutuallyExclusiveWithdrawAmountsError = exports.MidnightInvalidAccountAddressError = exports.InvalidMidnightHexInputError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.MidnightReplacementGroupCancelledError = exports.MidnightOfferRatifierMismatchError = exports.MidnightTakeableOfferMarketMismatchError = exports.ZeroBlueParkingSharesError = exports.EmptyBlueParkingMarketError = exports.MidnightOfferCallbackDataMismatchError = exports.MidnightOfferCallbackMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = exports.MidnightMarketAddressMismatchError = void 0;
6
6
  const blue_sdk_1 = require("@morpho-org/blue-sdk");
7
+ const midnight_sdk_1 = require("@morpho-org/midnight-sdk");
8
+ const constant_js_1 = require("../helpers/constant.js");
7
9
  /**
8
10
  * Thrown when a morpho-sdk input that must be non-negative is negative.
9
11
  *
@@ -703,6 +705,29 @@ class ReferralFeePctExceededError extends InputExceedsMaxError {
703
705
  }
704
706
  }
705
707
  exports.ReferralFeePctExceededError = ReferralFeePctExceededError;
708
+ /**
709
+ * Thrown when the SDK's 10% (`WAD / 10n`) Midnight referral-fee cap is exceeded;
710
+ * the contract itself only requires `referralFeePct < WAD`.
711
+ */
712
+ class MidnightReferralFeePctExceededError extends InputExceedsMaxError {
713
+ referralFeePct;
714
+ /**
715
+ * @param referralFeePct - WAD-scaled referral fee percentage supplied by the caller.
716
+ * The SDK cap is 10% (`WAD / 10n`); the contract itself only requires
717
+ * `referralFeePct < WAD`.
718
+ */
719
+ constructor(referralFeePct) {
720
+ super({
721
+ field: "referralFeePct",
722
+ value: referralFeePct,
723
+ max: constant_js_1.MIDNIGHT_MAX_REFERRAL_FEE_PCT,
724
+ });
725
+ this.referralFeePct = referralFeePct;
726
+ this.message = `Referral fee "${referralFeePct}" exceeds the SDK's 10% Midnight referral-fee cap "${constant_js_1.MIDNIGHT_MAX_REFERRAL_FEE_PCT}". Reduce referralFeePct.`;
727
+ this.name = "MidnightReferralFeePctExceededError";
728
+ }
729
+ }
730
+ exports.MidnightReferralFeePctExceededError = MidnightReferralFeePctExceededError;
706
731
  /** Thrown when a fixed bundles call mixes ERC-20 and native funding. */
707
732
  class MixedBundlesFundingError extends Error {
708
733
  constructor() {
@@ -1395,11 +1420,114 @@ class UnboundedMidnightTakeInputError extends Error {
1395
1420
  }
1396
1421
  }
1397
1422
  exports.UnboundedMidnightTakeInputError = UnboundedMidnightTakeInputError;
1398
- /** Thrown when a Midnight taker flow uses a zero address as its receiver. */
1423
+ /**
1424
+ * Thrown when none of a Midnight take's offers can fill and the flow has no other source of units,
1425
+ * so `MidnightBundlesV2` would revert with `OutOfOffers()`, or when every offer would abort the
1426
+ * bundle before its take (`Panic(0x12)`, `PriceGreaterThanOne()` or an underflow), whatever the
1427
+ * fallback.
1428
+ */
1429
+ class MidnightTakeableOffersNotFillableError extends Error {
1430
+ /** Every supplied offer with the reason it cannot fill. */
1431
+ offers;
1432
+ /**
1433
+ * @param offers - Every supplied offer with the reason it cannot fill.
1434
+ */
1435
+ constructor(offers) {
1436
+ super(`No Midnight takeable offer can fill: ${offers
1437
+ .map(({ index, reason }) => `offer "${index}" is "${reason}"`)
1438
+ .join(", ")}. Refresh the quote and try again.`);
1439
+ this.offers = offers;
1440
+ this.name = "MidnightTakeableOffersNotFillableError";
1441
+ }
1442
+ }
1443
+ exports.MidnightTakeableOffersNotFillableError = MidnightTakeableOffersNotFillableError;
1444
+ /**
1445
+ * Thrown when a Midnight take target can never be met, so `MidnightBundlesV2` would revert
1446
+ * (`OutOfOffers()`, `SellerAssetsTooLow()`, `UnitsTooHigh()` or a loan-token transfer error).
1447
+ */
1448
+ class MidnightTakeTargetUnreachableError extends Error {
1449
+ /** Target bound that cannot be met, or `takeableOffers` when the offers lack capacity. */
1450
+ field;
1451
+ /** Supplied bound, or the fillable units for `takeableOffers`. */
1452
+ value;
1453
+ /** Bound the target needs. */
1454
+ limit;
1455
+ /**
1456
+ * @param params - Unreachable bound, supplied value and required limit.
1457
+ * @param params.field - Target bound that cannot be met, or `takeableOffers`.
1458
+ * @param params.value - Supplied bound, or the fillable units for `takeableOffers`.
1459
+ * @param params.limit - Bound the target needs.
1460
+ */
1461
+ constructor(params) {
1462
+ super({
1463
+ "target.minSellerAssets": `Midnight "target.minSellerAssets" "${params.value}" exceeds the most the seller can receive, "${params.limit}", since each unit sells for at most one asset and the referral fee is deducted. Lower minSellerAssets or raise target.units.`,
1464
+ "target.maxUnits": `Midnight "target.maxUnits" "${params.value}" is below the "${params.limit}" units needed, since each unit sells for at most one asset and the referral fee is added. Raise maxUnits or lower target.assets.`,
1465
+ "target.maxBuyerAssets": `Midnight "target.maxBuyerAssets" "${params.value}" is below the minimum cost "${params.limit}" of the target units at the cheapest fillable price, including the referral fee. Raise maxBuyerAssets or lower target.units.`,
1466
+ "repay.maxBuyerAssets": `Midnight "repay.maxBuyerAssets" "${params.value}" is below the position debt "${params.limit}", which a full repay pays at par. Raise maxBuyerAssets to cover the debt.`,
1467
+ takeableOffers: `Midnight takeable offers can fill at most "${params.value}" units, below the "${params.limit}" units the target needs. Request a larger quote or lower the target.`,
1468
+ }[params.field]);
1469
+ this.field = params.field;
1470
+ this.value = params.value;
1471
+ this.limit = params.limit;
1472
+ this.name = "MidnightTakeTargetUnreachableError";
1473
+ }
1474
+ }
1475
+ exports.MidnightTakeTargetUnreachableError = MidnightTakeTargetUnreachableError;
1476
+ /**
1477
+ * Thrown when a Midnight buy's `maxContinuousFee` is below the market's continuous fee, so
1478
+ * `MidnightBundlesV2` would revert with `ContinuousFeeAboveMax()`.
1479
+ */
1480
+ class MidnightContinuousFeeAboveMaxError extends Error {
1481
+ /** Largest continuous fee the caller accepts. */
1482
+ maxContinuousFee;
1483
+ /** Market continuous fee from the market snapshot. */
1484
+ continuousFee;
1485
+ /**
1486
+ * @param params - Caller cap and market fee.
1487
+ * @param params.maxContinuousFee - Largest continuous fee the caller accepts.
1488
+ * @param params.continuousFee - Market continuous fee from the market snapshot.
1489
+ */
1490
+ constructor(params) {
1491
+ super(`Midnight market continuous fee "${params.continuousFee}" exceeds maxContinuousFee "${params.maxContinuousFee}". Raise maxContinuousFee or refresh the market data.`);
1492
+ this.maxContinuousFee = params.maxContinuousFee;
1493
+ this.continuousFee = params.continuousFee;
1494
+ this.name = "MidnightContinuousFeeAboveMaxError";
1495
+ }
1496
+ }
1497
+ exports.MidnightContinuousFeeAboveMaxError = MidnightContinuousFeeAboveMaxError;
1498
+ /**
1499
+ * Thrown when a Midnight reduce-only repay targets more than the position's debt, so
1500
+ * `MidnightBundlesV2` would revert with `NotReduceOnly()` or `OutOfOffers()`.
1501
+ */
1502
+ class MidnightRepayExceedsDebtError extends Error {
1503
+ /** Repay input that exceeds the debt. */
1504
+ field;
1505
+ /** Supplied repay amount; for `target.assets`, net of the referral fee. */
1506
+ value;
1507
+ /** Debt from the position snapshot. */
1508
+ debt;
1509
+ /**
1510
+ * @param params - Repay input, amount and debt.
1511
+ * @param params.field - Repay input that exceeds the debt.
1512
+ * @param params.value - Supplied repay amount; for `target.assets`, net of the referral fee.
1513
+ * @param params.debt - Debt from the position snapshot.
1514
+ */
1515
+ constructor(params) {
1516
+ super(`Midnight "${params.field}" "${params.value}" exceeds the position debt "${params.debt}". Lower the repay amount or use a full repay.`);
1517
+ this.field = params.field;
1518
+ this.value = params.value;
1519
+ this.debt = params.debt;
1520
+ this.name = "MidnightRepayExceedsDebtError";
1521
+ }
1522
+ }
1523
+ exports.MidnightRepayExceedsDebtError = MidnightRepayExceedsDebtError;
1524
+ /**
1525
+ * Thrown when a Midnight flow uses a zero receiver or a zero collateral receiver with withdrawals.
1526
+ */
1399
1527
  class MidnightZeroReceiverError extends Error {
1400
1528
  field;
1401
1529
  /**
1402
- * @param field - Receiver field containing the zero address.
1530
+ * @param field - Receiver field or collateral receiver field containing the zero address.
1403
1531
  */
1404
1532
  constructor(field) {
1405
1533
  super(`Midnight "${field}" cannot be the zero address. Provide a valid recipient.`);
@@ -1408,6 +1536,38 @@ class MidnightZeroReceiverError extends Error {
1408
1536
  }
1409
1537
  }
1410
1538
  exports.MidnightZeroReceiverError = MidnightZeroReceiverError;
1539
+ /**
1540
+ * Thrown when a Midnight receiver is a Midnight protocol or market token contract that cannot
1541
+ * forward received assets.
1542
+ */
1543
+ class MidnightContractReceiverError extends Error {
1544
+ /** Receiver field supplied with the contract address. */
1545
+ field;
1546
+ /** Contract address supplied as the receiver. */
1547
+ receiver;
1548
+ /** Midnight registry key (`"midnight"`, `"midnightBundlesV2"`,
1549
+ * `"midnightBlueBuyCallbackFactory"`, `"midnightMempool"`, `"ecrecoverRatifier"`,
1550
+ * `"ecrecoverAuthorizer"`, `"setterRatifier"`, `"priceRatifierV1"`,
1551
+ * `"rateRatifierV1"`) or market token label (`"loanToken"`, `"collateralToken[i]"`)
1552
+ * identifying the matched contract. */
1553
+ contract;
1554
+ /**
1555
+ * @param params - Matched receiver field, contract address, and contract label.
1556
+ * @param params.field - Receiver field supplied with the contract address.
1557
+ * @param params.receiver - Contract address supplied as the receiver.
1558
+ * @param params.contract - Midnight registry key (for example `"midnightBundlesV2"`) or
1559
+ * market token label (`"loanToken"`, `"collateralToken[i]"`) identifying the matched
1560
+ * contract.
1561
+ */
1562
+ constructor(params) {
1563
+ super(`Midnight "${params.field}" "${params.receiver}" is the ${params.contract} contract, which cannot forward received assets. Provide an account address that can receive them.`);
1564
+ this.name = "MidnightContractReceiverError";
1565
+ this.field = params.field;
1566
+ this.receiver = params.receiver;
1567
+ this.contract = params.contract;
1568
+ }
1569
+ }
1570
+ exports.MidnightContractReceiverError = MidnightContractReceiverError;
1411
1571
  /** Thrown when a Midnight take deadline is more than one hour from the current time. */
1412
1572
  class MidnightTakeDeadlineTooFarError extends Error {
1413
1573
  /** Deadline supplied by the caller. */
@@ -1525,6 +1685,65 @@ class InsufficientMidnightWithdrawableLiquidityError extends Error {
1525
1685
  }
1526
1686
  }
1527
1687
  exports.InsufficientMidnightWithdrawableLiquidityError = InsufficientMidnightWithdrawableLiquidityError;
1688
+ /**
1689
+ * Thrown when a Midnight root, publication or cancellation group, Blue callback salt,
1690
+ * root-signature `r`/`s`, or payload is not valid bounded hex input.
1691
+ */
1692
+ class InvalidMidnightHexInputError extends Error {
1693
+ /**
1694
+ * @param params - Invalid hex field details.
1695
+ * @param params.field - Midnight input field containing the invalid value.
1696
+ * @param params.value - Supplied hex value.
1697
+ * @param params.reason - Why the supplied value is invalid.
1698
+ */
1699
+ constructor(params) {
1700
+ const { expectation, remedy } = {
1701
+ notHex: {
1702
+ expectation: "strict 0x-prefixed hex",
1703
+ remedy: "Re-encode the value as 0x-prefixed hex.",
1704
+ },
1705
+ oddLength: {
1706
+ expectation: "even-length hex",
1707
+ remedy: "Re-encode the value as 0x-prefixed hex.",
1708
+ },
1709
+ wrongSize: {
1710
+ expectation: "exactly 32 bytes",
1711
+ remedy: "Pass exactly 32 bytes of hex.",
1712
+ },
1713
+ tooLong: {
1714
+ expectation: `no more than ${midnight_sdk_1.Payload.MAX_PAYLOAD_BYTES.toLocaleString("en-US")} bytes`,
1715
+ remedy: "Split the offers across smaller trees so the encoded payload fits.",
1716
+ },
1717
+ }[params.reason];
1718
+ const raw = String(params.value);
1719
+ const value = raw.length > 80 ? `${raw.slice(0, 40)}…${raw.slice(-8)}` : raw;
1720
+ super(`Midnight "${params.field}" must be ${expectation}, got "${value}". ${remedy}`);
1721
+ this.field = params.field;
1722
+ this.value = raw;
1723
+ this.reason = params.reason;
1724
+ this.name = "InvalidMidnightHexInputError";
1725
+ }
1726
+ /** Midnight input field containing the invalid value. */
1727
+ field;
1728
+ /** Supplied hex value. */
1729
+ value;
1730
+ /** Why the supplied value is invalid. */
1731
+ reason;
1732
+ }
1733
+ exports.InvalidMidnightHexInputError = InvalidMidnightHexInputError;
1734
+ /** Thrown when a Midnight entity account is malformed or the zero address. */
1735
+ class MidnightInvalidAccountAddressError extends Error {
1736
+ value;
1737
+ /**
1738
+ * @param value - Account address supplied by the caller.
1739
+ */
1740
+ constructor(value) {
1741
+ super(`Midnight accountAddress must be a valid non-zero address, got "${value}". Provide a valid account address.`);
1742
+ this.value = value;
1743
+ this.name = "MidnightInvalidAccountAddressError";
1744
+ }
1745
+ }
1746
+ exports.MidnightInvalidAccountAddressError = MidnightInvalidAccountAddressError;
1528
1747
  /** Thrown when a loan-asset withdraw specifies both `assets` and `shares` as non-zero (modes are mutually exclusive). */
1529
1748
  class MutuallyExclusiveWithdrawAmountsError extends Error {
1530
1749
  constructor(market) {
@@ -1589,3 +1808,44 @@ class MidnightOfferNotReduceOnlyError extends Error {
1589
1808
  }
1590
1809
  }
1591
1810
  exports.MidnightOfferNotReduceOnlyError = MidnightOfferNotReduceOnlyError;
1811
+ /**
1812
+ * Thrown when a configured registry address holds no contract code.
1813
+ *
1814
+ * A call to a code-less address succeeds on-chain as a no-op, so entity
1815
+ * `getRequirements()` checks each registry target with one `eth_getCode`
1816
+ * before returning requirements. Use {@link MissingContractCodeError.address}
1817
+ * and {@link MissingContractCodeError.role} to find the misconfigured registry
1818
+ * entry.
1819
+ *
1820
+ * @example
1821
+ * ```ts
1822
+ * import { MissingContractCodeError } from "@morpho-org/morpho-sdk";
1823
+ *
1824
+ * try {
1825
+ * await deposit.getRequirements();
1826
+ * } catch (error) {
1827
+ * if (error instanceof MissingContractCodeError) {
1828
+ * console.error(error.address, error.chainId, error.role);
1829
+ * }
1830
+ * }
1831
+ * ```
1832
+ */
1833
+ class MissingContractCodeError extends Error {
1834
+ address;
1835
+ chainId;
1836
+ role;
1837
+ /**
1838
+ * @param address - Registry-configured address without deployed code.
1839
+ * @param chainId - Chain id the flow targets.
1840
+ * @param role - Registry label naming the address's role in the flow.
1841
+ */
1842
+ // biome-ignore lint/complexity/useMaxParams: mirrors the registry-address failure shape
1843
+ constructor(address, chainId, role) {
1844
+ super(`No contract code at ${role} address ${address} on chain ${chainId}. Check the address registry and that the client's RPC serves chain ${chainId}.`);
1845
+ this.address = address;
1846
+ this.chainId = chainId;
1847
+ this.role = role;
1848
+ this.name = "MissingContractCodeError";
1849
+ }
1850
+ }
1851
+ exports.MissingContractCodeError = MissingContractCodeError;
@@ -4,4 +4,5 @@ export * from "./deallocation.js";
4
4
  export * from "./entity.js";
5
5
  export * from "./error.js";
6
6
  export * from "./metadata.js";
7
+ export * from "./midnightPublicationError.js";
7
8
  export * from "./sharedLiquidity.js";
@@ -20,4 +20,5 @@ __exportStar(require("./deallocation.js"), exports);
20
20
  __exportStar(require("./entity.js"), exports);
21
21
  __exportStar(require("./error.js"), exports);
22
22
  __exportStar(require("./metadata.js"), exports);
23
+ __exportStar(require("./midnightPublicationError.js"), exports);
23
24
  __exportStar(require("./sharedLiquidity.js"), exports);
@@ -0,0 +1,70 @@
1
+ import type { MarketInput } from "@morpho-org/midnight-sdk";
2
+ import type { Address, Hex } from "viem";
3
+ import type { MidnightBlueSupply, MidnightCollateralTransfer, MidnightGroupCancellation } from "./action.js";
4
+ import type { Metadata } from "./metadata.js";
5
+ /**
6
+ * Delegated root-activation signature passed to the ratifier's `setIsRootRatifiedWithSig`.
7
+ * Omit it to activate the root directly with `setIsRootRatified`.
8
+ */
9
+ export interface MidnightRootActivationSignature {
10
+ /** Tree height committed by the signature. */
11
+ readonly height: bigint;
12
+ /** Ratifier signature nonce. */
13
+ readonly nonce: bigint;
14
+ /** Signature deadline timestamp, independent of the bundle deadline. */
15
+ readonly deadline: bigint;
16
+ readonly v: number;
17
+ readonly r: Hex;
18
+ readonly s: Hex;
19
+ }
20
+ /** Collateral supplied for the maker before root activation; every offer must target `market`. */
21
+ export interface MidnightMakeBorrowCollateral {
22
+ readonly market: MarketInput;
23
+ readonly supplies: readonly MidnightCollateralTransfer[];
24
+ }
25
+ /** Offer root activated and published by a Midnight Bundles V2 maker bundle. */
26
+ export interface MidnightOfferPublication {
27
+ /**
28
+ * The chain's registered `priceRatifierV1` or `rateRatifierV1`, which activates `root`.
29
+ * MidnightBundlesV2 authorizes it over the maker's whole Midnight account.
30
+ */
31
+ readonly ratifier: Address;
32
+ /** Offer tree root to activate. */
33
+ readonly root: Hex;
34
+ /** Distinct offer groups contained in `root`. */
35
+ readonly groups: readonly Hex[];
36
+ /** Encoded offer payload for `root`, published to the Midnight log. */
37
+ readonly payload: Hex;
38
+ /**
39
+ * Optional builder-only delegated root-activation signature. Maker entity methods never set it;
40
+ * they encode zero signature fields and rely on MidnightBundlesV2 authorization.
41
+ */
42
+ readonly rootSignature?: MidnightRootActivationSignature;
43
+ /** Optional loan assets parked on Morpho Blue for the maker; share-price slippage is not checked. */
44
+ readonly blueSupply?: MidnightBlueSupply;
45
+ /** Optional collateral supplied to `market` for the maker before activation. */
46
+ readonly collateral?: MidnightMakeBorrowCollateral;
47
+ }
48
+ /**
49
+ * Parameters for encoding a Midnight Bundles V2 maker bundle: an offer publication or repost, or,
50
+ * without a publication, a cancellation of offer groups only.
51
+ */
52
+ export interface MidnightCancelAndMakeParams {
53
+ /** Chain id used to resolve `MidnightBundlesV2`. */
54
+ readonly chainId: number;
55
+ /** Offer groups to cancel, each with its largest accepted consumption. Empty for a new publication. */
56
+ readonly cancellations: readonly MidnightGroupCancellation[];
57
+ /** Bundle execution deadline timestamp. Pass `maxUint256` explicitly for no expiry. */
58
+ readonly deadline: bigint;
59
+ /**
60
+ * Optional native ETH sent as `value`; the bundle wraps it into the chain's wNative and transfers
61
+ * it to `msg.sender` before pulling. It may cover part or all of the maximum wNative amount this
62
+ * call can pull, but not more. Any wrapped native not pulled stays in the sender's wallet as
63
+ * wNative. The wNative approval to `MidnightBundlesV2` is still required for the full pulled amount.
64
+ */
65
+ readonly nativeAmount?: bigint;
66
+ /** Optional analytics metadata appended to calldata. */
67
+ readonly metadata?: Metadata;
68
+ /** Offers to publish after the cancellations. Omit to cancel offer groups only. */
69
+ readonly publication?: MidnightOfferPublication;
70
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });