@morpho-org/morpho-sdk 6.0.0-next.2 → 6.0.0-next.4
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-v5-to-v6.md +88 -32
- package/README.md +9 -7
- package/lib/cjs/abis.d.ts +7 -2844
- package/lib/cjs/abis.js +3 -1951
- package/lib/cjs/actions/blue/borrow.d.ts +3 -2
- package/lib/cjs/actions/blue/borrow.js +3 -2
- package/lib/cjs/actions/blue/common.js +1 -9
- package/lib/cjs/actions/blue/refinance.d.ts +2 -2
- package/lib/cjs/actions/blue/refinance.js +2 -2
- package/lib/cjs/actions/blue/repay.d.ts +1 -1
- package/lib/cjs/actions/blue/repay.js +1 -1
- package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +2 -2
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +2 -2
- package/lib/cjs/actions/blue/supply.d.ts +2 -2
- package/lib/cjs/actions/blue/supply.js +2 -2
- package/lib/cjs/actions/blue/supplyCollateral.d.ts +2 -2
- package/lib/cjs/actions/blue/supplyCollateral.js +2 -2
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +3 -2
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +3 -2
- package/lib/cjs/actions/blue/withdraw.d.ts +3 -3
- package/lib/cjs/actions/blue/withdraw.js +3 -3
- package/lib/cjs/actions/blue/withdrawCollateral.d.ts +2 -2
- package/lib/cjs/actions/blue/withdrawCollateral.js +2 -2
- package/lib/cjs/actions/bundles/common.d.ts +6 -2
- package/lib/cjs/actions/bundles/common.js +31 -5
- package/lib/cjs/actions/index.d.ts +0 -1
- package/lib/cjs/actions/index.js +0 -1
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -8
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +11 -16
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +4 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +6 -11
- package/lib/cjs/actions/requirements/encode/index.d.ts +0 -1
- package/lib/cjs/actions/requirements/encode/index.js +0 -1
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -6
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -6
- package/lib/cjs/actions/requirements/index.d.ts +0 -1
- package/lib/cjs/actions/requirements/index.js +0 -1
- package/lib/cjs/actions/vaultV1/deposit.d.ts +1 -2
- package/lib/cjs/actions/vaultV1/deposit.js +1 -2
- package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +7 -5
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +11 -7
- package/lib/cjs/actions/vaultV2/deposit.d.ts +1 -2
- package/lib/cjs/actions/vaultV2/deposit.js +1 -2
- package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +1 -1
- package/lib/cjs/actions/vaultV2/forceWithdraw.js +3 -3
- package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +7 -5
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +11 -7
- package/lib/cjs/augment/AccrualPosition.d.ts +1 -0
- package/lib/cjs/augment.d.ts +0 -1
- package/lib/cjs/augment.js +0 -1
- package/lib/cjs/blue/abis.d.ts +5 -5
- package/lib/cjs/blue/abis.js +3 -7
- package/lib/cjs/blue/entities.d.ts +10 -8
- package/lib/cjs/blue/entities.js +3 -3
- package/lib/cjs/blue/errors.d.ts +4 -2
- package/lib/cjs/blue/errors.js +3 -1
- package/lib/cjs/blue/fetch.d.ts +5 -3
- package/lib/cjs/blue/fetch.js +3 -3
- package/lib/cjs/blue/types.d.ts +2 -4
- package/lib/cjs/blue/utils.d.ts +6 -4
- package/lib/cjs/blue/utils.js +3 -3
- package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
- package/lib/cjs/client/morphoViemExtension.js +1 -1
- package/lib/cjs/constants.d.ts +3 -37
- package/lib/cjs/constants.js +1 -39
- package/lib/cjs/entities/blue/blue.d.ts +30 -265
- package/lib/cjs/entities/blue/blue.js +1 -205
- package/lib/cjs/entities/index.d.ts +11 -66
- package/lib/cjs/entities/index.js +3 -21
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -2
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +8 -3
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +13 -5
- package/lib/cjs/entities/vaultV1/vaultV1.js +16 -10
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +40 -19
- package/lib/cjs/entities/vaultV2/vaultV2.js +57 -26
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +4 -21
- package/lib/cjs/errors.d.ts +5 -47
- package/lib/cjs/errors.js +4 -46
- package/lib/cjs/fetch.d.ts +5 -17
- package/lib/cjs/fetch.js +3 -17
- package/lib/cjs/helpers/constant.d.ts +0 -2
- package/lib/cjs/helpers/constant.js +0 -2
- package/lib/cjs/helpers/index.d.ts +2 -3
- package/lib/cjs/helpers/index.js +1 -9
- package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +11 -5
- package/lib/cjs/helpers/slippage.d.ts +1 -103
- package/lib/cjs/helpers/slippage.js +0 -150
- package/lib/cjs/helpers/utilization.d.ts +12 -10
- package/lib/cjs/helpers/utilization.js +27 -12
- package/lib/cjs/helpers/validate.d.ts +1 -24
- package/lib/cjs/helpers/validate.js +2 -49
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +48 -15
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +48 -15
- package/lib/cjs/midnight/errors.d.ts +1 -1
- package/lib/cjs/midnight/errors.js +2 -1
- package/lib/cjs/types/action.d.ts +17 -65
- package/lib/cjs/types/action.js +11 -4
- package/lib/cjs/types/error.d.ts +50 -381
- package/lib/cjs/types/error.js +64 -395
- package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
- package/lib/cjs/types.d.ts +2 -18
- package/lib/cjs/utils.d.ts +10 -35
- package/lib/cjs/utils.js +4 -36
- package/lib/esm/abis.d.ts +7 -2844
- package/lib/esm/abis.js +7 -1950
- package/lib/esm/actions/blue/borrow.d.ts +3 -2
- package/lib/esm/actions/blue/borrow.js +3 -2
- package/lib/esm/actions/blue/common.js +1 -9
- package/lib/esm/actions/blue/refinance.d.ts +2 -2
- package/lib/esm/actions/blue/refinance.js +2 -2
- package/lib/esm/actions/blue/repay.d.ts +1 -1
- package/lib/esm/actions/blue/repay.js +1 -1
- package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +2 -2
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +2 -2
- package/lib/esm/actions/blue/supply.d.ts +2 -2
- package/lib/esm/actions/blue/supply.js +2 -2
- package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -2
- package/lib/esm/actions/blue/supplyCollateral.js +2 -2
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -2
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -2
- package/lib/esm/actions/blue/withdraw.d.ts +3 -3
- package/lib/esm/actions/blue/withdraw.js +3 -3
- package/lib/esm/actions/blue/withdrawCollateral.d.ts +2 -2
- package/lib/esm/actions/blue/withdrawCollateral.js +2 -2
- package/lib/esm/actions/bundles/common.d.ts +6 -2
- package/lib/esm/actions/bundles/common.js +32 -6
- package/lib/esm/actions/index.d.ts +0 -1
- package/lib/esm/actions/index.js +0 -1
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -8
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +12 -17
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +4 -5
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +6 -11
- package/lib/esm/actions/requirements/encode/index.d.ts +0 -1
- package/lib/esm/actions/requirements/encode/index.js +0 -1
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -6
- package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -6
- package/lib/esm/actions/requirements/index.d.ts +0 -1
- package/lib/esm/actions/requirements/index.js +0 -1
- package/lib/esm/actions/vaultV1/deposit.d.ts +1 -2
- package/lib/esm/actions/vaultV1/deposit.js +1 -2
- package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +7 -5
- package/lib/esm/actions/vaultV1/inKindRedeem.js +11 -7
- package/lib/esm/actions/vaultV2/deposit.d.ts +1 -2
- package/lib/esm/actions/vaultV2/deposit.js +1 -2
- package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +1 -1
- package/lib/esm/actions/vaultV2/forceWithdraw.js +3 -3
- package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +7 -5
- package/lib/esm/actions/vaultV2/inKindRedeem.js +11 -7
- package/lib/esm/augment/AccrualPosition.d.ts +1 -0
- package/lib/esm/augment.d.ts +0 -1
- package/lib/esm/augment.js +0 -1
- package/lib/esm/blue/abis.d.ts +5 -5
- package/lib/esm/blue/abis.js +5 -5
- package/lib/esm/blue/entities.d.ts +10 -8
- package/lib/esm/blue/entities.js +5 -3
- package/lib/esm/blue/errors.d.ts +4 -2
- package/lib/esm/blue/errors.js +4 -2
- package/lib/esm/blue/fetch.d.ts +5 -3
- package/lib/esm/blue/fetch.js +5 -3
- package/lib/esm/blue/types.d.ts +2 -4
- package/lib/esm/blue/utils.d.ts +6 -4
- package/lib/esm/blue/utils.js +6 -4
- package/lib/esm/client/morphoViemExtension.d.ts +1 -1
- package/lib/esm/client/morphoViemExtension.js +1 -1
- package/lib/esm/constants.d.ts +3 -37
- package/lib/esm/constants.js +3 -37
- package/lib/esm/entities/blue/blue.d.ts +30 -265
- package/lib/esm/entities/blue/blue.js +4 -208
- package/lib/esm/entities/index.d.ts +11 -66
- package/lib/esm/entities/index.js +5 -18
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -2
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +8 -3
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +13 -5
- package/lib/esm/entities/vaultV1/vaultV1.js +19 -13
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +40 -19
- package/lib/esm/entities/vaultV2/vaultV2.js +61 -30
- package/lib/esm/entities/vaultV2BlueReallocationData.js +2 -19
- package/lib/esm/errors.d.ts +5 -47
- package/lib/esm/errors.js +5 -47
- package/lib/esm/fetch.d.ts +5 -17
- package/lib/esm/fetch.js +5 -17
- package/lib/esm/helpers/constant.d.ts +0 -2
- package/lib/esm/helpers/constant.js +0 -2
- package/lib/esm/helpers/index.d.ts +2 -3
- package/lib/esm/helpers/index.js +2 -3
- package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +11 -5
- package/lib/esm/helpers/slippage.d.ts +1 -103
- package/lib/esm/helpers/slippage.js +1 -147
- package/lib/esm/helpers/utilization.d.ts +12 -10
- package/lib/esm/helpers/utilization.js +26 -11
- package/lib/esm/helpers/validate.d.ts +1 -24
- package/lib/esm/helpers/validate.js +2 -48
- package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/esm/helpers/validateRequirementSpender.js +1 -3
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +48 -15
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +48 -15
- package/lib/esm/midnight/errors.d.ts +1 -1
- package/lib/esm/midnight/errors.js +1 -1
- package/lib/esm/types/action.d.ts +17 -65
- package/lib/esm/types/action.js +12 -5
- package/lib/esm/types/error.d.ts +50 -381
- package/lib/esm/types/error.js +58 -377
- package/lib/esm/types/sharedLiquidity.d.ts +1 -117
- package/lib/esm/types.d.ts +2 -18
- package/lib/esm/utils.d.ts +10 -35
- package/lib/esm/utils.js +9 -34
- package/package.json +6 -17
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -88
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -152
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -53
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -74
- package/lib/cjs/actions/requirements/generalAdapter/index.d.ts +0 -3
- package/lib/cjs/actions/requirements/generalAdapter/index.js +0 -19
- package/lib/cjs/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
- package/lib/cjs/actions/signatures/getBlueAuthorizationAction.js +0 -48
- package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +0 -58
- package/lib/cjs/actions/signatures/getTokenRequirementActions.js +0 -119
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -45
- package/lib/cjs/actions/signatures/index.d.ts +0 -3
- package/lib/cjs/actions/signatures/index.js +0 -19
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +0 -8
- package/lib/cjs/bundler/actions.d.ts +0 -797
- package/lib/cjs/bundler/actions.js +0 -1371
- package/lib/cjs/bundler/index.d.ts +0 -2
- package/lib/cjs/bundler/index.js +0 -18
- package/lib/cjs/bundler/types.d.ts +0 -235
- package/lib/cjs/bundler/types.js +0 -2
- package/lib/cjs/entities/vaultV1ReallocationData.d.ts +0 -332
- package/lib/cjs/entities/vaultV1ReallocationData.js +0 -557
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -80
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -245
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -84
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -148
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -49
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -70
- package/lib/esm/actions/requirements/generalAdapter/index.d.ts +0 -3
- package/lib/esm/actions/requirements/generalAdapter/index.js +0 -3
- package/lib/esm/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
- package/lib/esm/actions/signatures/getBlueAuthorizationAction.js +0 -44
- package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +0 -58
- package/lib/esm/actions/signatures/getTokenRequirementActions.js +0 -115
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -41
- package/lib/esm/actions/signatures/index.d.ts +0 -3
- package/lib/esm/actions/signatures/index.js +0 -3
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -7
- package/lib/esm/bundler/actions.d.ts +0 -797
- package/lib/esm/bundler/actions.js +0 -1368
- package/lib/esm/bundler/index.d.ts +0 -2
- package/lib/esm/bundler/index.js +0 -2
- package/lib/esm/bundler/types.d.ts +0 -235
- package/lib/esm/bundler/types.js +0 -1
- package/lib/esm/entities/vaultV1ReallocationData.d.ts +0 -332
- package/lib/esm/entities/vaultV1ReallocationData.js +0 -559
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -80
- package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -241
package/lib/cjs/types/error.d.ts
CHANGED
|
@@ -103,10 +103,6 @@ export declare class VaultV2SingleAdapterRequiredError extends Error {
|
|
|
103
103
|
*/
|
|
104
104
|
constructor(vault: Address, adapters: number);
|
|
105
105
|
}
|
|
106
|
-
/** @deprecated Use {@link VaultV2SingleAdapterRequiredError}. */
|
|
107
|
-
export declare const InKindRedeemRequiresSingleAdapterError: typeof VaultV2SingleAdapterRequiredError;
|
|
108
|
-
/** @deprecated Use {@link VaultV2SingleAdapterRequiredError}. */
|
|
109
|
-
export type InKindRedeemRequiresSingleAdapterError = VaultV2SingleAdapterRequiredError;
|
|
110
106
|
/** Thrown when a requested in-kind redemption adapter is not part of the Vault V2 snapshot. */
|
|
111
107
|
export declare class AdapterNotPartOfVaultError extends Error {
|
|
112
108
|
readonly vault: Address;
|
|
@@ -140,10 +136,6 @@ export declare class VaultV2UnsupportedExitAdapterError extends Error {
|
|
|
140
136
|
*/
|
|
141
137
|
constructor(adapter: Address);
|
|
142
138
|
}
|
|
143
|
-
/** @deprecated Use {@link VaultV2UnsupportedExitAdapterError}. */
|
|
144
|
-
export declare const UnsupportedInKindAdapterError: typeof VaultV2UnsupportedExitAdapterError;
|
|
145
|
-
/** @deprecated Use {@link VaultV2UnsupportedExitAdapterError}. */
|
|
146
|
-
export type UnsupportedInKindAdapterError = VaultV2UnsupportedExitAdapterError;
|
|
147
139
|
/**
|
|
148
140
|
* Thrown when a Vault V2 exit cannot resolve the vault's configured liquidity adapter.
|
|
149
141
|
*
|
|
@@ -346,6 +338,41 @@ export declare class VaultV2ForceWithdrawZeroSharePriceError extends Error {
|
|
|
346
338
|
readonly slippageTolerance: bigint;
|
|
347
339
|
});
|
|
348
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Thrown when a supplied force-withdraw share-price floor is below the SDK safety floor.
|
|
343
|
+
*
|
|
344
|
+
* An override below the floor derived at `MAX_SLIPPAGE_TOLERANCE` would weaken the on-chain
|
|
345
|
+
* share-price protection and let the required share allowance grow without bound, so the entity
|
|
346
|
+
* rejects it instead of encoding it.
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* ```ts
|
|
350
|
+
* import { VaultV2ForceWithdrawSharePriceBelowFloorError } from "@morpho-org/morpho-sdk";
|
|
351
|
+
*
|
|
352
|
+
* try {
|
|
353
|
+
* vault.forceWithdraw({ exitAssets, vaultData, userAddress, minSharePriceE27 });
|
|
354
|
+
* } catch (error) {
|
|
355
|
+
* if (error instanceof VaultV2ForceWithdrawSharePriceBelowFloorError) {
|
|
356
|
+
* console.error(error.minSharePriceE27, error.floorE27);
|
|
357
|
+
* }
|
|
358
|
+
* }
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
export declare class VaultV2ForceWithdrawSharePriceBelowFloorError extends Error {
|
|
362
|
+
/** Supplied force-withdraw share-price floor. */
|
|
363
|
+
readonly minSharePriceE27: bigint;
|
|
364
|
+
/** Minimum share-price floor allowed at maximum SDK slippage tolerance. */
|
|
365
|
+
readonly floorE27: bigint;
|
|
366
|
+
/**
|
|
367
|
+
* @param params - Supplied and minimum allowed share-price floors.
|
|
368
|
+
* @param params.minSharePriceE27 - Supplied force-withdraw share-price floor.
|
|
369
|
+
* @param params.floorE27 - Minimum floor derived at maximum SDK slippage tolerance.
|
|
370
|
+
*/
|
|
371
|
+
constructor(params: {
|
|
372
|
+
readonly minSharePriceE27: bigint;
|
|
373
|
+
readonly floorE27: bigint;
|
|
374
|
+
});
|
|
375
|
+
}
|
|
349
376
|
/**
|
|
350
377
|
* Thrown when fee shares projected to the accepted deadline reach the lower force-withdraw
|
|
351
378
|
* burn bound at that time.
|
|
@@ -487,19 +514,6 @@ export declare class BundlesPermitMismatchError extends Error {
|
|
|
487
514
|
readonly cause?: unknown;
|
|
488
515
|
});
|
|
489
516
|
}
|
|
490
|
-
/**
|
|
491
|
-
* Thrown by the deprecated VaultExitBundlesV1 permit compatibility helper.
|
|
492
|
-
*
|
|
493
|
-
* @deprecated Use {@link BundlesPermitMismatchError} with `getBundlesSharesPermit`.
|
|
494
|
-
*/
|
|
495
|
-
export declare class VaultExitBundlesV1PermitMismatchError extends BundlesPermitMismatchError {
|
|
496
|
-
constructor(params: {
|
|
497
|
-
readonly field: "type" | "asset" | "owner" | "spender" | "amount" | "nonce" | "deadline" | "signature";
|
|
498
|
-
readonly expected: string;
|
|
499
|
-
readonly actual: string;
|
|
500
|
-
readonly cause?: unknown;
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
517
|
/** Thrown when a signed requirement cannot be safely encoded for a fixed bundles call. */
|
|
504
518
|
export declare class BundlesRequirementSignatureMismatchError extends Error {
|
|
505
519
|
/** Field whose signed value or encoding is invalid for the fixed bundles call. */
|
|
@@ -522,8 +536,6 @@ export declare class BundlesRequirementSignatureMismatchError extends Error {
|
|
|
522
536
|
cause?: unknown;
|
|
523
537
|
});
|
|
524
538
|
}
|
|
525
|
-
/** @deprecated Use {@link BundlesRequirementSignatureMismatchError}. */
|
|
526
|
-
export { BundlesRequirementSignatureMismatchError as BlueBundlesV1RequirementSignatureMismatchError, };
|
|
527
539
|
/** Thrown when an explicit Permit2 SignatureTransfer unordered nonce is already consumed. */
|
|
528
540
|
export declare class Permit2SignatureTransferNonceAlreadyUsedError extends Error {
|
|
529
541
|
readonly owner: Address;
|
|
@@ -544,8 +556,6 @@ export declare class NoUnusedPermit2NonceError extends Error {
|
|
|
544
556
|
*/
|
|
545
557
|
constructor(owner: Address, startNonce: bigint);
|
|
546
558
|
}
|
|
547
|
-
/** @deprecated Use {@link Permit2SignatureTransferNonceAlreadyUsedError}. */
|
|
548
|
-
export { Permit2SignatureTransferNonceAlreadyUsedError as Permit2TransferFromNonceAlreadyUsedError, };
|
|
549
559
|
/** Thrown when native funding does not exactly match the contract's gross token pull. */
|
|
550
560
|
export declare class NativeFundingAmountMismatchError extends Error {
|
|
551
561
|
readonly nativeAmount: bigint;
|
|
@@ -560,10 +570,6 @@ export declare class NativeFundingAmountMismatchError extends Error {
|
|
|
560
570
|
export declare class ReferralFeeRecipientMissingError extends Error {
|
|
561
571
|
constructor();
|
|
562
572
|
}
|
|
563
|
-
/** @deprecated Use {@link ReferralFeeRecipientMissingError}. */
|
|
564
|
-
export declare const MissingReferralFeeRecipientError: typeof ReferralFeeRecipientMissingError;
|
|
565
|
-
/** @deprecated Use {@link ReferralFeeRecipientMissingError}. */
|
|
566
|
-
export type MissingReferralFeeRecipientError = ReferralFeeRecipientMissingError;
|
|
567
573
|
/**
|
|
568
574
|
* Thrown when a referral fee percentage is outside the contract's `[0, WAD)` range.
|
|
569
575
|
*
|
|
@@ -600,9 +606,7 @@ export declare class ReallocationLoanTokenMismatchError extends Error {
|
|
|
600
606
|
constructor(expected: Address, actual: Address);
|
|
601
607
|
}
|
|
602
608
|
/**
|
|
603
|
-
* Thrown when a Blue authorization operator is not
|
|
604
|
-
* (GeneralAdapter1 or BlueBundlesV1). Guards the exported authorization builder so a misconfigured
|
|
605
|
-
* `authorized` cannot grant an arbitrary address control over the user's Morpho positions.
|
|
609
|
+
* Thrown when a Blue authorization operator is not the chain's registered BlueBundlesV1 contract.
|
|
606
610
|
*/
|
|
607
611
|
export declare class UnsupportedAuthorizationOperatorError extends Error {
|
|
608
612
|
readonly authorized: Address;
|
|
@@ -627,177 +631,6 @@ export declare class MaxRepayAssetsBelowRepayAssetsError extends Error {
|
|
|
627
631
|
*/
|
|
628
632
|
constructor(maxRepayAssets: bigint, repayAssets: bigint);
|
|
629
633
|
}
|
|
630
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
631
|
-
export declare const NonPositiveAssetAmountError: typeof NonPositiveInputError;
|
|
632
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
633
|
-
export type NonPositiveAssetAmountError = NonPositiveInputError;
|
|
634
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
635
|
-
export declare const NonPositiveSharesAmountError: typeof NonPositiveInputError;
|
|
636
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
637
|
-
export type NonPositiveSharesAmountError = NonPositiveInputError;
|
|
638
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
639
|
-
export declare const NonPositiveMaxSharePriceError: typeof NonPositiveInputError;
|
|
640
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
641
|
-
export type NonPositiveMaxSharePriceError = NonPositiveInputError;
|
|
642
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
643
|
-
export declare const ZeroDepositAmountError: typeof NonPositiveInputError;
|
|
644
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
645
|
-
export type ZeroDepositAmountError = NonPositiveInputError;
|
|
646
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
647
|
-
export declare const NonPositiveBorrowAmountError: typeof NonPositiveInputError;
|
|
648
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
649
|
-
export type NonPositiveBorrowAmountError = NonPositiveInputError;
|
|
650
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
651
|
-
export declare const ZeroCollateralAmountError: typeof NonPositiveInputError;
|
|
652
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
653
|
-
export type ZeroCollateralAmountError = NonPositiveInputError;
|
|
654
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
655
|
-
export declare const NonPositiveReallocationAmountError: typeof NonPositiveInputError;
|
|
656
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
657
|
-
export type NonPositiveReallocationAmountError = NonPositiveInputError;
|
|
658
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
659
|
-
export declare const NonPositiveRepayAmountError: typeof NonPositiveInputError;
|
|
660
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
661
|
-
export type NonPositiveRepayAmountError = NonPositiveInputError;
|
|
662
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
663
|
-
export declare const NonPositiveRepayMaxSharePriceError: typeof NonPositiveInputError;
|
|
664
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
665
|
-
export type NonPositiveRepayMaxSharePriceError = NonPositiveInputError;
|
|
666
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
667
|
-
export declare const NonPositiveWithdrawCollateralAmountError: typeof NonPositiveInputError;
|
|
668
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
669
|
-
export type NonPositiveWithdrawCollateralAmountError = NonPositiveInputError;
|
|
670
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
671
|
-
export declare const ZeroSupplyAmountError: typeof NonPositiveInputError;
|
|
672
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
673
|
-
export type ZeroSupplyAmountError = NonPositiveInputError;
|
|
674
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
675
|
-
export declare const NonPositiveWithdrawAmountError: typeof NonPositiveInputError;
|
|
676
|
-
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
677
|
-
export type NonPositiveWithdrawAmountError = NonPositiveInputError;
|
|
678
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
679
|
-
export declare const NegativeSlippageToleranceError: typeof NegativeInputError;
|
|
680
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
681
|
-
export type NegativeSlippageToleranceError = NegativeInputError;
|
|
682
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
683
|
-
export declare const NegativeNativeAmountError: typeof NegativeInputError;
|
|
684
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
685
|
-
export type NegativeNativeAmountError = NegativeInputError;
|
|
686
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
687
|
-
export declare const NegativeReallocationFeeError: typeof NegativeInputError;
|
|
688
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
689
|
-
export type NegativeReallocationFeeError = NegativeInputError;
|
|
690
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
691
|
-
export declare const NonPositiveMinBorrowSharePriceError: typeof NegativeInputError;
|
|
692
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
693
|
-
export type NonPositiveMinBorrowSharePriceError = NegativeInputError;
|
|
694
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
695
|
-
export declare const NegativeSupplyAmountError: typeof NegativeInputError;
|
|
696
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
697
|
-
export type NegativeSupplyAmountError = NegativeInputError;
|
|
698
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
699
|
-
export declare const NegativeSupplyMaxSharePriceError: typeof NegativeInputError;
|
|
700
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
701
|
-
export type NegativeSupplyMaxSharePriceError = NegativeInputError;
|
|
702
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
703
|
-
export declare const NegativeWithdrawMinSharePriceError: typeof NegativeInputError;
|
|
704
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
705
|
-
export type NegativeWithdrawMinSharePriceError = NegativeInputError;
|
|
706
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
707
|
-
export declare const NegativeMinSharePriceError: typeof NegativeInputError;
|
|
708
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
709
|
-
export type NegativeMinSharePriceError = NegativeInputError;
|
|
710
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
711
|
-
export declare const NegativeBorrowSharesError: typeof NegativeInputError;
|
|
712
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
713
|
-
export type NegativeBorrowSharesError = NegativeInputError;
|
|
714
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
715
|
-
export declare const NegativeMaxRepaySharePriceError: typeof NegativeInputError;
|
|
716
|
-
/** @deprecated Use {@link NegativeInputError}. */
|
|
717
|
-
export type NegativeMaxRepaySharePriceError = NegativeInputError;
|
|
718
|
-
/**
|
|
719
|
-
* Typed errors thrown while encoding supported Bundler3 actions.
|
|
720
|
-
*
|
|
721
|
-
* @remarks
|
|
722
|
-
* Import these classes through `@morpho-org/morpho-sdk` when handling
|
|
723
|
-
* failures from `BundlerAction`.
|
|
724
|
-
*/
|
|
725
|
-
export declare namespace BundlerErrors {
|
|
726
|
-
/**
|
|
727
|
-
* Thrown when an action that requires an offchain signature is encoded before
|
|
728
|
-
* the signature has been attached.
|
|
729
|
-
*
|
|
730
|
-
* @example
|
|
731
|
-
* ```ts
|
|
732
|
-
* import { BundlerErrors } from "@morpho-org/morpho-sdk";
|
|
733
|
-
*
|
|
734
|
-
* if (error instanceof BundlerErrors.MissingSignature) {
|
|
735
|
-
* // Attach the missing permit or Permit2 signature, then encode again.
|
|
736
|
-
* }
|
|
737
|
-
* ```
|
|
738
|
-
*/
|
|
739
|
-
class MissingSignature extends Error {
|
|
740
|
-
constructor();
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* Thrown when an action is unsupported on the requested chain.
|
|
744
|
-
*
|
|
745
|
-
* @example
|
|
746
|
-
* ```ts
|
|
747
|
-
* import { BundlerErrors } from "@morpho-org/morpho-sdk";
|
|
748
|
-
*
|
|
749
|
-
* if (error instanceof BundlerErrors.UnexpectedAction) {
|
|
750
|
-
* // Remove or replace the action for the selected chain.
|
|
751
|
-
* }
|
|
752
|
-
* ```
|
|
753
|
-
*/
|
|
754
|
-
class UnexpectedAction extends Error {
|
|
755
|
-
/**
|
|
756
|
-
* @param type - Unsupported Bundler3 action discriminator or name.
|
|
757
|
-
* @param chainId - Chain where the action was requested.
|
|
758
|
-
*/
|
|
759
|
-
constructor(type: string, chainId: number);
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* Thrown when a Morpho authorization signature names a forbidden `authorized` account
|
|
763
|
-
* (for example Bundler3 itself), which would grant operator rights to an unintended address.
|
|
764
|
-
*
|
|
765
|
-
* @example
|
|
766
|
-
* ```ts
|
|
767
|
-
* import { BundlerErrors } from "@morpho-org/morpho-sdk";
|
|
768
|
-
*
|
|
769
|
-
* if (error instanceof BundlerErrors.UnexpectedSignature) {
|
|
770
|
-
* // Re-sign the authorization targeting GeneralAdapter1.
|
|
771
|
-
* }
|
|
772
|
-
* ```
|
|
773
|
-
*/
|
|
774
|
-
class UnexpectedSignature extends Error {
|
|
775
|
-
/**
|
|
776
|
-
* @param authorized - The forbidden `authorized` address carried by the signature.
|
|
777
|
-
*/
|
|
778
|
-
constructor(authorized: Address);
|
|
779
|
-
}
|
|
780
|
-
/**
|
|
781
|
-
* Thrown when a skippable Blue Public Allocator call would leave a usable
|
|
782
|
-
* token allowance behind after the allocator call reverts.
|
|
783
|
-
*
|
|
784
|
-
* @example
|
|
785
|
-
* ```ts
|
|
786
|
-
* import { BundlerErrors } from "@morpho-org/morpho-sdk";
|
|
787
|
-
*
|
|
788
|
-
* if (error instanceof BundlerErrors.SkippableAllocatorPenalty) {
|
|
789
|
-
* // Rebuild the allocator call with skipRevert set to false.
|
|
790
|
-
* }
|
|
791
|
-
* ```
|
|
792
|
-
*/
|
|
793
|
-
class SkippableAllocatorPenalty extends Error {
|
|
794
|
-
readonly penaltyAssets: bigint;
|
|
795
|
-
/**
|
|
796
|
-
* @param penaltyAssets - Exact token amount approved to the allocator.
|
|
797
|
-
*/
|
|
798
|
-
constructor(penaltyAssets: bigint);
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
634
|
/** Requirement signature kind accepted by action-output transaction builders. */
|
|
802
635
|
export type RequirementSignatureKind = "permit" | "permit2SignatureTransfer" | "authorization" | "midnightOfferRootSignature";
|
|
803
636
|
/**
|
|
@@ -841,6 +674,14 @@ export declare class UnexpectedRequirementSignatureError extends Error {
|
|
|
841
674
|
*/
|
|
842
675
|
constructor(kind: RequirementSignatureKind);
|
|
843
676
|
}
|
|
677
|
+
/** Thrown when `buildTx` receives a requirement signature whose action type is not supported. */
|
|
678
|
+
export declare class UnsupportedRequirementSignatureError extends Error {
|
|
679
|
+
readonly type: string;
|
|
680
|
+
/**
|
|
681
|
+
* @param type - The unsupported signature action type.
|
|
682
|
+
*/
|
|
683
|
+
constructor(type: string);
|
|
684
|
+
}
|
|
844
685
|
/** Thrown when a viem client's account address does not match the address required by the call. */
|
|
845
686
|
export declare class AddressMismatchError extends Error {
|
|
846
687
|
constructor(clientAddress: Address, argsAddress: Address);
|
|
@@ -866,7 +707,6 @@ export declare class UnsupportedErc20ApprovalSpenderError extends Error {
|
|
|
866
707
|
constructor(params: {
|
|
867
708
|
readonly spender: Address;
|
|
868
709
|
readonly chainId: number;
|
|
869
|
-
readonly generalAdapter1: Address;
|
|
870
710
|
readonly permit2?: Address;
|
|
871
711
|
readonly midnight?: Address;
|
|
872
712
|
readonly midnightBundles?: Address;
|
|
@@ -909,10 +749,6 @@ export declare class DepositOwnerMismatchError extends Error {
|
|
|
909
749
|
export declare class DepositSpenderMismatchError extends Error {
|
|
910
750
|
constructor(depositSpender: Address, signatureSpender: Address);
|
|
911
751
|
}
|
|
912
|
-
/** Thrown when a `permit2` requirement signature is missing the `expiration` field. */
|
|
913
|
-
export declare class Permit2ExpirationMissingError extends Error {
|
|
914
|
-
constructor();
|
|
915
|
-
}
|
|
916
752
|
/** Thrown when a vault deposit uses `nativeAmount` but the vault asset is not the chain's wNative. */
|
|
917
753
|
export declare class NativeAmountOnNonWNativeVaultError extends Error {
|
|
918
754
|
constructor(vaultAsset: Address, wNative: Address);
|
|
@@ -929,9 +765,6 @@ export declare class VaultAddressMismatchError extends Error {
|
|
|
929
765
|
export declare class NativeAmountOnNonWNativeAssetError extends Error {
|
|
930
766
|
constructor(asset: Address, wNative: Address);
|
|
931
767
|
}
|
|
932
|
-
/** @deprecated Use {@link NativeAmountOnNonWNativeAssetError}. */
|
|
933
|
-
export declare const NativeAmountOnNonWNativeCollateralError: typeof NativeAmountOnNonWNativeAssetError;
|
|
934
|
-
export type NativeAmountOnNonWNativeCollateralError = NativeAmountOnNonWNativeAssetError;
|
|
935
768
|
/** Thrown when a borrow exceeds the LLTV-buffered safe maximum for the position. */
|
|
936
769
|
export declare class BorrowExceedsSafeLtvError extends Error {
|
|
937
770
|
constructor(borrowAmount: bigint, maxSafeBorrow: bigint);
|
|
@@ -948,14 +781,6 @@ export declare class MarketIdMismatchError extends Error {
|
|
|
948
781
|
export declare class AccrualPositionUserMismatchError extends Error {
|
|
949
782
|
constructor(positionUser: string, expectedUser: string);
|
|
950
783
|
}
|
|
951
|
-
/**
|
|
952
|
-
* Thrown when a reallocation has no withdrawals.
|
|
953
|
-
*
|
|
954
|
-
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
955
|
-
*/
|
|
956
|
-
export declare class EmptyReallocationWithdrawalsError extends Error {
|
|
957
|
-
constructor(vault: string);
|
|
958
|
-
}
|
|
959
784
|
/** Thrown when a Public Allocator source references the target Blue market. */
|
|
960
785
|
export declare class ReallocationWithdrawalOnTargetMarketError extends Error {
|
|
961
786
|
constructor(vault: string, marketId: string);
|
|
@@ -967,27 +792,12 @@ export declare class ReallocationWithdrawalOnTargetMarketError extends Error {
|
|
|
967
792
|
*
|
|
968
793
|
* @example
|
|
969
794
|
* ```ts
|
|
970
|
-
* import {
|
|
795
|
+
* import { InvalidVaultV2BlueReallocationShapeError } from "@morpho-org/morpho-sdk";
|
|
971
796
|
*
|
|
972
|
-
* const error = new
|
|
797
|
+
* const error = new InvalidVaultV2BlueReallocationShapeError();
|
|
973
798
|
* ```
|
|
974
799
|
*/
|
|
975
|
-
export declare class
|
|
976
|
-
constructor();
|
|
977
|
-
}
|
|
978
|
-
/**
|
|
979
|
-
* Thrown when one reallocation plan contains both Vault V1 and Vault V2 entries.
|
|
980
|
-
*
|
|
981
|
-
* @deprecated Vault V1/V2 mixed-plan support will be removed in the next major. Use Vault V2
|
|
982
|
-
* reallocations.
|
|
983
|
-
* @example
|
|
984
|
-
* ```ts
|
|
985
|
-
* import { MixedReallocationVersionsError } from "@morpho-org/morpho-sdk";
|
|
986
|
-
*
|
|
987
|
-
* const error = new MixedReallocationVersionsError();
|
|
988
|
-
* ```
|
|
989
|
-
*/
|
|
990
|
-
export declare class MixedReallocationVersionsError extends Error {
|
|
800
|
+
export declare class InvalidVaultV2BlueReallocationShapeError extends Error {
|
|
991
801
|
constructor();
|
|
992
802
|
}
|
|
993
803
|
/**
|
|
@@ -1068,26 +878,6 @@ export declare class InconsistentReallocationPenaltyError extends Error {
|
|
|
1068
878
|
readonly actual: bigint;
|
|
1069
879
|
});
|
|
1070
880
|
}
|
|
1071
|
-
/**
|
|
1072
|
-
* Thrown when reallocation withdrawals within a vault are not strictly sorted by market id.
|
|
1073
|
-
*
|
|
1074
|
-
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
1075
|
-
*/
|
|
1076
|
-
export declare class UnsortedReallocationWithdrawalsError extends Error {
|
|
1077
|
-
constructor(vault: string, marketId: string);
|
|
1078
|
-
}
|
|
1079
|
-
/**
|
|
1080
|
-
* Thrown when a market repay in assets mode has `transferAmount !== amount + nativeAmount` — the
|
|
1081
|
-
* pre-resolved ERC-20 pull plus the wrapped native must equal the assets repaid, so the bundle
|
|
1082
|
-
* neither strands over-pulled loan tokens on `GeneralAdapter1` nor under-funds the repay.
|
|
1083
|
-
*/
|
|
1084
|
-
export declare class TransferAmountNotEqualToAssetsError extends Error {
|
|
1085
|
-
constructor(params: {
|
|
1086
|
-
transferAmount: bigint;
|
|
1087
|
-
assets: bigint;
|
|
1088
|
-
market: string;
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
881
|
/** Thrown when a market repay specifies both `assets` and `shares` as non-zero (modes are mutually exclusive). */
|
|
1092
882
|
export declare class MutuallyExclusiveRepayAmountsError extends Error {
|
|
1093
883
|
constructor(market: string);
|
|
@@ -1108,10 +898,6 @@ export declare class WithdrawMakesPositionUnhealthyError extends Error {
|
|
|
1108
898
|
maxSafeBorrow: bigint;
|
|
1109
899
|
});
|
|
1110
900
|
}
|
|
1111
|
-
/** Thrown when a share-amount conversion would divide by zero (the market has no shares of the relevant kind). */
|
|
1112
|
-
export declare class ShareDivideByZeroError extends Error {
|
|
1113
|
-
constructor(market: string);
|
|
1114
|
-
}
|
|
1115
901
|
/** Thrown when a repay amount in assets exceeds the borrower's outstanding debt. */
|
|
1116
902
|
export declare class RepayExceedsDebtError extends Error {
|
|
1117
903
|
constructor(params: {
|
|
@@ -1133,25 +919,7 @@ export declare class RepaySharesExceedDebtError extends Error {
|
|
|
1133
919
|
});
|
|
1134
920
|
}
|
|
1135
921
|
/**
|
|
1136
|
-
* Thrown when
|
|
1137
|
-
*
|
|
1138
|
-
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
1139
|
-
*/
|
|
1140
|
-
export declare class MissingPublicAllocatorConfigError extends Error {
|
|
1141
|
-
constructor(vault: string);
|
|
1142
|
-
}
|
|
1143
|
-
/**
|
|
1144
|
-
* Thrown when a reallocation attempts to use a disabled vault market.
|
|
1145
|
-
*
|
|
1146
|
-
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
1147
|
-
*/
|
|
1148
|
-
export declare class DisabledReallocationMarketError extends Error {
|
|
1149
|
-
readonly vault: Address;
|
|
1150
|
-
readonly marketId: MarketId;
|
|
1151
|
-
constructor(vault: Address, marketId: MarketId);
|
|
1152
|
-
}
|
|
1153
|
-
/**
|
|
1154
|
-
* Thrown when shared liquidity selected by a Vault V1 or Vault V2 reallocation planner cannot
|
|
922
|
+
* Thrown when shared liquidity selected by a Vault V2 reallocation planner cannot
|
|
1155
923
|
* cover the operation's absolute shortfall on the target market — the resulting
|
|
1156
924
|
* `morphoBorrow` or `morphoWithdraw` would still revert onchain.
|
|
1157
925
|
*
|
|
@@ -1185,34 +953,6 @@ export declare class UnknownReallocationVaultError extends UnknownDataError {
|
|
|
1185
953
|
*/
|
|
1186
954
|
constructor(vault: Address);
|
|
1187
955
|
}
|
|
1188
|
-
/**
|
|
1189
|
-
* Thrown when reallocation state does not contain a requested vault-market config.
|
|
1190
|
-
*
|
|
1191
|
-
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
1192
|
-
*/
|
|
1193
|
-
export declare class UnknownReallocationVaultMarketConfigError extends UnknownDataError {
|
|
1194
|
-
readonly vault: Address;
|
|
1195
|
-
readonly marketId: MarketId;
|
|
1196
|
-
/**
|
|
1197
|
-
* @param vault - Vault address for the missing config.
|
|
1198
|
-
* @param marketId - Market id for the missing config.
|
|
1199
|
-
*/
|
|
1200
|
-
constructor(vault: Address, marketId: MarketId);
|
|
1201
|
-
}
|
|
1202
|
-
/**
|
|
1203
|
-
* Thrown when reallocation state does not contain a requested market position.
|
|
1204
|
-
*
|
|
1205
|
-
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
1206
|
-
*/
|
|
1207
|
-
export declare class UnknownReallocationPositionError extends UnknownDataError {
|
|
1208
|
-
readonly user: Address;
|
|
1209
|
-
readonly marketId: MarketId;
|
|
1210
|
-
/**
|
|
1211
|
-
* @param user - Position owner address.
|
|
1212
|
-
* @param marketId - Market id for the missing position.
|
|
1213
|
-
*/
|
|
1214
|
-
constructor(user: Address, marketId: MarketId);
|
|
1215
|
-
}
|
|
1216
956
|
/** Thrown when Vault V2 reallocation state does not contain a requested allocation id. */
|
|
1217
957
|
export declare class UnknownReallocationAllocationError extends UnknownDataError {
|
|
1218
958
|
readonly vault: Address;
|
|
@@ -1439,11 +1179,11 @@ export declare class WithdrawSharesExceedSupplyError extends Error {
|
|
|
1439
1179
|
});
|
|
1440
1180
|
}
|
|
1441
1181
|
/**
|
|
1442
|
-
* Thrown when a Vault
|
|
1182
|
+
* Thrown when a Vault V2 reallocation planner receives a withdraw `amount` greater
|
|
1443
1183
|
* than the target market's current `totalSupplyAssets` — the post-withdraw
|
|
1444
1184
|
* supply would be negative, making the on-chain `morphoWithdraw` revert
|
|
1445
1185
|
* regardless of any reallocation. Caught here so callers do not pay
|
|
1446
|
-
*
|
|
1186
|
+
* allocator penalties on an unreachable operation.
|
|
1447
1187
|
*/
|
|
1448
1188
|
export declare class ReallocationWithdrawExceedsMarketSupplyError extends Error {
|
|
1449
1189
|
readonly params: {
|
|
@@ -1469,74 +1209,3 @@ export declare class RefinanceSameMarketError extends Error {
|
|
|
1469
1209
|
export declare class RefinanceTokenMismatchError extends Error {
|
|
1470
1210
|
constructor(sourceMarket: string, targetMarket: string);
|
|
1471
1211
|
}
|
|
1472
|
-
/**
|
|
1473
|
-
* Thrown when a refinance specifies both `borrowAssets` and `borrowShares` as non-zero (modes are mutually exclusive).
|
|
1474
|
-
*
|
|
1475
|
-
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1476
|
-
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1477
|
-
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1478
|
-
*/
|
|
1479
|
-
export declare class BorrowAmountAndSharesExclusiveError extends Error {
|
|
1480
|
-
constructor(market: string);
|
|
1481
|
-
}
|
|
1482
|
-
/**
|
|
1483
|
-
* Thrown when a refinance's `collateralAmount` exceeds the source position's available collateral.
|
|
1484
|
-
*
|
|
1485
|
-
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1486
|
-
* partial collateral inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1487
|
-
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1488
|
-
*/
|
|
1489
|
-
export declare class RefinanceExceedsCollateralError extends Error {
|
|
1490
|
-
readonly market: string;
|
|
1491
|
-
readonly requested: bigint;
|
|
1492
|
-
readonly available: bigint;
|
|
1493
|
-
constructor(params: {
|
|
1494
|
-
market: string;
|
|
1495
|
-
requested: bigint;
|
|
1496
|
-
available: bigint;
|
|
1497
|
-
});
|
|
1498
|
-
}
|
|
1499
|
-
/**
|
|
1500
|
-
* Thrown when a refinance's `borrowShares` exceeds the source position's outstanding borrow shares.
|
|
1501
|
-
*
|
|
1502
|
-
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1503
|
-
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1504
|
-
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1505
|
-
*/
|
|
1506
|
-
export declare class RefinanceExceedsBorrowSharesError extends Error {
|
|
1507
|
-
readonly market: string;
|
|
1508
|
-
readonly requested: bigint;
|
|
1509
|
-
readonly available: bigint;
|
|
1510
|
-
constructor(params: {
|
|
1511
|
-
market: string;
|
|
1512
|
-
requested: bigint;
|
|
1513
|
-
available: bigint;
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
/**
|
|
1517
|
-
* Thrown when a refinance's `borrowAssets` exceeds the source position's outstanding debt assets.
|
|
1518
|
-
*
|
|
1519
|
-
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1520
|
-
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1521
|
-
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1522
|
-
*/
|
|
1523
|
-
export declare class RefinanceExceedsBorrowAssetsError extends Error {
|
|
1524
|
-
readonly market: string;
|
|
1525
|
-
readonly requested: bigint;
|
|
1526
|
-
readonly available: bigint;
|
|
1527
|
-
constructor(params: {
|
|
1528
|
-
market: string;
|
|
1529
|
-
requested: bigint;
|
|
1530
|
-
available: bigint;
|
|
1531
|
-
});
|
|
1532
|
-
}
|
|
1533
|
-
/**
|
|
1534
|
-
* Thrown when a refinance in shares mode (`borrowShares > 0n`) omits the `borrowAssets` overshoot for the target borrow leg.
|
|
1535
|
-
*
|
|
1536
|
-
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1537
|
-
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1538
|
-
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1539
|
-
*/
|
|
1540
|
-
export declare class RefinanceSharesMissingBorrowAssetsError extends Error {
|
|
1541
|
-
constructor(market: string);
|
|
1542
|
-
}
|