@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.
- package/README.md +3 -1
- package/lib/cjs/abis.d.ts +1 -1
- package/lib/cjs/abis.js +1 -5
- package/lib/cjs/actions/blue/borrow.d.ts +1 -0
- package/lib/cjs/actions/blue/borrow.js +1 -0
- package/lib/cjs/actions/blue/refinance.d.ts +1 -0
- package/lib/cjs/actions/blue/refinance.js +3 -0
- package/lib/cjs/actions/blue/repay.d.ts +1 -0
- package/lib/cjs/actions/blue/repay.js +1 -0
- package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +1 -0
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +2 -0
- package/lib/cjs/actions/blue/supply.d.ts +1 -0
- package/lib/cjs/actions/blue/supply.js +2 -0
- package/lib/cjs/actions/blue/supplyCollateral.d.ts +1 -0
- package/lib/cjs/actions/blue/supplyCollateral.js +1 -0
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +1 -0
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +2 -0
- package/lib/cjs/actions/blue/withdraw.d.ts +1 -0
- package/lib/cjs/actions/blue/withdraw.js +2 -0
- package/lib/cjs/actions/blue/withdrawCollateral.d.ts +1 -0
- package/lib/cjs/actions/blue/withdrawCollateral.js +1 -0
- package/lib/cjs/actions/midnight/takeLend.d.ts +1 -0
- package/lib/cjs/actions/midnight/takeLend.js +1 -0
- package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.d.ts +1 -0
- package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.js +1 -0
- package/lib/cjs/blue/abis.d.ts +1 -1
- package/lib/cjs/blue/abis.js +1 -5
- package/lib/cjs/blue/entities.d.ts +4 -4
- package/lib/cjs/blue/entities.js +1 -3
- package/lib/cjs/blue/errors.d.ts +2 -2
- package/lib/cjs/blue/errors.js +2 -5
- package/lib/cjs/blue/fetch.d.ts +2 -2
- package/lib/cjs/blue/fetch.js +1 -3
- package/lib/cjs/blue/utils.d.ts +1 -1
- package/lib/cjs/blue/utils.js +1 -2
- package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
- package/lib/cjs/client/morphoViemExtension.js +1 -7
- package/lib/cjs/entities/blue/blue.d.ts +43 -7
- package/lib/cjs/entities/blue/blue.js +27 -3
- package/lib/cjs/entities/index.d.ts +4 -4
- package/lib/cjs/entities/index.js +1 -3
- package/lib/cjs/entities/midnight/midnight.d.ts +7 -5
- package/lib/cjs/entities/midnight/midnight.js +7 -5
- package/lib/cjs/entities/midnight/types.d.ts +8 -1
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +12 -34
- package/lib/cjs/entities/vaultV2/vaultV2.js +9 -38
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +43 -18
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +210 -79
- package/lib/cjs/errors.d.ts +4 -4
- package/lib/cjs/errors.js +6 -10
- package/lib/cjs/fetch.d.ts +2 -2
- package/lib/cjs/fetch.js +1 -3
- package/lib/cjs/helpers/validate.d.ts +11 -1
- package/lib/cjs/helpers/validate.js +17 -1
- package/lib/cjs/helpers/validateTakeableOffers.d.ts +4 -2
- package/lib/cjs/helpers/validateTakeableOffers.js +12 -1
- package/lib/cjs/midnight/errors.d.ts +1 -2
- package/lib/cjs/midnight/errors.js +4 -5
- package/lib/cjs/types/error.d.ts +6 -0
- package/lib/cjs/types/error.js +9 -1
- package/lib/cjs/types/sharedLiquidity.d.ts +27 -11
- package/lib/cjs/utils.d.ts +2 -2
- package/lib/cjs/utils.js +2 -4
- package/lib/esm/abis.d.ts +1 -1
- package/lib/esm/abis.js +1 -1
- package/lib/esm/actions/blue/borrow.d.ts +1 -0
- package/lib/esm/actions/blue/borrow.js +1 -0
- package/lib/esm/actions/blue/refinance.d.ts +1 -0
- package/lib/esm/actions/blue/refinance.js +4 -1
- package/lib/esm/actions/blue/repay.d.ts +1 -0
- package/lib/esm/actions/blue/repay.js +1 -0
- package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +1 -0
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +3 -1
- package/lib/esm/actions/blue/supply.d.ts +1 -0
- package/lib/esm/actions/blue/supply.js +3 -1
- package/lib/esm/actions/blue/supplyCollateral.d.ts +1 -0
- package/lib/esm/actions/blue/supplyCollateral.js +1 -0
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +1 -0
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -1
- package/lib/esm/actions/blue/withdraw.d.ts +1 -0
- package/lib/esm/actions/blue/withdraw.js +3 -1
- package/lib/esm/actions/blue/withdrawCollateral.d.ts +1 -0
- package/lib/esm/actions/blue/withdrawCollateral.js +1 -0
- package/lib/esm/actions/midnight/takeLend.d.ts +1 -0
- package/lib/esm/actions/midnight/takeLend.js +1 -0
- package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.d.ts +1 -0
- package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.js +1 -0
- package/lib/esm/blue/abis.d.ts +1 -1
- package/lib/esm/blue/abis.js +1 -1
- package/lib/esm/blue/entities.d.ts +4 -4
- package/lib/esm/blue/entities.js +2 -2
- package/lib/esm/blue/errors.d.ts +2 -2
- package/lib/esm/blue/errors.js +2 -2
- package/lib/esm/blue/fetch.d.ts +2 -2
- package/lib/esm/blue/fetch.js +2 -2
- package/lib/esm/blue/utils.d.ts +1 -1
- package/lib/esm/blue/utils.js +1 -1
- package/lib/esm/client/morphoViemExtension.d.ts +1 -1
- package/lib/esm/client/morphoViemExtension.js +1 -7
- package/lib/esm/entities/blue/blue.d.ts +43 -7
- package/lib/esm/entities/blue/blue.js +27 -3
- package/lib/esm/entities/index.d.ts +4 -4
- package/lib/esm/entities/index.js +2 -2
- package/lib/esm/entities/midnight/midnight.d.ts +7 -5
- package/lib/esm/entities/midnight/midnight.js +7 -5
- package/lib/esm/entities/midnight/types.d.ts +8 -1
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +12 -34
- package/lib/esm/entities/vaultV2/vaultV2.js +10 -39
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +43 -18
- package/lib/esm/entities/vaultV2BlueReallocationData.js +211 -80
- package/lib/esm/errors.d.ts +4 -4
- package/lib/esm/errors.js +4 -4
- package/lib/esm/fetch.d.ts +2 -2
- package/lib/esm/fetch.js +2 -2
- package/lib/esm/helpers/validate.d.ts +11 -1
- package/lib/esm/helpers/validate.js +15 -0
- package/lib/esm/helpers/validateTakeableOffers.d.ts +4 -2
- package/lib/esm/helpers/validateTakeableOffers.js +13 -2
- package/lib/esm/midnight/errors.d.ts +1 -2
- package/lib/esm/midnight/errors.js +1 -2
- package/lib/esm/types/error.d.ts +6 -0
- package/lib/esm/types/error.js +7 -0
- package/lib/esm/types/sharedLiquidity.d.ts +27 -11
- package/lib/esm/utils.d.ts +2 -2
- package/lib/esm/utils.js +2 -2
- package/package.json +6 -6
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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";
|
package/lib/esm/types/error.d.ts
CHANGED
|
@@ -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: {
|
package/lib/esm/types/error.js
CHANGED
|
@@ -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.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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.
|
|
57
|
-
*
|
|
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
|
|
64
|
-
*
|
|
65
|
-
* penalty
|
|
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
|
*/
|
package/lib/esm/utils.d.ts
CHANGED
|
@@ -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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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.
|
|
157
|
-
"@morpho-org/blue-sdk-viem": "^7.1.0
|
|
158
|
-
"@morpho-org/midnight-sdk": "^2.
|
|
159
|
-
"@morpho-org/morpho-ts": "^4.
|
|
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.
|
|
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",
|