@morpho-org/morpho-sdk 5.1.2 → 5.3.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 (270) hide show
  1. package/README.md +46 -2
  2. package/lib/cjs/abis.d.ts +1 -0
  3. package/lib/cjs/abis.js +6 -1
  4. package/lib/cjs/actions/blue/borrow.d.ts +3 -7
  5. package/lib/cjs/actions/blue/borrow.js +5 -9
  6. package/lib/cjs/actions/blue/buildReallocationActions.d.ts +3 -4
  7. package/lib/cjs/actions/blue/buildReallocationActions.js +3 -4
  8. package/lib/cjs/actions/blue/refinance.d.ts +4 -8
  9. package/lib/cjs/actions/blue/refinance.js +10 -14
  10. package/lib/cjs/actions/blue/repay.d.ts +2 -5
  11. package/lib/cjs/actions/blue/repay.js +2 -5
  12. package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +3 -6
  13. package/lib/cjs/actions/blue/repayWithdrawCollateral.js +4 -7
  14. package/lib/cjs/actions/blue/resolveRepayFunding.d.ts +2 -5
  15. package/lib/cjs/actions/blue/resolveRepayFunding.js +15 -12
  16. package/lib/cjs/actions/blue/supply.d.ts +2 -4
  17. package/lib/cjs/actions/blue/supply.js +6 -8
  18. package/lib/cjs/actions/blue/supplyCollateral.d.ts +2 -3
  19. package/lib/cjs/actions/blue/supplyCollateral.js +5 -6
  20. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +4 -9
  21. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +9 -14
  22. package/lib/cjs/actions/blue/withdraw.d.ts +9 -7
  23. package/lib/cjs/actions/blue/withdraw.js +18 -10
  24. package/lib/cjs/actions/blue/withdrawCollateral.d.ts +1 -1
  25. package/lib/cjs/actions/blue/withdrawCollateral.js +2 -2
  26. package/lib/cjs/actions/index.d.ts +2 -0
  27. package/lib/cjs/actions/index.js +1 -0
  28. package/lib/cjs/actions/midnight/authorization.d.ts +37 -0
  29. package/lib/cjs/actions/midnight/authorization.js +69 -0
  30. package/lib/cjs/actions/midnight/cancelOffer.d.ts +38 -0
  31. package/lib/cjs/actions/midnight/cancelOffer.js +73 -0
  32. package/lib/cjs/actions/midnight/index.d.ts +11 -0
  33. package/lib/cjs/actions/midnight/index.js +27 -0
  34. package/lib/cjs/actions/midnight/mempoolSubmitOffers.d.ts +52 -0
  35. package/lib/cjs/actions/midnight/mempoolSubmitOffers.js +72 -0
  36. package/lib/cjs/actions/midnight/redeem.d.ts +43 -0
  37. package/lib/cjs/actions/midnight/redeem.js +79 -0
  38. package/lib/cjs/actions/midnight/repayWithdrawCollateral.d.ts +53 -0
  39. package/lib/cjs/actions/midnight/repayWithdrawCollateral.js +121 -0
  40. package/lib/cjs/actions/midnight/setterRatifierRatifyRoot.d.ts +40 -0
  41. package/lib/cjs/actions/midnight/setterRatifierRatifyRoot.js +59 -0
  42. package/lib/cjs/actions/midnight/supplyCollateral.d.ts +45 -0
  43. package/lib/cjs/actions/midnight/supplyCollateral.js +83 -0
  44. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.d.ts +51 -0
  45. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +128 -0
  46. package/lib/cjs/actions/midnight/takeBorrow.d.ts +57 -0
  47. package/lib/cjs/actions/midnight/takeBorrow.js +110 -0
  48. package/lib/cjs/actions/midnight/takeLend.d.ts +57 -0
  49. package/lib/cjs/actions/midnight/takeLend.js +110 -0
  50. package/lib/cjs/actions/midnight/types.d.ts +39 -0
  51. package/lib/cjs/actions/midnight/types.js +15 -0
  52. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +1 -1
  53. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +5 -16
  54. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +5 -4
  55. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +10 -14
  56. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +2 -2
  57. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +11 -28
  58. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +1 -1
  59. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +5 -17
  60. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
  61. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +10 -4
  62. package/lib/cjs/actions/requirements/getRequirementsApproval.js +10 -4
  63. package/lib/cjs/actions/requirements/index.d.ts +1 -0
  64. package/lib/cjs/actions/requirements/index.js +1 -0
  65. package/lib/cjs/actions/requirements/midnight/getMidnightApprovalRequirements.d.ts +49 -0
  66. package/lib/cjs/actions/requirements/midnight/getMidnightApprovalRequirements.js +76 -0
  67. package/lib/cjs/actions/requirements/midnight/getMidnightAuthorizationRequirement.d.ts +44 -0
  68. package/lib/cjs/actions/requirements/midnight/getMidnightAuthorizationRequirement.js +78 -0
  69. package/lib/cjs/actions/requirements/midnight/getSetterRatifierRatifyRootRequirement.d.ts +42 -0
  70. package/lib/cjs/actions/requirements/midnight/getSetterRatifierRatifyRootRequirement.js +70 -0
  71. package/lib/cjs/actions/requirements/midnight/index.d.ts +3 -0
  72. package/lib/cjs/actions/requirements/midnight/index.js +19 -0
  73. package/lib/cjs/actions/vaultV1/deposit.d.ts +3 -4
  74. package/lib/cjs/actions/vaultV1/deposit.js +7 -8
  75. package/lib/cjs/actions/vaultV1/migrateToV2.d.ts +2 -3
  76. package/lib/cjs/actions/vaultV1/migrateToV2.js +5 -6
  77. package/lib/cjs/actions/vaultV1/redeem.d.ts +1 -1
  78. package/lib/cjs/actions/vaultV1/redeem.js +2 -2
  79. package/lib/cjs/actions/vaultV1/withdraw.d.ts +1 -1
  80. package/lib/cjs/actions/vaultV1/withdraw.js +2 -2
  81. package/lib/cjs/actions/vaultV2/deposit.d.ts +3 -4
  82. package/lib/cjs/actions/vaultV2/deposit.js +7 -8
  83. package/lib/cjs/actions/vaultV2/forceRedeem.d.ts +2 -3
  84. package/lib/cjs/actions/vaultV2/forceRedeem.js +3 -4
  85. package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +1 -1
  86. package/lib/cjs/actions/vaultV2/forceWithdraw.js +2 -2
  87. package/lib/cjs/actions/vaultV2/redeem.d.ts +1 -1
  88. package/lib/cjs/actions/vaultV2/redeem.js +2 -2
  89. package/lib/cjs/actions/vaultV2/withdraw.d.ts +1 -1
  90. package/lib/cjs/actions/vaultV2/withdraw.js +2 -2
  91. package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
  92. package/lib/cjs/client/morphoViemExtension.js +5 -2
  93. package/lib/cjs/constants.d.ts +1 -0
  94. package/lib/cjs/constants.js +15 -1
  95. package/lib/cjs/entities/blue/blue.d.ts +5 -5
  96. package/lib/cjs/entities/blue/blue.js +105 -86
  97. package/lib/cjs/entities/index.d.ts +1 -0
  98. package/lib/cjs/entities/index.js +15 -0
  99. package/lib/cjs/entities/midnight/index.d.ts +2 -0
  100. package/lib/cjs/entities/midnight/index.js +18 -0
  101. package/lib/cjs/entities/midnight/midnight.d.ts +402 -0
  102. package/lib/cjs/entities/midnight/midnight.js +1036 -0
  103. package/lib/cjs/entities/midnight/types.d.ts +164 -0
  104. package/lib/cjs/entities/midnight/types.js +2 -0
  105. package/lib/cjs/entities/vaultV1/vaultV1.js +10 -17
  106. package/lib/cjs/entities/vaultV2/vaultV2.js +19 -21
  107. package/lib/cjs/errors.d.ts +1 -0
  108. package/lib/cjs/errors.js +17 -1
  109. package/lib/cjs/helpers/encodeDeallocation.d.ts +1 -0
  110. package/lib/cjs/helpers/encodeDeallocation.js +2 -1
  111. package/lib/cjs/helpers/index.d.ts +4 -1
  112. package/lib/cjs/helpers/index.js +8 -1
  113. package/lib/cjs/helpers/signAndVerifyTypedData.d.ts +34 -0
  114. package/lib/cjs/helpers/signAndVerifyTypedData.js +58 -0
  115. package/lib/cjs/helpers/validate.d.ts +40 -1
  116. package/lib/cjs/helpers/validate.js +47 -5
  117. package/lib/cjs/helpers/validateMidnightAuthorizationTarget.d.ts +15 -0
  118. package/lib/cjs/helpers/validateMidnightAuthorizationTarget.js +32 -0
  119. package/lib/cjs/helpers/validateMidnightMarket.d.ts +10 -0
  120. package/lib/cjs/helpers/validateMidnightMarket.js +24 -0
  121. package/lib/cjs/helpers/validateOfferSides.d.ts +21 -0
  122. package/lib/cjs/helpers/validateOfferSides.js +36 -0
  123. package/lib/cjs/helpers/validateRequirementSpender.d.ts +29 -0
  124. package/lib/cjs/helpers/validateRequirementSpender.js +49 -0
  125. package/lib/cjs/helpers/validateTakeableOffers.d.ts +18 -0
  126. package/lib/cjs/helpers/validateTakeableOffers.js +35 -0
  127. package/lib/cjs/midnight-api.d.ts +1 -0
  128. package/lib/cjs/midnight-api.js +17 -0
  129. package/lib/cjs/types/action.d.ts +189 -23
  130. package/lib/cjs/types/action.js +27 -7
  131. package/lib/cjs/types/client.d.ts +3 -2
  132. package/lib/cjs/types/error.d.ts +288 -114
  133. package/lib/cjs/types/error.js +259 -175
  134. package/lib/cjs/utils.d.ts +1 -0
  135. package/lib/cjs/utils.js +12 -2
  136. package/lib/esm/abis.d.ts +1 -0
  137. package/lib/esm/abis.js +1 -0
  138. package/lib/esm/actions/blue/borrow.d.ts +3 -7
  139. package/lib/esm/actions/blue/borrow.js +6 -10
  140. package/lib/esm/actions/blue/buildReallocationActions.d.ts +3 -4
  141. package/lib/esm/actions/blue/buildReallocationActions.js +3 -4
  142. package/lib/esm/actions/blue/refinance.d.ts +4 -8
  143. package/lib/esm/actions/blue/refinance.js +11 -15
  144. package/lib/esm/actions/blue/repay.d.ts +2 -5
  145. package/lib/esm/actions/blue/repay.js +2 -5
  146. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +3 -6
  147. package/lib/esm/actions/blue/repayWithdrawCollateral.js +5 -8
  148. package/lib/esm/actions/blue/resolveRepayFunding.d.ts +2 -5
  149. package/lib/esm/actions/blue/resolveRepayFunding.js +16 -13
  150. package/lib/esm/actions/blue/supply.d.ts +2 -4
  151. package/lib/esm/actions/blue/supply.js +7 -9
  152. package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -3
  153. package/lib/esm/actions/blue/supplyCollateral.js +6 -7
  154. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +4 -9
  155. package/lib/esm/actions/blue/supplyCollateralBorrow.js +10 -15
  156. package/lib/esm/actions/blue/withdraw.d.ts +9 -7
  157. package/lib/esm/actions/blue/withdraw.js +19 -11
  158. package/lib/esm/actions/blue/withdrawCollateral.d.ts +1 -1
  159. package/lib/esm/actions/blue/withdrawCollateral.js +3 -3
  160. package/lib/esm/actions/index.d.ts +2 -0
  161. package/lib/esm/actions/index.js +1 -0
  162. package/lib/esm/actions/midnight/authorization.d.ts +37 -0
  163. package/lib/esm/actions/midnight/authorization.js +65 -0
  164. package/lib/esm/actions/midnight/cancelOffer.d.ts +38 -0
  165. package/lib/esm/actions/midnight/cancelOffer.js +69 -0
  166. package/lib/esm/actions/midnight/index.d.ts +11 -0
  167. package/lib/esm/actions/midnight/index.js +11 -0
  168. package/lib/esm/actions/midnight/mempoolSubmitOffers.d.ts +52 -0
  169. package/lib/esm/actions/midnight/mempoolSubmitOffers.js +68 -0
  170. package/lib/esm/actions/midnight/redeem.d.ts +43 -0
  171. package/lib/esm/actions/midnight/redeem.js +75 -0
  172. package/lib/esm/actions/midnight/repayWithdrawCollateral.d.ts +53 -0
  173. package/lib/esm/actions/midnight/repayWithdrawCollateral.js +117 -0
  174. package/lib/esm/actions/midnight/setterRatifierRatifyRoot.d.ts +40 -0
  175. package/lib/esm/actions/midnight/setterRatifierRatifyRoot.js +55 -0
  176. package/lib/esm/actions/midnight/supplyCollateral.d.ts +45 -0
  177. package/lib/esm/actions/midnight/supplyCollateral.js +79 -0
  178. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.d.ts +51 -0
  179. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +124 -0
  180. package/lib/esm/actions/midnight/takeBorrow.d.ts +57 -0
  181. package/lib/esm/actions/midnight/takeBorrow.js +106 -0
  182. package/lib/esm/actions/midnight/takeLend.d.ts +57 -0
  183. package/lib/esm/actions/midnight/takeLend.js +106 -0
  184. package/lib/esm/actions/midnight/types.d.ts +39 -0
  185. package/lib/esm/actions/midnight/types.js +12 -0
  186. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +1 -1
  187. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +6 -17
  188. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +5 -4
  189. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +12 -16
  190. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +2 -2
  191. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +12 -29
  192. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +1 -1
  193. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +5 -17
  194. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
  195. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +10 -4
  196. package/lib/esm/actions/requirements/getRequirementsApproval.js +10 -4
  197. package/lib/esm/actions/requirements/index.d.ts +1 -0
  198. package/lib/esm/actions/requirements/index.js +1 -0
  199. package/lib/esm/actions/requirements/midnight/getMidnightApprovalRequirements.d.ts +49 -0
  200. package/lib/esm/actions/requirements/midnight/getMidnightApprovalRequirements.js +72 -0
  201. package/lib/esm/actions/requirements/midnight/getMidnightAuthorizationRequirement.d.ts +44 -0
  202. package/lib/esm/actions/requirements/midnight/getMidnightAuthorizationRequirement.js +74 -0
  203. package/lib/esm/actions/requirements/midnight/getSetterRatifierRatifyRootRequirement.d.ts +42 -0
  204. package/lib/esm/actions/requirements/midnight/getSetterRatifierRatifyRootRequirement.js +66 -0
  205. package/lib/esm/actions/requirements/midnight/index.d.ts +3 -0
  206. package/lib/esm/actions/requirements/midnight/index.js +3 -0
  207. package/lib/esm/actions/vaultV1/deposit.d.ts +3 -4
  208. package/lib/esm/actions/vaultV1/deposit.js +8 -9
  209. package/lib/esm/actions/vaultV1/migrateToV2.d.ts +2 -3
  210. package/lib/esm/actions/vaultV1/migrateToV2.js +6 -7
  211. package/lib/esm/actions/vaultV1/redeem.d.ts +1 -1
  212. package/lib/esm/actions/vaultV1/redeem.js +3 -3
  213. package/lib/esm/actions/vaultV1/withdraw.d.ts +1 -1
  214. package/lib/esm/actions/vaultV1/withdraw.js +3 -3
  215. package/lib/esm/actions/vaultV2/deposit.d.ts +3 -4
  216. package/lib/esm/actions/vaultV2/deposit.js +8 -9
  217. package/lib/esm/actions/vaultV2/forceRedeem.d.ts +2 -3
  218. package/lib/esm/actions/vaultV2/forceRedeem.js +4 -5
  219. package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +1 -1
  220. package/lib/esm/actions/vaultV2/forceWithdraw.js +3 -3
  221. package/lib/esm/actions/vaultV2/redeem.d.ts +1 -1
  222. package/lib/esm/actions/vaultV2/redeem.js +3 -3
  223. package/lib/esm/actions/vaultV2/withdraw.d.ts +1 -1
  224. package/lib/esm/actions/vaultV2/withdraw.js +3 -3
  225. package/lib/esm/client/morphoViemExtension.d.ts +1 -1
  226. package/lib/esm/client/morphoViemExtension.js +6 -3
  227. package/lib/esm/constants.d.ts +1 -0
  228. package/lib/esm/constants.js +1 -0
  229. package/lib/esm/entities/blue/blue.d.ts +5 -5
  230. package/lib/esm/entities/blue/blue.js +107 -88
  231. package/lib/esm/entities/index.d.ts +1 -0
  232. package/lib/esm/entities/index.js +1 -0
  233. package/lib/esm/entities/midnight/index.d.ts +2 -0
  234. package/lib/esm/entities/midnight/index.js +2 -0
  235. package/lib/esm/entities/midnight/midnight.d.ts +402 -0
  236. package/lib/esm/entities/midnight/midnight.js +1032 -0
  237. package/lib/esm/entities/midnight/types.d.ts +164 -0
  238. package/lib/esm/entities/midnight/types.js +1 -0
  239. package/lib/esm/entities/vaultV1/vaultV1.js +13 -20
  240. package/lib/esm/entities/vaultV2/vaultV2.js +9 -11
  241. package/lib/esm/errors.d.ts +1 -0
  242. package/lib/esm/errors.js +1 -0
  243. package/lib/esm/helpers/encodeDeallocation.d.ts +1 -0
  244. package/lib/esm/helpers/encodeDeallocation.js +3 -2
  245. package/lib/esm/helpers/index.d.ts +4 -1
  246. package/lib/esm/helpers/index.js +4 -1
  247. package/lib/esm/helpers/signAndVerifyTypedData.d.ts +34 -0
  248. package/lib/esm/helpers/signAndVerifyTypedData.js +54 -0
  249. package/lib/esm/helpers/validate.d.ts +40 -1
  250. package/lib/esm/helpers/validate.js +46 -5
  251. package/lib/esm/helpers/validateMidnightAuthorizationTarget.d.ts +15 -0
  252. package/lib/esm/helpers/validateMidnightAuthorizationTarget.js +28 -0
  253. package/lib/esm/helpers/validateMidnightMarket.d.ts +10 -0
  254. package/lib/esm/helpers/validateMidnightMarket.js +20 -0
  255. package/lib/esm/helpers/validateOfferSides.d.ts +21 -0
  256. package/lib/esm/helpers/validateOfferSides.js +32 -0
  257. package/lib/esm/helpers/validateRequirementSpender.d.ts +29 -0
  258. package/lib/esm/helpers/validateRequirementSpender.js +45 -0
  259. package/lib/esm/helpers/validateTakeableOffers.d.ts +18 -0
  260. package/lib/esm/helpers/validateTakeableOffers.js +31 -0
  261. package/lib/esm/midnight-api.d.ts +1 -0
  262. package/lib/esm/midnight-api.js +1 -0
  263. package/lib/esm/types/action.d.ts +189 -23
  264. package/lib/esm/types/action.js +26 -7
  265. package/lib/esm/types/client.d.ts +3 -2
  266. package/lib/esm/types/error.d.ts +288 -114
  267. package/lib/esm/types/error.js +232 -149
  268. package/lib/esm/utils.d.ts +1 -0
  269. package/lib/esm/utils.js +1 -0
  270. package/package.json +13 -4
