@morpho-org/morpho-sdk 6.0.0 → 6.2.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 (99) hide show
  1. package/MIGRATION-v5-to-v6.md +1 -1
  2. package/README.md +1 -1
  3. package/lib/cjs/abis.d.ts +1 -1
  4. package/lib/cjs/abis.js +3 -1
  5. package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +16 -5
  6. package/lib/cjs/actions/vaultV2/forceWithdraw.js +16 -5
  7. package/lib/cjs/blue/errors.d.ts +1 -1
  8. package/lib/cjs/blue/errors.js +2 -1
  9. package/lib/cjs/constants.d.ts +1 -1
  10. package/lib/cjs/constants.js +4 -1
  11. package/lib/cjs/entities/blue/blue.d.ts +28 -0
  12. package/lib/cjs/entities/blue/blue.js +1 -0
  13. package/lib/cjs/entities/index.d.ts +1 -1
  14. package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +1 -0
  15. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +9 -2
  16. package/lib/cjs/entities/vaultV1/vaultV1.js +2 -0
  17. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +35 -11
  18. package/lib/cjs/entities/vaultV2/vaultV2.js +1 -0
  19. package/lib/cjs/errors.d.ts +2 -2
  20. package/lib/cjs/errors.js +9 -1
  21. package/lib/cjs/helpers/encodeDeallocation.d.ts +1 -0
  22. package/lib/cjs/helpers/encodeDeallocation.js +1 -0
  23. package/lib/cjs/helpers/metadata.d.ts +13 -0
  24. package/lib/cjs/helpers/metadata.js +13 -0
  25. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.d.ts +10 -6
  26. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +10 -6
  27. package/lib/cjs/helpers/slippage.d.ts +3 -2
  28. package/lib/cjs/helpers/slippage.js +3 -2
  29. package/lib/cjs/helpers/validate.d.ts +40 -2
  30. package/lib/cjs/helpers/validate.js +42 -3
  31. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +94 -59
  32. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +94 -59
  33. package/lib/cjs/midnight/abis.d.ts +1 -1
  34. package/lib/cjs/midnight/abis.js +3 -1
  35. package/lib/cjs/midnight/constants.d.ts +1 -1
  36. package/lib/cjs/midnight/constants.js +4 -1
  37. package/lib/cjs/midnight/entities.d.ts +1 -1
  38. package/lib/cjs/midnight/errors.d.ts +1 -1
  39. package/lib/cjs/midnight/errors.js +7 -1
  40. package/lib/cjs/midnight/types.d.ts +1 -1
  41. package/lib/cjs/midnight/utils.d.ts +11 -1
  42. package/lib/cjs/midnight/utils.js +13 -1
  43. package/lib/cjs/types/action.d.ts +34 -0
  44. package/lib/cjs/types/action.js +10 -0
  45. package/lib/cjs/types/data.d.ts +3 -0
  46. package/lib/cjs/types/entity.d.ts +3 -0
  47. package/lib/cjs/types/metadata.d.ts +6 -0
  48. package/lib/cjs/types.d.ts +1 -1
  49. package/lib/cjs/utils.d.ts +11 -1
  50. package/lib/cjs/utils.js +14 -2
  51. package/lib/esm/abis.d.ts +1 -1
  52. package/lib/esm/abis.js +1 -1
  53. package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +16 -5
  54. package/lib/esm/actions/vaultV2/forceWithdraw.js +16 -5
  55. package/lib/esm/blue/errors.d.ts +1 -1
  56. package/lib/esm/blue/errors.js +1 -1
  57. package/lib/esm/constants.d.ts +1 -1
  58. package/lib/esm/constants.js +1 -1
  59. package/lib/esm/entities/blue/blue.d.ts +28 -0
  60. package/lib/esm/entities/blue/blue.js +1 -0
  61. package/lib/esm/entities/index.d.ts +1 -1
  62. package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +1 -0
  63. package/lib/esm/entities/vaultV1/vaultV1.d.ts +9 -2
  64. package/lib/esm/entities/vaultV1/vaultV1.js +2 -0
  65. package/lib/esm/entities/vaultV2/vaultV2.d.ts +35 -11
  66. package/lib/esm/entities/vaultV2/vaultV2.js +1 -0
  67. package/lib/esm/errors.d.ts +2 -2
  68. package/lib/esm/errors.js +2 -2
  69. package/lib/esm/helpers/encodeDeallocation.d.ts +1 -0
  70. package/lib/esm/helpers/encodeDeallocation.js +1 -0
  71. package/lib/esm/helpers/metadata.d.ts +13 -0
  72. package/lib/esm/helpers/metadata.js +13 -0
  73. package/lib/esm/helpers/previewVaultV2ForceWithdraw.d.ts +10 -6
  74. package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +10 -6
  75. package/lib/esm/helpers/slippage.d.ts +3 -2
  76. package/lib/esm/helpers/slippage.js +3 -2
  77. package/lib/esm/helpers/validate.d.ts +40 -2
  78. package/lib/esm/helpers/validate.js +41 -1
  79. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +94 -59
  80. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +94 -59
  81. package/lib/esm/midnight/abis.d.ts +1 -1
  82. package/lib/esm/midnight/abis.js +1 -1
  83. package/lib/esm/midnight/constants.d.ts +1 -1
  84. package/lib/esm/midnight/constants.js +1 -1
  85. package/lib/esm/midnight/entities.d.ts +1 -1
  86. package/lib/esm/midnight/errors.d.ts +1 -1
  87. package/lib/esm/midnight/errors.js +1 -1
  88. package/lib/esm/midnight/types.d.ts +1 -1
  89. package/lib/esm/midnight/utils.d.ts +11 -1
  90. package/lib/esm/midnight/utils.js +11 -1
  91. package/lib/esm/types/action.d.ts +34 -0
  92. package/lib/esm/types/action.js +10 -0
  93. package/lib/esm/types/data.d.ts +3 -0
  94. package/lib/esm/types/entity.d.ts +3 -0
  95. package/lib/esm/types/metadata.d.ts +6 -0
  96. package/lib/esm/types.d.ts +1 -1
  97. package/lib/esm/utils.d.ts +11 -1
  98. package/lib/esm/utils.js +11 -1
  99. package/package.json +7 -7
