@morpho-org/morpho-sdk 9.1.0-next.0 → 9.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 (126) hide show
  1. package/README.md +3 -1
  2. package/lib/cjs/abis.d.ts +1 -1
  3. package/lib/cjs/abis.js +1 -5
  4. package/lib/cjs/actions/blue/borrow.d.ts +1 -0
  5. package/lib/cjs/actions/blue/borrow.js +1 -0
  6. package/lib/cjs/actions/blue/refinance.d.ts +1 -0
  7. package/lib/cjs/actions/blue/refinance.js +3 -0
  8. package/lib/cjs/actions/blue/repay.d.ts +1 -0
  9. package/lib/cjs/actions/blue/repay.js +1 -0
  10. package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +1 -0
  11. package/lib/cjs/actions/blue/repayWithdrawCollateral.js +2 -0
  12. package/lib/cjs/actions/blue/supply.d.ts +1 -0
  13. package/lib/cjs/actions/blue/supply.js +2 -0
  14. package/lib/cjs/actions/blue/supplyCollateral.d.ts +1 -0
  15. package/lib/cjs/actions/blue/supplyCollateral.js +1 -0
  16. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +1 -0
  17. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +2 -0
  18. package/lib/cjs/actions/blue/withdraw.d.ts +1 -0
  19. package/lib/cjs/actions/blue/withdraw.js +2 -0
  20. package/lib/cjs/actions/blue/withdrawCollateral.d.ts +1 -0
  21. package/lib/cjs/actions/blue/withdrawCollateral.js +1 -0
  22. package/lib/cjs/actions/midnight/takeLend.d.ts +1 -0
  23. package/lib/cjs/actions/midnight/takeLend.js +1 -0
  24. package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.d.ts +1 -0
  25. package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.js +1 -0
  26. package/lib/cjs/blue/abis.d.ts +1 -1
  27. package/lib/cjs/blue/abis.js +1 -5
  28. package/lib/cjs/blue/entities.d.ts +4 -4
  29. package/lib/cjs/blue/entities.js +1 -3
  30. package/lib/cjs/blue/errors.d.ts +2 -2
  31. package/lib/cjs/blue/errors.js +2 -5
  32. package/lib/cjs/blue/fetch.d.ts +2 -2
  33. package/lib/cjs/blue/fetch.js +1 -3
  34. package/lib/cjs/blue/utils.d.ts +1 -1
  35. package/lib/cjs/blue/utils.js +1 -2
  36. package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
  37. package/lib/cjs/client/morphoViemExtension.js +1 -7
  38. package/lib/cjs/entities/blue/blue.d.ts +43 -7
  39. package/lib/cjs/entities/blue/blue.js +27 -3
  40. package/lib/cjs/entities/index.d.ts +4 -4
  41. package/lib/cjs/entities/index.js +1 -3
  42. package/lib/cjs/entities/midnight/midnight.d.ts +7 -5
  43. package/lib/cjs/entities/midnight/midnight.js +7 -5
  44. package/lib/cjs/entities/midnight/types.d.ts +8 -1
  45. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +12 -34
  46. package/lib/cjs/entities/vaultV2/vaultV2.js +9 -38
  47. package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +43 -18
  48. package/lib/cjs/entities/vaultV2BlueReallocationData.js +210 -79
  49. package/lib/cjs/errors.d.ts +4 -4
  50. package/lib/cjs/errors.js +6 -10
  51. package/lib/cjs/fetch.d.ts +2 -2
  52. package/lib/cjs/fetch.js +1 -3
  53. package/lib/cjs/helpers/validate.d.ts +11 -1
  54. package/lib/cjs/helpers/validate.js +17 -1
  55. package/lib/cjs/helpers/validateTakeableOffers.d.ts +4 -2
  56. package/lib/cjs/helpers/validateTakeableOffers.js +12 -1
  57. package/lib/cjs/midnight/errors.d.ts +1 -2
  58. package/lib/cjs/midnight/errors.js +4 -5
  59. package/lib/cjs/types/error.d.ts +6 -0
  60. package/lib/cjs/types/error.js +9 -1
  61. package/lib/cjs/types/sharedLiquidity.d.ts +27 -11
  62. package/lib/cjs/utils.d.ts +2 -2
  63. package/lib/cjs/utils.js +2 -4
  64. package/lib/esm/abis.d.ts +1 -1
  65. package/lib/esm/abis.js +1 -1
  66. package/lib/esm/actions/blue/borrow.d.ts +1 -0
  67. package/lib/esm/actions/blue/borrow.js +1 -0
  68. package/lib/esm/actions/blue/refinance.d.ts +1 -0
  69. package/lib/esm/actions/blue/refinance.js +4 -1
  70. package/lib/esm/actions/blue/repay.d.ts +1 -0
  71. package/lib/esm/actions/blue/repay.js +1 -0
  72. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +1 -0
  73. package/lib/esm/actions/blue/repayWithdrawCollateral.js +3 -1
  74. package/lib/esm/actions/blue/supply.d.ts +1 -0
  75. package/lib/esm/actions/blue/supply.js +3 -1
  76. package/lib/esm/actions/blue/supplyCollateral.d.ts +1 -0
  77. package/lib/esm/actions/blue/supplyCollateral.js +1 -0
  78. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +1 -0
  79. package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -1
  80. package/lib/esm/actions/blue/withdraw.d.ts +1 -0
  81. package/lib/esm/actions/blue/withdraw.js +3 -1
  82. package/lib/esm/actions/blue/withdrawCollateral.d.ts +1 -0
  83. package/lib/esm/actions/blue/withdrawCollateral.js +1 -0
  84. package/lib/esm/actions/midnight/takeLend.d.ts +1 -0
  85. package/lib/esm/actions/midnight/takeLend.js +1 -0
  86. package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.d.ts +1 -0
  87. package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.js +1 -0
  88. package/lib/esm/blue/abis.d.ts +1 -1
  89. package/lib/esm/blue/abis.js +1 -1
  90. package/lib/esm/blue/entities.d.ts +4 -4
  91. package/lib/esm/blue/entities.js +2 -2
  92. package/lib/esm/blue/errors.d.ts +2 -2
  93. package/lib/esm/blue/errors.js +2 -2
  94. package/lib/esm/blue/fetch.d.ts +2 -2
  95. package/lib/esm/blue/fetch.js +2 -2
  96. package/lib/esm/blue/utils.d.ts +1 -1
  97. package/lib/esm/blue/utils.js +1 -1
  98. package/lib/esm/client/morphoViemExtension.d.ts +1 -1
  99. package/lib/esm/client/morphoViemExtension.js +1 -7
  100. package/lib/esm/entities/blue/blue.d.ts +43 -7
  101. package/lib/esm/entities/blue/blue.js +27 -3
  102. package/lib/esm/entities/index.d.ts +4 -4
  103. package/lib/esm/entities/index.js +2 -2
  104. package/lib/esm/entities/midnight/midnight.d.ts +7 -5
  105. package/lib/esm/entities/midnight/midnight.js +7 -5
  106. package/lib/esm/entities/midnight/types.d.ts +8 -1
  107. package/lib/esm/entities/vaultV2/vaultV2.d.ts +12 -34
  108. package/lib/esm/entities/vaultV2/vaultV2.js +10 -39
  109. package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +43 -18
  110. package/lib/esm/entities/vaultV2BlueReallocationData.js +211 -80
  111. package/lib/esm/errors.d.ts +4 -4
  112. package/lib/esm/errors.js +4 -4
  113. package/lib/esm/fetch.d.ts +2 -2
  114. package/lib/esm/fetch.js +2 -2
  115. package/lib/esm/helpers/validate.d.ts +11 -1
  116. package/lib/esm/helpers/validate.js +15 -0
  117. package/lib/esm/helpers/validateTakeableOffers.d.ts +4 -2
  118. package/lib/esm/helpers/validateTakeableOffers.js +13 -2
  119. package/lib/esm/midnight/errors.d.ts +1 -2
  120. package/lib/esm/midnight/errors.js +1 -2
  121. package/lib/esm/types/error.d.ts +6 -0
  122. package/lib/esm/types/error.js +7 -0
  123. package/lib/esm/types/sharedLiquidity.d.ts +27 -11
  124. package/lib/esm/utils.d.ts +2 -2
  125. package/lib/esm/utils.js +2 -2
  126. package/package.json +6 -6