@@ -1,5 +1,137 @@
1
1
  import { type MarketId, UnknownDataError } from "@morpho-org/blue-sdk";
2
2
  import type { Address } from "viem";
3
+ /**
4
+ * Thrown when a morpho-sdk input that must be non-negative is negative.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { NegativeInputError } from "@morpho-org/morpho-sdk";
9
+ *
10
+ * const error = new NegativeInputError("amount", -1n);
11
+ * if (error instanceof NegativeInputError) {
12
+ * console.error(error.field, error.value);
13
+ * }
14
+ * ```
15
+ */
16
+ export declare class NegativeInputError extends Error {
17
+ readonly field: string;
18
+ readonly value: bigint;
19
+ /**
20
+ * @param field - Public input field whose value is invalid.
21
+ * @param value - Negative bigint supplied for the field.
22
+ */
23
+ constructor(field: string, value: bigint);
24
+ }
25
+ /**
26
+ * Thrown when a morpho-sdk input that must be positive is zero or negative.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * import { NonPositiveInputError } from "@morpho-org/morpho-sdk";
31
+ *
32
+ * const error = new NonPositiveInputError("shares", 0n);
33
+ * if (error instanceof NonPositiveInputError) {
34
+ * console.error(error.field, error.value);
35
+ * }
36
+ * ```
37
+ */
38
+ export declare class NonPositiveInputError extends Error {
39
+ readonly field: string;
40
+ readonly value: bigint;
41
+ /**
42
+ * @param field - Public input field whose value is invalid.
43
+ * @param value - Zero or negative bigint supplied for the field.
44
+ */
45
+ constructor(field: string, value: bigint);
46
+ }
47
+ /** @deprecated Use {@link NonPositiveInputError}. */
48
+ export declare const NonPositiveAssetAmountError: typeof NonPositiveInputError;
49
+ /** @deprecated Use {@link NonPositiveInputError}. */
50
+ export type NonPositiveAssetAmountError = NonPositiveInputError;
51
+ /** @deprecated Use {@link NonPositiveInputError}. */
52
+ export declare const NonPositiveSharesAmountError: typeof NonPositiveInputError;
53
+ /** @deprecated Use {@link NonPositiveInputError}. */
54
+ export type NonPositiveSharesAmountError = NonPositiveInputError;
55
+ /** @deprecated Use {@link NonPositiveInputError}. */
56
+ export declare const NonPositiveMaxSharePriceError: typeof NonPositiveInputError;
57
+ /** @deprecated Use {@link NonPositiveInputError}. */
58
+ export type NonPositiveMaxSharePriceError = NonPositiveInputError;
59
+ /** @deprecated Use {@link NonPositiveInputError}. */
60
+ export declare const ZeroDepositAmountError: typeof NonPositiveInputError;
61
+ /** @deprecated Use {@link NonPositiveInputError}. */
62
+ export type ZeroDepositAmountError = NonPositiveInputError;
63
+ /** @deprecated Use {@link NonPositiveInputError}. */
64
+ export declare const NonPositiveBorrowAmountError: typeof NonPositiveInputError;
65
+ /** @deprecated Use {@link NonPositiveInputError}. */
66
+ export type NonPositiveBorrowAmountError = NonPositiveInputError;
67
+ /** @deprecated Use {@link NonPositiveInputError}. */
68
+ export declare const ZeroCollateralAmountError: typeof NonPositiveInputError;
69
+ /** @deprecated Use {@link NonPositiveInputError}. */
70
+ export type ZeroCollateralAmountError = NonPositiveInputError;
71
+ /** @deprecated Use {@link NonPositiveInputError}. */
72
+ export declare const NonPositiveReallocationAmountError: typeof NonPositiveInputError;
73
+ /** @deprecated Use {@link NonPositiveInputError}. */
74
+ export type NonPositiveReallocationAmountError = NonPositiveInputError;
75
+ /** @deprecated Use {@link NonPositiveInputError}. */
76
+ export declare const NonPositiveRepayAmountError: typeof NonPositiveInputError;
77
+ /** @deprecated Use {@link NonPositiveInputError}. */
78
+ export type NonPositiveRepayAmountError = NonPositiveInputError;
79
+ /** @deprecated Use {@link NonPositiveInputError}. */
80
+ export declare const NonPositiveRepayMaxSharePriceError: typeof NonPositiveInputError;
81
+ /** @deprecated Use {@link NonPositiveInputError}. */
82
+ export type NonPositiveRepayMaxSharePriceError = NonPositiveInputError;
83
+ /** @deprecated Use {@link NonPositiveInputError}. */
84
+ export declare const NonPositiveWithdrawCollateralAmountError: typeof NonPositiveInputError;
85
+ /** @deprecated Use {@link NonPositiveInputError}. */
86
+ export type NonPositiveWithdrawCollateralAmountError = NonPositiveInputError;
87
+ /** @deprecated Use {@link NonPositiveInputError}. */
88
+ export declare const ZeroSupplyAmountError: typeof NonPositiveInputError;
89
+ /** @deprecated Use {@link NonPositiveInputError}. */
90
+ export type ZeroSupplyAmountError = NonPositiveInputError;
91
+ /** @deprecated Use {@link NonPositiveInputError}. */
92
+ export declare const NonPositiveWithdrawAmountError: typeof NonPositiveInputError;
93
+ /** @deprecated Use {@link NonPositiveInputError}. */
94
+ export type NonPositiveWithdrawAmountError = NonPositiveInputError;
95
+ /** @deprecated Use {@link NegativeInputError}. */
96
+ export declare const NegativeSlippageToleranceError: typeof NegativeInputError;
97
+ /** @deprecated Use {@link NegativeInputError}. */
98
+ export type NegativeSlippageToleranceError = NegativeInputError;
99
+ /** @deprecated Use {@link NegativeInputError}. */
100
+ export declare const NegativeNativeAmountError: typeof NegativeInputError;
101
+ /** @deprecated Use {@link NegativeInputError}. */
102
+ export type NegativeNativeAmountError = NegativeInputError;
103
+ /** @deprecated Use {@link NegativeInputError}. */
104
+ export declare const NegativeReallocationFeeError: typeof NegativeInputError;
105
+ /** @deprecated Use {@link NegativeInputError}. */
106
+ export type NegativeReallocationFeeError = NegativeInputError;
107
+ /** @deprecated Use {@link NegativeInputError}. */
108
+ export declare const NonPositiveMinBorrowSharePriceError: typeof NegativeInputError;
109
+ /** @deprecated Use {@link NegativeInputError}. */
110
+ export type NonPositiveMinBorrowSharePriceError = NegativeInputError;
111
+ /** @deprecated Use {@link NegativeInputError}. */
112
+ export declare const NegativeSupplyAmountError: typeof NegativeInputError;
113
+ /** @deprecated Use {@link NegativeInputError}. */
114
+ export type NegativeSupplyAmountError = NegativeInputError;
115
+ /** @deprecated Use {@link NegativeInputError}. */
116
+ export declare const NegativeSupplyMaxSharePriceError: typeof NegativeInputError;
117
+ /** @deprecated Use {@link NegativeInputError}. */
118
+ export type NegativeSupplyMaxSharePriceError = NegativeInputError;
119
+ /** @deprecated Use {@link NegativeInputError}. */
120
+ export declare const NegativeWithdrawMinSharePriceError: typeof NegativeInputError;
121
+ /** @deprecated Use {@link NegativeInputError}. */
122
+ export type NegativeWithdrawMinSharePriceError = NegativeInputError;
123
+ /** @deprecated Use {@link NegativeInputError}. */
124
+ export declare const NegativeMinSharePriceError: typeof NegativeInputError;
125
+ /** @deprecated Use {@link NegativeInputError}. */
126
+ export type NegativeMinSharePriceError = NegativeInputError;
127
+ /** @deprecated Use {@link NegativeInputError}. */
128
+ export declare const NegativeBorrowSharesError: typeof NegativeInputError;
129
+ /** @deprecated Use {@link NegativeInputError}. */
130
+ export type NegativeBorrowSharesError = NegativeInputError;
131
+ /** @deprecated Use {@link NegativeInputError}. */
132
+ export declare const NegativeMaxRepaySharePriceError: typeof NegativeInputError;
133
+ /** @deprecated Use {@link NegativeInputError}. */
134
+ export type NegativeMaxRepaySharePriceError = NegativeInputError;
3
135
  /**
4
136
  * Typed errors thrown while encoding supported Bundler3 actions.
5
137
  *
@@ -63,32 +195,33 @@ export declare namespace BundlerErrors {
63
195
  constructor(authorized: Address);
64
196
  }
65
197
  }
198
+ /** Requirement signature kind accepted by action-output transaction builders. */
199
+ export type RequirementSignatureKind = "permit" | "authorization" | "midnightOfferRootSignature";
66
200
  /**
67
201
  * Thrown when `buildTx` receives more than one requirement signature of the same kind.
68
202
  *
69
- * A bundled path consumes at most one permit and one authorization signature; passing several of
70
- * the same kind is ambiguous and would silently drop all but the first, so it is rejected instead.
203
+ * A bundled path consumes at most one signature per accepted kind; passing several of the same
204
+ * kind is ambiguous and would silently drop all but the first, so it is rejected instead.
71
205
  *
72
206
  * @example
73
207
  * ```ts
74
208
  * import { AmbiguousRequirementSignaturesError } from "@morpho-org/morpho-sdk";
75
209
  *
76
210
  * if (error instanceof AmbiguousRequirementSignaturesError) {
77
- * // Pass a single permit (and at most one authorization) signature to buildTx.
211
+ * // Pass a single signature per accepted kind to buildTx.
78
212
  * }
79
213
  * ```
80
214
  */