@@ -2,8 +2,6 @@ import { type AccrualPosition, type MarketId } from "@morpho-org/blue-sdk";
2
2
  import type { MarketInput as MidnightMarketInput } from "@morpho-org/midnight-sdk";
3
3
  import { type Address } from "viem";
4
4
  import { type VaultV2BlueReallocation } from "../types/index.js";
5
- /** @internal */
6
- export declare const compareMarketIds: (idA: MarketId, idB: MarketId) => -1 | 0 | 1;
7
5
  /**
8
6
  * Rejects a `bigint` field that falls outside the unsigned 256-bit ABI range so a direct caller
9
7
  * gets the SDK's typed error instead of viem's `IntegerOutOfRangeError` at encode time. `maxUint256`
@@ -176,6 +174,31 @@ export declare const validateNativeVaultAsset: (chainId: number, vaultAsset: Add
176
174
  * @param params.withdrawAmount - Amount of collateral being withdrawn.
177
175
  * @param params.lltv - The market's liquidation LTV.
178
176
  * @param params.marketId - The market identifier (for error messages).
177
+ * @returns `void` when the post-withdraw position stays within the safe LTV threshold.
178
+ * @throws {MarketIdMismatchError} when `positionData.marketId` differs from `marketId`.
179
+ * @throws {WithdrawExceedsCollateralError} when `withdrawAmount` exceeds the position's collateral.
180
+ * @throws {MissingMarketPriceError} when the position carries debt but the market has no oracle price.
181
+ * @throws {WithdrawMakesPositionUnhealthyError} when the remaining collateral cannot cover the debt
182
+ * at LLTV minus `DEFAULT_LLTV_BUFFER`.
183
+ * @example
184
+ * ```ts
185
+ * import type { AccrualPosition, MarketId } from "@morpho-org/blue-sdk";
186
+ * import { validatePositionHealthAfterWithdraw } from "@morpho-org/morpho-sdk";
187
+ *
188
+ * export function assertSafeWithdraw(
189
+ * positionData: AccrualPosition,
190
+ * withdrawAmount: bigint,
191
+ * lltv: bigint,
192
+ * marketId: MarketId,
193
+ * ): void {
194
+ * validatePositionHealthAfterWithdraw({
195
+ * positionData,
196
+ * withdrawAmount,
197
+ * lltv,
198
+ * marketId,
199
+ * });
200
+ * }
201
+ * ```
179
202
  */
