@morpho-org/morpho-sdk 7.0.0 → 7.1.0-next.1
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/MIGRATION-v6-to-v7.md +6 -0
- package/lib/cjs/abis.d.ts +1 -1
- package/lib/cjs/abis.js +5 -1
- package/lib/cjs/blue/abis.d.ts +1 -1
- package/lib/cjs/blue/abis.js +5 -1
- package/lib/cjs/blue/entities.d.ts +4 -4
- package/lib/cjs/blue/entities.js +3 -1
- package/lib/cjs/blue/errors.d.ts +2 -2
- package/lib/cjs/blue/errors.js +5 -1
- package/lib/cjs/blue/fetch.d.ts +2 -2
- package/lib/cjs/blue/fetch.js +3 -1
- package/lib/cjs/blue/utils.d.ts +1 -1
- package/lib/cjs/blue/utils.js +2 -1
- package/lib/cjs/entities/index.d.ts +4 -4
- package/lib/cjs/entities/index.js +3 -1
- package/lib/cjs/entities/midnight/midnight.d.ts +5 -2
- package/lib/cjs/entities/midnight/midnight.js +5 -2
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +1 -1
- package/lib/cjs/entities/vaultV1/vaultV1.js +31 -34
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +35 -11
- package/lib/cjs/entities/vaultV2/vaultV2.js +67 -41
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +5 -3
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +9 -3
- package/lib/cjs/errors.d.ts +4 -4
- package/lib/cjs/errors.js +10 -5
- package/lib/cjs/fetch.d.ts +2 -2
- package/lib/cjs/fetch.js +3 -1
- package/lib/cjs/midnight/errors.d.ts +2 -1
- package/lib/cjs/midnight/errors.js +5 -4
- package/lib/cjs/types/action.d.ts +102 -1
- package/lib/cjs/types/action.js +102 -1
- package/lib/cjs/utils.d.ts +2 -2
- package/lib/cjs/utils.js +4 -2
- package/lib/esm/abis.d.ts +1 -1
- package/lib/esm/abis.js +1 -1
- 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/entities/index.d.ts +4 -4
- package/lib/esm/entities/index.js +2 -2
- package/lib/esm/entities/midnight/midnight.d.ts +5 -2
- package/lib/esm/entities/midnight/midnight.js +5 -2
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +1 -1
- package/lib/esm/entities/vaultV1/vaultV1.js +32 -35
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +35 -11
- package/lib/esm/entities/vaultV2/vaultV2.js +68 -42
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +5 -3
- package/lib/esm/entities/vaultV2BlueReallocationData.js +9 -3
- 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/midnight/errors.d.ts +2 -1
- package/lib/esm/midnight/errors.js +2 -1
- package/lib/esm/types/action.d.ts +102 -1
- package/lib/esm/types/action.js +102 -1
- package/lib/esm/utils.d.ts +2 -2
- package/lib/esm/utils.js +2 -2
- package/package.json +8 -9
|
@@ -39,8 +39,9 @@ export interface InputVaultV2BlueReallocationData {
|
|
|
39
39
|
/**
|
|
40
40
|
* Immutable-by-convention state container for Vault V2 BluePublicAllocator simulations.
|
|
41
41
|
*
|
|
42
|
-
* Constructor inputs are cloned
|
|
43
|
-
*
|
|
42
|
+
* Constructor inputs are cloned, except Midnight adapter snapshots: those are
|
|
43
|
+
* shared by reference and must be treated as read-only. Every simulated
|
|
44
|
+
* reallocation returns a new instance. Planning keeps the transaction-scoped `firstTotalAssets`
|
|
44
45
|
* denominator outside the durable snapshot while applying reallocations in
|
|
45
46
|
* contract order. Penalty donations update simulated vault accounting but are
|
|
46
47
|
* excluded from same-plan idle liquidity so round-up dust cannot create
|
|
@@ -100,7 +101,8 @@ export declare class VaultV2BlueReallocationData implements InputVaultV2BlueReal
|
|
|
100
101
|
/**
|
|
101
102
|
* Clones the complete simulation snapshot.
|
|
102
103
|
*
|
|
103
|
-
* @returns A deep clone of this simulation state.
|
|
104
|
+
* @returns A deep clone of this simulation state. Midnight adapter snapshots are
|
|
105
|
+
* shared by reference and must be treated as read-only.
|
|
104
106
|
* @example
|
|
105
107
|
* ```ts
|
|
106
108
|
* import { markets } from "@morpho-org/morpho-test";
|
|
@@ -75,6 +75,10 @@ const cloneAccrualVault = (vault, markets) => new AccrualVault({
|
|
|
75
75
|
position: clonePosition(position, markets),
|
|
76
76
|
})));
|
|
77
77
|
const cloneAdapter = (adapter, markets) => {
|
|
78
|
+
// BluePublicAllocator never moves Midnight liquidity, and reallocation never mutates a Midnight
|
|
79
|
+
// adapter, so its read-only snapshot is shared as-is.
|
|
80
|
+
if (adapter.type === "VaultV2MidnightAdapter")
|
|
81
|
+
return adapter;
|
|
78
82
|
const base = {
|
|
79
83
|
address: adapter.address,
|
|
80
84
|
parentVault: adapter.parentVault,
|
|
@@ -122,8 +126,9 @@ const cloneVault = (vault, { markets, adapterKeysToClone, }) => {
|
|
|
122
126
|
/**
|
|
123
127
|
* Immutable-by-convention state container for Vault V2 BluePublicAllocator simulations.
|
|
124
128
|
*
|
|
125
|
-
* Constructor inputs are cloned
|
|
126
|
-
*
|
|
129
|
+
* Constructor inputs are cloned, except Midnight adapter snapshots: those are
|
|
130
|
+
* shared by reference and must be treated as read-only. Every simulated
|
|
131
|
+
* reallocation returns a new instance. Planning keeps the transaction-scoped `firstTotalAssets`
|
|
127
132
|
* denominator outside the durable snapshot while applying reallocations in
|
|
128
133
|
* contract order. Penalty donations update simulated vault accounting but are
|
|
129
134
|
* excluded from same-plan idle liquidity so round-up dust cannot create
|
|
@@ -245,7 +250,8 @@ export class VaultV2BlueReallocationData {
|
|
|
245
250
|
/**
|
|
246
251
|
* Clones the complete simulation snapshot.
|
|
247
252
|
*
|
|
248
|
-
* @returns A deep clone of this simulation state.
|
|
253
|
+
* @returns A deep clone of this simulation state. Midnight adapter snapshots are
|
|
254
|
+
* shared by reference and must be treated as read-only.
|
|
249
255
|
* @example
|
|
250
256
|
* ```ts
|
|
251
257
|
* import { markets } from "@morpho-org/morpho-test";
|
package/lib/esm/errors.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { BlueErrors, IncompleteChainRegistryError, InvalidMarketParamsError as InvalidBlueMarketParamsError, UnknownAddressError, UnknownDataError as UnknownBlueDataError, UnknownFactory as UnknownBlueFactory, UnknownMarketAllocationError as UnknownBlueMarketAllocationError, UnknownMarketParamsError as UnknownBlueMarketParamsError, UnknownOfFactory as UnknownBlueOfFactory, UnknownTokenError as UnknownBlueTokenError, UnknownTokenPriceError as UnknownBlueTokenPriceError, UnknownVaultConfigError as UnknownBlueVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError as UnsupportedBlueMarketIrmError,
|
|
1
|
+
export { BlueErrors, IncompleteChainRegistryError, InvalidMarketParamsError as InvalidBlueMarketParamsError, InvalidVaultV2MidnightAdapterMarketsError as InvalidBlueVaultV2MidnightAdapterMarketsError, UnknownAddressError, UnknownDataError as UnknownBlueDataError, UnknownFactory as UnknownBlueFactory, UnknownMarketAllocationError as UnknownBlueMarketAllocationError, UnknownMarketParamsError as UnknownBlueMarketParamsError, UnknownOfFactory as UnknownBlueOfFactory, UnknownTokenError as UnknownBlueTokenError, UnknownTokenPriceError as UnknownBlueTokenPriceError, UnknownVaultConfigError as UnknownBlueVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError as UnsupportedBlueMarketIrmError,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
UnsupportedPreLiquidationParamsError as UnsupportedBluePreLiquidationParamsError, UnsupportedVaultV2AdapterError as UnsupportedBlueVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
4
|
-
export { getUnsupportedVaultV2Adapter as getBlueUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError as isBlueUnknownOfFactoryError, MarketParamsIdMismatchError as BlueMarketParamsIdMismatchError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
-
export { ChainIdMismatchError as MidnightChainIdMismatchError, InvalidEcrecoverSignatureVError as InvalidMidnightEcrecoverSignatureVError, InvalidMarketParameterError as InvalidMidnightMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError as InvalidMidnightOfferGroupError, InvalidOfferParameterError as InvalidMidnightOfferParameterError,
|
|
4
|
+
export { getUnsupportedVaultV2Adapter as getBlueUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError as isBlueUnknownOfFactoryError, MarketParamsIdMismatchError as BlueMarketParamsIdMismatchError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnresolvedBlockNumberError as BlueUnresolvedBlockNumberError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
+
export { ChainIdMismatchError as MidnightChainIdMismatchError, InvalidEcrecoverSignatureVError as InvalidMidnightEcrecoverSignatureVError, InvalidMarketParameterError as InvalidMidnightMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError as InvalidMidnightOfferGroupError, InvalidOfferParameterError as InvalidMidnightOfferParameterError, InvalidRateRatifierV1RateError as InvalidMidnightRateRatifierV1RateError, InvalidRateRatifierV1TickError as InvalidMidnightRateRatifierV1TickError, InvalidRateRatifierV1TimeError as InvalidMidnightRateRatifierV1TimeError, InvalidRatifierV1AddressError as InvalidMidnightRatifierV1AddressError, InvalidTickSpacingError as InvalidMidnightTickSpacingError, InvalidTreeError as InvalidMidnightTreeError, InvalidTreeHeightError as InvalidMidnightTreeHeightError, InvalidTypedDataSignatureError as InvalidMidnightTypedDataSignatureError, MidnightApiError, MidnightMempoolValidationError, PayloadDecodeError as MidnightPayloadDecodeError, PriceGreaterThanOneError as MidnightPriceGreaterThanOneError, RateRatifierV1BoundOverflowError as MidnightRateRatifierV1BoundOverflowError, RatifierV1TakerNotAllowedError as MidnightRatifierV1TakerNotAllowedError, SettlementFeeExceedsPriceError as MidnightSettlementFeeExceedsPriceError, TickOutOfRangeError as MidnightTickOutOfRangeError, UnknownCollateralIndexError as UnknownMidnightCollateralIndexError, } from "@morpho-org/midnight-sdk";
|
|
6
6
|
export type { ErrorClass } from "@morpho-org/morpho-ts";
|
|
7
|
-
export { _try, DivisionByZeroError, InvalidAddressError, InvalidBitLengthError, NegativeValueError, RegistryValueAlreadyRegisteredError, } from "@morpho-org/morpho-ts";
|
|
7
|
+
export { _try, DivisionByZeroError, InvalidAddressError, InvalidBitLengthError, InvalidPositionAccrualStateError, InvalidPositionAccrualStateError as InvalidMidnightPositionAccrualStateError, InvalidPositionAccrualTimestampError, InvalidPositionAccrualTimestampError as InvalidMidnightPositionAccrualTimestampError, InvalidPositionLossFactorError, InvalidPositionLossFactorError as InvalidMidnightPositionLossFactorError, NegativeValueError, RegistryValueAlreadyRegisteredError, } from "@morpho-org/morpho-ts";
|
package/lib/esm/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { BlueErrors, IncompleteChainRegistryError, InvalidMarketParamsError as InvalidBlueMarketParamsError, UnknownAddressError, UnknownDataError as UnknownBlueDataError, UnknownFactory as UnknownBlueFactory, UnknownMarketAllocationError as UnknownBlueMarketAllocationError, UnknownMarketParamsError as UnknownBlueMarketParamsError, UnknownOfFactory as UnknownBlueOfFactory, UnknownTokenError as UnknownBlueTokenError, UnknownTokenPriceError as UnknownBlueTokenPriceError, UnknownVaultConfigError as UnknownBlueVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError as UnsupportedBlueMarketIrmError,
|
|
1
|
+
export { BlueErrors, IncompleteChainRegistryError, InvalidMarketParamsError as InvalidBlueMarketParamsError, InvalidVaultV2MidnightAdapterMarketsError as InvalidBlueVaultV2MidnightAdapterMarketsError, UnknownAddressError, UnknownDataError as UnknownBlueDataError, UnknownFactory as UnknownBlueFactory, UnknownMarketAllocationError as UnknownBlueMarketAllocationError, UnknownMarketParamsError as UnknownBlueMarketParamsError, UnknownOfFactory as UnknownBlueOfFactory, UnknownTokenError as UnknownBlueTokenError, UnknownTokenPriceError as UnknownBlueTokenPriceError, UnknownVaultConfigError as UnknownBlueVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError as UnsupportedBlueMarketIrmError,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
UnsupportedPreLiquidationParamsError as UnsupportedBluePreLiquidationParamsError, UnsupportedVaultV2AdapterError as UnsupportedBlueVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
4
|
-
export { getUnsupportedVaultV2Adapter as getBlueUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError as isBlueUnknownOfFactoryError, MarketParamsIdMismatchError as BlueMarketParamsIdMismatchError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
-
export { ChainIdMismatchError as MidnightChainIdMismatchError, InvalidEcrecoverSignatureVError as InvalidMidnightEcrecoverSignatureVError, InvalidMarketParameterError as InvalidMidnightMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError as InvalidMidnightOfferGroupError, InvalidOfferParameterError as InvalidMidnightOfferParameterError,
|
|
6
|
-
export { _try, DivisionByZeroError, InvalidAddressError, InvalidBitLengthError, NegativeValueError, RegistryValueAlreadyRegisteredError, } from "@morpho-org/morpho-ts";
|
|
4
|
+
export { getUnsupportedVaultV2Adapter as getBlueUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError as isBlueUnknownOfFactoryError, MarketParamsIdMismatchError as BlueMarketParamsIdMismatchError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnresolvedBlockNumberError as BlueUnresolvedBlockNumberError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
+
export { ChainIdMismatchError as MidnightChainIdMismatchError, InvalidEcrecoverSignatureVError as InvalidMidnightEcrecoverSignatureVError, InvalidMarketParameterError as InvalidMidnightMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError as InvalidMidnightOfferGroupError, InvalidOfferParameterError as InvalidMidnightOfferParameterError, InvalidRateRatifierV1RateError as InvalidMidnightRateRatifierV1RateError, InvalidRateRatifierV1TickError as InvalidMidnightRateRatifierV1TickError, InvalidRateRatifierV1TimeError as InvalidMidnightRateRatifierV1TimeError, InvalidRatifierV1AddressError as InvalidMidnightRatifierV1AddressError, InvalidTickSpacingError as InvalidMidnightTickSpacingError, InvalidTreeError as InvalidMidnightTreeError, InvalidTreeHeightError as InvalidMidnightTreeHeightError, InvalidTypedDataSignatureError as InvalidMidnightTypedDataSignatureError, MidnightApiError, MidnightMempoolValidationError, PayloadDecodeError as MidnightPayloadDecodeError, PriceGreaterThanOneError as MidnightPriceGreaterThanOneError, RateRatifierV1BoundOverflowError as MidnightRateRatifierV1BoundOverflowError, RatifierV1TakerNotAllowedError as MidnightRatifierV1TakerNotAllowedError, SettlementFeeExceedsPriceError as MidnightSettlementFeeExceedsPriceError, TickOutOfRangeError as MidnightTickOutOfRangeError, UnknownCollateralIndexError as UnknownMidnightCollateralIndexError, } from "@morpho-org/midnight-sdk";
|
|
6
|
+
export { _try, DivisionByZeroError, InvalidAddressError, InvalidBitLengthError, InvalidPositionAccrualStateError, InvalidPositionAccrualStateError as InvalidMidnightPositionAccrualStateError, InvalidPositionAccrualTimestampError, InvalidPositionAccrualTimestampError as InvalidMidnightPositionAccrualTimestampError, InvalidPositionLossFactorError, InvalidPositionLossFactorError as InvalidMidnightPositionLossFactorError, NegativeValueError, RegistryValueAlreadyRegisteredError, } from "@morpho-org/morpho-ts";
|
package/lib/esm/fetch.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { fetchAccrualPosition as fetchBlueAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket as fetchBlueMarket, fetchMarketParams as fetchBlueMarketParams, fetchPosition as fetchBluePosition,
|
|
1
|
+
export { fetchAccrualPosition as fetchBlueAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MidnightAdapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket as fetchBlueMarket, fetchMarketParams as fetchBlueMarketParams, fetchPosition as fetchBluePosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
fetchPreLiquidationParams as fetchBluePreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
fetchPreLiquidationPosition as fetchBluePreLiquidationPosition, fetchToken, fetchUser as fetchBlueUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
+
fetchPreLiquidationPosition as fetchBluePreLiquidationPosition, fetchToken, fetchUser as fetchBlueUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MidnightAdapter, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
6
6
|
export { fetchAccrualPosition as fetchMidnightAccrualPosition, fetchMarket as fetchMidnightMarket, fetchMarketParams as fetchMidnightMarketParams, fetchPosition as fetchMidnightPosition, fetchRatifierInfo as fetchMidnightRatifierInfo, } from "@morpho-org/midnight-sdk";
|
package/lib/esm/fetch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { fetchAccrualPosition as fetchBlueAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket as fetchBlueMarket, fetchMarketParams as fetchBlueMarketParams, fetchPosition as fetchBluePosition,
|
|
1
|
+
export { fetchAccrualPosition as fetchBlueAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MidnightAdapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket as fetchBlueMarket, fetchMarketParams as fetchBlueMarketParams, fetchPosition as fetchBluePosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
fetchPreLiquidationParams as fetchBluePreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
fetchPreLiquidationPosition as fetchBluePreLiquidationPosition, fetchToken, fetchUser as fetchBlueUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
+
fetchPreLiquidationPosition as fetchBluePreLiquidationPosition, fetchToken, fetchUser as fetchBlueUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MidnightAdapter, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
6
6
|
export { fetchAccrualPosition as fetchMidnightAccrualPosition, fetchMarket as fetchMidnightMarket, fetchMarketParams as fetchMidnightMarketParams, fetchPosition as fetchMidnightPosition, fetchRatifierInfo as fetchMidnightRatifierInfo, } from "@morpho-org/midnight-sdk";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { ChainIdMismatchError, InvalidEcrecoverSignatureVError, InvalidMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError, InvalidOfferParameterError,
|
|
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 +1,2 @@
|
|
|
1
|
-
export { ChainIdMismatchError, InvalidEcrecoverSignatureVError, InvalidMarketParameterError, InvalidMidnightApiQuoteTargetError, InvalidMidnightApiResponseError, InvalidOfferGroupError, InvalidOfferParameterError,
|
|
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";
|
|
@@ -677,8 +677,99 @@ export interface ActionOutput<TAction extends BaseAction = TransactionAction, TS
|
|
|
677
677
|
readonly buildTx: (signatures?: TSignatures) => Readonly<Transaction<TAction>>;
|
|
678
678
|
readonly getRequirements: (params?: TRequirementsParams) => Promise<readonly ActionRequirement[]>;
|
|
679
679
|
}
|
|
680
|
+
/**
|
|
681
|
+
* Narrows an action requirement to an ERC-20 approval transaction.
|
|
682
|
+
*
|
|
683
|
+
* @param requirement - The requirement returned by `getRequirements()` to test.
|
|
684
|
+
* @returns `true` when `requirement.action.type` is `"erc20Approval"`.
|
|
685
|
+
* @example
|
|
686
|
+
* ```ts
|
|
687
|
+
* import { vaults } from "@morpho-org/morpho-test";
|
|
688
|
+
* import {
|
|
689
|
+
* isRequirementApproval,
|
|
690
|
+
* morphoViemExtension,
|
|
691
|
+
* } from "@morpho-org/morpho-sdk";
|
|
692
|
+
* import { createWalletClient, http, publicActions, zeroAddress } from "viem";
|
|
693
|
+
* import { mainnet } from "viem/chains";
|
|
694
|
+
*
|
|
695
|
+
* const client = createWalletClient({
|
|
696
|
+
* chain: mainnet,
|
|
697
|
+
* transport: http(),
|
|
698
|
+
* account: zeroAddress,
|
|
699
|
+
* })
|
|
700
|
+
* .extend(publicActions)
|
|
701
|
+
* .extend(morphoViemExtension());
|
|
702
|
+
*
|
|
703
|
+
* const vault = client.morpho.vaultV1(
|
|
704
|
+
* vaults[mainnet.id].steakUsdc.address,
|
|
705
|
+
* mainnet.id,
|
|
706
|
+
* );
|
|
707
|
+
* const vaultData = await vault.getData();
|
|
708
|
+
* const handle = vault.deposit({
|
|
709
|
+
* amount: 1_000_000n,
|
|
710
|
+
* userAddress: zeroAddress,
|
|
711
|
+
* vaultData,
|
|
712
|
+
* });
|
|
713
|
+
*
|
|
714
|
+
* for (const requirement of await handle.getRequirements()) {
|
|
715
|
+
* if (!isRequirementApproval(requirement)) continue;
|
|
716
|
+
*
|
|
717
|
+
* const { amount, spender } = requirement.action.args;
|
|
718
|
+
* const hash = await client.sendTransaction(requirement);
|
|
719
|
+
* console.log({ amount, spender, hash });
|
|
720
|
+
* await client.waitForTransactionReceipt({ hash });
|
|
721
|
+
* }
|
|
722
|
+
* ```
|
|
723
|
+
*/
|
|
680
724
|
export declare function isRequirementApproval(requirement: unknown): requirement is Transaction<ERC20ApprovalAction>;
|
|
681
|
-
/**
|
|
725
|
+
/**
|
|
726
|
+
* Narrows an action requirement to a Blue authorization call.
|
|
727
|
+
*
|
|
728
|
+
* @param requirement - The requirement returned by `getRequirements()` to test.
|
|
729
|
+
* @returns `true` when the requirement is a call whose `action.type` is `"blueAuthorization"`.
|
|
730
|
+
* @example
|
|
731
|
+
* ```ts
|
|
732
|
+
* import { AccrualPosition } from "@morpho-org/blue-sdk";
|
|
733
|
+
* import { markets } from "@morpho-org/morpho-test";
|
|
734
|
+
* import { Time } from "@morpho-org/morpho-ts";
|
|
735
|
+
* import { createWalletClient, http, publicActions, zeroAddress } from "viem";
|
|
736
|
+
* import { mainnet } from "viem/chains";
|
|
737
|
+
* import {
|
|
738
|
+
* isRequirementBlueAuthorization,
|
|
739
|
+
* morphoViemExtension,
|
|
740
|
+
* } from "@morpho-org/morpho-sdk";
|
|
741
|
+
*
|
|
742
|
+
* const client = createWalletClient({
|
|
743
|
+
* chain: mainnet,
|
|
744
|
+
* transport: http(),
|
|
745
|
+
* account: zeroAddress,
|
|
746
|
+
* })
|
|
747
|
+
* .extend(publicActions)
|
|
748
|
+
* .extend(morphoViemExtension());
|
|
749
|
+
*
|
|
750
|
+
* const blue = client.morpho.blue(
|
|
751
|
+
* markets[mainnet.id].usdc_wbtc,
|
|
752
|
+
* mainnet.id,
|
|
753
|
+
* );
|
|
754
|
+
* const positionData = new AccrualPosition(
|
|
755
|
+
* { user: zeroAddress, supplyShares: 0n, borrowShares: 0n, collateral: 10n ** 8n },
|
|
756
|
+
* await blue.getMarketData(),
|
|
757
|
+
* );
|
|
758
|
+
* const handle = blue.borrow({
|
|
759
|
+
* userAddress: zeroAddress,
|
|
760
|
+
* borrowAssets: 1_000_000n,
|
|
761
|
+
* positionData,
|
|
762
|
+
* deadline: Time.timestamp() + 600n,
|
|
763
|
+
* });
|
|
764
|
+
*
|
|
765
|
+
* for (const requirement of await handle.getRequirements()) {
|
|
766
|
+
* if (!isRequirementBlueAuthorization(requirement)) continue;
|
|
767
|
+
*
|
|
768
|
+
* const hash = await client.sendTransaction(requirement);
|
|
769
|
+
* await client.waitForTransactionReceipt({ hash });
|
|
770
|
+
* }
|
|
771
|
+
* ```
|
|
772
|
+
*/
|
|
682
773
|
export declare function isRequirementBlueAuthorization(requirement: unknown): requirement is Transaction<BlueAuthorizationAction>;
|
|
683
774
|
/**
|
|
684
775
|
* Narrows an action requirement to a signature requirement.
|
|
@@ -743,6 +834,16 @@ export declare function isPermit2SignatureTransferSignature(signature: Requireme
|
|
|
743
834
|
*
|
|
744
835
|
* @param signature - The signed requirement to test.
|
|
745
836
|
* @returns `true` when `signature.action.type` is `"authorization"`.
|
|
837
|
+
* @example
|
|
838
|
+
* ```ts
|
|
839
|
+
* import {
|
|
840
|
+
* isAuthorizationSignature,
|
|
841
|
+
* type RequirementSignature,
|
|
842
|
+
* } from "@morpho-org/morpho-sdk";
|
|
843
|
+
*
|
|
844
|
+
* const getAuthorizationNonce = (signature: RequirementSignature): bigint | undefined =>
|
|
845
|
+
* isAuthorizationSignature(signature) ? signature.args.nonce : undefined;
|
|
846
|
+
* ```
|
|
746
847
|
*/
|
|
747
848
|
export declare function isAuthorizationSignature(signature: RequirementSignature): signature is AuthorizationRequirementSignature;
|
|
748
849
|
/** The typed requirement-signature slots a transaction builder consumes, split from a `buildTx` array. */
|
package/lib/esm/types/action.js
CHANGED
|
@@ -1,4 +1,48 @@
|
|
|
1
1
|
import { AmbiguousRequirementSignaturesError, UnexpectedRequirementSignatureError, UnsupportedRequirementSignatureError, } from "./error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Narrows an action requirement to an ERC-20 approval transaction.
|
|
4
|
+
*
|
|
5
|
+
* @param requirement - The requirement returned by `getRequirements()` to test.
|
|
6
|
+
* @returns `true` when `requirement.action.type` is `"erc20Approval"`.
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { vaults } from "@morpho-org/morpho-test";
|
|
10
|
+
* import {
|
|
11
|
+
* isRequirementApproval,
|
|
12
|
+
* morphoViemExtension,
|
|
13
|
+
* } from "@morpho-org/morpho-sdk";
|
|
14
|
+
* import { createWalletClient, http, publicActions, zeroAddress } from "viem";
|
|
15
|
+
* import { mainnet } from "viem/chains";
|
|
16
|
+
*
|
|
17
|
+
* const client = createWalletClient({
|
|
18
|
+
* chain: mainnet,
|
|
19
|
+
* transport: http(),
|
|
20
|
+
* account: zeroAddress,
|
|
21
|
+
* })
|
|
22
|
+
* .extend(publicActions)
|
|
23
|
+
* .extend(morphoViemExtension());
|
|
24
|
+
*
|
|
25
|
+
* const vault = client.morpho.vaultV1(
|
|
26
|
+
* vaults[mainnet.id].steakUsdc.address,
|
|
27
|
+
* mainnet.id,
|
|
28
|
+
* );
|
|
29
|
+
* const vaultData = await vault.getData();
|
|
30
|
+
* const handle = vault.deposit({
|
|
31
|
+
* amount: 1_000_000n,
|
|
32
|
+
* userAddress: zeroAddress,
|
|
33
|
+
* vaultData,
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* for (const requirement of await handle.getRequirements()) {
|
|
37
|
+
* if (!isRequirementApproval(requirement)) continue;
|
|
38
|
+
*
|
|
39
|
+
* const { amount, spender } = requirement.action.args;
|
|
40
|
+
* const hash = await client.sendTransaction(requirement);
|
|
41
|
+
* console.log({ amount, spender, hash });
|
|
42
|
+
* await client.waitForTransactionReceipt({ hash });
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
2
46
|
export function isRequirementApproval(requirement) {
|
|
3
47
|
return (typeof requirement === "object" &&
|
|
4
48
|
requirement !== null &&
|
|
@@ -11,7 +55,54 @@ export function isRequirementApproval(requirement) {
|
|
|
11
55
|
"type" in requirement.action &&
|
|
12
56
|
requirement.action.type === "erc20Approval");
|
|
13
57
|
}
|
|
14
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Narrows an action requirement to a Blue authorization call.
|
|
60
|
+
*
|
|
61
|
+
* @param requirement - The requirement returned by `getRequirements()` to test.
|
|
62
|
+
* @returns `true` when the requirement is a call whose `action.type` is `"blueAuthorization"`.
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* import { AccrualPosition } from "@morpho-org/blue-sdk";
|
|
66
|
+
* import { markets } from "@morpho-org/morpho-test";
|
|
67
|
+
* import { Time } from "@morpho-org/morpho-ts";
|
|
68
|
+
* import { createWalletClient, http, publicActions, zeroAddress } from "viem";
|
|
69
|
+
* import { mainnet } from "viem/chains";
|
|
70
|
+
* import {
|
|
71
|
+
* isRequirementBlueAuthorization,
|
|
72
|
+
* morphoViemExtension,
|
|
73
|
+
* } from "@morpho-org/morpho-sdk";
|
|
74
|
+
*
|
|
75
|
+
* const client = createWalletClient({
|
|
76
|
+
* chain: mainnet,
|
|
77
|
+
* transport: http(),
|
|
78
|
+
* account: zeroAddress,
|
|
79
|
+
* })
|
|
80
|
+
* .extend(publicActions)
|
|
81
|
+
* .extend(morphoViemExtension());
|
|
82
|
+
*
|
|
83
|
+
* const blue = client.morpho.blue(
|
|
84
|
+
* markets[mainnet.id].usdc_wbtc,
|
|
85
|
+
* mainnet.id,
|
|
86
|
+
* );
|
|
87
|
+
* const positionData = new AccrualPosition(
|
|
88
|
+
* { user: zeroAddress, supplyShares: 0n, borrowShares: 0n, collateral: 10n ** 8n },
|
|
89
|
+
* await blue.getMarketData(),
|
|
90
|
+
* );
|
|
91
|
+
* const handle = blue.borrow({
|
|
92
|
+
* userAddress: zeroAddress,
|
|
93
|
+
* borrowAssets: 1_000_000n,
|
|
94
|
+
* positionData,
|
|
95
|
+
* deadline: Time.timestamp() + 600n,
|
|
96
|
+
* });
|
|
97
|
+
*
|
|
98
|
+
* for (const requirement of await handle.getRequirements()) {
|
|
99
|
+
* if (!isRequirementBlueAuthorization(requirement)) continue;
|
|
100
|
+
*
|
|
101
|
+
* const hash = await client.sendTransaction(requirement);
|
|
102
|
+
* await client.waitForTransactionReceipt({ hash });
|
|
103
|
+
* }
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
15
106
|
export function isRequirementBlueAuthorization(requirement) {
|
|
16
107
|
return (typeof requirement === "object" &&
|
|
17
108
|
requirement !== null &&
|
|
@@ -74,6 +165,16 @@ export function isPermit2SignatureTransferSignature(signature) {
|
|
|
74
165
|
*
|
|
75
166
|
* @param signature - The signed requirement to test.
|
|
76
167
|
* @returns `true` when `signature.action.type` is `"authorization"`.
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* import {
|
|
171
|
+
* isAuthorizationSignature,
|
|
172
|
+
* type RequirementSignature,
|
|
173
|
+
* } from "@morpho-org/morpho-sdk";
|
|
174
|
+
*
|
|
175
|
+
* const getAuthorizationNonce = (signature: RequirementSignature): bigint | undefined =>
|
|
176
|
+
* isAuthorizationSignature(signature) ? signature.args.nonce : undefined;
|
|
177
|
+
* ```
|
|
77
178
|
*/
|
|
78
179
|
export function isAuthorizationSignature(signature) {
|
|
79
180
|
return signature.action.type === "authorization";
|
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, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
6
|
+
getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2MidnightAdapterUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
7
7
|
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, 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, 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, MidnightPositionLib, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
|
|
21
21
|
export { addTransactionMetadata } from "./helpers/metadata.js";
|
|
22
22
|
export { type PreviewVaultV2ForceWithdrawParams, previewVaultV2ForceWithdraw, type VaultV2ForceWithdrawPreview, } from "./helpers/previewVaultV2ForceWithdraw.js";
|
|
23
23
|
export { type PreviewVaultV2InKindRedeemParams, previewVaultV2InKindRedeem, type VaultV2InKindRedeemMarketPreview, } from "./helpers/previewVaultV2InKindRedeem.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, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
5
|
+
getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2MidnightAdapterUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
6
6
|
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, 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, 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, MidnightPositionLib, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
|
|
19
19
|
export { addTransactionMetadata } from "./helpers/metadata.js";
|
|
20
20
|
export { previewVaultV2ForceWithdraw, } from "./helpers/previewVaultV2ForceWithdraw.js";
|
|
21
21
|
export { previewVaultV2InKindRedeem, } from "./helpers/previewVaultV2InKindRedeem.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": "7.0.
|
|
4
|
+
"version": "7.1.0-next.1",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -151,22 +151,21 @@
|
|
|
151
151
|
"MIGRATION-v6-to-v7.md"
|
|
152
152
|
],
|
|
153
153
|
"dependencies": {
|
|
154
|
-
"@morpho-org/blue-sdk": "^8.0.0",
|
|
155
|
-
"@morpho-org/blue-sdk-viem": "^6.
|
|
156
|
-
"@morpho-org/midnight-sdk": "^2.0.0",
|
|
157
|
-
"@morpho-org/morpho-ts": "^4.0.0"
|
|
154
|
+
"@morpho-org/blue-sdk": "^8.1.0-next.0",
|
|
155
|
+
"@morpho-org/blue-sdk-viem": "^6.3.0-next.0",
|
|
156
|
+
"@morpho-org/midnight-sdk": "^2.1.0-next.0",
|
|
157
|
+
"@morpho-org/morpho-ts": "^4.1.0-next.0"
|
|
158
158
|
},
|
|
159
159
|
"peerDependencies": {
|
|
160
160
|
"viem": "^2.0.0"
|
|
161
161
|
},
|
|
162
162
|
"devDependencies": {
|
|
163
|
-
"@morpho-org/test": "^
|
|
164
|
-
"
|
|
163
|
+
"@morpho-org/morpho-test": "^4.1.0-next.0",
|
|
164
|
+
"@morpho-org/test": "^2.11.0-next.0",
|
|
165
165
|
"fast-check": "^4.9.0",
|
|
166
166
|
"typescript": "7.0.2",
|
|
167
167
|
"viem": "^2.55.10",
|
|
168
|
-
"vitest": "^4.1.11"
|
|
169
|
-
"zod": "^4.6.5"
|
|
168
|
+
"vitest": "^4.1.11"
|
|
170
169
|
},
|
|
171
170
|
"scripts": {
|
|
172
171
|
"prepublish": "pnpm build",
|