81
215
  export declare class AmbiguousRequirementSignaturesError extends Error {
82
216
  /**
83
- * @param kind - The over-supplied signature kind (`"permit"` or `"authorization"`).
217
+ * @param kind - The over-supplied signature kind.
84
218
  * @param count - How many signatures of that kind were received.
85
219
  */
86
- constructor(kind: "permit" | "authorization", count: number);
220
+ constructor(kind: RequirementSignatureKind, count: number);
87
221
  }
88
222
  /**
89
- * Thrown when `buildTx` receives a requirement signature of a kind the operation does not consume
90
- * (for example an authorization signature on a plain supply path). Surfacing it prevents a signed
91
- * authorization or permit from being silently ignored.
223
+ * Thrown when `buildTx` receives a requirement signature of a kind the operation does not consume.
224
+ * Surfacing it prevents a signed requirement from being silently ignored.
92
225
  *
93
226
  * @example
94
227
  * ```ts
@@ -101,21 +234,9 @@ export declare class AmbiguousRequirementSignaturesError extends Error {
101
234
  */
102
235
  export declare class UnexpectedRequirementSignatureError extends Error {
103
236
  /**
104
- * @param kind - The unexpected signature kind (`"permit"` or `"authorization"`).
237
+ * @param kind - The unexpected signature kind.
105
238
  */
106
- constructor(kind: "permit" | "authorization");
107
- }
108
- /** Thrown when an asset amount is required to be positive but is zero or negative. */
109
- export declare class NonPositiveAssetAmountError extends Error {
110
- constructor(origin: Address);
111
- }
112
- /** Thrown when a shares amount is required to be positive but is zero or negative. */
113
- export declare class NonPositiveSharesAmountError extends Error {
114
- constructor(vault: Address);
115
- }
116
- /** Thrown when a vault deposit's `maxSharePrice` slippage bound is zero or negative. */
117
- export declare class NonPositiveMaxSharePriceError extends Error {
118
- constructor(vault: Address);
239
+ constructor(kind: RequirementSignatureKind);
119
240
  }