@@ -1,5 +1,7 @@
1
- import { EmptyMidnightTakeableOffersError, MidnightTakeableOfferMarketMismatchError, } from "../types/index.js";
1
+ import { isAddressEqual, zeroAddress } from "viem";
2
+ import { EmptyMidnightTakeableOffersError, MidnightTakeableOfferMarketMismatchError, MidnightTakeableOfferZeroSellerReceiverError, } from "../types/index.js";
2
3
  import { encodeMidnightMarketId } from "./encodeMidnightCalldata.js";
4
+ import { validateMidnightAddress } from "./validateMidnightAccount.js";
3
5
  import { validateOfferSides } from "./validateOfferSides.js";
4
6
  /**
5
7
  * Validates the pure invariants shared by Midnight take entity and action layers.
@@ -9,7 +11,9 @@ import { validateOfferSides } from "./validateOfferSides.js";
9
11
  * @throws {EmptyMidnightTakeableOffersError} when no offers are provided.
10
12
  * @throws {MidnightOfferSideMismatchError} when an offer has the wrong maker side.
11
13
  * @throws {MidnightTakeableOfferMarketMismatchError} when an offer belongs to another market.
12
- * @throws {MidnightCalldataEncodingError} when a market cannot be ABI-encoded.
14
+ * @throws {MidnightTakeableOfferZeroSellerReceiverError} when a sell offer routes seller proceeds to the zero address.
15
+ * @throws {MidnightCalldataEncodingError} when a market cannot be ABI-encoded or a sell offer's
16
+ * `receiverIfMakerIsSeller` is not an address.
13
17
  * @internal
14
18
  */
