@morpho-org/morpho-sdk 5.6.0 → 5.8.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 +15 -3
- package/lib/cjs/abis.js +13 -1
- package/lib/cjs/actions/midnight/mempoolSubmitOffers.d.ts +2 -2
- package/lib/cjs/actions/midnight/mempoolSubmitOffers.js +2 -2
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +1 -1
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +1 -1
- package/lib/cjs/blue/abis.d.ts +2 -0
- package/lib/cjs/blue/abis.js +33 -0
- package/lib/cjs/blue/addresses.d.ts +2 -0
- package/lib/cjs/blue/addresses.js +19 -0
- package/lib/cjs/blue/constants.d.ts +1 -0
- package/lib/cjs/blue/constants.js +13 -0
- package/lib/cjs/blue/entities.d.ts +2 -0
- package/lib/cjs/blue/entities.js +37 -0
- package/lib/cjs/blue/errors.d.ts +2 -0
- package/lib/cjs/blue/errors.js +29 -0
- package/lib/cjs/blue/fetch.d.ts +1 -0
- package/lib/cjs/blue/fetch.js +33 -0
- package/lib/cjs/blue/types.d.ts +2 -0
- package/lib/cjs/blue/types.js +2 -0
- package/lib/cjs/blue/utils.d.ts +3 -0
- package/lib/cjs/blue/utils.js +29 -0
- package/lib/cjs/bundler/actions.d.ts +10 -8
- package/lib/cjs/bundler/actions.js +10 -8
- package/lib/cjs/constants.d.ts +36 -2
- package/lib/cjs/constants.js +39 -1
- package/lib/cjs/entities/blue/blue.d.ts +8 -6
- package/lib/cjs/entities/blue/blue.js +4 -3
- package/lib/cjs/entities/index.d.ts +62 -3
- package/lib/cjs/entities/index.js +32 -20
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +6 -6
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +22 -33
- package/lib/cjs/errors.d.ts +48 -3
- package/lib/cjs/errors.js +62 -1
- package/lib/cjs/fetch.d.ts +16 -1
- package/lib/cjs/fetch.js +24 -1
- package/lib/cjs/helpers/validate.d.ts +2 -2
- package/lib/cjs/helpers/validate.js +2 -2
- package/lib/cjs/midnight/abis.d.ts +1 -0
- package/lib/cjs/midnight/abis.js +8 -0
- package/lib/cjs/midnight/constants.d.ts +1 -0
- package/lib/cjs/midnight/constants.js +19 -0
- package/lib/cjs/midnight/entities.d.ts +2 -0
- package/lib/cjs/midnight/entities.js +11 -0
- package/lib/cjs/midnight/errors.d.ts +1 -0
- package/lib/cjs/midnight/errors.js +24 -0
- package/lib/cjs/midnight/fetch.d.ts +1 -0
- package/lib/cjs/midnight/fetch.js +9 -0
- package/lib/cjs/midnight/types.d.ts +1 -0
- package/lib/cjs/midnight/types.js +2 -0
- package/lib/cjs/midnight/utils.d.ts +1 -0
- package/lib/cjs/midnight/utils.js +17 -0
- package/lib/cjs/types.d.ts +17 -2
- package/lib/cjs/utils.d.ts +30 -3
- package/lib/cjs/utils.js +40 -2
- package/lib/esm/abis.d.ts +15 -3
- package/lib/esm/abis.js +15 -3
- package/lib/esm/actions/midnight/mempoolSubmitOffers.d.ts +2 -2
- package/lib/esm/actions/midnight/mempoolSubmitOffers.js +2 -2
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +1 -1
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +1 -1
- package/lib/esm/blue/abis.d.ts +2 -0
- package/lib/esm/blue/abis.js +2 -0
- package/lib/esm/blue/addresses.d.ts +2 -0
- package/lib/esm/blue/addresses.js +1 -0
- package/lib/esm/blue/constants.d.ts +1 -0
- package/lib/esm/blue/constants.js +1 -0
- package/lib/esm/blue/entities.d.ts +2 -0
- package/lib/esm/blue/entities.js +1 -0
- package/lib/esm/blue/errors.d.ts +2 -0
- package/lib/esm/blue/errors.js +2 -0
- package/lib/esm/blue/fetch.d.ts +1 -0
- package/lib/esm/blue/fetch.js +1 -0
- package/lib/esm/blue/types.d.ts +2 -0
- package/lib/esm/blue/types.js +1 -0
- package/lib/esm/blue/utils.d.ts +3 -0
- package/lib/esm/blue/utils.js +2 -0
- package/lib/esm/bundler/actions.d.ts +10 -8
- package/lib/esm/bundler/actions.js +10 -8
- package/lib/esm/constants.d.ts +36 -2
- package/lib/esm/constants.js +36 -2
- package/lib/esm/entities/blue/blue.d.ts +8 -6
- package/lib/esm/entities/blue/blue.js +4 -3
- package/lib/esm/entities/index.d.ts +62 -3
- package/lib/esm/entities/index.js +17 -2
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +6 -6
- package/lib/esm/entities/vaultV2BlueReallocationData.js +22 -33
- package/lib/esm/errors.d.ts +48 -3
- package/lib/esm/errors.js +48 -3
- package/lib/esm/fetch.d.ts +16 -1
- package/lib/esm/fetch.js +16 -1
- package/lib/esm/helpers/validate.d.ts +2 -2
- package/lib/esm/helpers/validate.js +2 -2
- package/lib/esm/midnight/abis.d.ts +1 -0
- package/lib/esm/midnight/abis.js +1 -0
- package/lib/esm/midnight/constants.d.ts +1 -0
- package/lib/esm/midnight/constants.js +1 -0
- package/lib/esm/midnight/entities.d.ts +2 -0
- package/lib/esm/midnight/entities.js +1 -0
- package/lib/esm/midnight/errors.d.ts +1 -0
- package/lib/esm/midnight/errors.js +1 -0
- package/lib/esm/midnight/fetch.d.ts +1 -0
- package/lib/esm/midnight/fetch.js +1 -0
- package/lib/esm/midnight/types.d.ts +1 -0
- package/lib/esm/midnight/types.js +1 -0
- package/lib/esm/midnight/utils.d.ts +1 -0
- package/lib/esm/midnight/utils.js +1 -0
- package/lib/esm/types.d.ts +17 -2
- package/lib/esm/utils.d.ts +30 -3
- package/lib/esm/utils.js +30 -3
- package/package.json +22 -6
|
@@ -33,10 +33,10 @@ export interface MempoolSubmitOffersParams {
|
|
|
33
33
|
* @throws {InvalidTreeError} when `offers <= 0`.
|
|
34
34
|
* @example
|
|
35
35
|
* ```ts
|
|
36
|
-
* import {
|
|
36
|
+
* import { MidnightPayload } from "@morpho-org/morpho-sdk/utils";
|
|
37
37
|
* import { mempoolSubmitOffers } from "@morpho-org/morpho-sdk";
|
|
38
38
|
*
|
|
39
|
-
* const payload = await
|
|
39
|
+
* const payload = await MidnightPayload.encode(items);
|
|
40
40
|
* const tx = mempoolSubmitOffers({
|
|
41
41
|
* chainId: 8453,
|
|
42
42
|
* groups,
|
|
@@ -22,10 +22,10 @@ import { addTransactionMetadata } from "../../helpers/index.js";
|
|
|
22
22
|
* @throws {InvalidTreeError} when `offers <= 0`.
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
25
|
-
* import {
|
|
25
|
+
* import { MidnightPayload } from "@morpho-org/morpho-sdk/utils";
|
|
26
26
|
* import { mempoolSubmitOffers } from "@morpho-org/morpho-sdk";
|
|
27
27
|
*
|
|
28
|
-
* const payload = await
|
|
28
|
+
* const payload = await MidnightPayload.encode(items);
|
|
29
29
|
* const tx = mempoolSubmitOffers({
|
|
30
30
|
* chainId: 8453,
|
|
31
31
|
* groups,
|
package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ interface GeneralAdapterPermit2Erc20Allowances {
|
|
|
28
28
|
* bookkeeping invariants break (should not happen with the values this function passes).
|
|
29
29
|
* @example
|
|
30
30
|
* ```ts
|
|
31
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
31
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
32
32
|
* import { getGeneralAdapterRequirementsPermit2 } from "@morpho-org/morpho-sdk";
|
|
33
33
|
*
|
|
34
34
|
* const { permit2 } = getChainAddresses(1);
|
|
@@ -26,7 +26,7 @@ import { getRequirementsApproval } from "../getRequirementsApproval.js";
|
|
|
26
26
|
* bookkeeping invariants break (should not happen with the values this function passes).
|
|
27
27
|
* @example
|
|
28
28
|
* ```ts
|
|
29
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
29
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
30
30
|
* import { getGeneralAdapterRequirementsPermit2 } from "@morpho-org/morpho-sdk";
|
|
31
31
|
*
|
|
32
32
|
* const { permit2 } = getChainAddresses(1);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { marketParamsAbi } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi, vaultV1PublicAllocatorAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { marketParamsAbi } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi, vaultV1PublicAllocatorAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { AddressLabel, AddressRegistry, ChainAddresses, ChainDeployments, DeploymentRegistry, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddress, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, } from "@morpho-org/blue-sdk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddress, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, } from "@morpho-org/blue-sdk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId, LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE, SECONDS_PER_YEAR, TransactionType, } from "@morpho-org/blue-sdk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId, LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE, SECONDS_PER_YEAR, TransactionType, } from "@morpho-org/blue-sdk";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket, IMarketParams, IPosition, IPreLiquidationParams, IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultMarketPublicAllocatorConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, VaultPublicAllocatorConfig, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidBitLengthError, InvalidMarketParamsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedPreLiquidationParamsError, UnsupportedVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { getUnsupportedVaultV2Adapter, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidBitLengthError, InvalidMarketParamsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedPreLiquidationParamsError, UnsupportedVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { getUnsupportedVaultV2Adapter, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultMarketPublicAllocatorConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultMarketPublicAllocatorConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams, IPermit2Allowance, Loadable, MarketId, MaxBorrowOptions, MaxPositionCapacities, MaxWithdrawCollateralOptions, Pending, Permit2Allowance, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export type { AuthorizationArgs, DaiPermitArgs, DeploylessFetchParameters, FetchParameters, InputAllocation, MetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { CapacityLimit, RoundingDirection } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
3
|
+
export { decodeBytes32String, getAuthorizationTypedData, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { decodeBytes32String, getAuthorizationTypedData, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -50,7 +50,7 @@ export declare namespace BundlerAction {
|
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
52
|
* ```ts
|
|
53
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
53
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
54
54
|
* import { BundlerAction } from "@morpho-org/morpho-sdk/bundler";
|
|
55
55
|
*
|
|
56
56
|
* const { generalAdapter1 } = getChainAddresses(1).bundler3;
|
|
@@ -137,7 +137,7 @@ export declare namespace BundlerAction {
|
|
|
137
137
|
*
|
|
138
138
|
* @example
|
|
139
139
|
* ```ts
|
|
140
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
140
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
141
141
|
* import { BundlerAction } from "@morpho-org/morpho-sdk/bundler";
|
|
142
142
|
*
|
|
143
143
|
* const adapter = getChainAddresses(1).bundler3.generalAdapter1;
|
|
@@ -351,7 +351,7 @@ export declare namespace BundlerAction {
|
|
|
351
351
|
*
|
|
352
352
|
* @example
|
|
353
353
|
* ```ts
|
|
354
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
354
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
355
355
|
* import { BundlerAction } from "@morpho-org/morpho-sdk/bundler";
|
|
356
356
|
*
|
|
357
357
|
* const { generalAdapter1 } = getChainAddresses(1).bundler3;
|
|
@@ -670,7 +670,8 @@ export declare namespace BundlerAction {
|
|
|
670
670
|
* @throws {BundlerErrors.SkippableAllocatorPenalty} when `skipRevert` is true and a token approval is required.
|
|
671
671
|
* @example
|
|
672
672
|
* ```ts
|
|
673
|
-
* import { ChainId
|
|
673
|
+
* import { ChainId } from "@morpho-org/morpho-sdk/constants";
|
|
674
|
+
* import type { BlueInputMarketParams } from "@morpho-org/morpho-sdk/types";
|
|
674
675
|
* import {
|
|
675
676
|
* BundlerAction,
|
|
676
677
|
* type BundlerCall,
|
|
@@ -694,11 +695,11 @@ export declare namespace BundlerAction {
|
|
|
694
695
|
* oracle: ethUsdOracle,
|
|
695
696
|
* irm: adaptiveCurveIrm,
|
|
696
697
|
* lltv: 860_000_000_000_000_000n,
|
|
697
|
-
* } satisfies
|
|
698
|
+
* } satisfies BlueInputMarketParams;
|
|
698
699
|
* const targetMarket = {
|
|
699
700
|
* ...sourceMarket,
|
|
700
701
|
* collateralToken: wbtc,
|
|
701
|
-
* } satisfies
|
|
702
|
+
* } satisfies BlueInputMarketParams;
|
|
702
703
|
*
|
|
703
704
|
* const calls: BundlerCall[] = BundlerAction.vaultV2BluePublicAllocatorReallocate(
|
|
704
705
|
* ChainId.EthMainnet,
|
|
@@ -732,7 +733,8 @@ export declare namespace BundlerAction {
|
|
|
732
733
|
* @throws {BundlerErrors.SkippableAllocatorPenalty} when `skipRevert` is true and a token approval is required.
|
|
733
734
|
* @example
|
|
734
735
|
* ```ts
|
|
735
|
-
* import { ChainId
|
|
736
|
+
* import { ChainId } from "@morpho-org/morpho-sdk/constants";
|
|
737
|
+
* import type { BlueInputMarketParams } from "@morpho-org/morpho-sdk/types";
|
|
736
738
|
* import {
|
|
737
739
|
* BundlerAction,
|
|
738
740
|
* type BundlerCall,
|
|
@@ -753,7 +755,7 @@ export declare namespace BundlerAction {
|
|
|
753
755
|
* oracle: ethUsdOracle,
|
|
754
756
|
* irm: adaptiveCurveIrm,
|
|
755
757
|
* lltv: 860_000_000_000_000_000n,
|
|
756
|
-
* } satisfies
|
|
758
|
+
* } satisfies BlueInputMarketParams;
|
|
757
759
|
*
|
|
758
760
|
* const calls: BundlerCall[] = BundlerAction.vaultV2BluePublicAllocatorAllocateFromIdle(
|
|
759
761
|
* ChainId.EthMainnet,
|
|
@@ -71,7 +71,7 @@ export var BundlerAction;
|
|
|
71
71
|
*
|
|
72
72
|
* @example
|
|
73
73
|
* ```ts
|
|
74
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
74
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
75
75
|
* import { BundlerAction } from "@morpho-org/morpho-sdk/bundler";
|
|
76
76
|
*
|
|
77
77
|
* const { generalAdapter1 } = getChainAddresses(1).bundler3;
|
|
@@ -332,7 +332,7 @@ export var BundlerAction;
|
|
|
332
332
|
*
|
|
333
333
|
* @example
|
|
334
334
|
* ```ts
|
|
335
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
335
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
336
336
|
* import { BundlerAction } from "@morpho-org/morpho-sdk/bundler";
|
|
337
337
|
*
|
|
338
338
|
* const adapter = getChainAddresses(1).bundler3.generalAdapter1;
|
|
@@ -675,7 +675,7 @@ export var BundlerAction;
|
|
|
675
675
|
*
|
|
676
676
|
* @example
|
|
677
677
|
* ```ts
|
|
678
|
-
* import { getChainAddresses } from "@morpho-org/
|
|
678
|
+
* import { getChainAddresses } from "@morpho-org/morpho-sdk/addresses";
|
|
679
679
|
* import { BundlerAction } from "@morpho-org/morpho-sdk/bundler";
|
|
680
680
|
*
|
|
681
681
|
* const { generalAdapter1 } = getChainAddresses(1).bundler3;
|
|
@@ -1140,7 +1140,8 @@ export var BundlerAction;
|
|
|
1140
1140
|
* @throws {BundlerErrors.SkippableAllocatorPenalty} when `skipRevert` is true and a token approval is required.
|
|
1141
1141
|
* @example
|
|
1142
1142
|
* ```ts
|
|
1143
|
-
* import { ChainId
|
|
1143
|
+
* import { ChainId } from "@morpho-org/morpho-sdk/constants";
|
|
1144
|
+
* import type { BlueInputMarketParams } from "@morpho-org/morpho-sdk/types";
|
|
1144
1145
|
* import {
|
|
1145
1146
|
* BundlerAction,
|
|
1146
1147
|
* type BundlerCall,
|
|
@@ -1164,11 +1165,11 @@ export var BundlerAction;
|
|
|
1164
1165
|
* oracle: ethUsdOracle,
|
|
1165
1166
|
* irm: adaptiveCurveIrm,
|
|
1166
1167
|
* lltv: 860_000_000_000_000_000n,
|
|
1167
|
-
* } satisfies
|
|
1168
|
+
* } satisfies BlueInputMarketParams;
|
|
1168
1169
|
* const targetMarket = {
|
|
1169
1170
|
* ...sourceMarket,
|
|
1170
1171
|
* collateralToken: wbtc,
|
|
1171
|
-
* } satisfies
|
|
1172
|
+
* } satisfies BlueInputMarketParams;
|
|
1172
1173
|
*
|
|
1173
1174
|
* const calls: BundlerCall[] = BundlerAction.vaultV2BluePublicAllocatorReallocate(
|
|
1174
1175
|
* ChainId.EthMainnet,
|
|
@@ -1248,7 +1249,8 @@ export var BundlerAction;
|
|
|
1248
1249
|
* @throws {BundlerErrors.SkippableAllocatorPenalty} when `skipRevert` is true and a token approval is required.
|
|
1249
1250
|
* @example
|
|
1250
1251
|
* ```ts
|
|
1251
|
-
* import { ChainId
|
|
1252
|
+
* import { ChainId } from "@morpho-org/morpho-sdk/constants";
|
|
1253
|
+
* import type { BlueInputMarketParams } from "@morpho-org/morpho-sdk/types";
|
|
1252
1254
|
* import {
|
|
1253
1255
|
* BundlerAction,
|
|
1254
1256
|
* type BundlerCall,
|
|
@@ -1269,7 +1271,7 @@ export var BundlerAction;
|
|
|
1269
1271
|
* oracle: ethUsdOracle,
|
|
1270
1272
|
* irm: adaptiveCurveIrm,
|
|
1271
1273
|
* lltv: 860_000_000_000_000_000n,
|
|
1272
|
-
* } satisfies
|
|
1274
|
+
* } satisfies BlueInputMarketParams;
|
|
1273
1275
|
*
|
|
1274
1276
|
* const calls: BundlerCall[] = BundlerAction.vaultV2BluePublicAllocatorAllocateFromIdle(
|
|
1275
1277
|
* ChainId.EthMainnet,
|
package/lib/esm/constants.d.ts
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS,
|
|
2
|
-
|
|
1
|
+
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId as isBlueMarketId,
|
|
2
|
+
/** @deprecated Use `isBlueMarketId` or the raw `/blue/constants` subpath. */
|
|
3
|
+
isMarketId, LIQUIDATION_CURSOR as BLUE_LIQUIDATION_CURSOR,
|
|
4
|
+
/** @deprecated Use `BLUE_LIQUIDATION_CURSOR` or the raw `/blue/constants` subpath. */
|
|
5
|
+
LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR as BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR,
|
|
6
|
+
/** @deprecated Use `BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR` or the raw `/blue/constants` subpath. */
|
|
7
|
+
MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE, SECONDS_PER_YEAR, TransactionType as BlueTransactionType,
|
|
8
|
+
/** @deprecated Use `BlueTransactionType` or the raw `/blue/constants` subpath. */
|
|
9
|
+
TransactionType, } from "@morpho-org/blue-sdk";
|
|
10
|
+
export { CBP as MIDNIGHT_CBP,
|
|
11
|
+
/** @deprecated Use `MIDNIGHT_CBP` or the raw `/midnight/constants` subpath. */
|
|
12
|
+
CBP, COLLATERAL_PARAMS_TYPEHASH as MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH,
|
|
13
|
+
/** @deprecated Use `MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
14
|
+
COLLATERAL_PARAMS_TYPEHASH, DEFAULT_TICK_SPACING as MIDNIGHT_DEFAULT_TICK_SPACING,
|
|
15
|
+
/** @deprecated Use `MIDNIGHT_DEFAULT_TICK_SPACING` or the raw `/midnight/constants` subpath. */
|
|
16
|
+
DEFAULT_TICK_SPACING, EIP712_DOMAIN_TYPEHASH as MIDNIGHT_EIP712_DOMAIN_TYPEHASH,
|
|
17
|
+
/** @deprecated Use `MIDNIGHT_EIP712_DOMAIN_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
18
|
+
EIP712_DOMAIN_TYPEHASH, MARKET_TYPEHASH as MIDNIGHT_MARKET_TYPEHASH,
|
|
19
|
+
/** @deprecated Use `MIDNIGHT_MARKET_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
20
|
+
MARKET_TYPEHASH, MAX_COLLATERALS as MIDNIGHT_MAX_COLLATERALS,
|
|
21
|
+
/** @deprecated Use `MIDNIGHT_MAX_COLLATERALS` or the raw `/midnight/constants` subpath. */
|
|
22
|
+
MAX_COLLATERALS, MAX_COLLATERALS_PER_BORROWER as MIDNIGHT_MAX_COLLATERALS_PER_BORROWER,
|
|
23
|
+
/** @deprecated Use `MIDNIGHT_MAX_COLLATERALS_PER_BORROWER` or the raw `/midnight/constants` subpath. */
|
|
24
|
+
MAX_COLLATERALS_PER_BORROWER, MAX_CONTINUOUS_FEE as MIDNIGHT_MAX_CONTINUOUS_FEE,
|
|
25
|
+
/** @deprecated Use `MIDNIGHT_MAX_CONTINUOUS_FEE` or the raw `/midnight/constants` subpath. */
|
|
26
|
+
MAX_CONTINUOUS_FEE, MAX_OFFER_CAP as MIDNIGHT_MAX_OFFER_CAP, MAX_SETTLEMENT_FEES as MIDNIGHT_MAX_SETTLEMENT_FEES,
|
|
27
|
+
/** @deprecated Use `MIDNIGHT_MAX_SETTLEMENT_FEES` or the raw `/midnight/constants` subpath. */
|
|
28
|
+
MAX_SETTLEMENT_FEES, MAX_TICK as MIDNIGHT_MAX_TICK,
|
|
29
|
+
/** @deprecated Use `MIDNIGHT_MAX_TICK` or the raw `/midnight/constants` subpath. */
|
|
30
|
+
MAX_TICK, OFFER_TYPEHASH as MIDNIGHT_OFFER_TYPEHASH,
|
|
31
|
+
/** @deprecated Use `MIDNIGHT_OFFER_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
32
|
+
OFFER_TYPEHASH, PRICE_ROUNDING_STEP as MIDNIGHT_PRICE_ROUNDING_STEP,
|
|
33
|
+
/** @deprecated Use `MIDNIGHT_PRICE_ROUNDING_STEP` or the raw `/midnight/constants` subpath. */
|
|
34
|
+
PRICE_ROUNDING_STEP, SETTLEMENT_FEE_BREAKPOINTS as MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS,
|
|
35
|
+
/** @deprecated Use `MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS` or the raw `/midnight/constants` subpath. */
|
|
36
|
+
SETTLEMENT_FEE_BREAKPOINTS, TIME_TO_MAX_LIF as MIDNIGHT_TIME_TO_MAX_LIF, } from "@morpho-org/midnight-sdk";
|
|
3
37
|
export { BLUE_API_BASE_URL, BLUE_API_GRAPHQL_URL, CDN_BASE_URL, ChainId, ChainUtils, DOCS_BASE_URL, MORPHO_DOMAIN, OPTIMIZERS_API_BASE_URL, OPTIMIZERS_BASE_URL, REWARDS_BASE_URL, ZERO_ADDRESS, } from "@morpho-org/morpho-ts";
|
|
4
38
|
export { APPROVE_ONLY_ONCE_TOKENS, DEFAULT_LLTV_BUFFER, DEFAULT_MAX_REALLOCATION_PENALTY, DEFAULT_SUPPLY_TARGET_UTILIZATION, DEFAULT_WITHDRAWAL_TARGET_UTILIZATION, MAX_ABSOLUTE_SHARE_PRICE, MAX_REALLOCATION_PENALTY, MAX_SLIPPAGE_TOLERANCE, MAX_TOKEN_APPROVALS, } from "./helpers/constant.js";
|
package/lib/esm/constants.js
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS,
|
|
2
|
-
|
|
1
|
+
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId as isBlueMarketId,
|
|
2
|
+
/** @deprecated Use `isBlueMarketId` or the raw `/blue/constants` subpath. */
|
|
3
|
+
isMarketId, LIQUIDATION_CURSOR as BLUE_LIQUIDATION_CURSOR,
|
|
4
|
+
/** @deprecated Use `BLUE_LIQUIDATION_CURSOR` or the raw `/blue/constants` subpath. */
|
|
5
|
+
LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR as BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR,
|
|
6
|
+
/** @deprecated Use `BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR` or the raw `/blue/constants` subpath. */
|
|
7
|
+
MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE, SECONDS_PER_YEAR, TransactionType as BlueTransactionType,
|
|
8
|
+
/** @deprecated Use `BlueTransactionType` or the raw `/blue/constants` subpath. */
|
|
9
|
+
TransactionType, } from "@morpho-org/blue-sdk";
|
|
10
|
+
export { CBP as MIDNIGHT_CBP,
|
|
11
|
+
/** @deprecated Use `MIDNIGHT_CBP` or the raw `/midnight/constants` subpath. */
|
|
12
|
+
CBP, COLLATERAL_PARAMS_TYPEHASH as MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH,
|
|
13
|
+
/** @deprecated Use `MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
14
|
+
COLLATERAL_PARAMS_TYPEHASH, DEFAULT_TICK_SPACING as MIDNIGHT_DEFAULT_TICK_SPACING,
|
|
15
|
+
/** @deprecated Use `MIDNIGHT_DEFAULT_TICK_SPACING` or the raw `/midnight/constants` subpath. */
|
|
16
|
+
DEFAULT_TICK_SPACING, EIP712_DOMAIN_TYPEHASH as MIDNIGHT_EIP712_DOMAIN_TYPEHASH,
|
|
17
|
+
/** @deprecated Use `MIDNIGHT_EIP712_DOMAIN_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
18
|
+
EIP712_DOMAIN_TYPEHASH, MARKET_TYPEHASH as MIDNIGHT_MARKET_TYPEHASH,
|
|
19
|
+
/** @deprecated Use `MIDNIGHT_MARKET_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
20
|
+
MARKET_TYPEHASH, MAX_COLLATERALS as MIDNIGHT_MAX_COLLATERALS,
|
|
21
|
+
/** @deprecated Use `MIDNIGHT_MAX_COLLATERALS` or the raw `/midnight/constants` subpath. */
|
|
22
|
+
MAX_COLLATERALS, MAX_COLLATERALS_PER_BORROWER as MIDNIGHT_MAX_COLLATERALS_PER_BORROWER,
|
|
23
|
+
/** @deprecated Use `MIDNIGHT_MAX_COLLATERALS_PER_BORROWER` or the raw `/midnight/constants` subpath. */
|
|
24
|
+
MAX_COLLATERALS_PER_BORROWER, MAX_CONTINUOUS_FEE as MIDNIGHT_MAX_CONTINUOUS_FEE,
|
|
25
|
+
/** @deprecated Use `MIDNIGHT_MAX_CONTINUOUS_FEE` or the raw `/midnight/constants` subpath. */
|
|
26
|
+
MAX_CONTINUOUS_FEE, MAX_OFFER_CAP as MIDNIGHT_MAX_OFFER_CAP, MAX_SETTLEMENT_FEES as MIDNIGHT_MAX_SETTLEMENT_FEES,
|
|
27
|
+
/** @deprecated Use `MIDNIGHT_MAX_SETTLEMENT_FEES` or the raw `/midnight/constants` subpath. */
|
|
28
|
+
MAX_SETTLEMENT_FEES, MAX_TICK as MIDNIGHT_MAX_TICK,
|
|
29
|
+
/** @deprecated Use `MIDNIGHT_MAX_TICK` or the raw `/midnight/constants` subpath. */
|
|
30
|
+
MAX_TICK, OFFER_TYPEHASH as MIDNIGHT_OFFER_TYPEHASH,
|
|
31
|
+
/** @deprecated Use `MIDNIGHT_OFFER_TYPEHASH` or the raw `/midnight/constants` subpath. */
|
|
32
|
+
OFFER_TYPEHASH, PRICE_ROUNDING_STEP as MIDNIGHT_PRICE_ROUNDING_STEP,
|
|
33
|
+
/** @deprecated Use `MIDNIGHT_PRICE_ROUNDING_STEP` or the raw `/midnight/constants` subpath. */
|
|
34
|
+
PRICE_ROUNDING_STEP, SETTLEMENT_FEE_BREAKPOINTS as MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS,
|
|
35
|
+
/** @deprecated Use `MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS` or the raw `/midnight/constants` subpath. */
|
|
36
|
+
SETTLEMENT_FEE_BREAKPOINTS, TIME_TO_MAX_LIF as MIDNIGHT_TIME_TO_MAX_LIF, } from "@morpho-org/midnight-sdk";
|
|
3
37
|
export { BLUE_API_BASE_URL, BLUE_API_GRAPHQL_URL, CDN_BASE_URL, ChainId, ChainUtils, DOCS_BASE_URL, MORPHO_DOMAIN, OPTIMIZERS_API_BASE_URL, OPTIMIZERS_BASE_URL, REWARDS_BASE_URL, ZERO_ADDRESS, } from "@morpho-org/morpho-ts";
|
|
4
38
|
export { APPROVE_ONLY_ONCE_TOKENS, DEFAULT_LLTV_BUFFER, DEFAULT_MAX_REALLOCATION_PENALTY, DEFAULT_SUPPLY_TARGET_UTILIZATION, DEFAULT_WITHDRAWAL_TARGET_UTILIZATION, MAX_ABSOLUTE_SHARE_PRICE, MAX_REALLOCATION_PENALTY, MAX_SLIPPAGE_TOLERANCE, MAX_TOKEN_APPROVALS, } from "./helpers/constant.js";
|
|
@@ -407,9 +407,9 @@ export interface BlueActions {
|
|
|
407
407
|
* @throws {ChainIdMismatchError} when the client chain does not match this market.
|
|
408
408
|
* @throws {UnsupportedChainIdError} when the chain is absent from the address registry.
|
|
409
409
|
* @throws {UnknownAddressError} when the chain has no BluePublicAllocator deployment.
|
|
410
|
-
* @throws {
|
|
411
|
-
* @throws {
|
|
412
|
-
* @throws {
|
|
410
|
+
* @throws {UnknownBlueFactory} when the chain has no Vault V2 factory.
|
|
411
|
+
* @throws {UnknownBlueOfFactory} when a requested address is not a Vault V2 from that factory.
|
|
412
|
+
* @throws {UnsupportedBlueVaultV2AdapterError} when a vault contains an unsupported adapter.
|
|
413
413
|
* @throws {viem.BaseError} when an RPC or contract read fails with no fallback left.
|
|
414
414
|
*/
|
|
415
415
|
getVaultV2BlueReallocationData: (params: {
|
|
@@ -495,6 +495,7 @@ export interface BlueActions {
|
|
|
495
495
|
* @throws {UnknownReallocationActiveAdaptersError} when active-adapter state is absent.
|
|
496
496
|
* @throws {UnknownReallocationMarketPublicAllocatorConfigError} when an adapter-market allocator configuration is absent.
|
|
497
497
|
* @throws {UnknownReallocationAllocationError} when required allocation state is absent.
|
|
498
|
+
* @throws {ReallocationAdapterSupplySharesUnderflowError} when an inconsistent adapter snapshot underflows during the final transition.
|
|
498
499
|
* @throws {ReallocationAllocationUnderflowError} when an inconsistent allocation snapshot underflows during the final transition.
|
|
499
500
|
* @throws {InsufficientSharedLiquidityError} when selected liquidity cannot cover the shortfall.
|
|
500
501
|
* @throws {ReallocationWithdrawExceedsMarketSupplyError} when a withdrawal exceeds market supply.
|
|
@@ -681,9 +682,9 @@ export declare class MorphoBlue implements BlueActions {
|
|
|
681
682
|
* @throws {ChainIdMismatchError} when the client chain does not match this market.
|
|
682
683
|
* @throws {UnsupportedChainIdError} when the chain is absent from the address registry.
|
|
683
684
|
* @throws {UnknownAddressError} when the chain has no BluePublicAllocator deployment.
|
|
684
|
-
* @throws {
|
|
685
|
-
* @throws {
|
|
686
|
-
* @throws {
|
|
685
|
+
* @throws {UnknownBlueFactory} when the chain has no Vault V2 factory.
|
|
686
|
+
* @throws {UnknownBlueOfFactory} when a requested address is not a Vault V2 from that factory.
|
|
687
|
+
* @throws {UnsupportedBlueVaultV2AdapterError} when a vault contains an unsupported adapter.
|
|
687
688
|
* @throws {viem.BaseError} when an RPC or contract read fails with no fallback left.
|
|
688
689
|
* @example
|
|
689
690
|
* ```ts
|
|
@@ -781,6 +782,7 @@ export declare class MorphoBlue implements BlueActions {
|
|
|
781
782
|
* @throws {UnknownReallocationActiveAdaptersError} when active-adapter state is absent.
|
|
782
783
|
* @throws {UnknownReallocationMarketPublicAllocatorConfigError} when an adapter-market allocator configuration is absent.
|
|
783
784
|
* @throws {UnknownReallocationAllocationError} when required allocation state is absent.
|
|
785
|
+
* @throws {ReallocationAdapterSupplySharesUnderflowError} when an inconsistent adapter snapshot underflows during the final transition.
|
|
784
786
|
* @throws {ReallocationAllocationUnderflowError} when an inconsistent allocation snapshot underflows during the final transition.
|
|
785
787
|
* @throws {InsufficientSharedLiquidityError} when selected liquidity cannot cover the shortfall.
|
|
786
788
|
* @throws {ReallocationWithdrawExceedsMarketSupplyError} when a withdrawal exceeds market supply.
|
|
@@ -1030,9 +1030,9 @@ export class MorphoBlue {
|
|
|
1030
1030
|
* @throws {ChainIdMismatchError} when the client chain does not match this market.
|
|
1031
1031
|
* @throws {UnsupportedChainIdError} when the chain is absent from the address registry.
|
|
1032
1032
|
* @throws {UnknownAddressError} when the chain has no BluePublicAllocator deployment.
|
|
1033
|
-
* @throws {
|
|
1034
|
-
* @throws {
|
|
1035
|
-
* @throws {
|
|
1033
|
+
* @throws {UnknownBlueFactory} when the chain has no Vault V2 factory.
|
|
1034
|
+
* @throws {UnknownBlueOfFactory} when a requested address is not a Vault V2 from that factory.
|
|
1035
|
+
* @throws {UnsupportedBlueVaultV2AdapterError} when a vault contains an unsupported adapter.
|
|
1036
1036
|
* @throws {viem.BaseError} when an RPC or contract read fails with no fallback left.
|
|
1037
1037
|
* @example
|
|
1038
1038
|
* ```ts
|
|
@@ -1186,6 +1186,7 @@ export class MorphoBlue {
|
|
|
1186
1186
|
* @throws {UnknownReallocationActiveAdaptersError} when active-adapter state is absent.
|
|
1187
1187
|
* @throws {UnknownReallocationMarketPublicAllocatorConfigError} when an adapter-market allocator configuration is absent.
|
|
1188
1188
|
* @throws {UnknownReallocationAllocationError} when required allocation state is absent.
|
|
1189
|
+
* @throws {ReallocationAdapterSupplySharesUnderflowError} when an inconsistent adapter snapshot underflows during the final transition.
|
|
1189
1190
|
* @throws {ReallocationAllocationUnderflowError} when an inconsistent allocation snapshot underflows during the final transition.
|
|
1190
1191
|
* @throws {InsufficientSharedLiquidityError} when selected liquidity cannot cover the shortfall.
|
|
1191
1192
|
* @throws {ReallocationWithdrawExceedsMarketSupplyError} when a withdrawal exceeds market supply.
|
|
@@ -1,7 +1,66 @@
|
|
|
1
|
-
export type { IAccrualPosition
|
|
2
|
-
|
|
1
|
+
export type { IAccrualPosition as IBlueAccrualPosition,
|
|
2
|
+
/** @deprecated Use `IBlueAccrualPosition` or the raw Blue subpath. */
|
|
3
|
+
IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket as IBlueMarket,
|
|
4
|
+
/** @deprecated Use `IBlueMarket` or the raw Blue subpath. */
|
|
5
|
+
IMarket, IMarketParams as IBlueMarketParams,
|
|
6
|
+
/** @deprecated Use `IBlueMarketParams` or the raw Blue subpath. */
|
|
7
|
+
IMarketParams, IPosition as IBluePosition,
|
|
8
|
+
/** @deprecated Use `IBluePosition` or the raw Blue subpath. */
|
|
9
|
+
IPosition, IPreLiquidationParams as IBluePreLiquidationParams,
|
|
10
|
+
/** @deprecated Use `IBluePreLiquidationParams` or the raw Blue subpath. */
|
|
11
|
+
IPreLiquidationParams, IPreLiquidationPosition as IBluePreLiquidationPosition,
|
|
12
|
+
/** @deprecated Use `IBluePreLiquidationPosition` or the raw Blue subpath. */
|
|
13
|
+
IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultMarketPublicAllocatorConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, VaultPublicAllocatorConfig, } from "@morpho-org/blue-sdk";
|
|
14
|
+
export { AccrualPosition as BlueAccrualPosition,
|
|
15
|
+
/** @deprecated Use `BlueAccrualPosition` or the raw Blue subpath. */
|
|
16
|
+
AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market as BlueMarket,
|
|
17
|
+
/** @deprecated Use `BlueMarket` or the raw Blue subpath. */
|
|
18
|
+
Market, MarketParams as BlueMarketParams,
|
|
19
|
+
/** @deprecated Use `BlueMarketParams` or the raw Blue subpath. */
|
|
20
|
+
MarketParams, Position as BluePosition,
|
|
21
|
+
/** @deprecated Use `BluePosition` or the raw Blue subpath. */
|
|
22
|
+
Position, PreLiquidationParams as BluePreLiquidationParams,
|
|
23
|
+
/** @deprecated Use `BluePreLiquidationParams` or the raw Blue subpath. */
|
|
24
|
+
PreLiquidationParams, PreLiquidationPosition as BluePreLiquidationPosition,
|
|
25
|
+
/** @deprecated Use `BluePreLiquidationPosition` or the raw Blue subpath. */
|
|
26
|
+
PreLiquidationPosition, Token, User as BlueUser,
|
|
27
|
+
/** @deprecated Use `BlueUser` or the raw Blue subpath. */
|
|
28
|
+
User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
29
|
+
export type { BuildOfferParams as MidnightBuildOfferParams, CollateralParams as MidnightCollateralParams, GroupInput as MidnightGroupInput, IAccrualPosition as IMidnightAccrualPosition, ICollateralParams as IMidnightCollateralParams, IGroup as IMidnightGroup, IMarket as IMidnightMarket, IMarketParams as IMidnightMarketParams, IOffer as IMidnightOffer, IPosition as IMidnightPosition, MarketInput as MidnightMarketInput, OfferStruct as MidnightOfferStruct, RatifierTreeInput as MidnightRatifierTreeInput, SettlementFeeCbps as MidnightSettlementFeeCbps, TreeCreateParams as MidnightTreeCreateParams, TreeDescriptor as MidnightTreeDescriptor, TreeInput as MidnightTreeInput, TreeLike as MidnightTreeLike, TreeMempoolValidateParams as MidnightTreeMempoolValidateParams, TreeMempoolValidateRatification as MidnightTreeMempoolValidateRatification, TreeProof as MidnightTreeProof, } from "@morpho-org/midnight-sdk";
|
|
30
|
+
export { AccrualPosition as MidnightAccrualPosition, Group as MidnightGroup, Market as MidnightMarket, MarketParams as MidnightMarketParams, Offer as MidnightOffer, Position as MidnightPosition, Tree as MidnightTree, } from "@morpho-org/midnight-sdk";
|
|
3
31
|
export { MorphoBlue } from "./blue/index.js";
|
|
4
|
-
export
|
|
32
|
+
export type { GetOffersDataParams as MidnightGetOffersDataParams,
|
|
33
|
+
/** @deprecated Use `MidnightGetOffersDataParams`. */
|
|
34
|
+
GetOffersDataParams, GetPositionDataParams as MidnightGetPositionDataParams,
|
|
35
|
+
/** @deprecated Use `MidnightGetPositionDataParams`. */
|
|
36
|
+
GetPositionDataParams, MakeLendParams as MidnightMakeLendParams,
|
|
37
|
+
/** @deprecated Use `MidnightMakeLendParams`. */
|
|
38
|
+
MakeLendParams, MakeOffersOutput as MidnightMakeOffersOutput,
|
|
39
|
+
/** @deprecated Use `MidnightMakeOffersOutput`. */
|
|
40
|
+
MakeOffersOutput, MakeOffersParams as MidnightMakeOffersParams,
|
|
41
|
+
/** @deprecated Use `MidnightMakeOffersParams`. */
|
|
42
|
+
MakeOffersParams, MarketActionParams as MidnightMarketActionParams,
|
|
43
|
+
/** @deprecated Use `MidnightMarketActionParams`. */
|
|
44
|
+
MarketActionParams, OffersData as MidnightOffersData,
|
|
45
|
+
/** @deprecated Use `MidnightOffersData`. */
|
|
46
|
+
OffersData, OfferValidationParams as MidnightOfferValidationParams,
|
|
47
|
+
/** @deprecated Use `MidnightOfferValidationParams`. */
|
|
48
|
+
OfferValidationParams, RedeemParams as MidnightRedeemParams,
|
|
49
|
+
/** @deprecated Use `MidnightRedeemParams`. */
|
|
50
|
+
RedeemParams, RepayWithdrawCollateralParams as MidnightRepayWithdrawCollateralParams,
|
|
51
|
+
/** @deprecated Use `MidnightRepayWithdrawCollateralParams`. */
|
|
52
|
+
RepayWithdrawCollateralParams, SupplyCollateralMakeBorrowParams as MidnightSupplyCollateralMakeBorrowParams,
|
|
53
|
+
/** @deprecated Use `MidnightSupplyCollateralMakeBorrowParams`. */
|
|
54
|
+
SupplyCollateralMakeBorrowParams, SupplyCollateralParams as MidnightSupplyCollateralParams,
|
|
55
|
+
/** @deprecated Use `MidnightSupplyCollateralParams`. */
|
|
56
|
+
SupplyCollateralParams, SupplyCollateralTakeBorrowParams as MidnightSupplyCollateralTakeBorrowParams,
|
|
57
|
+
/** @deprecated Use `MidnightSupplyCollateralTakeBorrowParams`. */
|
|
58
|
+
SupplyCollateralTakeBorrowParams, TakeBorrowParams as MidnightTakeBorrowParams,
|
|
59
|
+
/** @deprecated Use `MidnightTakeBorrowParams`. */
|
|
60
|
+
TakeBorrowParams, TakeLendParams as MidnightTakeLendParams,
|
|
61
|
+
/** @deprecated Use `MidnightTakeLendParams`. */
|
|
62
|
+
TakeLendParams, } from "./midnight/index.js";
|
|
63
|
+
export { type MidnightActionOutput, type MidnightActionSignatures, type MidnightActions, MorphoMidnight, } from "./midnight/index.js";
|
|
5
64
|
export { MorphoVaultV1 } from "./vaultV1/index.js";
|
|
6
65
|
export { type InputReallocationData, type InputVaultV1ReallocationData, ReallocationData, VaultV1ReallocationData, } from "./vaultV1ReallocationData.js";
|
|
7
66
|
export { MorphoVaultV2 } from "./vaultV2/index.js";
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
export { AccrualPosition
|
|
1
|
+
export { AccrualPosition as BlueAccrualPosition,
|
|
2
|
+
/** @deprecated Use `BlueAccrualPosition` or the raw Blue subpath. */
|
|
3
|
+
AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market as BlueMarket,
|
|
4
|
+
/** @deprecated Use `BlueMarket` or the raw Blue subpath. */
|
|
5
|
+
Market, MarketParams as BlueMarketParams,
|
|
6
|
+
/** @deprecated Use `BlueMarketParams` or the raw Blue subpath. */
|
|
7
|
+
MarketParams, Position as BluePosition,
|
|
8
|
+
/** @deprecated Use `BluePosition` or the raw Blue subpath. */
|
|
9
|
+
Position, PreLiquidationParams as BluePreLiquidationParams,
|
|
10
|
+
/** @deprecated Use `BluePreLiquidationParams` or the raw Blue subpath. */
|
|
11
|
+
PreLiquidationParams, PreLiquidationPosition as BluePreLiquidationPosition,
|
|
12
|
+
/** @deprecated Use `BluePreLiquidationPosition` or the raw Blue subpath. */
|
|
13
|
+
PreLiquidationPosition, Token, User as BlueUser,
|
|
14
|
+
/** @deprecated Use `BlueUser` or the raw Blue subpath. */
|
|
15
|
+
User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
16
|
+
export { AccrualPosition as MidnightAccrualPosition, Group as MidnightGroup, Market as MidnightMarket, MarketParams as MidnightMarketParams, Offer as MidnightOffer, Position as MidnightPosition, Tree as MidnightTree, } from "@morpho-org/midnight-sdk";
|
|
2
17
|
export { MorphoBlue } from "./blue/index.js";
|
|
3
|
-
export
|
|
18
|
+
export { MorphoMidnight, } from "./midnight/index.js";
|
|
4
19
|
export { MorphoVaultV1 } from "./vaultV1/index.js";
|
|
5
20
|
export { ReallocationData, VaultV1ReallocationData, } from "./vaultV1ReallocationData.js";
|
|
6
21
|
export { MorphoVaultV2 } from "./vaultV2/index.js";
|
|
@@ -94,7 +94,7 @@ export declare class VaultV2BlueReallocationData implements InputVaultV2BlueReal
|
|
|
94
94
|
* Creates a cloned Vault V2 reallocation snapshot.
|
|
95
95
|
*
|
|
96
96
|
* @param input - State fetched at one consistent block.
|
|
97
|
-
* @throws {
|
|
97
|
+
* @throws {UnsupportedBlueVaultV2AdapterError} when a vault contains an unsupported adapter type.
|
|
98
98
|
*/
|
|
99
99
|
constructor(input: InputVaultV2BlueReallocationData);
|
|
100
100
|
/**
|
|
@@ -365,10 +365,11 @@ export declare class VaultV2BlueReallocationData implements InputVaultV2BlueReal
|
|
|
365
365
|
* `options.maxPenalty` are ignored. By default, only zero-penalty vaults are
|
|
366
366
|
* considered.
|
|
367
367
|
*
|
|
368
|
-
* Shared-cap discovery is conservative
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
368
|
+
* Shared-cap discovery is conservative. Operation planning searches at most
|
|
369
|
+
* 1,024 base units above its targeted amount for the nearest executable fit.
|
|
370
|
+
* Full-liquidity discovery omits a candidate when its non-shared maximum
|
|
371
|
+
* violates a shared cap instead of scanning smaller base-unit amounts. These
|
|
372
|
+
* bounds can understate executable liquidity in rounding-only edge cases.
|
|
372
373
|
*
|
|
373
374
|
* @param marketId - Target Blue market id.
|
|
374
375
|
* @param options - Optional discovery controls and operation to support.
|
|
@@ -382,7 +383,6 @@ export declare class VaultV2BlueReallocationData implements InputVaultV2BlueReal
|
|
|
382
383
|
* @throws {UnknownReallocationActiveAdaptersError} when active-adapter state is absent for a vault.
|
|
383
384
|
* @throws {UnknownReallocationMarketPublicAllocatorConfigError} when an adapter-market allocator configuration is absent.
|
|
384
385
|
* @throws {UnknownReallocationAllocationError} when required allocation state is absent.
|
|
385
|
-
* @throws {ReallocationAllocationUnderflowError} when an inconsistent allocation snapshot underflows during the final transition.
|
|
386
386
|
* @throws {InsufficientSharedLiquidityError} when selected liquidity cannot cover the absolute shortfall.
|
|
387
387
|
* @throws {ReallocationWithdrawExceedsMarketSupplyError} when a withdraw exceeds market supply.
|
|
388
388
|
* @example
|