120
241
  /** Thrown when a viem client's account address does not match the address required by the call. */
121
242
  export declare class AddressMismatchError extends Error {
@@ -125,6 +246,10 @@ export declare class AddressMismatchError extends Error {
125
246
  export declare class ChainIdMismatchError extends Error {
126
247
  constructor(clientChainId: number | undefined, argsChainId: number);
127
248
  }
249
+ /** Thrown when a runtime crypto API is required but unavailable. */
250
+ export declare class CryptoUnavailableError extends Error {
251
+ constructor(feature: string);
252
+ }
128
253
  /** Thrown when the viem client is missing a property the call requires (e.g. `account.address`). */
129
254
  export declare class MissingClientPropertyError extends Error {
130
255
  constructor(property: string);
@@ -145,13 +270,17 @@ export declare class UnsupportedErc20ApprovalSpenderError extends Error {
145
270
  readonly supportedSpenders?: readonly (Address | undefined)[];
146
271
  });
147
272
  }
148
- /** Thrown when a slippage tolerance is negative. */
149
- export declare class NegativeSlippageToleranceError extends Error {
150
- constructor(slippageTolerance: bigint);
273
+ /** Thrown when a Midnight authorization requirement targets an unsupported operator. */
274
+ export declare class UnsupportedMidnightAuthorizationTargetError extends Error {
275
+ constructor(params: {
276
+ readonly authorized: Address;
277
+ readonly chainId: number;
278
+ readonly supportedTargets: readonly Address[];
279
+ });
151
280
  }
152
- /** Thrown when a Morpho accrual position is missing for a market the call needs to read. */
281
+ /** Thrown when a Morpho accrual position required by a call is missing. */
153
282
  export declare class MissingAccrualPositionError extends Error {
154
- constructor(market: string);
283
+ constructor(market?: string);
155
284
  }
156
285
  /** Thrown when a slippage tolerance exceeds `MAX_SLIPPAGE_TOLERANCE` (10%). */
157
286
  export declare class ExcessiveSlippageToleranceError extends Error {
@@ -169,6 +298,14 @@ export declare class DepositAmountMismatchError extends Error {
169
298
  export declare class DepositAssetMismatchError extends Error {
170
299
  constructor(depositAsset: Address, signatureAsset: Address);
171
300
  }
301
+ /** Thrown when a deposit's owner differs from the owner the supplied permit / permit2 signature was issued for. */
302
+ export declare class DepositOwnerMismatchError extends Error {
303
+ constructor(depositOwner: Address, signatureOwner: Address);
304
+ }
305
+ /** Thrown when a deposit's spender differs from the spender the supplied permit / permit2 signature was issued for. */
306
+ export declare class DepositSpenderMismatchError extends Error {
307
+ constructor(depositSpender: Address, signatureSpender: Address);
308
+ }
172
309
  /** Thrown when a `permit2` requirement signature is missing the `expiration` field. */
173
310
  export declare class Permit2ExpirationMissingError extends Error {
174
311
  constructor();
@@ -181,26 +318,10 @@ export declare class NativeAmountOnNonWNativeVaultError extends Error {
181
318
  export declare class ChainWNativeMissingError extends Error {
182
319
  constructor(chainId: number);
183
320
  }
184
- /** Thrown when `nativeAmount` is negative. */
185
- export declare class NegativeNativeAmountError extends Error {
186
- constructor(nativeAmount: bigint);
187
- }
188
- /** Thrown when both `amount` and `nativeAmount` resolve to zero on a vault deposit. */
189
- export declare class ZeroDepositAmountError extends Error {
190
- constructor(vault: Address);
191
- }
192
321
  /** Thrown when a vault entity's address does not match the vault address embedded in the call's args. */
193
322
  export declare class VaultAddressMismatchError extends Error {
194
323
  constructor(vaultAddress: Address, argsVaultAddress: Address);
195
324
  }
196
- /** Thrown when a market borrow amount is zero or negative. */
197
- export declare class NonPositiveBorrowAmountError extends Error {
198
- constructor(market: string);
199
- }
200
- /** Thrown when both `amount` and `nativeAmount` resolve to zero on a market collateral supply. */
201
- export declare class ZeroCollateralAmountError extends Error {
202
- constructor(market: string);
203
- }
204
325
  /** Thrown when an action uses `nativeAmount` but the target asset is not the chain's wNative. */
205
326
  export declare class NativeAmountOnNonWNativeAssetError extends Error {
206
327
  constructor(asset: Address, wNative: Address);
@@ -224,18 +345,10 @@ export declare class MarketIdMismatchError extends Error {
224
345
  export declare class AccrualPositionUserMismatchError extends Error {
225
346
  constructor(positionUser: string, expectedUser: string);
226
347
  }
227
- /** Thrown when a reallocation's fee is negative. */
228
- export declare class NegativeReallocationFeeError extends Error {
229
- constructor(vault: string);
230
- }
231
348
  /** Thrown when a reallocation has no withdrawals. */
232
349
  export declare class EmptyReallocationWithdrawalsError extends Error {
233
350
  constructor(vault: string);
234
351
  }
235
- /** Thrown when a reallocation withdrawal amount is zero or negative. */
236
- export declare class NonPositiveReallocationAmountError extends Error {
237
- constructor(vault: string, market: string);
238
- }
239
352
  /** Thrown when a reallocation withdrawal references the operation's target market (which would be a no-op or self-deal). */
240
353
  export declare class ReallocationWithdrawalOnTargetMarketError extends Error {
241
354
  constructor(vault: string, marketId: string);
@@ -244,17 +357,6 @@ export declare class ReallocationWithdrawalOnTargetMarketError extends Error {
244
357
  export declare class UnsortedReallocationWithdrawalsError extends Error {
245
358
  constructor(vault: string, marketId: string);
246
359
  }
247
- /**
248
- * Thrown when a market repay's `transferAmount` is zero or negative.
249
- *
250
- * @deprecated No longer thrown. The repay action layer no longer validates `transferAmount`
251
- * directly (assets mode uses {@link NonPositiveRepayAmountError}; shares mode allows a zero
252
- * ERC-20 transfer for fully-native repays). Retained as exported API for back-compat; slated
253
- * for removal in a future major.
254
- */
255
- export declare class NonPositiveTransferAmountError extends Error {
256
- constructor(market: string);
257
- }
258
360
  /**
259
361
  * Thrown when a market repay in assets mode has `transferAmount !== amount + nativeAmount` — the
260
362
  * pre-resolved ERC-20 pull plus the wrapped native must equal the assets repaid, so the bundle
@@ -267,33 +369,10 @@ export declare class TransferAmountNotEqualToAssetsError extends Error {
267
369
  market: string;
268
370
  });
269
371
  }
270
- /**
271
- * Thrown when a shares-mode repay's `nativeAmount` exceeds `transferAmount`, which
272
- * would make the ERC-20 amount to pull (`transferAmount − nativeAmount`) negative.
273
- */
274
- export declare class NativeAmountExceedsTransferAmountError extends Error {
275
- constructor(params: {
276
- nativeAmount: bigint;
277
- transferAmount: bigint;
278
- market: string;
279
- });
280
- }
281
372
  /** Thrown when a market repay specifies both `assets` and `shares` as non-zero (modes are mutually exclusive). */
282
373
  export declare class MutuallyExclusiveRepayAmountsError extends Error {
283
374
  constructor(market: string);
284
375
  }
285
- /** Thrown when a market repay has non-positive amounts: both `assets` and `shares` are zero, or either is negative. */
286
- export declare class NonPositiveRepayAmountError extends Error {
287
- constructor(market: string);
288
- }
289
- /** Thrown when a market repay's `maxSharePrice` slippage bound is zero or negative. */
290
- export declare class NonPositiveRepayMaxSharePriceError extends Error {
291
- constructor(market: string);
292
- }
293
- /** Thrown when a market `withdrawCollateral` amount is zero or negative. */
294
- export declare class NonPositiveWithdrawCollateralAmountError extends Error {
295
- constructor(market: string);
296
- }
297
376
  /** Thrown when a withdraw amount exceeds the position's available collateral. */
298
377
  export declare class WithdrawExceedsCollateralError extends Error {
299
378
  constructor(params: {
@@ -399,30 +478,137 @@ export declare class UnknownReallocationPositionError extends UnknownDataError {
399
478
  */
400
479
  constructor(user: Address, marketId: MarketId);
401
480
  }
402
- /** Thrown when a market borrow's `minSharePrice` slippage bound is negative. */
403
- export declare class NonPositiveMinBorrowSharePriceError extends Error {
404
- constructor(market: string);
481
+ /** Thrown when a Midnight amount exceeds the maximum offer-cap value accepted onchain. */
482
+ export declare class MidnightAmountExceedsMaxOfferCapError extends Error {
483
+ constructor(params: {
484
+ readonly label: string;
485
+ readonly amount: bigint;
486
+ readonly maxOfferCap: bigint;
487
+ });
405
488
  }
406
- /** Thrown when a market loan-asset supply amount is negative. */
407
- export declare class NegativeSupplyAmountError extends Error {
408
- constructor(market: string);
489
+ /** Thrown when a Midnight flow needs at least one takeable offer. */
490
+ export declare class EmptyMidnightTakeableOffersError extends Error {
491
+ constructor();
409
492
  }
410
- /** Thrown when a market loan-asset supply's `maxSharePrice` slippage bound is negative. */
411
- export declare class NegativeSupplyMaxSharePriceError extends Error {
412
- constructor(market: string);
493
+ /** Thrown when a Midnight offer has the wrong maker side for the requested flow. */
494
+ export declare class MidnightOfferSideMismatchError extends Error {
495
+ constructor(params: {
496
+ index: number;
497
+ expectedBuy: boolean;
498
+ actualBuy: boolean;
499
+ });
413
500
  }
414
- /** Thrown when both `amount` and `nativeAmount` resolve to zero on a market loan-asset supply. */
415
- export declare class ZeroSupplyAmountError extends Error {
416
- constructor(market: string);
501
+ /** Thrown when a Midnight maker offer belongs to a different account than the action flow. */
502
+ export declare class MidnightOfferMakerMismatchError extends Error {
503
+ constructor(params: {
504
+ readonly index: number;
505
+ readonly expectedMaker: Address;
506
+ readonly actualMaker: Address;
507
+ });
417
508
  }
418
- /** Thrown when a market loan-asset withdraw has both `assets` and `shares` zero, or either negative. */
419
- export declare class NonPositiveWithdrawAmountError extends Error {
420
- constructor(market: string);
509
+ /** Thrown when a Midnight maker offer targets a different chain than the action flow. */
510
+ export declare class MidnightOfferMarketChainMismatchError extends Error {
511
+ constructor(params: {
512
+ readonly index: number;
513
+ readonly expectedChainId: number;
514
+ readonly actualChainId: bigint;
515
+ });
516
+ }
517
+ /** Thrown when a Midnight maker offer targets a different Midnight contract than the action flow. */
518
+ export declare class MidnightOfferMarketAddressMismatchError extends Error {
519
+ constructor(params: {
520
+ readonly index: number;
521
+ readonly expectedMidnight: Address;
522
+ readonly actualMidnight: Address;
523
+ });
524
+ }
525
+ /** Thrown when a Midnight market targets a different deployment than the selected chain. */
526
+ export declare class MidnightMarketAddressMismatchError extends Error {
527
+ constructor(params: {
528
+ readonly expectedMidnight: Address;
529
+ readonly actualMidnight: Address;
530
+ });
531
+ }
532
+ /** Thrown when a Midnight make-lend offer does not use the approved loan token. */
533
+ export declare class MidnightOfferMarketLoanTokenMismatchError extends Error {
534
+ constructor(params: {
535
+ readonly index: number;
536
+ readonly expectedLoanToken: Address;
537
+ readonly actualLoanToken: Address;
538
+ });
539
+ }
540
+ /** Thrown when a quoted Midnight takeable offer belongs to a different market than the requested flow. */
541
+ export declare class MidnightTakeableOfferMarketMismatchError extends Error {
542
+ constructor(params: {
543
+ index: number;
544
+ expectedMarket: string;
545
+ actualMarket: string;
546
+ });
547
+ }
548
+ /** Thrown when a Midnight offer tree uses an unsupported ratifier address. */
549
+ export declare class UnknownMidnightRatifierError extends Error {
550
+ constructor(params: {
551
+ ratifier: Address;
552
+ ecrecoverRatifier: Address;
553
+ setterRatifier: Address;
554
+ });
421
555
  }
422
- /** Thrown when a market loan-asset withdraw's `minSharePrice` slippage bound is negative. */
423
- export declare class NegativeWithdrawMinSharePriceError extends Error {
556
+ /** Thrown when a Midnight Ecrecover maker flow builds the submit transaction before signing. */
557
+ export declare class MissingMidnightOfferRootSignatureError extends Error {
558
+ constructor();
559
+ }
560
+ /** Thrown when a Midnight offer-root signature does not match the prepared tree root. */
561
+ export declare class MidnightOfferRootMismatchError extends Error {
562
+ constructor(params: {
563
+ expectedRoot: string;
564
+ actualRoot: string;
565
+ });
566
+ }
567
+ /** Thrown when a Midnight offer-root signature was produced by another maker account. */
568
+ export declare class MidnightOfferRootOwnerMismatchError extends Error {
569
+ constructor(params: {
570
+ expectedOwner: Address;
571
+ actualOwner: Address;
572
+ });
573
+ }
574
+ /** Thrown when a Midnight offer-root signature targets another ratifier. */
575
+ export declare class MidnightOfferRootRatifierMismatchError extends Error {
576
+ constructor(params: {
577
+ expectedRatifier: Address;
578
+ actualRatifier: Address;
579
+ });
580
+ }
581
+ /** Thrown when a Midnight offer-root signature was produced for another offer count. */
582
+ export declare class MidnightOfferRootOfferCountMismatchError extends Error {
583
+ constructor(params: {
584
+ expectedOffers: number;
585
+ actualOffers: number;
586
+ });
587
+ }
588
+ /** Thrown when a Midnight offer-root signature was not prepared by this maker flow. */
589
+ export declare class UnpreparedMidnightOfferRootSignatureError extends Error {
590
+ constructor();
591
+ }
592
+ /** Thrown when a Midnight redeem flow finds no credit units for the user. */
593
+ export declare class NoMidnightCreditToRedeemError extends Error {
424
594
  constructor(market: string);
425
595
  }
596
+ /** Thrown when a Midnight redeem amount exceeds the user's accrued credit. */
597
+ export declare class MidnightRedeemExceedsCreditError extends Error {
598
+ constructor(params: {
599
+ market: string;
600
+ units: bigint;
601
+ credit: bigint;
602
+ });
603
+ }
604
+ /** Thrown when a Midnight redeem amount exceeds the market's currently withdrawable liquidity. */
605
+ export declare class InsufficientMidnightWithdrawableLiquidityError extends Error {
606
+ constructor(params: {
607
+ market: string;
608
+ units: bigint;
609
+ withdrawable: bigint;
610
+ });
611
+ }
426
612
  /** Thrown when a loan-asset withdraw specifies both `assets` and `shares` as non-zero (modes are mutually exclusive). */
427
613
  export declare class MutuallyExclusiveWithdrawAmountsError extends Error {
428
614
  constructor(market: string);
@@ -466,22 +652,10 @@ export declare class ReallocationWithdrawExceedsMarketSupplyError extends Error
466
652
  export declare class VaultAssetMismatchError extends Error {
467
653
  constructor(sourceAsset: Address, targetAsset: Address);
468
654
  }
469
- /** Thrown when a vault redeem's `minSharePrice` slippage bound is negative. */
470
- export declare class NegativeMinSharePriceError extends Error {
471
- constructor(vault: Address);
472
- }
473
- /** Thrown when a refinance's `borrowShares` argument is negative. */
474
- export declare class NegativeBorrowSharesError extends Error {
475
- constructor(market: string);
476
- }
477
655
  /** Thrown when a refinance specifies both `borrowAssets` and `borrowShares` as non-zero (modes are mutually exclusive). */
478
656
  export declare class BorrowAmountAndSharesExclusiveError extends Error {
479
657
  constructor(market: string);
480
658
  }
481
- /** Thrown when a refinance's `maxRepaySharePrice` slippage bound is negative. */
482
- export declare class NegativeMaxRepaySharePriceError extends Error {
483
- constructor(market: string);
484
- }
485
659
  /** Thrown when a refinance has identical source and target market ids (a refinance to the same market is a costly no-op). */
486
660
  export declare class RefinanceSameMarketError extends Error {
487
661
  constructor(market: string);