15
19
  export const validateTakeableOffers = (params) => {
@@ -27,6 +31,13 @@ export const validateTakeableOffers = (params) => {
27
31
  actualMarket: actualMarketId,
28
32
  });
29
33
  }
34
+ if (take.offer.buy)
35
+ continue;
36
+ // Reject a malformed address before viem compares it.
37
+ validateMidnightAddress(`takeableOffers[${index}].offer.receiverIfMakerIsSeller`, take.offer.receiverIfMakerIsSeller);
38
+ if (isAddressEqual(take.offer.receiverIfMakerIsSeller, zeroAddress)) {
39
+ throw new MidnightTakeableOfferZeroSellerReceiverError({ index });
40
+ }
30
41
  }
31
42
  return marketId;
32
43
  };
@@ -1,2 +1 @@
1
- export { ChainIdMismatchError, InvalidEcrecoverSignatureVError, InvalidMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError, InvalidOfferParameterError, InvalidRateRatifierV1RateError, InvalidRateRatifierV1TickError, InvalidRateRatifierV1TimeError, InvalidRatifierV1AddressError, InvalidTickSpacingError, InvalidTreeError, InvalidTreeHeightError, InvalidTypedDataSignatureError, MidnightApiError, MidnightMempoolValidationError, PayloadDecodeError, PriceGreaterThanOneError, RateRatifierV1BoundOverflowError, RatifierV1TakerNotAllowedError, SettlementFeeExceedsPriceError, TickOutOfRangeError, UnknownCollateralIndexError, } from "@morpho-org/midnight-sdk";
2
- export { InvalidPositionAccrualStateError, InvalidPositionAccrualTimestampError, InvalidPositionLossFactorError, } from "@morpho-org/morpho-ts";
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,2 +1 @@
1
- export { ChainIdMismatchError, InvalidEcrecoverSignatureVError, InvalidMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError, InvalidOfferParameterError, InvalidRateRatifierV1RateError, InvalidRateRatifierV1TickError, InvalidRateRatifierV1TimeError, InvalidRatifierV1AddressError, InvalidTickSpacingError, InvalidTreeError, InvalidTreeHeightError, InvalidTypedDataSignatureError, MidnightApiError, MidnightMempoolValidationError, PayloadDecodeError, PriceGreaterThanOneError, RateRatifierV1BoundOverflowError, RatifierV1TakerNotAllowedError, SettlementFeeExceedsPriceError, TickOutOfRangeError, UnknownCollateralIndexError, } from "@morpho-org/midnight-sdk";
2
- export { InvalidPositionAccrualStateError, InvalidPositionAccrualTimestampError, InvalidPositionLossFactorError, } from "@morpho-org/morpho-ts";
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";
@@ -1340,6 +1340,12 @@ export declare class MidnightTakeableOfferMarketMismatchError extends Error {
1340
1340
  actualMarket: string;
1341
1341
  });