180
203
  export declare const validatePositionHealthAfterWithdraw: (params: {
181
204
  positionData: AccrualPosition;
@@ -203,6 +226,21 @@ export declare const validateRepayAmount: (params: {
203
226
  * @param params.positionData - The current accrual position.
204
227
  * @param params.repayShares - The amount of shares to repay.
205
228
  * @param params.marketId - The market identifier (for error messages).
229
+ * @returns `void` when `repayShares` does not exceed the position's borrow shares.
230
+ * @throws {RepaySharesExceedDebtError} when `repayShares` exceeds the position's borrow shares.
231
+ * @example
232
+ * ```ts
233
+ * import type { AccrualPosition, MarketId } from "@morpho-org/blue-sdk";
234
+ * import { validateRepayShares } from "@morpho-org/morpho-sdk";
235
+ *
236
+ * export function assertRepayable(
237
+ * positionData: AccrualPosition,
238
+ * repayShares: bigint,
239
+ * marketId: MarketId,
240
+ * ): void {
241
+ * validateRepayShares({ positionData, repayShares, marketId });
242
+ * }
243
+ * ```
206
244
  */
207
245
  export declare const validateRepayShares: (params: {
208
246
  positionData: AccrualPosition;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateWithdrawShares = exports.validateWithdrawAmount = exports.validateSlippageTolerance = exports.validateVaultV2BlueReallocations = exports.validateRepayShares = exports.validateRepayAmount = exports.validatePositionHealthAfterWithdraw = exports.validateNativeVaultAsset = exports.validateNativeAsset = exports.validateChainId = exports.validatePositionHealth = exports.validateAccrualPosition = exports.validateMidnightMarketChainId = exports.validateReferralFee = exports.validateDeadline = exports.validateUint256Field = exports.compareMarketIds = void 0;
3
+ exports.validateWithdrawShares = exports.validateWithdrawAmount = exports.validateSlippageTolerance = exports.validateVaultV2BlueReallocations = exports.validateRepayShares = exports.validateRepayAmount = exports.validatePositionHealthAfterWithdraw = exports.validateNativeVaultAsset = exports.validateNativeAsset = exports.validateChainId = exports.validatePositionHealth = exports.validateAccrualPosition = exports.validateMidnightMarketChainId = exports.validateReferralFee = exports.validateDeadline = exports.validateUint256Field = void 0;
4
4
  exports.validateUserAddress = validateUserAddress;
5
5
  const blue_sdk_1 = require("@morpho-org/blue-sdk");
6
6
  const morpho_ts_1 = require("@morpho-org/morpho-ts");
@@ -17,7 +17,6 @@ const compareMarketIds = (idA, idB) => {
17
17
  return -1;
18
18
  return 0;
19
19
  };
20
- exports.compareMarketIds = compareMarketIds;
21
20
  /**
22
21
  * Rejects a `bigint` field that falls outside the unsigned 256-bit ABI range so a direct caller
23
22
  * gets the SDK's typed error instead of viem's `IntegerOutOfRangeError` at encode time. `maxUint256`
@@ -263,6 +262,31 @@ exports.validateNativeVaultAsset = validateNativeVaultAsset;
263
262
  * @param params.withdrawAmount - Amount of collateral being withdrawn.
264
263
  * @param params.lltv - The market's liquidation LTV.
265
264
  * @param params.marketId - The market identifier (for error messages).
265
+ * @returns `void` when the post-withdraw position stays within the safe LTV threshold.
266
+ * @throws {MarketIdMismatchError} when `positionData.marketId` differs from `marketId`.
267
+ * @throws {WithdrawExceedsCollateralError} when `withdrawAmount` exceeds the position's collateral.
268
+ * @throws {MissingMarketPriceError} when the position carries debt but the market has no oracle price.
269
+ * @throws {WithdrawMakesPositionUnhealthyError} when the remaining collateral cannot cover the debt
270
+ * at LLTV minus `DEFAULT_LLTV_BUFFER`.
271
+ * @example
272
+ * ```ts
273
+ * import type { AccrualPosition, MarketId } from "@morpho-org/blue-sdk";
274
+ * import { validatePositionHealthAfterWithdraw } from "@morpho-org/morpho-sdk";
275
+ *
276
+ * export function assertSafeWithdraw(
277
+ * positionData: AccrualPosition,
278
+ * withdrawAmount: bigint,
279
+ * lltv: bigint,
280
+ * marketId: MarketId,
281
+ * ): void {
282
+ * validatePositionHealthAfterWithdraw({
283
+ * positionData,
284
+ * withdrawAmount,
285
+ * lltv,
286
+ * marketId,
287
+ * });
288
+ * }
289
+ * ```
266
290
  */
267
291
  const validatePositionHealthAfterWithdraw = (params) => {
268
292
  const { positionData, withdrawAmount, lltv, marketId } = params;
@@ -323,6 +347,21 @@ exports.validateRepayAmount = validateRepayAmount;
323
347
  * @param params.positionData - The current accrual position.
324
348
  * @param params.repayShares - The amount of shares to repay.
325
349
  * @param params.marketId - The market identifier (for error messages).
350
+ * @returns `void` when `repayShares` does not exceed the position's borrow shares.
351
+ * @throws {RepaySharesExceedDebtError} when `repayShares` exceeds the position's borrow shares.
352
+ * @example
353
+ * ```ts
354
+ * import type { AccrualPosition, MarketId } from "@morpho-org/blue-sdk";
355
+ * import { validateRepayShares } from "@morpho-org/morpho-sdk";
356
+ *
357
+ * export function assertRepayable(
358
+ * positionData: AccrualPosition,
359
+ * repayShares: bigint,
360
+ * marketId: MarketId,
361
+ * ): void {
362
+ * validateRepayShares({ positionData, repayShares, marketId });
363
+ * }
364
+ * ```
326
365
  */
327
366
  const validateRepayShares = (params) => {
328
367
  const { positionData, repayShares, marketId } = params;
@@ -412,7 +451,7 @@ const validateVaultV2BlueReallocations = (reallocations, targetMarketId) => {
412
451
  }
413
452
  penaltyByVault.set(penaltyKey, reallocation.penalty);
414
453
  if (sourceMarketId !== undefined &&
415
- (0, exports.compareMarketIds)(sourceMarketId, targetMarketId) === 0) {
454
+ compareMarketIds(sourceMarketId, targetMarketId) === 0) {
416
455
  throw new index_js_1.ReallocationWithdrawalOnTargetMarketError(reallocation.vault, sourceMarketId);
417
456
  }
418
457
  }
@@ -51,11 +51,15 @@ export type VaultV2ForceWithdrawEligibility = {
51
51
  * describing which precondition failed.
52
52
  * @example
53
53
  * ```ts
54
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
54
55
  * import { resolveVaultV2ForceWithdrawEligibility } from "@morpho-org/morpho-sdk";
55
56
  *
56
- * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
57
- * if (eligibility.type === "eligible") {
58
- * console.log(eligibility.adapter.address, eligibility.liquidityMarketId);
57
+ * export function checkEligibility(vaultData: AccrualVaultV2) {
58
+ * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
59
+ * if (eligibility.type === "eligible") {
60
+ * console.log(eligibility.adapter.address, eligibility.liquidityMarketId);
61
+ * }
62
+ * return eligibility;
59
63
  * }
60
64
  * ```
61
65
  */
@@ -76,13 +80,21 @@ export declare function resolveVaultV2ForceWithdrawEligibility(vaultData: Accrua
76
80
  * owner is not a fee recipient.
77
81
  * @example
78
82
  * ```ts
83
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
79
84
  * import { computeVaultV2ForceWithdrawFeeSharesMinted } from "@morpho-org/morpho-sdk";
85
+ * import type { Address } from "viem";
80
86
  *
81
- * const feeShares = computeVaultV2ForceWithdrawFeeSharesMinted({
82
- * vaultData,
83
- * owner,
84
- * timestamp,
85
- * });
87
+ * export function feeShares(
88
+ * vaultData: AccrualVaultV2,
89
+ * owner: Address,
90
+ * timestamp: bigint,
91
+ * ) {
92
+ * return computeVaultV2ForceWithdrawFeeSharesMinted({
93
+ * vaultData,
94
+ * owner,
95
+ * timestamp,
96
+ * });
97
+ * }
86
98
  * ```
87
99
  */
88
100
  export declare function computeVaultV2ForceWithdrawFeeSharesMinted(params: {
@@ -155,21 +167,24 @@ export interface VaultV2ForceWithdrawPlan {
155
167
  * @throws {NonPositiveInputError} when `exitAssets` is not positive.
156
168
  * @example
157
169
  * ```ts
170
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
158
171
  * import {
159
172
  * computeVaultV2ForceWithdrawPlan,
160
173
  * resolveVaultV2ForceWithdrawEligibility,
161
174
  * } from "@morpho-org/morpho-sdk";
162
175
  *
163
- * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
164
- * if (eligibility.type === "eligible") {
176
+ * export function planExit(vaultData: AccrualVaultV2, timestamp: bigint) {
177
+ * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
178
+ * if (eligibility.type !== "eligible") return undefined;
165
179
  * const plan = computeVaultV2ForceWithdrawPlan({
166
180
  * vaultData,
167
181
  * adapter: eligibility.adapter,
168
182
  * liquidityMarketId: eligibility.liquidityMarketId,
169
183
  * exitAssets: 1_000_000n,
170
- * timestamp: 1_800_000_000n,
184
+ * timestamp,
171
185
  * });
172
186
  * // plan.withdrawnAssets is what the user receives before the referral fee
187
+ * return plan;
173
188
  * }
174
189
  * ```
175
190
  */
@@ -224,55 +239,69 @@ export declare function computeVaultV2ForceWithdrawPlan(params: {
224
239
  * @returns An upper bound, in vault shares, of what the exit burns.
225
240
  * @example
226
241
  * ```ts
227
- * import { MathLib } from "@morpho-org/blue-sdk";
242
+ * import { MathLib, type AccrualVaultV2 } from "@morpho-org/blue-sdk";
228
243
  * import {
229
244
  * computeVaultV2ForceWithdrawFeeSharesMinted,
230
245
  * computeVaultV2ForceWithdrawSharesBurnt,
246
+ * type VaultV2ForceWithdrawPlan,
231
247
  * } from "@morpho-org/morpho-sdk";
248
+ * import { type Address, maxUint256 } from "viem";
232
249
  *
233
- * const { vault: nowVaultData } = vaultData.accrueInterest(now);
234
- * const sharesBurntRaw = computeVaultV2ForceWithdrawSharesBurnt({
235
- * vaultData,
236
- * deadlineVaultData: vaultData,
237
- * plan,
238
- * });
239
- * const sharesBurntNow = computeVaultV2ForceWithdrawSharesBurnt({
240
- * vaultData: nowVaultData,
241
- * deadlineVaultData: nowVaultData,
242
- * plan,
243
- * });
244
- * const feeSharesNow = computeVaultV2ForceWithdrawFeeSharesMinted({
245
- * vaultData,
246
- * owner,
247
- * timestamp: now,
248
- * });
249
- * const sharesBurntForFloor = MathLib.max(
250
- * sharesBurntRaw,
251
- * sharesBurntNow - feeSharesNow,
252
- * );
253
- * const allowanceSharePriceE27 = MathLib.max(
254
- * MathLib.min(
255
- * MathLib.mulDivDown(
256
- * minSharePriceE27,
257
- * MathLib.WAD - slippageTolerance,
258
- * MathLib.WAD,
250
+ * export function requiredShareAllowance(
251
+ * vaultData: AccrualVaultV2,
252
+ * plan: VaultV2ForceWithdrawPlan,
253
+ * owner: Address,
254
+ * now: bigint,
255
+ * deadline: bigint,
256
+ * exitAssets: bigint,
257
+ * minSharePriceE27: bigint,
258
+ * slippageTolerance: bigint,
259
+ * ) {
260
+ * const { vault: nowVaultData } = vaultData.accrueInterest(now);
261
+ * const sharesBurntRaw = computeVaultV2ForceWithdrawSharesBurnt({
262
+ * vaultData,
263
+ * deadlineVaultData: vaultData,
264
+ * plan,
265
+ * });
266
+ * const sharesBurntNow = computeVaultV2ForceWithdrawSharesBurnt({
267
+ * vaultData: nowVaultData,
268
+ * deadlineVaultData: nowVaultData,
269
+ * plan,
270
+ * });
271
+ * const feeSharesNow = computeVaultV2ForceWithdrawFeeSharesMinted({
272
+ * vaultData,
273
+ * owner,
274
+ * timestamp: now,
275
+ * });
276
+ * const sharesBurntForFloor = MathLib.max(
277
+ * sharesBurntRaw,
278
+ * sharesBurntNow - feeSharesNow,
279
+ * );
280
+ * const allowanceSharePriceE27 = MathLib.max(
281
+ * MathLib.min(
282
+ * MathLib.mulDivDown(
283
+ * minSharePriceE27,
284
+ * MathLib.WAD - slippageTolerance,
285
+ * MathLib.WAD,
286
+ * ),
287
+ * minSharePriceE27 - 1n,
259
288
  * ),
260
- * minSharePriceE27 - 1n,
261
- * ),
262
- * 1n,
263
- * );
264
- * const requiredShareAllowance = MathLib.min(
265
- * MathLib.max(
266
- * MathLib.mulDivUp(exitAssets, MathLib.RAY, allowanceSharePriceE27),
267
- * MathLib.mulDivUp(exitAssets, MathLib.RAY, minSharePriceE27) + 1n,
268
- * ) +
269
- * computeVaultV2ForceWithdrawFeeSharesMinted({
270
- * vaultData,
271
- * owner,
272
- * timestamp: deadline,
273
- * }),
274
- * maxUint256,
275
- * );
289
+ * 1n,
290
+ * );
291
+ * const requiredShareAllowance = MathLib.min(
292
+ * MathLib.max(
293
+ * MathLib.mulDivUp(exitAssets, MathLib.RAY, allowanceSharePriceE27),
294
+ * MathLib.mulDivUp(exitAssets, MathLib.RAY, minSharePriceE27) + 1n,
295
+ * ) +
296
+ * computeVaultV2ForceWithdrawFeeSharesMinted({
297
+ * vaultData,
298
+ * owner,
299
+ * timestamp: deadline,
300
+ * }),
301
+ * maxUint256,
302
+ * );
303
+ * return requiredShareAllowance;
304
+ * }
276
305
  * ```
277
306
  */
278
307
  export declare function computeVaultV2ForceWithdrawSharesBurnt(params: {
@@ -293,12 +322,18 @@ export declare function computeVaultV2ForceWithdrawSharesBurnt(params: {
293
322
  * @returns A lower bound, in vault shares, of the burn measured by the contract.
294
323
  * @example
295
324
  * ```ts
296
- * import { computeVaultV2ForceWithdrawMinSharesBurnt } from "@morpho-org/morpho-sdk";
325
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
326
+ * import {
327
+ * computeVaultV2ForceWithdrawMinSharesBurnt,
328
+ * type VaultV2ForceWithdrawPlan,
329
+ * } from "@morpho-org/morpho-sdk";
297
330
  *
298
- * const minSharesBurnt = computeVaultV2ForceWithdrawMinSharesBurnt({
299
- * vaultData,
300
- * plan,
301
- * });
331
+ * export function minSharesBurnt(
332
+ * vaultData: AccrualVaultV2,
333
+ * plan: VaultV2ForceWithdrawPlan,
334
+ * ) {
335
+ * return computeVaultV2ForceWithdrawMinSharesBurnt({ vaultData, plan });
336
+ * }
302
337
  * ```
303
338
  */
304
339
  export declare function computeVaultV2ForceWithdrawMinSharesBurnt(params: {
@@ -25,11 +25,15 @@ const index_js_1 = require("../types/index.js");
25
25
  * describing which precondition failed.
26
26
  * @example
27
27
  * ```ts
28
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
28
29
  * import { resolveVaultV2ForceWithdrawEligibility } from "@morpho-org/morpho-sdk";
29
30
  *
30
- * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
31
- * if (eligibility.type === "eligible") {
32
- * console.log(eligibility.adapter.address, eligibility.liquidityMarketId);
31
+ * export function checkEligibility(vaultData: AccrualVaultV2) {
32
+ * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
33
+ * if (eligibility.type === "eligible") {
34
+ * console.log(eligibility.adapter.address, eligibility.liquidityMarketId);
35
+ * }
36
+ * return eligibility;
33
37
  * }
34
38
  * ```
35
39
  */
@@ -88,13 +92,21 @@ function resolveVaultV2ForceWithdrawEligibility(vaultData, adapterOverride) {
88
92
  * owner is not a fee recipient.
89
93
  * @example
90
94
  * ```ts
95
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
91
96
  * import { computeVaultV2ForceWithdrawFeeSharesMinted } from "@morpho-org/morpho-sdk";
97
+ * import type { Address } from "viem";
92
98
  *
93
- * const feeShares = computeVaultV2ForceWithdrawFeeSharesMinted({
94
- * vaultData,
95
- * owner,
96
- * timestamp,
97
- * });
99
+ * export function feeShares(
100
+ * vaultData: AccrualVaultV2,
101
+ * owner: Address,
102
+ * timestamp: bigint,
103
+ * ) {
104
+ * return computeVaultV2ForceWithdrawFeeSharesMinted({
105
+ * vaultData,
106
+ * owner,
107
+ * timestamp,
108
+ * });
109
+ * }
98
110
  * ```
99
111
  */
100
112
  function computeVaultV2ForceWithdrawFeeSharesMinted(params) {
@@ -144,21 +156,24 @@ function computeVaultV2ForceWithdrawFeeSharesMinted(params) {
144
156
  * @throws {NonPositiveInputError} when `exitAssets` is not positive.
145
157
  * @example
146
158
  * ```ts
159
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
147
160
  * import {
148
161
  * computeVaultV2ForceWithdrawPlan,
149
162
  * resolveVaultV2ForceWithdrawEligibility,
150
163
  * } from "@morpho-org/morpho-sdk";
151
164
  *
152
- * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
153
- * if (eligibility.type === "eligible") {
165
+ * export function planExit(vaultData: AccrualVaultV2, timestamp: bigint) {
166
+ * const eligibility = resolveVaultV2ForceWithdrawEligibility(vaultData);
167
+ * if (eligibility.type !== "eligible") return undefined;
154
168
  * const plan = computeVaultV2ForceWithdrawPlan({
155
169
  * vaultData,
156
170
  * adapter: eligibility.adapter,
157
171
  * liquidityMarketId: eligibility.liquidityMarketId,
158
172
  * exitAssets: 1_000_000n,
159
- * timestamp: 1_800_000_000n,
173
+ * timestamp,
160
174
  * });
161
175
  * // plan.withdrawnAssets is what the user receives before the referral fee
176
+ * return plan;
162
177
  * }
163
178
  * ```
164
179
  */
@@ -301,55 +316,69 @@ function computeVaultV2ForceWithdrawPlan(params) {
301
316
  * @returns An upper bound, in vault shares, of what the exit burns.
302
317
  * @example
303
318
  * ```ts
304
- * import { MathLib } from "@morpho-org/blue-sdk";
319
+ * import { MathLib, type AccrualVaultV2 } from "@morpho-org/blue-sdk";
305
320
  * import {
306
321
  * computeVaultV2ForceWithdrawFeeSharesMinted,
307
322
  * computeVaultV2ForceWithdrawSharesBurnt,
323
+ * type VaultV2ForceWithdrawPlan,
308
324
  * } from "@morpho-org/morpho-sdk";
325
+ * import { type Address, maxUint256 } from "viem";
309
326
  *
310
- * const { vault: nowVaultData } = vaultData.accrueInterest(now);
311
- * const sharesBurntRaw = computeVaultV2ForceWithdrawSharesBurnt({
312
- * vaultData,
313
- * deadlineVaultData: vaultData,
314
- * plan,
315
- * });
316
- * const sharesBurntNow = computeVaultV2ForceWithdrawSharesBurnt({
317
- * vaultData: nowVaultData,
318
- * deadlineVaultData: nowVaultData,
319
- * plan,
320
- * });
321
- * const feeSharesNow = computeVaultV2ForceWithdrawFeeSharesMinted({
322
- * vaultData,
323
- * owner,
324
- * timestamp: now,
325
- * });
326
- * const sharesBurntForFloor = MathLib.max(
327
- * sharesBurntRaw,
328
- * sharesBurntNow - feeSharesNow,
329
- * );
330
- * const allowanceSharePriceE27 = MathLib.max(
331
- * MathLib.min(
332
- * MathLib.mulDivDown(
333
- * minSharePriceE27,
334
- * MathLib.WAD - slippageTolerance,
335
- * MathLib.WAD,
327
+ * export function requiredShareAllowance(
328
+ * vaultData: AccrualVaultV2,
329
+ * plan: VaultV2ForceWithdrawPlan,
330
+ * owner: Address,
331
+ * now: bigint,
332
+ * deadline: bigint,
333
+ * exitAssets: bigint,
334
+ * minSharePriceE27: bigint,
335
+ * slippageTolerance: bigint,
336
+ * ) {
337
+ * const { vault: nowVaultData } = vaultData.accrueInterest(now);
338
+ * const sharesBurntRaw = computeVaultV2ForceWithdrawSharesBurnt({
339
+ * vaultData,
340
+ * deadlineVaultData: vaultData,
341
+ * plan,
342
+ * });
343
+ * const sharesBurntNow = computeVaultV2ForceWithdrawSharesBurnt({
344
+ * vaultData: nowVaultData,
345
+ * deadlineVaultData: nowVaultData,
346
+ * plan,
347
+ * });
348
+ * const feeSharesNow = computeVaultV2ForceWithdrawFeeSharesMinted({
349
+ * vaultData,
350
+ * owner,
351
+ * timestamp: now,
352
+ * });
353
+ * const sharesBurntForFloor = MathLib.max(
354
+ * sharesBurntRaw,
355
+ * sharesBurntNow - feeSharesNow,
356
+ * );
357
+ * const allowanceSharePriceE27 = MathLib.max(
358
+ * MathLib.min(
359
+ * MathLib.mulDivDown(
360
+ * minSharePriceE27,
361
+ * MathLib.WAD - slippageTolerance,
362
+ * MathLib.WAD,
363
+ * ),
364
+ * minSharePriceE27 - 1n,
336
365
  * ),
337
- * minSharePriceE27 - 1n,
338
- * ),
339
- * 1n,
340
- * );
341
- * const requiredShareAllowance = MathLib.min(
342
- * MathLib.max(
343
- * MathLib.mulDivUp(exitAssets, MathLib.RAY, allowanceSharePriceE27),
344
- * MathLib.mulDivUp(exitAssets, MathLib.RAY, minSharePriceE27) + 1n,
345
- * ) +
346
- * computeVaultV2ForceWithdrawFeeSharesMinted({
347
- * vaultData,
348
- * owner,
349
- * timestamp: deadline,
350
- * }),
351
- * maxUint256,
352
- * );
366
+ * 1n,
367
+ * );
368
+ * const requiredShareAllowance = MathLib.min(
369
+ * MathLib.max(
370
+ * MathLib.mulDivUp(exitAssets, MathLib.RAY, allowanceSharePriceE27),
371
+ * MathLib.mulDivUp(exitAssets, MathLib.RAY, minSharePriceE27) + 1n,
372
+ * ) +
373
+ * computeVaultV2ForceWithdrawFeeSharesMinted({
374
+ * vaultData,
375
+ * owner,
376
+ * timestamp: deadline,
377
+ * }),
378
+ * maxUint256,
379
+ * );
380
+ * return requiredShareAllowance;
381
+ * }
353
382
  * ```
354
383
  */
355
384
  function computeVaultV2ForceWithdrawSharesBurnt(params) {
@@ -384,12 +413,18 @@ function computeVaultV2ForceWithdrawSharesBurnt(params) {
384
413
  * @returns A lower bound, in vault shares, of the burn measured by the contract.
385
414
  * @example
386
415
  * ```ts
387
- * import { computeVaultV2ForceWithdrawMinSharesBurnt } from "@morpho-org/morpho-sdk";
416
+ * import type { AccrualVaultV2 } from "@morpho-org/blue-sdk";
417
+ * import {
418
+ * computeVaultV2ForceWithdrawMinSharesBurnt,
419
+ * type VaultV2ForceWithdrawPlan,
420
+ * } from "@morpho-org/morpho-sdk";
388
421
  *
389
- * const minSharesBurnt = computeVaultV2ForceWithdrawMinSharesBurnt({
390
- * vaultData,
391
- * plan,
392
- * });
422
+ * export function minSharesBurnt(
423
+ * vaultData: AccrualVaultV2,
424
+ * plan: VaultV2ForceWithdrawPlan,
425
+ * ) {
426
+ * return computeVaultV2ForceWithdrawMinSharesBurnt({ vaultData, plan });
427
+ * }
393
428
  * ```
394
429
  */
395
430
  function computeVaultV2ForceWithdrawMinSharesBurnt(params) {
@@ -1 +1 @@
1
- export { ecrecoverRatifierAbi, midnightAbi, midnightBundlesAbi, setterRatifierAbi, } from "@morpho-org/midnight-sdk";
1
+ export { ecrecoverRatifierAbi, midnightAbi, midnightBundlesAbi, priceRatifierV1Abi, rateRatifierV1Abi, setterRatifierAbi, } from "@morpho-org/midnight-sdk";
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setterRatifierAbi = exports.midnightBundlesAbi = exports.midnightAbi = exports.ecrecoverRatifierAbi = void 0;
3
+ exports.setterRatifierAbi = exports.rateRatifierV1Abi = exports.priceRatifierV1Abi = exports.midnightBundlesAbi = exports.midnightAbi = exports.ecrecoverRatifierAbi = void 0;
4
4
  var midnight_sdk_1 = require("@morpho-org/midnight-sdk");
5
5
  Object.defineProperty(exports, "ecrecoverRatifierAbi", { enumerable: true, get: function () { return midnight_sdk_1.ecrecoverRatifierAbi; } });
6
6
  Object.defineProperty(exports, "midnightAbi", { enumerable: true, get: function () { return midnight_sdk_1.midnightAbi; } });
7
7
  Object.defineProperty(exports, "midnightBundlesAbi", { enumerable: true, get: function () { return midnight_sdk_1.midnightBundlesAbi; } });
8
+ Object.defineProperty(exports, "priceRatifierV1Abi", { enumerable: true, get: function () { return midnight_sdk_1.priceRatifierV1Abi; } });
9
+ Object.defineProperty(exports, "rateRatifierV1Abi", { enumerable: true, get: function () { return midnight_sdk_1.rateRatifierV1Abi; } });
8
10
  Object.defineProperty(exports, "setterRatifierAbi", { enumerable: true, get: function () { return midnight_sdk_1.setterRatifierAbi; } });
@@ -1 +1 @@
1
- export { CBP, COLLATERAL_PARAMS_TYPEHASH, DEFAULT_TICK_SPACING, EIP712_DOMAIN_TYPEHASH, MARKET_TYPEHASH, MAX_COLLATERALS, MAX_COLLATERALS_PER_BORROWER, MAX_CONTINUOUS_FEE, MAX_OFFER_CAP, MAX_SETTLEMENT_FEES, MAX_TICK, OFFER_TYPEHASH, PRICE_ROUNDING_STEP, SETTLEMENT_FEE_BREAKPOINTS, TIME_TO_MAX_LIF, } from "@morpho-org/midnight-sdk";
1
+ export { CBP, COLLATERAL_PARAMS_TYPEHASH, DEFAULT_TICK_SPACING, EIP712_DOMAIN_TYPEHASH, MARKET_TYPEHASH, MAX_COLLATERALS, MAX_COLLATERALS_PER_BORROWER, MAX_CONTINUOUS_FEE, MAX_OFFER_CAP, MAX_SETTLEMENT_FEES, MAX_TICK, MAX_TREE_HEIGHT, OFFER_TYPEHASH, PRICE_RATIFIER_V1_OFFER_TYPEHASH, PRICE_ROUNDING_STEP, RATE_RATIFIER_V1_OFFER_TYPEHASH, SETTLEMENT_FEE_BREAKPOINTS, TIME_TO_MAX_LIF, } from "@morpho-org/midnight-sdk";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TIME_TO_MAX_LIF = exports.SETTLEMENT_FEE_BREAKPOINTS = exports.PRICE_ROUNDING_STEP = exports.OFFER_TYPEHASH = exports.MAX_TICK = exports.MAX_SETTLEMENT_FEES = exports.MAX_OFFER_CAP = exports.MAX_CONTINUOUS_FEE = exports.MAX_COLLATERALS_PER_BORROWER = exports.MAX_COLLATERALS = exports.MARKET_TYPEHASH = exports.EIP712_DOMAIN_TYPEHASH = exports.DEFAULT_TICK_SPACING = exports.COLLATERAL_PARAMS_TYPEHASH = exports.CBP = void 0;
3
+ exports.TIME_TO_MAX_LIF = exports.SETTLEMENT_FEE_BREAKPOINTS = exports.RATE_RATIFIER_V1_OFFER_TYPEHASH = exports.PRICE_ROUNDING_STEP = exports.PRICE_RATIFIER_V1_OFFER_TYPEHASH = exports.OFFER_TYPEHASH = exports.MAX_TREE_HEIGHT = exports.MAX_TICK = exports.MAX_SETTLEMENT_FEES = exports.MAX_OFFER_CAP = exports.MAX_CONTINUOUS_FEE = exports.MAX_COLLATERALS_PER_BORROWER = exports.MAX_COLLATERALS = exports.MARKET_TYPEHASH = exports.EIP712_DOMAIN_TYPEHASH = exports.DEFAULT_TICK_SPACING = exports.COLLATERAL_PARAMS_TYPEHASH = exports.CBP = void 0;
4
4
  var midnight_sdk_1 = require("@morpho-org/midnight-sdk");
5
5
  Object.defineProperty(exports, "CBP", { enumerable: true, get: function () { return midnight_sdk_1.CBP; } });
6
6
  Object.defineProperty(exports, "COLLATERAL_PARAMS_TYPEHASH", { enumerable: true, get: function () { return midnight_sdk_1.COLLATERAL_PARAMS_TYPEHASH; } });
@@ -13,7 +13,10 @@ Object.defineProperty(exports, "MAX_CONTINUOUS_FEE", { enumerable: true, get: fu
13
13
  Object.defineProperty(exports, "MAX_OFFER_CAP", { enumerable: true, get: function () { return midnight_sdk_1.MAX_OFFER_CAP; } });
14
14
  Object.defineProperty(exports, "MAX_SETTLEMENT_FEES", { enumerable: true, get: function () { return midnight_sdk_1.MAX_SETTLEMENT_FEES; } });
15
15
  Object.defineProperty(exports, "MAX_TICK", { enumerable: true, get: function () { return midnight_sdk_1.MAX_TICK; } });
16
+ Object.defineProperty(exports, "MAX_TREE_HEIGHT", { enumerable: true, get: function () { return midnight_sdk_1.MAX_TREE_HEIGHT; } });
16
17
  Object.defineProperty(exports, "OFFER_TYPEHASH", { enumerable: true, get: function () { return midnight_sdk_1.OFFER_TYPEHASH; } });
18
+ Object.defineProperty(exports, "PRICE_RATIFIER_V1_OFFER_TYPEHASH", { enumerable: true, get: function () { return midnight_sdk_1.PRICE_RATIFIER_V1_OFFER_TYPEHASH; } });
17
19
  Object.defineProperty(exports, "PRICE_ROUNDING_STEP", { enumerable: true, get: function () { return midnight_sdk_1.PRICE_ROUNDING_STEP; } });
20
+ Object.defineProperty(exports, "RATE_RATIFIER_V1_OFFER_TYPEHASH", { enumerable: true, get: function () { return midnight_sdk_1.RATE_RATIFIER_V1_OFFER_TYPEHASH; } });
18
21
  Object.defineProperty(exports, "SETTLEMENT_FEE_BREAKPOINTS", { enumerable: true, get: function () { return midnight_sdk_1.SETTLEMENT_FEE_BREAKPOINTS; } });
19
22
  Object.defineProperty(exports, "TIME_TO_MAX_LIF", { enumerable: true, get: function () { return midnight_sdk_1.TIME_TO_MAX_LIF; } });
@@ -1,2 +1,2 @@
1
- export type { BuildOfferParams, CollateralParams, GroupInput, IAccrualPosition, ICollateralParams, IGroup, IMarket, IMarketParams, IOffer, IPosition, MarketInput, OfferStruct, RatifierTreeInput, SettlementFeeCbps, TreeCreateParams, TreeDescriptor, TreeInput, TreeLike, TreeMempoolValidateParams, TreeMempoolValidateRatification, TreeProof, } from "@morpho-org/midnight-sdk";
1
+ export type { AnyTree, AnyTreeSnapshot, BuildOfferParams, CollateralParams, EcrecoverTreeCreateRequest, GroupInput, IAccrualPosition, ICollateralParams, IGroup, IMarket, IMarketParams, IOffer, IPosition, MarketInput, OfferStruct, PriceRatifierV1TreeCreateRequest, RateRatifierV1TreeCreateRequest, RatifierKind, RatifierTreeInput, RatifierTypes, SetterTreeCreateRequest, SettlementFeeCbps, TreeCreateParams, TreeCreateRequest, TreeData, TreeDescriptor, TreeEntry, TreeInput, TreeLike, TreeMempoolValidateParams, TreeMempoolValidateRatification, TreeProof, TreeSnapshot, TypedRatifierTreeInput, TypedTreeMempoolValidateParams, } from "@morpho-org/midnight-sdk";
2
2
  export { AccrualPosition, Group, Market, MarketParams, Offer, Position, Tree, } from "@morpho-org/midnight-sdk";
@@ -1 +1 @@
1
- export { ChainIdMismatchError, InvalidEcrecoverSignatureVError, InvalidMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError, InvalidOfferParameterError, InvalidPositionAccrualStateError, InvalidPositionAccrualTimestampError, InvalidPositionLossFactorError, InvalidTickSpacingError, InvalidTreeError, InvalidTreeHeightError, InvalidTypedDataSignatureError, MidnightApiError, MidnightMempoolValidationError, PayloadDecodeError, PriceGreaterThanOneError, SettlementFeeExceedsPriceError, TickOutOfRangeError, UnknownCollateralIndexError, } from "@morpho-org/midnight-sdk";
1
+ export { ChainIdMismatchError, InvalidEcrecoverSignatureVError, InvalidMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError, InvalidOfferParameterError, InvalidPositionAccrualStateError, InvalidPositionAccrualTimestampError, InvalidPositionLossFactorError, InvalidRateRatifierV1RateError, InvalidRateRatifierV1TickError, InvalidRateRatifierV1TimeError, InvalidRatifierV1AddressError, InvalidTickSpacingError, InvalidTreeError, InvalidTreeHeightError, InvalidTypedDataSignatureError, MidnightApiError, MidnightMempoolValidationError, PayloadDecodeError, PriceGreaterThanOneError, RateRatifierV1BoundOverflowError, RatifierV1TakerNotAllowedError, SettlementFeeExceedsPriceError, TickOutOfRangeError, UnknownCollateralIndexError, } from "@morpho-org/midnight-sdk";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnknownCollateralIndexError = exports.TickOutOfRangeError = exports.SettlementFeeExceedsPriceError = exports.PriceGreaterThanOneError = exports.PayloadDecodeError = exports.MidnightMempoolValidationError = exports.MidnightApiError = exports.InvalidTypedDataSignatureError = exports.InvalidTreeHeightError = exports.InvalidTreeError = exports.InvalidTickSpacingError = exports.InvalidPositionLossFactorError = exports.InvalidPositionAccrualTimestampError = exports.InvalidPositionAccrualStateError = exports.InvalidOfferParameterError = exports.InvalidOfferGroupError = exports.InvalidMidnightApiResponseError = exports.InvalidMidnightApiQuoteTargetError = exports.InvalidMarketParameterError = exports.InvalidEcrecoverSignatureVError = exports.ChainIdMismatchError = void 0;
3
+ exports.UnknownCollateralIndexError = exports.TickOutOfRangeError = exports.SettlementFeeExceedsPriceError = exports.RatifierV1TakerNotAllowedError = exports.RateRatifierV1BoundOverflowError = exports.PriceGreaterThanOneError = exports.PayloadDecodeError = exports.MidnightMempoolValidationError = exports.MidnightApiError = exports.InvalidTypedDataSignatureError = exports.InvalidTreeHeightError = exports.InvalidTreeError = exports.InvalidTickSpacingError = exports.InvalidRatifierV1AddressError = exports.InvalidRateRatifierV1TimeError = exports.InvalidRateRatifierV1TickError = exports.InvalidRateRatifierV1RateError = exports.InvalidPositionLossFactorError = exports.InvalidPositionAccrualTimestampError = exports.InvalidPositionAccrualStateError = exports.InvalidOfferParameterError = exports.InvalidOfferGroupError = exports.InvalidMidnightApiResponseError = exports.InvalidMidnightApiQuoteTargetError = exports.InvalidMarketParameterError = exports.InvalidEcrecoverSignatureVError = exports.ChainIdMismatchError = void 0;
4
4
  var midnight_sdk_1 = require("@morpho-org/midnight-sdk");
5
5
  Object.defineProperty(exports, "ChainIdMismatchError", { enumerable: true, get: function () { return midnight_sdk_1.ChainIdMismatchError; } });
6
6
  Object.defineProperty(exports, "InvalidEcrecoverSignatureVError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidEcrecoverSignatureVError; } });
@@ -12,6 +12,10 @@ Object.defineProperty(exports, "InvalidOfferParameterError", { enumerable: true,
12
12
  Object.defineProperty(exports, "InvalidPositionAccrualStateError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidPositionAccrualStateError; } });
13
13
  Object.defineProperty(exports, "InvalidPositionAccrualTimestampError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidPositionAccrualTimestampError; } });
14
14
  Object.defineProperty(exports, "InvalidPositionLossFactorError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidPositionLossFactorError; } });
15
+ Object.defineProperty(exports, "InvalidRateRatifierV1RateError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidRateRatifierV1RateError; } });
16
+ Object.defineProperty(exports, "InvalidRateRatifierV1TickError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidRateRatifierV1TickError; } });
17
+ Object.defineProperty(exports, "InvalidRateRatifierV1TimeError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidRateRatifierV1TimeError; } });
18
+ Object.defineProperty(exports, "InvalidRatifierV1AddressError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidRatifierV1AddressError; } });
15
19
  Object.defineProperty(exports, "InvalidTickSpacingError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidTickSpacingError; } });
16
20
  Object.defineProperty(exports, "InvalidTreeError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidTreeError; } });
17
21
  Object.defineProperty(exports, "InvalidTreeHeightError", { enumerable: true, get: function () { return midnight_sdk_1.InvalidTreeHeightError; } });
@@ -20,6 +24,8 @@ Object.defineProperty(exports, "MidnightApiError", { enumerable: true, get: func
20
24
  Object.defineProperty(exports, "MidnightMempoolValidationError", { enumerable: true, get: function () { return midnight_sdk_1.MidnightMempoolValidationError; } });
21
25
  Object.defineProperty(exports, "PayloadDecodeError", { enumerable: true, get: function () { return midnight_sdk_1.PayloadDecodeError; } });
22
26
  Object.defineProperty(exports, "PriceGreaterThanOneError", { enumerable: true, get: function () { return midnight_sdk_1.PriceGreaterThanOneError; } });
27
+ Object.defineProperty(exports, "RateRatifierV1BoundOverflowError", { enumerable: true, get: function () { return midnight_sdk_1.RateRatifierV1BoundOverflowError; } });
28
+ Object.defineProperty(exports, "RatifierV1TakerNotAllowedError", { enumerable: true, get: function () { return midnight_sdk_1.RatifierV1TakerNotAllowedError; } });
23
29
  Object.defineProperty(exports, "SettlementFeeExceedsPriceError", { enumerable: true, get: function () { return midnight_sdk_1.SettlementFeeExceedsPriceError; } });
24
30
  Object.defineProperty(exports, "TickOutOfRangeError", { enumerable: true, get: function () { return midnight_sdk_1.TickOutOfRangeError; } });
25
31
  Object.defineProperty(exports, "UnknownCollateralIndexError", { enumerable: true, get: function () { return midnight_sdk_1.UnknownCollateralIndexError; } });