@morpho-org/morpho-sdk 9.1.0-next.0 → 9.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.
- package/README.md +7 -1
- package/lib/cjs/abis.d.ts +2 -2
- package/lib/cjs/abis.js +3 -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/constants.d.ts +1 -1
- package/lib/cjs/blue/constants.js +2 -1
- 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/constants.d.ts +2 -2
- package/lib/cjs/constants.js +4 -1
- package/lib/cjs/entities/blue/blue.d.ts +112 -21
- package/lib/cjs/entities/blue/blue.js +58 -6
- 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 +9 -6
- package/lib/cjs/entities/midnight/midnight.js +12 -9
- package/lib/cjs/entities/midnight/types.d.ts +8 -1
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +8 -0
- package/lib/cjs/entities/vaultV1/vaultV1.js +5 -0
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +16 -34
- package/lib/cjs/entities/vaultV2/vaultV2.js +12 -38
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +77 -19
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +376 -80
- 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/constant.d.ts +7 -0
- package/lib/cjs/helpers/constant.js +8 -1
- package/lib/cjs/helpers/deadShares.d.ts +82 -0
- package/lib/cjs/helpers/deadShares.js +200 -0
- package/lib/cjs/helpers/index.d.ts +2 -1
- package/lib/cjs/helpers/index.js +7 -1
- 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/abis.d.ts +1 -1
- package/lib/cjs/midnight/abis.js +3 -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 +60 -5
- package/lib/cjs/types/error.js +68 -6
- package/lib/cjs/types/sharedLiquidity.d.ts +31 -11
- package/lib/cjs/utils.d.ts +2 -2
- package/lib/cjs/utils.js +2 -4
- package/lib/esm/abis.d.ts +2 -2
- package/lib/esm/abis.js +2 -2
- 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/constants.d.ts +1 -1
- package/lib/esm/blue/constants.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/constants.d.ts +2 -2
- package/lib/esm/constants.js +2 -2
- package/lib/esm/entities/blue/blue.d.ts +112 -21
- package/lib/esm/entities/blue/blue.js +60 -8
- 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 +9 -6
- package/lib/esm/entities/midnight/midnight.js +13 -10
- package/lib/esm/entities/midnight/types.d.ts +8 -1
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +8 -0
- package/lib/esm/entities/vaultV1/vaultV1.js +5 -0
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +16 -34
- package/lib/esm/entities/vaultV2/vaultV2.js +13 -39
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +77 -19
- package/lib/esm/entities/vaultV2BlueReallocationData.js +377 -81
- 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/constant.d.ts +7 -0
- package/lib/esm/helpers/constant.js +7 -0
- package/lib/esm/helpers/deadShares.d.ts +82 -0
- package/lib/esm/helpers/deadShares.js +195 -0
- package/lib/esm/helpers/index.d.ts +2 -1
- package/lib/esm/helpers/index.js +2 -1
- 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/abis.d.ts +1 -1
- package/lib/esm/midnight/abis.js +1 -1
- package/lib/esm/midnight/errors.d.ts +1 -2
- package/lib/esm/midnight/errors.js +1 -2
- package/lib/esm/types/error.d.ts +60 -5
- package/lib/esm/types/error.js +64 -5
- package/lib/esm/types/sharedLiquidity.d.ts +31 -11
- package/lib/esm/utils.d.ts +2 -2
- package/lib/esm/utils.js +2 -2
- package/package.json +9 -8
package/lib/esm/types/error.js
CHANGED
|
@@ -1144,11 +1144,16 @@ export class RepaySharesExceedDebtError extends Error {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
/**
|
|
1147
|
-
* Thrown when shared liquidity
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1147
|
+
* Thrown when shared liquidity cannot cover the operation's required
|
|
1148
|
+
* reallocated assets. When Blue's balance is explicit, it is also thrown if
|
|
1149
|
+
* that balance cannot fund the penalty flash loan, an earlier market-sourced
|
|
1150
|
+
* withdrawal, or the final operation transfer. A borrow or withdraw plan that
|
|
1151
|
+
* otherwise covers its shortfall but whose planned penalty exceeds its amount
|
|
1152
|
+
* instead throws `InputExceedsMaxError`.
|
|
1150
1153
|
*
|
|
1151
|
-
*
|
|
1154
|
+
* `shortfall` is the reallocated assets required by the operation and is
|
|
1155
|
+
* comparable to `available`. Pattern-match on the class and inspect `params`
|
|
1156
|
+
* to surface the gap to users.
|
|
1152
1157
|
*/
|
|
1153
1158
|
export class InsufficientSharedLiquidityError extends Error {
|
|
1154
1159
|
params;
|
|
@@ -1580,7 +1585,12 @@ export class MidnightOfferCallbackDataMismatchError extends Error {
|
|
|
1580
1585
|
this.name = "MidnightOfferCallbackDataMismatchError";
|
|
1581
1586
|
}
|
|
1582
1587
|
}
|
|
1583
|
-
/**
|
|
1588
|
+
/**
|
|
1589
|
+
* Thrown when loan assets would be parked in a Morpho Blue market with no existing supply.
|
|
1590
|
+
*
|
|
1591
|
+
* @deprecated `supplyBlueMakeLend` now throws `InsufficientDeadSharesError` or
|
|
1592
|
+
* `MissingDeadSharesDataError` instead; kept exported so existing `instanceof` checks compile.
|
|
1593
|
+
*/
|
|
1584
1594
|
export class EmptyBlueParkingMarketError extends Error {
|
|
1585
1595
|
constructor(params) {
|
|
1586
1596
|
super(`Morpho Blue market "${params.marketId}" has no supply shares. Parking assets in an empty market is exposed to supply-share-price inflation; choose a market with existing supply.`);
|
|
@@ -1597,6 +1607,48 @@ export class ZeroBlueParkingSharesError extends Error {
|
|
|
1597
1607
|
this.name = "ZeroBlueParkingSharesError";
|
|
1598
1608
|
}
|
|
1599
1609
|
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Thrown when a Morpho Blue market or vault, or a market or Vault V1 it can allocate to, fails the
|
|
1612
|
+
* dead-deposit rule that protects deposits against share-price inflation.
|
|
1613
|
+
*/
|
|
1614
|
+
export class InsufficientDeadSharesError extends Error {
|
|
1615
|
+
/** Failing entity, outermost vault first; the last element is the market id or vault address. */
|
|
1616
|
+
entity;
|
|
1617
|
+
/** Failed condition. */
|
|
1618
|
+
reason;
|
|
1619
|
+
/** Observed dead shares or assets; for `sharePrice`, `(totalAssets + 1) * 10 * virtualShares`. */
|
|
1620
|
+
observed;
|
|
1621
|
+
/** Required minimum; for `sharePrice`, `totalSupply + virtualShares + 1`. */
|
|
1622
|
+
required;
|
|
1623
|
+
constructor(params) {
|
|
1624
|
+
const target = params.entity.join(" > ");
|
|
1625
|
+
super(params.reason === "sharePrice"
|
|
1626
|
+
? `Vault V2 "${target}" share price is at or below 1 / (10 * virtualShares) ("${params.observed}" < "${params.required}"), so it may have been deflated before its dead deposit. Choose another vault.`
|
|
1627
|
+
: `"${target}" holds "${params.observed}" dead ${params.reason === "deadShares" ? "shares" : "assets"} at 0x000000000000000000000000000000000000dEaD, below the required "${params.required}". Choose a market or vault with a sufficient dead deposit.`);
|
|
1628
|
+
this.name = "InsufficientDeadSharesError";
|
|
1629
|
+
this.entity = params.entity;
|
|
1630
|
+
this.reason = params.reason;
|
|
1631
|
+
this.observed = params.observed;
|
|
1632
|
+
this.required = params.required;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* Thrown when a market or vault snapshot lacks the data the dead-deposit check needs, such as a
|
|
1637
|
+
* snapshot built by hand, from the Morpho API or by an older fetcher, or a Vault V2 adapter the
|
|
1638
|
+
* SDK cannot hydrate. The check fails closed rather than pass unverified data.
|
|
1639
|
+
*/
|
|
1640
|
+
export class MissingDeadSharesDataError extends Error {
|
|
1641
|
+
/** Entity missing the data, outermost vault first. */
|
|
1642
|
+
entity;
|
|
1643
|
+
/** Missing field. */
|
|
1644
|
+
field;
|
|
1645
|
+
constructor(params) {
|
|
1646
|
+
super(`"${params.entity.join(" > ")}" has no "${params.field}" data for the dead-deposit check. Fetch the snapshot with the @morpho-org/blue-sdk-viem fetchers before building the transaction.`);
|
|
1647
|
+
this.name = "MissingDeadSharesDataError";
|
|
1648
|
+
this.entity = params.entity;
|
|
1649
|
+
this.field = params.field;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1600
1652
|
/** Thrown when a quoted Midnight takeable offer belongs to a different market than the requested flow. */
|
|
1601
1653
|
export class MidnightTakeableOfferMarketMismatchError extends Error {
|
|
1602
1654
|
constructor(params) {
|
|
@@ -1604,6 +1656,13 @@ export class MidnightTakeableOfferMarketMismatchError extends Error {
|
|
|
1604
1656
|
this.name = "MidnightTakeableOfferMarketMismatchError";
|
|
1605
1657
|
}
|
|
1606
1658
|
}
|
|
1659
|
+
/** Thrown when a quoted Midnight sell offer routes its seller proceeds to the zero address. */
|
|
1660
|
+
export class MidnightTakeableOfferZeroSellerReceiverError extends Error {
|
|
1661
|
+
constructor(params) {
|
|
1662
|
+
super(`Midnight takeable offer "${params.index}" routes seller proceeds to the zero address. Drop the offer or refresh the quote.`);
|
|
1663
|
+
this.name = "MidnightTakeableOfferZeroSellerReceiverError";
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1607
1666
|
/** Thrown when a Midnight offer's ratifier does not match its tree's ratifier route. */
|
|
1608
1667
|
export class MidnightOfferRatifierMismatchError extends Error {
|
|
1609
1668
|
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,33 @@ 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 planner tries this friendly
|
|
60
|
+
* utilization before falling back to 100% when required coverage remains.
|
|
61
|
+
* Positive-penalty tiers cover the remaining absolute shortfall or, when
|
|
62
|
+
* larger, Blue's loan-token balance deficit while BlueBundlesV1 flash-loans
|
|
63
|
+
* the penalty.
|
|
58
64
|
*
|
|
59
65
|
* @default 90% (900000000000000000n)
|
|
60
66
|
*/
|
|
61
67
|
readonly maxWithdrawalUtilization?: bigint;
|
|
62
68
|
/**
|
|
63
|
-
* Maximum proportional vault-asset penalty accepted
|
|
64
|
-
*
|
|
65
|
-
* penalty
|
|
69
|
+
* Maximum proportional vault-asset penalty accepted per call, scaled by
|
|
70
|
+
* WAD; higher-penalty vaults are ignored. Must not exceed WAD. Operation
|
|
71
|
+
* plans consider penalty tiers ascending, free first. Each tier tries
|
|
72
|
+
* friendly source utilization (90% by default) before falling back to 100%
|
|
73
|
+
* when required coverage remains. Positive-penalty tiers cover the remaining
|
|
74
|
+
* absolute shortfall or, when larger, Blue's loan-token balance deficit while
|
|
75
|
+
* BlueBundlesV1 flash-loans the penalty. Free capacity inside
|
|
76
|
+
* `allocatorCapHeadroom` stays unused, so a penalized leg can cover it.
|
|
77
|
+
* Getters count all vaults up to this limit. For `refinance`, compute the
|
|
78
|
+
* plan on the destination-market handle (for example,
|
|
79
|
+
* `client.morpho.blue(destination.marketParams, chainId)`), not the source
|
|
80
|
+
* handle. Pass the source position's `borrowAssets` accrued to
|
|
81
|
+
* `max(now, source.lastUpdate, destination.lastUpdate) + 2h` as
|
|
82
|
+
* `operation.amount`; the optional `operation.referralFeePct` is WAD-scaled.
|
|
83
|
+
* The planner includes the referral fee and its own allocator-leg penalties
|
|
84
|
+
* in destination debt, so penalized legs also cover their own penalty.
|
|
85
|
+
* Refinance never uses vaults with a 100% penalty.
|
|
66
86
|
*
|
|
67
87
|
* @default 0n
|
|
68
88
|
*/
|
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.
|
|
4
|
+
"version": "9.2.0",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -150,20 +150,21 @@
|
|
|
150
150
|
"MIGRATION-v5-to-v6.md",
|
|
151
151
|
"MIGRATION-v6-to-v7.md",
|
|
152
152
|
"MIGRATION-v7-to-v8.md",
|
|
153
|
-
"MIGRATION-v8-to-v9.md"
|
|
153
|
+
"MIGRATION-v8-to-v9.md",
|
|
154
|
+
"DEAD-SHARE-PROTECTION.md"
|
|
154
155
|
],
|
|
155
156
|
"dependencies": {
|
|
156
|
-
"@morpho-org/blue-sdk": "^8.1.0
|
|
157
|
-
"@morpho-org/blue-sdk-viem": "^7.
|
|
158
|
-
"@morpho-org/midnight-sdk": "^2.3.0
|
|
159
|
-
"@morpho-org/morpho-ts": "^4.
|
|
157
|
+
"@morpho-org/blue-sdk": "^8.1.0",
|
|
158
|
+
"@morpho-org/blue-sdk-viem": "^7.2.0",
|
|
159
|
+
"@morpho-org/midnight-sdk": "^2.3.0",
|
|
160
|
+
"@morpho-org/morpho-ts": "^4.1.0"
|
|
160
161
|
},
|
|
161
162
|
"peerDependencies": {
|
|
162
163
|
"viem": "^2.0.0"
|
|
163
164
|
},
|
|
164
165
|
"devDependencies": {
|
|
165
|
-
"@morpho-org/morpho-test": "^4.
|
|
166
|
-
"@morpho-org/test": "^2.12.0
|
|
166
|
+
"@morpho-org/morpho-test": "^4.2.0",
|
|
167
|
+
"@morpho-org/test": "^2.12.0",
|
|
167
168
|
"fast-check": "^4.9.0",
|
|
168
169
|
"typescript": "7.0.2",
|
|
169
170
|
"viem": "^2.55.10",
|