1342
1342
  }
1343
+ /** Thrown when a quoted Midnight sell offer routes its seller proceeds to the zero address. */
1344
+ export declare class MidnightTakeableOfferZeroSellerReceiverError extends Error {
1345
+ constructor(params: {
1346
+ index: number;
1347
+ });
1348
+ }
1343
1349
  /** Thrown when a Midnight offer's ratifier does not match its tree's ratifier route. */
1344
1350
  export declare class MidnightOfferRatifierMismatchError extends Error {
1345
1351
  constructor(params: {
@@ -1604,6 +1604,13 @@ export class MidnightTakeableOfferMarketMismatchError extends Error {
1604
1604
  this.name = "MidnightTakeableOfferMarketMismatchError";
1605
1605
  }
1606
1606
  }
1607
+ /** Thrown when a quoted Midnight sell offer routes its seller proceeds to the zero address. */
1608
+ export class MidnightTakeableOfferZeroSellerReceiverError extends Error {
1609
+ constructor(params) {
1610
+ super(`Midnight takeable offer "${params.index}" routes seller proceeds to the zero address. Drop the offer or refresh the quote.`);
1611
+ this.name = "MidnightTakeableOfferZeroSellerReceiverError";
1612
+ }
1613
+ }
1607
1614
  /** Thrown when a Midnight offer's ratifier does not match its tree's ratifier route. */
1608
1615
  export class MidnightOfferRatifierMismatchError extends Error {
1609
1616
  constructor(params) {
@@ -5,12 +5,15 @@ export interface VaultV2BluePublicAllocatorOptions {
5
5
  /** Whether Vault V2 public allocator discovery is enabled. */
6
6
  readonly enabled?: boolean;
7
7
  /**
8
- * Timestamp at which market and Vault V2 state is evaluated. Canonical state
9
- * and the returned post-state stay at this timestamp; only target-market cap
10
- * checks reserve interest on the vault's existing allocation through this
11
- * timestamp plus `capAccrualBuffer`. For market-source reallocations the
12
- * source position's interest is also reserved on cap ids shared with the
13
- * target, and reserves persist across every leg of a plan.
8
+ * Timestamp at which market and Vault V2 state is evaluated. Defaults to the
9
+ * snapshot's timestamp (the fetched block's timestamp), never earlier than
10
+ * the latest market/vault `lastUpdate`; when the snapshot has no timestamp,
11
+ * defaults to the latest market/vault `lastUpdate`. Canonical state and the
12
+ * returned post-state stay at this timestamp; only target-market cap checks
13
+ * reserve interest on the vault's existing allocation through this timestamp
14
+ * plus `capAccrualBuffer`. For market-source reallocations the source
15
+ * position's interest is also reserved on cap ids shared with the target, and
16
+ * reserves persist across every leg of a plan.
14
17
  */
15
18
  readonly timestamp?: BigIntish;
16
19
  /**
@@ -53,16 +56,29 @@ export interface VaultV2BluePublicAllocatorOptions {
53
56
  readonly reallocatableVaults?: Iterable<Address>;
54
57
  /**
55
58
  * Maximum utilization source markets may reach during friendly discovery,
56
- * scaled by WAD. The amount-aware planner falls back to 100% only when the
57
- * friendly phase cannot cover the operation's absolute shortfall.
59
+ * scaled by WAD. Within each penalty tier, the amount-aware planner falls
60
+ * back to 100% only when that tier's friendly pass leaves an absolute
61
+ * shortfall.
58
62
  *
59
63
  * @default 90% (900000000000000000n)
60
64
  */
61
65
  readonly maxWithdrawalUtilization?: bigint;
62
66
  /**
63
- * Maximum proportional vault-asset penalty accepted for each
64
- * BluePublicAllocator call, scaled by WAD. Vaults with a higher configured
65
- * penalty are ignored. Must not exceed WAD (100%).
67
+ * Maximum proportional vault-asset penalty accepted per call, scaled by
68
+ * WAD; higher-penalty vaults are ignored. Must not exceed WAD. Operation
69
+ * plans consider penalty tiers ascending, free first. Each tier uses friendly
70
+ * source utilization (90% by default) before 100%; positive tiers cover only
71
+ * the remaining absolute shortfall. Free capacity inside
72
+ * `allocatorCapHeadroom` stays unused, so a penalized leg can cover it.
73
+ * Getters count all vaults up to this limit. For `refinance`, compute the
74
+ * plan on the destination-market handle (for example,
75
+ * `client.morpho.blue(destination.marketParams, chainId)`), not the source
76
+ * handle. Pass the source position's `borrowAssets` accrued to
77
+ * `max(now, source.lastUpdate, destination.lastUpdate) + 2h` as
78
+ * `operation.amount`; the optional `operation.referralFeePct` is WAD-scaled.
79
+ * The planner includes the referral fee and its own allocator-leg penalties
80
+ * in destination debt, so penalized legs also cover their own penalty.
81
+ * Refinance never uses vaults with a 100% penalty.
66
82
  *
67
83
  * @default 0n
68
84
  */
@@ -3,7 +3,7 @@ export { AdaptiveCurveIrmLib as BlueAdaptiveCurveIrmLib, CapacityLimitReason,
3
3
  /** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
4
4
  defaultPreLiquidationParamsRegistry as blueDefaultPreLiquidationParamsRegistry,
5
5
  /** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
6
- getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2MidnightAdapterUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
6
+ getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
7
7
  export { catchRevertOnly, decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, isContractRevertError, isTransportError, isUndecodableResultError, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
8
8
  export { EcrecoverRatifier as MidnightEcrecoverRatifier,
9
9
  /** @deprecated Use MidnightEcrecoverRatifier with a tagged tree. */
@@ -17,7 +17,7 @@ RatifierUtils as MidnightRatifierUtils, SetterRatifier as MidnightSetterRatifier
17
17
  /** @deprecated Use MidnightSetterRatifier with a tagged tree. */
18
18
  SetterRatifierUtils as MidnightSetterRatifierUtils, TakeAmountsLib as MidnightTakeAmountsLib, TickLib as MidnightTickLib, TreeUtils as MidnightTreeUtils, } from "@morpho-org/midnight-sdk";
19
19
  export type { ArrayElementType, DeepPartial, DottedKeys, FieldType, PartialDottedKeys, } from "@morpho-org/morpho-ts";
20
- export { bigIntComparator, createGetValue, createHasValue, deepFreeze, entries, filterDefined, fromEntries, getLast, getLastDefined, getSubdomainBaseUrl, getValue, hasValue, isDefined, isNotNull, isNotUndefined, keys, MidnightPositionLib, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
20
+ export { bigIntComparator, createGetValue, createHasValue, deepFreeze, entries, filterDefined, fromEntries, getLast, getLastDefined, getSubdomainBaseUrl, getValue, hasValue, isDefined, isNotNull, isNotUndefined, keys, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
21
21
  export { validateClientChainId } from "./actions/requirements/validateClientChainId.js";
22
22
  export { addTransactionMetadata } from "./helpers/metadata.js";
23
23
  export { type PreviewVaultV2ForceWithdrawParams, previewVaultV2ForceWithdraw, type VaultV2ForceWithdrawPreview, } from "./helpers/previewVaultV2ForceWithdraw.js";
package/lib/esm/utils.js CHANGED
@@ -2,7 +2,7 @@ export { AdaptiveCurveIrmLib as BlueAdaptiveCurveIrmLib, CapacityLimitReason,
2
2
  /** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
3
3
  defaultPreLiquidationParamsRegistry as blueDefaultPreLiquidationParamsRegistry,
4
4
  /** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
5
- getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2MidnightAdapterUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
5
+ getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
6
6
  export { catchRevertOnly, decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, isContractRevertError, isTransportError, isUndecodableResultError, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
7
7
  export { EcrecoverRatifier as MidnightEcrecoverRatifier,
8
8
  /** @deprecated Use MidnightEcrecoverRatifier with a tagged tree. */
@@ -15,7 +15,7 @@ RateRatifierV1Utils as MidnightRateRatifierV1Utils, Ratifier as MidnightRatifier
15
15
  RatifierUtils as MidnightRatifierUtils, SetterRatifier as MidnightSetterRatifier,
16
16
  /** @deprecated Use MidnightSetterRatifier with a tagged tree. */
17
17
  SetterRatifierUtils as MidnightSetterRatifierUtils, TakeAmountsLib as MidnightTakeAmountsLib, TickLib as MidnightTickLib, TreeUtils as MidnightTreeUtils, } from "@morpho-org/midnight-sdk";
18
- export { bigIntComparator, createGetValue, createHasValue, deepFreeze, entries, filterDefined, fromEntries, getLast, getLastDefined, getSubdomainBaseUrl, getValue, hasValue, isDefined, isNotNull, isNotUndefined, keys, MidnightPositionLib, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
18
+ export { bigIntComparator, createGetValue, createHasValue, deepFreeze, entries, filterDefined, fromEntries, getLast, getLastDefined, getSubdomainBaseUrl, getValue, hasValue, isDefined, isNotNull, isNotUndefined, keys, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
19
19
  export { validateClientChainId } from "./actions/requirements/validateClientChainId.js";
20
20
  export { addTransactionMetadata } from "./helpers/metadata.js";
21
21
  export { previewVaultV2ForceWithdraw, } from "./helpers/previewVaultV2ForceWithdraw.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@morpho-org/morpho-sdk",
3
3
  "description": "Abstraction layer for Morpho's complexity.",
4
- "version": "9.1.0-next.0",
4
+ "version": "9.1.0",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -153,17 +153,17 @@
153
153
  "MIGRATION-v8-to-v9.md"
154
154
  ],
155
155
  "dependencies": {
156
- "@morpho-org/blue-sdk": "^8.1.0-next.1",
157
- "@morpho-org/blue-sdk-viem": "^7.1.0-next.1",
158
- "@morpho-org/midnight-sdk": "^2.3.0-next.0",
159
- "@morpho-org/morpho-ts": "^4.2.0-next.0"
156
+ "@morpho-org/blue-sdk": "^8.0.2",
157
+ "@morpho-org/blue-sdk-viem": "^7.1.0",
158
+ "@morpho-org/midnight-sdk": "^2.2.1",
159
+ "@morpho-org/morpho-ts": "^4.1.0"
160
160
  },
161
161
  "peerDependencies": {
162
162
  "viem": "^2.0.0"
163
163
  },
164
164
  "devDependencies": {
165
165
  "@morpho-org/morpho-test": "^4.1.0",
166
- "@morpho-org/test": "^2.12.0-next.1",
166
+ "@morpho-org/test": "^2.11.0",
167
167
  "fast-check": "^4.9.0",
168
168
  "typescript": "7.0.2",
169
169
  "viem": "^2.55.10",