@morpho-org/morpho-sdk 6.0.0-next.1 → 6.0.0-next.3
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 +199 -34
- package/README.md +23 -15
- package/lib/cjs/abis.d.ts +3 -2829
- package/lib/cjs/abis.js +1 -1938
- 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 +6 -35
- 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 +4 -9
- 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 +38 -4
- package/lib/cjs/actions/bundles/common.js +91 -35
- 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 +9 -8
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +17 -26
- package/lib/cjs/actions/requirements/blue/index.d.ts +0 -1
- package/lib/cjs/actions/requirements/blue/index.js +0 -1
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +20 -14
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +24 -25
- 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 +21 -12
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +39 -38
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +4 -2
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +14 -9
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +9 -6
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +22 -17
- 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 +6 -4
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +12 -8
- 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 +58 -39
- package/lib/cjs/actions/vaultV2/forceWithdraw.js +87 -60
- package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +6 -4
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +12 -8
- package/lib/cjs/augment.d.ts +0 -1
- package/lib/cjs/augment.js +0 -1
- package/lib/cjs/blue/abis.d.ts +1 -1
- package/lib/cjs/blue/abis.js +1 -5
- package/lib/cjs/blue/entities.d.ts +2 -2
- package/lib/cjs/blue/entities.js +1 -2
- package/lib/cjs/blue/errors.d.ts +1 -1
- package/lib/cjs/blue/errors.js +2 -1
- package/lib/cjs/blue/fetch.d.ts +1 -1
- package/lib/cjs/blue/fetch.js +1 -2
- package/lib/cjs/blue/types.d.ts +2 -4
- package/lib/cjs/blue/utils.d.ts +1 -3
- package/lib/cjs/blue/utils.js +1 -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 +38 -264
- package/lib/cjs/entities/blue/blue.js +2 -203
- package/lib/cjs/entities/index.d.ts +3 -60
- package/lib/cjs/entities/index.js +1 -20
- package/lib/cjs/entities/midnight/midnight.js +20 -24
- package/lib/cjs/entities/requirements/getBundlesTokenRequirements.d.ts +7 -6
- package/lib/cjs/entities/requirements/getBundlesTokenRequirements.js +19 -14
- package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +3 -3
- package/lib/cjs/entities/requirements/index.d.ts +1 -0
- package/lib/cjs/entities/requirements/index.js +1 -0
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +18 -6
- package/lib/cjs/entities/vaultV1/vaultV1.js +25 -8
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +154 -35
- package/lib/cjs/entities/vaultV2/vaultV2.js +249 -23
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +8 -1
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +50 -34
- package/lib/cjs/errors.d.ts +2 -46
- package/lib/cjs/errors.js +2 -46
- package/lib/cjs/fetch.d.ts +1 -15
- package/lib/cjs/fetch.js +1 -16
- package/lib/cjs/helpers/constant.d.ts +0 -2
- package/lib/cjs/helpers/constant.js +0 -2
- package/lib/cjs/helpers/index.d.ts +4 -3
- package/lib/cjs/helpers/index.js +10 -9
- package/lib/cjs/helpers/metadata.d.ts +3 -5
- package/lib/cjs/helpers/metadata.js +4 -6
- package/lib/cjs/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
- package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +164 -0
- package/lib/cjs/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
- package/lib/cjs/helpers/previewVaultV2InKindRedeem.js +2 -0
- package/lib/cjs/helpers/slippage.d.ts +34 -90
- package/lib/cjs/helpers/slippage.js +52 -137
- package/lib/cjs/helpers/utilization.d.ts +12 -10
- package/lib/cjs/helpers/utilization.js +27 -12
- package/lib/cjs/helpers/validate.d.ts +66 -32
- package/lib/cjs/helpers/validate.js +84 -57
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +369 -0
- package/lib/cjs/types/action.d.ts +102 -68
- package/lib/cjs/types/action.js +11 -4
- package/lib/cjs/types/error.d.ts +332 -385
- package/lib/cjs/types/error.js +369 -412
- package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
- package/lib/cjs/types.d.ts +2 -18
- package/lib/cjs/utils.d.ts +8 -35
- package/lib/cjs/utils.js +11 -36
- package/lib/esm/abis.d.ts +3 -2829
- package/lib/esm/abis.js +3 -1935
- 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 +8 -37
- 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 +6 -11
- 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 +38 -4
- package/lib/esm/actions/bundles/common.js +91 -36
- 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 +9 -8
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +20 -29
- package/lib/esm/actions/requirements/blue/index.d.ts +0 -1
- package/lib/esm/actions/requirements/blue/index.js +0 -1
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +20 -14
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +25 -26
- 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 +21 -12
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +40 -39
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +4 -2
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +14 -9
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +9 -6
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +22 -17
- 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 +6 -4
- package/lib/esm/actions/vaultV1/inKindRedeem.js +12 -8
- 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 +58 -39
- package/lib/esm/actions/vaultV2/forceWithdraw.js +89 -62
- package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +6 -4
- package/lib/esm/actions/vaultV2/inKindRedeem.js +12 -8
- package/lib/esm/augment.d.ts +0 -1
- package/lib/esm/augment.js +0 -1
- package/lib/esm/blue/abis.d.ts +1 -1
- package/lib/esm/blue/abis.js +1 -1
- package/lib/esm/blue/entities.d.ts +2 -2
- package/lib/esm/blue/entities.js +1 -1
- package/lib/esm/blue/errors.d.ts +1 -1
- package/lib/esm/blue/errors.js +1 -1
- package/lib/esm/blue/fetch.d.ts +1 -1
- package/lib/esm/blue/fetch.js +1 -1
- package/lib/esm/blue/types.d.ts +2 -4
- package/lib/esm/blue/utils.d.ts +1 -3
- package/lib/esm/blue/utils.js +1 -3
- 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 +38 -264
- package/lib/esm/entities/blue/blue.js +5 -206
- package/lib/esm/entities/index.d.ts +3 -60
- package/lib/esm/entities/index.js +1 -16
- package/lib/esm/entities/midnight/midnight.js +20 -24
- package/lib/esm/entities/requirements/getBundlesTokenRequirements.d.ts +7 -6
- package/lib/esm/entities/requirements/getBundlesTokenRequirements.js +20 -15
- package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +3 -3
- package/lib/esm/entities/requirements/index.d.ts +1 -0
- package/lib/esm/entities/requirements/index.js +1 -0
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +18 -6
- package/lib/esm/entities/vaultV1/vaultV1.js +29 -12
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +154 -35
- package/lib/esm/entities/vaultV2/vaultV2.js +256 -30
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +8 -1
- package/lib/esm/entities/vaultV2BlueReallocationData.js +48 -32
- package/lib/esm/errors.d.ts +2 -46
- package/lib/esm/errors.js +2 -46
- package/lib/esm/fetch.d.ts +1 -15
- package/lib/esm/fetch.js +1 -15
- package/lib/esm/helpers/constant.d.ts +0 -2
- package/lib/esm/helpers/constant.js +0 -2
- package/lib/esm/helpers/index.d.ts +4 -3
- package/lib/esm/helpers/index.js +4 -3
- package/lib/esm/helpers/metadata.d.ts +3 -5
- package/lib/esm/helpers/metadata.js +4 -6
- package/lib/esm/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
- package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +161 -0
- package/lib/esm/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
- package/lib/esm/helpers/previewVaultV2InKindRedeem.js +2 -0
- package/lib/esm/helpers/slippage.d.ts +34 -90
- package/lib/esm/helpers/slippage.js +52 -134
- package/lib/esm/helpers/utilization.d.ts +12 -10
- package/lib/esm/helpers/utilization.js +26 -11
- package/lib/esm/helpers/validate.d.ts +66 -32
- package/lib/esm/helpers/validate.js +83 -57
- package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/esm/helpers/validateRequirementSpender.js +1 -3
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +362 -0
- package/lib/esm/types/action.d.ts +102 -68
- package/lib/esm/types/action.js +12 -5
- package/lib/esm/types/error.d.ts +332 -385
- package/lib/esm/types/error.js +355 -392
- package/lib/esm/types/sharedLiquidity.d.ts +1 -117
- package/lib/esm/types.d.ts +2 -18
- package/lib/esm/utils.d.ts +8 -35
- package/lib/esm/utils.js +7 -34
- package/package.json +7 -15
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -42
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -83
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -151
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -37
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -50
- 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 -44
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -43
- 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 -8
- 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 -326
- package/lib/cjs/entities/vaultV1ReallocationData.js +0 -542
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -78
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -243
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -42
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -79
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -147
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -37
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -46
- 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 -44
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -39
- 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 -8
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -5
- 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 -326
- package/lib/esm/entities/vaultV1ReallocationData.js +0 -544
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -78
- package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -239
- /package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.d.ts +0 -0
- /package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.d.ts +0 -0
|
@@ -38,8 +38,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
38
38
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
|
|
39
39
|
* {@link InputExceedsMaxError}, so either class catches it.
|
|
40
40
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
41
|
-
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit
|
|
42
|
-
* Permit2 AllowanceTransfer signature is supplied.
|
|
41
|
+
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
|
|
43
42
|
* @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
|
|
44
43
|
* @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
|
|
45
44
|
* @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
|
|
@@ -1,58 +1,77 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type
|
|
2
|
+
import { type Metadata, type PermitRequirementSignature, type Transaction, type VaultV2ForceWithdrawAction } from "../../types/index.js";
|
|
3
3
|
/** Parameters for {@link vaultV2ForceWithdraw}. */
|
|
4
4
|
export interface VaultV2ForceWithdrawParams {
|
|
5
|
-
vault: {
|
|
6
|
-
|
|
5
|
+
readonly vault: {
|
|
6
|
+
readonly chainId: number;
|
|
7
|
+
readonly address: Address;
|
|
7
8
|
};
|
|
8
|
-
args: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
readonly args: {
|
|
10
|
+
readonly adapter: Address;
|
|
11
|
+
readonly exitAssets: bigint;
|
|
12
|
+
readonly minSharePriceE27: bigint;
|
|
13
|
+
readonly userAddress: Address;
|
|
14
|
+
readonly deadline: bigint;
|
|
15
|
+
readonly referralFeePct?: bigint;
|
|
16
|
+
readonly referralFeeRecipient?: Address;
|
|
17
|
+
readonly requirementSignature?: PermitRequirementSignature;
|
|
15
18
|
};
|
|
16
|
-
metadata?: Metadata;
|
|
19
|
+
readonly metadata?: Metadata;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
|
-
* Prepares a
|
|
22
|
+
* Prepares a Vault V2 force withdrawal through VaultExitBundlesV1.
|
|
20
23
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
+
* The contract first withdraws everything the vault can pay without a penalty — its idle assets
|
|
25
|
+
* plus the liquidity available through its liquidity adapter — then force-deallocates the remainder
|
|
26
|
+
* by looping over the adapter's markets.
|
|
24
27
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
+
* `exitAssets` is **penalty-inclusive**: it is what the contract debits from the user's position,
|
|
29
|
+
* while the assets actually delivered are
|
|
30
|
+
* `assetsToWithdraw + floor((exitAssets - assetsToWithdraw) * WAD / (WAD + penalty))` minus the
|
|
31
|
+
* referral fee. Use `previewVaultV2ForceWithdraw` to quote the split.
|
|
28
32
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @param params
|
|
33
|
-
*
|
|
34
|
-
* @param params.
|
|
35
|
-
* @param params.args.
|
|
36
|
-
*
|
|
37
|
-
* @param params.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @
|
|
41
|
-
*
|
|
42
|
-
*
|
|
33
|
+
* Without a signature this embeds the empty-permit sentinel and requires a sufficient vault-share
|
|
34
|
+
* approval to VaultExitBundlesV1.
|
|
35
|
+
*
|
|
36
|
+
* @param params - Force withdrawal parameters.
|
|
37
|
+
* @param params.vault.chainId - Chain containing the target Vault V2 and VaultExitBundlesV1.
|
|
38
|
+
* @param params.vault.address - Target Vault V2 address.
|
|
39
|
+
* @param params.args.adapter - Vault's sole MorphoMarketV1AdapterV2.
|
|
40
|
+
* @param params.args.exitAssets - Penalty-inclusive, asset-denominated amount to exit.
|
|
41
|
+
* @param params.args.minSharePriceE27 - RAY-scaled lower bound on the realized exit share price
|
|
42
|
+
* (withdrawn assets per share burned). `0n` disables the on-chain bound; prefer the value the
|
|
43
|
+
* entity computes.
|
|
44
|
+
* @param params.args.userAddress - Expected transaction sender, recorded in action metadata only.
|
|
45
|
+
* VaultExitBundlesV1 burns `msg.sender`'s vault shares and pays out to `msg.sender`, so the
|
|
46
|
+
* submitting account must equal this address.
|
|
47
|
+
* @param params.args.deadline - Permit and bundle deadline.
|
|
48
|
+
* @param params.args.referralFeePct - Optional WAD-scaled share of the withdrawn assets routed to
|
|
49
|
+
* `referralFeeRecipient`. Defaults to `0n`. Deducted *after* the `minSharePriceE27` check, so it
|
|
50
|
+
* is outside that bound's protection.
|
|
51
|
+
* @param params.args.referralFeeRecipient - Optional referral fee recipient. Defaults to the zero
|
|
52
|
+
* address, which is only valid alongside a zero `referralFeePct`.
|
|
53
|
+
* @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
|
|
54
|
+
* @param params.metadata - Optional analytics metadata.
|
|
55
|
+
* @returns A deep-frozen `Readonly<Transaction<VaultV2ForceWithdrawAction>>` with `to`, `value`,
|
|
56
|
+
* `data`, and the typed action discriminator.
|
|
57
|
+
* @throws {NonPositiveInputError} when `exitAssets` or `deadline` is not positive.
|
|
58
|
+
* @throws {NegativeInputError} when `referralFeePct` or `minSharePriceE27` is negative.
|
|
59
|
+
* @throws {InputExceedsMaxError} when `referralFeePct` is not below WAD (the contract rejects it
|
|
60
|
+
* with `PctExceeded`), or when `exitAssets`, `deadline`, or `minSharePriceE27` exceeds `uint256`.
|
|
61
|
+
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
62
|
+
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
63
|
+
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
64
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind,
|
|
65
|
+
* asset, owner, spender, or signature encoding.
|
|
43
66
|
* @example
|
|
44
67
|
* ```ts
|
|
45
68
|
* import { vaultV2ForceWithdraw } from "@morpho-org/morpho-sdk";
|
|
46
69
|
*
|
|
47
70
|
* const tx = vaultV2ForceWithdraw({
|
|
48
|
-
* vault: { address:
|
|
49
|
-
* args: {
|
|
50
|
-
* deallocations: [{ adapter, marketParams, amount: 500_000n }],
|
|
51
|
-
* withdraw: { amount: 500_000n, recipient },
|
|
52
|
-
* onBehalf,
|
|
53
|
-
* },
|
|
71
|
+
* vault: { chainId: 1, address: vault },
|
|
72
|
+
* args: { adapter, exitAssets: 1_000_000n, minSharePriceE27, userAddress, deadline },
|
|
54
73
|
* });
|
|
55
74
|
* // tx satisfies Readonly<Transaction<VaultV2ForceWithdrawAction>>
|
|
56
75
|
* ```
|
|
57
76
|
*/
|
|
58
|
-
export declare const vaultV2ForceWithdraw: ({ vault
|
|
77
|
+
export declare const vaultV2ForceWithdraw: ({ vault, args, metadata, }: VaultV2ForceWithdrawParams) => Readonly<Transaction<VaultV2ForceWithdrawAction>>;
|
|
@@ -1,90 +1,117 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { deepFreeze } from "@morpho-org/morpho-ts";
|
|
1
|
+
import { deepFreeze, getChainAddress } from "@morpho-org/morpho-ts";
|
|
3
2
|
import { encodeFunctionData } from "viem";
|
|
4
|
-
import {
|
|
3
|
+
import { vaultExitBundlesV1Abi } from "../../abis.js";
|
|
5
4
|
import { addTransactionMetadata } from "../../helpers/index.js";
|
|
6
|
-
import {
|
|
5
|
+
import { validateDeadline, validateReferralFee, validateUint256Field, } from "../../helpers/validate.js";
|
|
6
|
+
import { NonPositiveInputError, } from "../../types/index.js";
|
|
7
|
+
import { getBundlesSharesPermit } from "../bundles/common.js";
|
|
7
8
|
/**
|
|
8
|
-
* Prepares a
|
|
9
|
+
* Prepares a Vault V2 force withdrawal through VaultExitBundlesV1.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* The contract first withdraws everything the vault can pay without a penalty — its idle assets
|
|
12
|
+
* plus the liquidity available through its liquidity adapter — then force-deallocates the remainder
|
|
13
|
+
* by looping over the adapter's markets.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* `exitAssets` is **penalty-inclusive**: it is what the contract debits from the user's position,
|
|
16
|
+
* while the assets actually delivered are
|
|
17
|
+
* `assetsToWithdraw + floor((exitAssets - assetsToWithdraw) * WAD / (WAD + penalty))` minus the
|
|
18
|
+
* referral fee. Use `previewVaultV2ForceWithdraw` to quote the split.
|
|
17
19
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @param params
|
|
22
|
-
*
|
|
23
|
-
* @param params.
|
|
24
|
-
* @param params.args.
|
|
25
|
-
*
|
|
26
|
-
* @param params.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @
|
|
30
|
-
*
|
|
31
|
-
*
|
|
20
|
+
* Without a signature this embeds the empty-permit sentinel and requires a sufficient vault-share
|
|
21
|
+
* approval to VaultExitBundlesV1.
|
|
22
|
+
*
|
|
23
|
+
* @param params - Force withdrawal parameters.
|
|
24
|
+
* @param params.vault.chainId - Chain containing the target Vault V2 and VaultExitBundlesV1.
|
|
25
|
+
* @param params.vault.address - Target Vault V2 address.
|
|
26
|
+
* @param params.args.adapter - Vault's sole MorphoMarketV1AdapterV2.
|
|
27
|
+
* @param params.args.exitAssets - Penalty-inclusive, asset-denominated amount to exit.
|
|
28
|
+
* @param params.args.minSharePriceE27 - RAY-scaled lower bound on the realized exit share price
|
|
29
|
+
* (withdrawn assets per share burned). `0n` disables the on-chain bound; prefer the value the
|
|
30
|
+
* entity computes.
|
|
31
|
+
* @param params.args.userAddress - Expected transaction sender, recorded in action metadata only.
|
|
32
|
+
* VaultExitBundlesV1 burns `msg.sender`'s vault shares and pays out to `msg.sender`, so the
|
|
33
|
+
* submitting account must equal this address.
|
|
34
|
+
* @param params.args.deadline - Permit and bundle deadline.
|
|
35
|
+
* @param params.args.referralFeePct - Optional WAD-scaled share of the withdrawn assets routed to
|
|
36
|
+
* `referralFeeRecipient`. Defaults to `0n`. Deducted *after* the `minSharePriceE27` check, so it
|
|
37
|
+
* is outside that bound's protection.
|
|
38
|
+
* @param params.args.referralFeeRecipient - Optional referral fee recipient. Defaults to the zero
|
|
39
|
+
* address, which is only valid alongside a zero `referralFeePct`.
|
|
40
|
+
* @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
|
|
41
|
+
* @param params.metadata - Optional analytics metadata.
|
|
42
|
+
* @returns A deep-frozen `Readonly<Transaction<VaultV2ForceWithdrawAction>>` with `to`, `value`,
|
|
43
|
+
* `data`, and the typed action discriminator.
|
|
44
|
+
* @throws {NonPositiveInputError} when `exitAssets` or `deadline` is not positive.
|
|
45
|
+
* @throws {NegativeInputError} when `referralFeePct` or `minSharePriceE27` is negative.
|
|
46
|
+
* @throws {InputExceedsMaxError} when `referralFeePct` is not below WAD (the contract rejects it
|
|
47
|
+
* with `PctExceeded`), or when `exitAssets`, `deadline`, or `minSharePriceE27` exceeds `uint256`.
|
|
48
|
+
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
49
|
+
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
50
|
+
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
51
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind,
|
|
52
|
+
* asset, owner, spender, or signature encoding.
|
|
32
53
|
* @example
|
|
33
54
|
* ```ts
|
|
34
55
|
* import { vaultV2ForceWithdraw } from "@morpho-org/morpho-sdk";
|
|
35
56
|
*
|
|
36
57
|
* const tx = vaultV2ForceWithdraw({
|
|
37
|
-
* vault: { address:
|
|
38
|
-
* args: {
|
|
39
|
-
* deallocations: [{ adapter, marketParams, amount: 500_000n }],
|
|
40
|
-
* withdraw: { amount: 500_000n, recipient },
|
|
41
|
-
* onBehalf,
|
|
42
|
-
* },
|
|
58
|
+
* vault: { chainId: 1, address: vault },
|
|
59
|
+
* args: { adapter, exitAssets: 1_000_000n, minSharePriceE27, userAddress, deadline },
|
|
43
60
|
* });
|
|
44
61
|
* // tx satisfies Readonly<Transaction<VaultV2ForceWithdrawAction>>
|
|
45
62
|
* ```
|
|
46
63
|
*/
|
|
47
|
-
export const vaultV2ForceWithdraw = ({ vault
|
|
48
|
-
if (
|
|
49
|
-
throw new
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
export const vaultV2ForceWithdraw = ({ vault, args, metadata, }) => {
|
|
65
|
+
if (args.exitAssets <= 0n)
|
|
66
|
+
throw new NonPositiveInputError("exitAssets", args.exitAssets);
|
|
67
|
+
validateUint256Field("exitAssets", args.exitAssets);
|
|
68
|
+
validateDeadline(args.deadline);
|
|
69
|
+
// `0n` stays valid — it is the intentional "no on-chain bound" opt-out — but a value the uint256
|
|
70
|
+
// slot cannot hold must fail with a dedicated error instead of viem's `IntegerOutOfRangeError`.
|
|
71
|
+
// The entity never emits these (it forbids a non-positive override); this guards direct callers.
|
|
72
|
+
validateUint256Field("minSharePriceE27", args.minSharePriceE27);
|
|
73
|
+
const { referralFeePct, referralFeeRecipient } = validateReferralFee(args);
|
|
74
|
+
const to = getChainAddress(vault.chainId, "bundles.vaultExitBundlesV1");
|
|
75
|
+
const sharesPermit = getBundlesSharesPermit({
|
|
76
|
+
vault: vault.address,
|
|
77
|
+
deadline: args.deadline,
|
|
78
|
+
owner: args.userAddress,
|
|
79
|
+
spender: to,
|
|
80
|
+
requirementSignature: args.requirementSignature,
|
|
81
|
+
});
|
|
64
82
|
let tx = {
|
|
65
|
-
to
|
|
83
|
+
to,
|
|
84
|
+
value: 0n,
|
|
66
85
|
data: encodeFunctionData({
|
|
67
|
-
abi:
|
|
68
|
-
functionName: "
|
|
69
|
-
args: [
|
|
86
|
+
abi: vaultExitBundlesV1Abi,
|
|
87
|
+
functionName: "vaultExitBundlesV1ForceWithdrawVaultV2",
|
|
88
|
+
args: [
|
|
89
|
+
vault.address,
|
|
90
|
+
args.adapter,
|
|
91
|
+
args.exitAssets,
|
|
92
|
+
args.minSharePriceE27,
|
|
93
|
+
sharesPermit,
|
|
94
|
+
referralFeePct,
|
|
95
|
+
referralFeeRecipient,
|
|
96
|
+
args.deadline,
|
|
97
|
+
],
|
|
70
98
|
}),
|
|
71
|
-
value: 0n,
|
|
72
99
|
};
|
|
73
|
-
if (metadata)
|
|
100
|
+
if (metadata)
|
|
74
101
|
tx = addTransactionMetadata(tx, metadata);
|
|
75
|
-
}
|
|
76
102
|
return deepFreeze({
|
|
77
103
|
...tx,
|
|
78
104
|
action: {
|
|
79
105
|
type: "vaultV2ForceWithdraw",
|
|
80
106
|
args: {
|
|
81
|
-
vault:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
onBehalf,
|
|
107
|
+
vault: vault.address,
|
|
108
|
+
adapter: args.adapter,
|
|
109
|
+
exitAssets: args.exitAssets,
|
|
110
|
+
minSharePriceE27: args.minSharePriceE27,
|
|
111
|
+
referralFeePct,
|
|
112
|
+
referralFeeRecipient,
|
|
113
|
+
onBehalf: args.userAddress,
|
|
114
|
+
deadline: args.deadline,
|
|
88
115
|
},
|
|
89
116
|
},
|
|
90
117
|
});
|
|
@@ -30,18 +30,20 @@ export interface VaultV2InKindRedeemParams {
|
|
|
30
30
|
* @param params.args.amount - Penalty-inclusive, asset-denominated amount to exit.
|
|
31
31
|
* @param params.args.marketParamsList - Ordered markets consumed greedily after idle assets. May be
|
|
32
32
|
* empty when the vault's idle balance covers `amount`.
|
|
33
|
-
* @param params.args.userAddress -
|
|
34
|
-
*
|
|
35
|
-
* address.
|
|
33
|
+
* @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
|
|
34
|
+
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
35
|
+
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
36
36
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
37
37
|
* @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
|
|
38
38
|
* @param params.metadata - Optional analytics metadata.
|
|
39
39
|
* @returns A deep-frozen `Readonly<Transaction<VaultV2InKindRedeemAction>>` with `to`, `value`,
|
|
40
40
|
* `data`, and the typed action discriminator.
|
|
41
41
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
42
|
+
* @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
|
|
42
43
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
43
44
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
44
|
-
* @throws {
|
|
45
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
|
|
46
|
+
* spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
|
|
45
47
|
* @example
|
|
46
48
|
* ```ts
|
|
47
49
|
* import { vaultV2InKindRedeem } from "@morpho-org/morpho-sdk";
|
|
@@ -2,8 +2,9 @@ import { deepFreeze, getChainAddress } from "@morpho-org/morpho-ts";
|
|
|
2
2
|
import { encodeFunctionData } from "viem";
|
|
3
3
|
import { vaultExitBundlesV1Abi } from "../../abis.js";
|
|
4
4
|
import { addTransactionMetadata } from "../../helpers/index.js";
|
|
5
|
+
import { validateDeadline } from "../../helpers/validate.js";
|
|
5
6
|
import { NonPositiveInputError, } from "../../types/index.js";
|
|
6
|
-
import {
|
|
7
|
+
import { getBundlesSharesPermit } from "../bundles/common.js";
|
|
7
8
|
/**
|
|
8
9
|
* Prepares a Vault V2 in-kind redemption into idle assets and Morpho Blue supply positions.
|
|
9
10
|
*
|
|
@@ -17,18 +18,20 @@ import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBun
|
|
|
17
18
|
* @param params.args.amount - Penalty-inclusive, asset-denominated amount to exit.
|
|
18
19
|
* @param params.args.marketParamsList - Ordered markets consumed greedily after idle assets. May be
|
|
19
20
|
* empty when the vault's idle balance covers `amount`.
|
|
20
|
-
* @param params.args.userAddress -
|
|
21
|
-
*
|
|
22
|
-
* address.
|
|
21
|
+
* @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
|
|
22
|
+
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
23
|
+
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
23
24
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
24
25
|
* @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
|
|
25
26
|
* @param params.metadata - Optional analytics metadata.
|
|
26
27
|
* @returns A deep-frozen `Readonly<Transaction<VaultV2InKindRedeemAction>>` with `to`, `value`,
|
|
27
28
|
* `data`, and the typed action discriminator.
|
|
28
29
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
30
|
+
* @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
|
|
29
31
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
30
32
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
31
|
-
* @throws {
|
|
33
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
|
|
34
|
+
* spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
|
|
32
35
|
* @example
|
|
33
36
|
* ```ts
|
|
34
37
|
* import { vaultV2InKindRedeem } from "@morpho-org/morpho-sdk";
|
|
@@ -43,8 +46,7 @@ import { getVaultExitBundlesV1PermitStruct } from "../signatures/getVaultExitBun
|
|
|
43
46
|
export const vaultV2InKindRedeem = ({ vault, args, metadata, }) => {
|
|
44
47
|
if (args.amount <= 0n)
|
|
45
48
|
throw new NonPositiveInputError("amount", args.amount);
|
|
46
|
-
|
|
47
|
-
throw new NonPositiveInputError("deadline", args.deadline);
|
|
49
|
+
validateDeadline(args.deadline);
|
|
48
50
|
const to = getChainAddress(vault.chainId, "bundles.vaultExitBundlesV1");
|
|
49
51
|
const marketParamsList = args.marketParamsList.map((marketParams) => ({
|
|
50
52
|
loanToken: marketParams.loanToken,
|
|
@@ -53,9 +55,11 @@ export const vaultV2InKindRedeem = ({ vault, args, metadata, }) => {
|
|
|
53
55
|
irm: marketParams.irm,
|
|
54
56
|
lltv: marketParams.lltv,
|
|
55
57
|
}));
|
|
56
|
-
const sharesPermit =
|
|
58
|
+
const sharesPermit = getBundlesSharesPermit({
|
|
57
59
|
vault: vault.address,
|
|
58
60
|
deadline: args.deadline,
|
|
61
|
+
owner: args.userAddress,
|
|
62
|
+
spender: to,
|
|
59
63
|
requirementSignature: args.requirementSignature,
|
|
60
64
|
});
|
|
61
65
|
let tx = {
|
package/lib/esm/augment.d.ts
CHANGED
package/lib/esm/augment.js
CHANGED
package/lib/esm/blue/abis.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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,
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/abis.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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,
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -1,2 +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,
|
|
2
|
-
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig,
|
|
1
|
+
export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket, IMarketParams, IPosition, IPreLiquidationParams, IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, } 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, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
package/lib/esm/blue/entities.js
CHANGED
|
@@ -1 +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,
|
|
1
|
+
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
package/lib/esm/blue/errors.d.ts
CHANGED
|
@@ -1,2 +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";
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidBitLengthError, InvalidMarketParamsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError, UnsupportedPreLiquidationParamsError, UnsupportedVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
2
2
|
export { getUnsupportedVaultV2Adapter, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/errors.js
CHANGED
|
@@ -1,2 +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";
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidBitLengthError, InvalidMarketParamsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError, UnsupportedPreLiquidationParamsError, UnsupportedVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
2
2
|
export { getUnsupportedVaultV2Adapter, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/fetch.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig,
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/fetch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig,
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/types.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams,
|
|
2
|
-
export type { AuthorizationArgs,
|
|
3
|
-
/** @deprecated Args for the deprecated getDaiPermitTypedData; scheduled for removal in the next major. */
|
|
4
|
-
DaiPermitArgs, DeploylessFetchParameters, FetchParameters, InputAllocation, MetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs, } from "@morpho-org/blue-sdk-viem";
|
|
1
|
+
export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams, Loadable, MarketId, MaxBorrowOptions, MaxPositionCapacities, MaxWithdrawCollateralOptions, Pending, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export type { AuthorizationArgs, DeploylessFetchParameters, FetchParameters, InputAllocation, MetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/utils.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export type { CapacityLimit, RoundingDirection } from "@morpho-org/blue-sdk";
|
|
2
2
|
export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
3
|
-
export { decodeBytes32String, getAuthorizationTypedData,
|
|
4
|
-
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
5
|
-
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
3
|
+
export { decodeBytes32String, getAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/utils.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export { AdaptiveCurveIrmLib, CapacityLimitReason, defaultPreLiquidationParamsRegistry, getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
2
|
-
export { decodeBytes32String, getAuthorizationTypedData,
|
|
3
|
-
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
4
|
-
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
2
|
+
export { decodeBytes32String, getAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -12,7 +12,7 @@ import { type Metadata, type MorphoClientType } from "../types/index.js";
|
|
|
12
12
|
* @param _options.metadata - Optional analytics metadata applied to every transaction the
|
|
13
13
|
* `morpho` namespace builds.
|
|
14
14
|
* @param _options.supportSignature - Whether the integrator can collect EIP-712 signatures for
|
|
15
|
-
* ERC-2612, Permit2
|
|
15
|
+
* ERC-2612, Permit2 SignatureTransfer, and Morpho authorization.
|
|
16
16
|
* Defaults to `false` (standalone approvals and authorization calls only).
|
|
17
17
|
* @param _options.supportDeployless - Whether entity fetchers may use deployless multicall.
|
|
18
18
|
* @returns A viem extension function — `client.extend(morphoViemExtension(...))` adds
|
|
@@ -52,7 +52,7 @@ function createMorphoNamespace(viemClient, options) {
|
|
|
52
52
|
* @param _options.metadata - Optional analytics metadata applied to every transaction the
|
|
53
53
|
* `morpho` namespace builds.
|
|
54
54
|
* @param _options.supportSignature - Whether the integrator can collect EIP-712 signatures for
|
|
55
|
-
* ERC-2612, Permit2
|
|
55
|
+
* ERC-2612, Permit2 SignatureTransfer, and Morpho authorization.
|
|
56
56
|
* Defaults to `false` (standalone approvals and authorization calls only).
|
|
57
57
|
* @param _options.supportDeployless - Whether entity fetchers may use deployless multicall.
|
|
58
58
|
* @returns A viem extension function — `client.extend(morphoViemExtension(...))` adds
|
package/lib/esm/constants.d.ts
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId as isBlueMarketId,
|
|
2
|
-
|
|
3
|
-
|
|
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";
|
|
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";
|
|
1
|
+
export { DEFAULT_SLIPPAGE_TOLERANCE, EIP_712_FIELDS, ERC20_ALLOWANCE_RECIPIENTS, isMarketId as isBlueMarketId, LIQUIDATION_CURSOR as BLUE_LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR as BLUE_MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE, SECONDS_PER_YEAR, TransactionType as BlueTransactionType, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export { CBP as MIDNIGHT_CBP, COLLATERAL_PARAMS_TYPEHASH as MIDNIGHT_COLLATERAL_PARAMS_TYPEHASH, DEFAULT_TICK_SPACING as MIDNIGHT_DEFAULT_TICK_SPACING, EIP712_DOMAIN_TYPEHASH as MIDNIGHT_EIP712_DOMAIN_TYPEHASH, MARKET_TYPEHASH as MIDNIGHT_MARKET_TYPEHASH, MAX_COLLATERALS as MIDNIGHT_MAX_COLLATERALS, MAX_COLLATERALS_PER_BORROWER as MIDNIGHT_MAX_COLLATERALS_PER_BORROWER, MAX_CONTINUOUS_FEE as MIDNIGHT_MAX_CONTINUOUS_FEE, MAX_OFFER_CAP as MIDNIGHT_MAX_OFFER_CAP, MAX_SETTLEMENT_FEES as MIDNIGHT_MAX_SETTLEMENT_FEES, MAX_TICK as MIDNIGHT_MAX_TICK, OFFER_TYPEHASH as MIDNIGHT_OFFER_TYPEHASH, PRICE_ROUNDING_STEP as MIDNIGHT_PRICE_ROUNDING_STEP, SETTLEMENT_FEE_BREAKPOINTS as MIDNIGHT_SETTLEMENT_FEE_BREAKPOINTS, TIME_TO_MAX_LIF as MIDNIGHT_TIME_TO_MAX_LIF, } from "@morpho-org/midnight-sdk";
|
|
3
|
+
export { BLUE_API_BASE_URL, BLUE_API_GRAPHQL_URL, ChainId, ChainUtils, DOCS_BASE_URL, MORPHO_DOMAIN, REWARDS_BASE_URL, ZERO_ADDRESS, } from "@morpho-org/morpho-ts";
|
|
38
4
|
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";
|