@morpho-org/morpho-sdk 6.0.0-next.2 → 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 +83 -29
- package/README.md +9 -7
- package/lib/cjs/abis.d.ts +3 -2844
- package/lib/cjs/abis.js +1 -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 +23 -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 +6 -5
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +10 -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 +6 -5
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +10 -7
- package/lib/cjs/augment.d.ts +0 -1
- package/lib/cjs/augment.js +0 -1
- package/lib/cjs/blue/abis.d.ts +1 -5
- package/lib/cjs/blue/abis.js +1 -7
- package/lib/cjs/blue/entities.d.ts +2 -8
- package/lib/cjs/blue/entities.js +1 -3
- package/lib/cjs/blue/fetch.d.ts +1 -3
- package/lib/cjs/blue/fetch.js +1 -3
- 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 +30 -265
- package/lib/cjs/entities/blue/blue.js +1 -205
- package/lib/cjs/entities/index.d.ts +3 -66
- package/lib/cjs/entities/index.js +1 -21
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +9 -2
- package/lib/cjs/entities/vaultV1/vaultV1.js +12 -7
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +22 -9
- package/lib/cjs/entities/vaultV2/vaultV2.js +28 -15
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +4 -21
- package/lib/cjs/errors.d.ts +2 -46
- package/lib/cjs/errors.js +1 -46
- package/lib/cjs/fetch.d.ts +1 -17
- package/lib/cjs/fetch.js +1 -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/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/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 +6 -35
- package/lib/cjs/utils.js +2 -36
- package/lib/esm/abis.d.ts +3 -2844
- package/lib/esm/abis.js +3 -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 +24 -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 +6 -5
- package/lib/esm/actions/vaultV1/inKindRedeem.js +10 -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 +6 -5
- package/lib/esm/actions/vaultV2/inKindRedeem.js +10 -7
- package/lib/esm/augment.d.ts +0 -1
- package/lib/esm/augment.js +0 -1
- package/lib/esm/blue/abis.d.ts +1 -5
- package/lib/esm/blue/abis.js +1 -5
- package/lib/esm/blue/entities.d.ts +2 -8
- package/lib/esm/blue/entities.js +1 -3
- package/lib/esm/blue/fetch.d.ts +1 -3
- package/lib/esm/blue/fetch.js +1 -3
- 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 +30 -265
- package/lib/esm/entities/blue/blue.js +4 -208
- package/lib/esm/entities/index.d.ts +3 -66
- package/lib/esm/entities/index.js +1 -18
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +9 -2
- package/lib/esm/entities/vaultV1/vaultV1.js +15 -10
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +22 -9
- package/lib/esm/entities/vaultV2/vaultV2.js +32 -19
- package/lib/esm/entities/vaultV2BlueReallocationData.js +2 -19
- package/lib/esm/errors.d.ts +2 -46
- package/lib/esm/errors.js +2 -46
- package/lib/esm/fetch.d.ts +1 -17
- package/lib/esm/fetch.js +1 -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/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/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 +6 -35
- package/lib/esm/utils.js +5 -34
- package/package.json +5 -13
- 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
|
@@ -11,12 +11,12 @@ interface EncodeErc20ApprovalParams {
|
|
|
11
11
|
* Encodes a deep-frozen ERC-20 approval transaction for a supported SDK spender.
|
|
12
12
|
*
|
|
13
13
|
* Caps `amount` at the per-chain, per-token maximum from `MAX_TOKEN_APPROVALS` (defaults to
|
|
14
|
-
* `maxUint256`). Used by {@link getRequirementsApproval}
|
|
14
|
+
* `maxUint256`). Used by {@link getRequirementsApproval}.
|
|
15
15
|
*
|
|
16
16
|
* @param params - Encoding parameters.
|
|
17
17
|
* @param params.token - ERC-20 token address to approve.
|
|
18
|
-
* @param params.spender - Address granted the allowance. Must be
|
|
19
|
-
*
|
|
18
|
+
* @param params.spender - Address granted the allowance. Must be Permit2, Midnight,
|
|
19
|
+
* MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for the chain.
|
|
20
20
|
* @param params.amount - Allowance amount before per-token cap.
|
|
21
21
|
* @param params.chainId - The chain the transaction targets (used to resolve supported spenders and the per-token cap).
|
|
22
22
|
* @returns A deep-frozen `Transaction<ERC20ApprovalAction>` with the capped approval amount.
|
|
@@ -28,7 +28,7 @@ interface EncodeErc20ApprovalParams {
|
|
|
28
28
|
*
|
|
29
29
|
* const tx = encodeErc20Approval({
|
|
30
30
|
* token: USDC,
|
|
31
|
-
* spender:
|
|
31
|
+
* spender: blueBundlesV1,
|
|
32
32
|
* amount: 1_000_000n,
|
|
33
33
|
* chainId: 1,
|
|
34
34
|
* });
|
|
@@ -10,12 +10,12 @@ const validateRequirementSpender_js_1 = require("../../../helpers/validateRequir
|
|
|
10
10
|
* Encodes a deep-frozen ERC-20 approval transaction for a supported SDK spender.
|
|
11
11
|
*
|
|
12
12
|
* Caps `amount` at the per-chain, per-token maximum from `MAX_TOKEN_APPROVALS` (defaults to
|
|
13
|
-
* `maxUint256`). Used by {@link getRequirementsApproval}
|
|
13
|
+
* `maxUint256`). Used by {@link getRequirementsApproval}.
|
|
14
14
|
*
|
|
15
15
|
* @param params - Encoding parameters.
|
|
16
16
|
* @param params.token - ERC-20 token address to approve.
|
|
17
|
-
* @param params.spender - Address granted the allowance. Must be
|
|
18
|
-
*
|
|
17
|
+
* @param params.spender - Address granted the allowance. Must be Permit2, Midnight,
|
|
18
|
+
* MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for the chain.
|
|
19
19
|
* @param params.amount - Allowance amount before per-token cap.
|
|
20
20
|
* @param params.chainId - The chain the transaction targets (used to resolve supported spenders and the per-token cap).
|
|
21
21
|
* @returns A deep-frozen `Transaction<ERC20ApprovalAction>` with the capped approval amount.
|
|
@@ -27,7 +27,7 @@ const validateRequirementSpender_js_1 = require("../../../helpers/validateRequir
|
|
|
27
27
|
*
|
|
28
28
|
* const tx = encodeErc20Approval({
|
|
29
29
|
* token: USDC,
|
|
30
|
-
* spender:
|
|
30
|
+
* spender: blueBundlesV1,
|
|
31
31
|
* amount: 1_000_000n,
|
|
32
32
|
* chainId: 1,
|
|
33
33
|
* });
|
|
@@ -41,7 +41,6 @@ const encodeErc20Approval = (params) => {
|
|
|
41
41
|
chainId,
|
|
42
42
|
spender,
|
|
43
43
|
allowed: [
|
|
44
|
-
"generalAdapter1",
|
|
45
44
|
"permit2",
|
|
46
45
|
"midnight",
|
|
47
46
|
"midnightBundles",
|
|
@@ -27,8 +27,8 @@ interface EncodeErc20PermitParams {
|
|
|
27
27
|
* @param params - Permit encoding parameters.
|
|
28
28
|
* @param params.token - ERC-20 token address (must support EIP-2612).
|
|
29
29
|
* @param params.owner - Account that owns the tokens and signs the permit.
|
|
30
|
-
* @param params.spender - Permit spender. Must be
|
|
31
|
-
*
|
|
30
|
+
* @param params.spender - Permit spender. Must be MidnightBundles, VaultBundlesV1, or
|
|
31
|
+
* BlueBundlesV1 for the chain.
|
|
32
32
|
* @param params.amount - Permit allowance amount.
|
|
33
33
|
* @param params.chainId - Target chain id.
|
|
34
34
|
* @param params.nonce - The owner's current EIP-2612 nonce on `token`.
|
|
@@ -38,8 +38,8 @@ interface EncodeErc20PermitParams {
|
|
|
38
38
|
* `sign(client, userAddress)` produces the deep-frozen signature.
|
|
39
39
|
* @throws {ChainIdMismatchError} when `viemClient.chain?.id !== params.chainId`.
|
|
40
40
|
* @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
|
|
41
|
-
* @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not
|
|
42
|
-
*
|
|
41
|
+
* @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not MidnightBundles,
|
|
42
|
+
* VaultBundlesV1, or BlueBundlesV1 for `chainId`.
|
|
43
43
|
* @throws {NonPositiveInputError} when an explicit `deadline` is not positive.
|
|
44
44
|
* @throws {InputExceedsMaxError} when an explicit `deadline` exceeds `uint256`.
|
|
45
45
|
* @throws {ExpiredDeadlineError} when an explicit `deadline` is positive but not in the future.
|
|
@@ -58,7 +58,7 @@ interface EncodeErc20PermitParams {
|
|
|
58
58
|
* const requirement = await encodeErc20Permit(client, {
|
|
59
59
|
* token: USDC, // Must implement standard ERC-2612. DAI is routed through Permit2 by requirement helpers.
|
|
60
60
|
* owner,
|
|
61
|
-
* spender:
|
|
61
|
+
* spender: blueBundlesV1,
|
|
62
62
|
* amount: 1_000_000n,
|
|
63
63
|
* chainId: 1,
|
|
64
64
|
* nonce: 0n,
|
|
@@ -21,8 +21,8 @@ const index_js_1 = require("../../../types/index.js");
|
|
|
21
21
|
* @param params - Permit encoding parameters.
|
|
22
22
|
* @param params.token - ERC-20 token address (must support EIP-2612).
|
|
23
23
|
* @param params.owner - Account that owns the tokens and signs the permit.
|
|
24
|
-
* @param params.spender - Permit spender. Must be
|
|
25
|
-
*
|
|
24
|
+
* @param params.spender - Permit spender. Must be MidnightBundles, VaultBundlesV1, or
|
|
25
|
+
* BlueBundlesV1 for the chain.
|
|
26
26
|
* @param params.amount - Permit allowance amount.
|
|
27
27
|
* @param params.chainId - Target chain id.
|
|
28
28
|
* @param params.nonce - The owner's current EIP-2612 nonce on `token`.
|
|
@@ -32,8 +32,8 @@ const index_js_1 = require("../../../types/index.js");
|
|
|
32
32
|
* `sign(client, userAddress)` produces the deep-frozen signature.
|
|
33
33
|
* @throws {ChainIdMismatchError} when `viemClient.chain?.id !== params.chainId`.
|
|
34
34
|
* @throws {UnsupportedChainIdError} when `chainId` is absent from the address registry.
|
|
35
|
-
* @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not
|
|
36
|
-
*
|
|
35
|
+
* @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not MidnightBundles,
|
|
36
|
+
* VaultBundlesV1, or BlueBundlesV1 for `chainId`.
|
|
37
37
|
* @throws {NonPositiveInputError} when an explicit `deadline` is not positive.
|
|
38
38
|
* @throws {InputExceedsMaxError} when an explicit `deadline` exceeds `uint256`.
|
|
39
39
|
* @throws {ExpiredDeadlineError} when an explicit `deadline` is positive but not in the future.
|
|
@@ -52,7 +52,7 @@ const index_js_1 = require("../../../types/index.js");
|
|
|
52
52
|
* const requirement = await encodeErc20Permit(client, {
|
|
53
53
|
* token: USDC, // Must implement standard ERC-2612. DAI is routed through Permit2 by requirement helpers.
|
|
54
54
|
* owner,
|
|
55
|
-
* spender:
|
|
55
|
+
* spender: blueBundlesV1,
|
|
56
56
|
* amount: 1_000_000n,
|
|
57
57
|
* chainId: 1,
|
|
58
58
|
* nonce: 0n,
|
|
@@ -70,12 +70,7 @@ const encodeErc20Permit = async (viemClient, params) => {
|
|
|
70
70
|
(0, validateRequirementSpender_js_1.validateRequirementSpender)({
|
|
71
71
|
chainId,
|
|
72
72
|
spender,
|
|
73
|
-
allowed: [
|
|
74
|
-
"generalAdapter1",
|
|
75
|
-
"midnightBundles",
|
|
76
|
-
"vaultBundlesV1",
|
|
77
|
-
"blueBundlesV1",
|
|
78
|
-
],
|
|
73
|
+
allowed: ["midnightBundles", "vaultBundlesV1", "blueBundlesV1"],
|
|
79
74
|
});
|
|
80
75
|
const now = morpho_ts_1.Time.timestamp();
|
|
81
76
|
// Validate an explicit deadline before the token-metadata read: this exported encoder can be
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from "./encodeBlueSignatureAuthorization.js";
|
|
2
2
|
export * from "./encodeErc20Approval.js";
|
|
3
3
|
export * from "./encodeErc20Permit.js";
|
|
4
|
-
export * from "./encodeErc20Permit2Approve.js";
|
|
5
4
|
export * from "./encodeErc20Permit2SignatureTransfer.js";
|
|
6
5
|
export * from "./encodeVaultSharesPermit.js";
|
|
@@ -17,6 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./encodeBlueSignatureAuthorization.js"), exports);
|
|
18
18
|
__exportStar(require("./encodeErc20Approval.js"), exports);
|
|
19
19
|
__exportStar(require("./encodeErc20Permit.js"), exports);
|
|
20
|
-
__exportStar(require("./encodeErc20Permit2Approve.js"), exports);
|
|
21
20
|
__exportStar(require("./encodeErc20Permit2SignatureTransfer.js"), exports);
|
|
22
21
|
__exportStar(require("./encodeVaultSharesPermit.js"), exports);
|
|
@@ -5,8 +5,8 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
|
|
|
5
5
|
* allowance.
|
|
6
6
|
*
|
|
7
7
|
* The spender is validated by {@link encodeErc20Approval}. Supported spenders are the chain's
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, and BlueBundlesV1
|
|
9
|
+
* addresses when configured.
|
|
10
10
|
*
|
|
11
11
|
* Returns an empty array when the allowance already covers `spendAmount`. When the token is in
|
|
12
12
|
* `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) and the existing allowance is non-zero, prepends a
|
|
@@ -19,9 +19,8 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
|
|
|
19
19
|
* @param params.args.spendAmount - The amount the bundle will actually pull.
|
|
20
20
|
* @param params.args.approvalAmount - The amount to approve (often equal to `spendAmount`, but
|
|
21
21
|
* may be `maxUint256` for reusable Permit2 or saturated-share-repay approvals).
|
|
22
|
-
* @param params.args.spender - Address that will be granted the approval. Must be
|
|
23
|
-
*
|
|
24
|
-
* `chainId`.
|
|
22
|
+
* @param params.args.spender - Address that will be granted the approval. Must be Permit2,
|
|
23
|
+
* Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
|
|
25
24
|
* @param params.allowances - The user's current allowance of `address` for `spender`.
|
|
26
25
|
* @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
|
|
27
26
|
* followed by the new approval. Empty when no approval is needed.
|
|
@@ -35,7 +34,7 @@ import { type ERC20ApprovalAction, type Transaction } from "../../types/index.js
|
|
|
35
34
|
* const txs = getRequirementsApproval({
|
|
36
35
|
* address: USDC,
|
|
37
36
|
* chainId: 1,
|
|
38
|
-
* args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender:
|
|
37
|
+
* args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender: blueBundlesV1 },
|
|
39
38
|
* allowances: 0n,
|
|
40
39
|
* });
|
|
41
40
|
* // txs satisfies Readonly<Transaction<ERC20ApprovalAction>>[]
|
|
@@ -10,8 +10,8 @@ const encodeErc20Approval_js_1 = require("./encode/encodeErc20Approval.js");
|
|
|
10
10
|
* allowance.
|
|
11
11
|
*
|
|
12
12
|
* The spender is validated by {@link encodeErc20Approval}. Supported spenders are the chain's
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Permit2, Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, and BlueBundlesV1
|
|
14
|
+
* addresses when configured.
|
|
15
15
|
*
|
|
16
16
|
* Returns an empty array when the allowance already covers `spendAmount`. When the token is in
|
|
17
17
|
* `APPROVE_ONLY_ONCE_TOKENS` (e.g. USDT) and the existing allowance is non-zero, prepends a
|
|
@@ -24,9 +24,8 @@ const encodeErc20Approval_js_1 = require("./encode/encodeErc20Approval.js");
|
|
|
24
24
|
* @param params.args.spendAmount - The amount the bundle will actually pull.
|
|
25
25
|
* @param params.args.approvalAmount - The amount to approve (often equal to `spendAmount`, but
|
|
26
26
|
* may be `maxUint256` for reusable Permit2 or saturated-share-repay approvals).
|
|
27
|
-
* @param params.args.spender - Address that will be granted the approval. Must be
|
|
28
|
-
*
|
|
29
|
-
* `chainId`.
|
|
27
|
+
* @param params.args.spender - Address that will be granted the approval. Must be Permit2,
|
|
28
|
+
* Midnight, MidnightBundles, VaultExitBundlesV1, VaultBundlesV1, or BlueBundlesV1 for `chainId`.
|
|
30
29
|
* @param params.allowances - The user's current allowance of `address` for `spender`.
|
|
31
30
|
* @returns Up to two deep-frozen `Transaction<ERC20ApprovalAction>` entries: an optional reset
|
|
32
31
|
* followed by the new approval. Empty when no approval is needed.
|
|
@@ -40,7 +39,7 @@ const encodeErc20Approval_js_1 = require("./encode/encodeErc20Approval.js");
|
|
|
40
39
|
* const txs = getRequirementsApproval({
|
|
41
40
|
* address: USDC,
|
|
42
41
|
* chainId: 1,
|
|
43
|
-
* args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender:
|
|
42
|
+
* args: { approvalAmount: 1_000_000n, spendAmount: 1_000_000n, spender: blueBundlesV1 },
|
|
44
43
|
* allowances: 0n,
|
|
45
44
|
* });
|
|
46
45
|
* // txs satisfies Readonly<Transaction<ERC20ApprovalAction>>[]
|
|
@@ -16,6 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./blue/index.js"), exports);
|
|
18
18
|
__exportStar(require("./encode/index.js"), exports);
|
|
19
|
-
__exportStar(require("./generalAdapter/index.js"), exports);
|
|
20
19
|
__exportStar(require("./getRequirementsApproval.js"), exports);
|
|
21
20
|
__exportStar(require("./midnight/index.js"), exports);
|
|
@@ -52,8 +52,7 @@ export interface VaultV1DepositParams {
|
|
|
52
52
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
|
|
53
53
|
* {@link InputExceedsMaxError}, so either class catches it.
|
|
54
54
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
55
|
-
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit
|
|
56
|
-
* Permit2 AllowanceTransfer signature is supplied.
|
|
55
|
+
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
|
|
57
56
|
* @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
|
|
58
57
|
* @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
|
|
59
58
|
* @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
|
|
@@ -41,8 +41,7 @@ const common_js_1 = require("../bundles/common.js");
|
|
|
41
41
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
|
|
42
42
|
* {@link InputExceedsMaxError}, so either class catches it.
|
|
43
43
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
44
|
-
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit
|
|
45
|
-
* Permit2 AllowanceTransfer signature is supplied.
|
|
44
|
+
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
|
|
46
45
|
* @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
|
|
47
46
|
* @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
|
|
48
47
|
* @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
|
|
@@ -27,20 +27,21 @@ export interface VaultV1InKindRedeemParams {
|
|
|
27
27
|
* @param params.vault.address - Target Vault V1 address.
|
|
28
28
|
* @param params.args.amount - Asset-denominated amount to exit.
|
|
29
29
|
* @param params.args.marketParamsList - Ordered markets consumed greedily by the contract.
|
|
30
|
-
* @param params.args.userAddress -
|
|
31
|
-
*
|
|
32
|
-
* address.
|
|
30
|
+
* @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
|
|
31
|
+
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
32
|
+
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
33
33
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
34
34
|
* @param params.args.requirementSignature - Optional bounded Vault V1 shares permit.
|
|
35
35
|
* @param params.metadata - Optional analytics metadata.
|
|
36
36
|
* @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
|
|
37
37
|
* `data`, and the typed action discriminator.
|
|
38
38
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
39
|
-
* @throws {InputExceedsMaxError} when
|
|
39
|
+
* @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
|
|
40
40
|
* @throws {EmptyMarketParamsListError} when no markets are supplied.
|
|
41
41
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
42
42
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
43
|
-
* @throws {
|
|
43
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
|
|
44
|
+
* spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
|
|
44
45
|
* @example
|
|
45
46
|
* ```ts
|
|
46
47
|
* import { vaultV1InKindRedeem } from "@morpho-org/morpho-sdk";
|
|
@@ -7,7 +7,7 @@ const abis_js_1 = require("../../abis.js");
|
|
|
7
7
|
const index_js_1 = require("../../helpers/index.js");
|
|
8
8
|
const validate_js_1 = require("../../helpers/validate.js");
|
|
9
9
|
const index_js_2 = require("../../types/index.js");
|
|
10
|
-
const
|
|
10
|
+
const common_js_1 = require("../bundles/common.js");
|
|
11
11
|
/**
|
|
12
12
|
* Prepares a Vault V1 in-kind redemption into Morpho Blue supply positions.
|
|
13
13
|
*
|
|
@@ -19,20 +19,21 @@ const getVaultExitBundlesV1PermitStruct_js_1 = require("../signatures/getVaultEx
|
|
|
19
19
|
* @param params.vault.address - Target Vault V1 address.
|
|
20
20
|
* @param params.args.amount - Asset-denominated amount to exit.
|
|
21
21
|
* @param params.args.marketParamsList - Ordered markets consumed greedily by the contract.
|
|
22
|
-
* @param params.args.userAddress -
|
|
23
|
-
*
|
|
24
|
-
* address.
|
|
22
|
+
* @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
|
|
23
|
+
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
24
|
+
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
25
25
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
26
26
|
* @param params.args.requirementSignature - Optional bounded Vault V1 shares permit.
|
|
27
27
|
* @param params.metadata - Optional analytics metadata.
|
|
28
28
|
* @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
|
|
29
29
|
* `data`, and the typed action discriminator.
|
|
30
30
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
31
|
-
* @throws {InputExceedsMaxError} when
|
|
31
|
+
* @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
|
|
32
32
|
* @throws {EmptyMarketParamsListError} when no markets are supplied.
|
|
33
33
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
34
34
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
35
|
-
* @throws {
|
|
35
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
|
|
36
|
+
* spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
|
|
36
37
|
* @example
|
|
37
38
|
* ```ts
|
|
38
39
|
* import { vaultV1InKindRedeem } from "@morpho-org/morpho-sdk";
|
|
@@ -58,9 +59,11 @@ const vaultV1InKindRedeem = ({ vault, args, metadata, }) => {
|
|
|
58
59
|
irm: marketParams.irm,
|
|
59
60
|
lltv: marketParams.lltv,
|
|
60
61
|
}));
|
|
61
|
-
const sharesPermit = (0,
|
|
62
|
+
const sharesPermit = (0, common_js_1.getBundlesSharesPermit)({
|
|
62
63
|
vault: vault.address,
|
|
63
64
|
deadline: args.deadline,
|
|
65
|
+
owner: args.userAddress,
|
|
66
|
+
spender: to,
|
|
64
67
|
requirementSignature: args.requirementSignature,
|
|
65
68
|
});
|
|
66
69
|
let tx = {
|
|
@@ -52,8 +52,7 @@ export interface VaultV2DepositParams {
|
|
|
52
52
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
|
|
53
53
|
* {@link InputExceedsMaxError}, so either class catches it.
|
|
54
54
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
55
|
-
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit
|
|
56
|
-
* Permit2 AllowanceTransfer signature is supplied.
|
|
55
|
+
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
|
|
57
56
|
* @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
|
|
58
57
|
* @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
|
|
59
58
|
* @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
|
|
@@ -41,8 +41,7 @@ const common_js_1 = require("../bundles/common.js");
|
|
|
41
41
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
|
|
42
42
|
* {@link InputExceedsMaxError}, so either class catches it.
|
|
43
43
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
44
|
-
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit
|
|
45
|
-
* Permit2 AllowanceTransfer signature is supplied.
|
|
44
|
+
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit.
|
|
46
45
|
* @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
|
|
47
46
|
* @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
|
|
48
47
|
* @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
|
|
@@ -61,7 +61,7 @@ export interface VaultV2ForceWithdrawParams {
|
|
|
61
61
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
62
62
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
63
63
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
64
|
-
* @throws {
|
|
64
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind,
|
|
65
65
|
* asset, owner, spender, or signature encoding.
|
|
66
66
|
* @example
|
|
67
67
|
* ```ts
|
|
@@ -7,7 +7,7 @@ const abis_js_1 = require("../../abis.js");
|
|
|
7
7
|
const index_js_1 = require("../../helpers/index.js");
|
|
8
8
|
const validate_js_1 = require("../../helpers/validate.js");
|
|
9
9
|
const index_js_2 = require("../../types/index.js");
|
|
10
|
-
const
|
|
10
|
+
const common_js_1 = require("../bundles/common.js");
|
|
11
11
|
/**
|
|
12
12
|
* Prepares a Vault V2 force withdrawal through VaultExitBundlesV1.
|
|
13
13
|
*
|
|
@@ -51,7 +51,7 @@ const getVaultExitBundlesV1PermitStruct_js_1 = require("../signatures/getVaultEx
|
|
|
51
51
|
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
52
52
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
53
53
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
54
|
-
* @throws {
|
|
54
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind,
|
|
55
55
|
* asset, owner, spender, or signature encoding.
|
|
56
56
|
* @example
|
|
57
57
|
* ```ts
|
|
@@ -75,7 +75,7 @@ const vaultV2ForceWithdraw = ({ vault, args, metadata, }) => {
|
|
|
75
75
|
(0, validate_js_1.validateUint256Field)("minSharePriceE27", args.minSharePriceE27);
|
|
76
76
|
const { referralFeePct, referralFeeRecipient } = (0, validate_js_1.validateReferralFee)(args);
|
|
77
77
|
const to = (0, morpho_ts_1.getChainAddress)(vault.chainId, "bundles.vaultExitBundlesV1");
|
|
78
|
-
const sharesPermit = (0,
|
|
78
|
+
const sharesPermit = (0, common_js_1.getBundlesSharesPermit)({
|
|
79
79
|
vault: vault.address,
|
|
80
80
|
deadline: args.deadline,
|
|
81
81
|
owner: args.userAddress,
|
|
@@ -30,19 +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
|
|
42
|
+
* @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
|
|
43
43
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
44
44
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
45
|
-
* @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.
|
|
46
47
|
* @example
|
|
47
48
|
* ```ts
|
|
48
49
|
* import { vaultV2InKindRedeem } from "@morpho-org/morpho-sdk";
|
|
@@ -7,7 +7,7 @@ const abis_js_1 = require("../../abis.js");
|
|
|
7
7
|
const index_js_1 = require("../../helpers/index.js");
|
|
8
8
|
const validate_js_1 = require("../../helpers/validate.js");
|
|
9
9
|
const index_js_2 = require("../../types/index.js");
|
|
10
|
-
const
|
|
10
|
+
const common_js_1 = require("../bundles/common.js");
|
|
11
11
|
/**
|
|
12
12
|
* Prepares a Vault V2 in-kind redemption into idle assets and Morpho Blue supply positions.
|
|
13
13
|
*
|
|
@@ -21,19 +21,20 @@ const getVaultExitBundlesV1PermitStruct_js_1 = require("../signatures/getVaultEx
|
|
|
21
21
|
* @param params.args.amount - Penalty-inclusive, asset-denominated amount to exit.
|
|
22
22
|
* @param params.args.marketParamsList - Ordered markets consumed greedily after idle assets. May be
|
|
23
23
|
* empty when the vault's idle balance covers `amount`.
|
|
24
|
-
* @param params.args.userAddress -
|
|
25
|
-
*
|
|
26
|
-
* address.
|
|
24
|
+
* @param params.args.userAddress - Redeeming account, recorded in action metadata and validated as
|
|
25
|
+
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
26
|
+
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
27
27
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
28
28
|
* @param params.args.requirementSignature - Optional bounded Vault V2 shares permit.
|
|
29
29
|
* @param params.metadata - Optional analytics metadata.
|
|
30
30
|
* @returns A deep-frozen `Readonly<Transaction<VaultV2InKindRedeemAction>>` with `to`, `value`,
|
|
31
31
|
* `data`, and the typed action discriminator.
|
|
32
32
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
33
|
-
* @throws {InputExceedsMaxError} when
|
|
33
|
+
* @throws {InputExceedsMaxError} when the bundle or permit deadline exceeds `uint256`.
|
|
34
34
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
35
35
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
36
|
-
* @throws {
|
|
36
|
+
* @throws {BundlesPermitMismatchError} when the requirement has the wrong permit kind, asset, owner,
|
|
37
|
+
* spender, or signature encoding, or when its signed and action amounts or deadlines disagree.
|
|
37
38
|
* @example
|
|
38
39
|
* ```ts
|
|
39
40
|
* import { vaultV2InKindRedeem } from "@morpho-org/morpho-sdk";
|
|
@@ -57,9 +58,11 @@ const vaultV2InKindRedeem = ({ vault, args, metadata, }) => {
|
|
|
57
58
|
irm: marketParams.irm,
|
|
58
59
|
lltv: marketParams.lltv,
|
|
59
60
|
}));
|
|
60
|
-
const sharesPermit = (0,
|
|
61
|
+
const sharesPermit = (0, common_js_1.getBundlesSharesPermit)({
|
|
61
62
|
vault: vault.address,
|
|
62
63
|
deadline: args.deadline,
|
|
64
|
+
owner: args.userAddress,
|
|
65
|
+
spender: to,
|
|
63
66
|
requirementSignature: args.requirementSignature,
|
|
64
67
|
});
|
|
65
68
|
let tx = {
|
package/lib/cjs/augment.d.ts
CHANGED
package/lib/cjs/augment.js
CHANGED
package/lib/cjs/blue/abis.d.ts
CHANGED
|
@@ -1,6 +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,
|
|
3
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
|
|
4
|
-
publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi,
|
|
5
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
|
|
6
|
-
vaultV1PublicAllocatorAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
|
|
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/cjs/blue/abis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wstEthAbi = exports.wrappedBackedTokenAbi = exports.whitelistControllerAggregatorV2Abi = exports.vaultV2FactoryAbi = exports.vaultV2BluePublicAllocatorAbi = exports.vaultV2Abi = exports.
|
|
3
|
+
exports.wstEthAbi = exports.wrappedBackedTokenAbi = exports.whitelistControllerAggregatorV2Abi = exports.vaultV2FactoryAbi = exports.vaultV2BluePublicAllocatorAbi = exports.vaultV2Abi = exports.preLiquidationFactoryAbi = exports.preLiquidationAbi = exports.permit2Abi = exports.permissionedErc20WrapperAbi = exports.morphoVaultV1AdapterFactoryAbi = exports.morphoVaultV1AdapterAbi = exports.morphoMarketV1AdapterV2FactoryAbi = exports.morphoMarketV1AdapterV2Abi = exports.morphoMarketV1AdapterFactoryAbi = exports.morphoMarketV1AdapterAbi = exports.metaMorphoFactoryAbi = exports.metaMorphoAbi = exports.erc5267Abi = exports.erc2612Abi = exports.blueOracleAbi = exports.blueAbi = exports.adaptiveCurveIrmAbi = exports.marketParamsAbi = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "marketParamsAbi", { enumerable: true, get: function () { return blue_sdk_1.marketParamsAbi; } });
|
|
6
6
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
@@ -21,12 +21,6 @@ Object.defineProperty(exports, "permissionedErc20WrapperAbi", { enumerable: true
|
|
|
21
21
|
Object.defineProperty(exports, "permit2Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.permit2Abi; } });
|
|
22
22
|
Object.defineProperty(exports, "preLiquidationAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.preLiquidationAbi; } });
|
|
23
23
|
Object.defineProperty(exports, "preLiquidationFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.preLiquidationFactoryAbi; } });
|
|
24
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
|
|
25
|
-
Object.defineProperty(exports, "publicAllocatorAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.publicAllocatorAbi; } });
|
|
26
|
-
Object.defineProperty(exports, "vaultV1AdapterAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.vaultV1AdapterAbi; } });
|
|
27
|
-
Object.defineProperty(exports, "vaultV1AdapterFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.vaultV1AdapterFactoryAbi; } });
|
|
28
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `vaultV2BluePublicAllocatorAbi`. */
|
|
29
|
-
Object.defineProperty(exports, "vaultV1PublicAllocatorAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.vaultV1PublicAllocatorAbi; } });
|
|
30
24
|
Object.defineProperty(exports, "vaultV2Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.vaultV2Abi; } });
|
|
31
25
|
Object.defineProperty(exports, "vaultV2BluePublicAllocatorAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.vaultV2BluePublicAllocatorAbi; } });
|
|
32
26
|
Object.defineProperty(exports, "vaultV2FactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.vaultV2FactoryAbi; } });
|
|
@@ -1,8 +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
|
-
|
|
3
|
-
IVaultMarketPublicAllocatorConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType,
|
|
4
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `IVaultV2BluePublicAllocatorConfig`. */
|
|
5
|
-
VaultPublicAllocatorConfig, } from "@morpho-org/blue-sdk";
|
|
6
|
-
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position, PreLiquidationParams, PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig,
|
|
7
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `VaultV2BlueMarketPublicAllocatorConfig`. */
|
|
8
|
-
VaultMarketPublicAllocatorConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
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/cjs/blue/entities.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WrappedToken = exports.VaultV2MorphoVaultV1Adapter = exports.VaultV2MorphoMarketV1AdapterV2 = exports.VaultV2MorphoMarketV1Adapter = exports.VaultV2BluePublicAllocatorConfig = exports.VaultV2BlueMarketPublicAllocatorConfig = exports.VaultV2Adapter = exports.VaultV2 = exports.VaultUser = exports.VaultToken = exports.
|
|
3
|
+
exports.WrappedToken = exports.VaultV2MorphoVaultV1Adapter = exports.VaultV2MorphoMarketV1AdapterV2 = exports.VaultV2MorphoMarketV1Adapter = exports.VaultV2BluePublicAllocatorConfig = exports.VaultV2BlueMarketPublicAllocatorConfig = exports.VaultV2Adapter = exports.VaultV2 = exports.VaultUser = exports.VaultToken = exports.VaultMarketConfig = exports.VaultMarketAllocation = exports.VaultConfig = exports.Vault = exports.User = exports.Token = exports.PreLiquidationPosition = exports.PreLiquidationParams = exports.Position = exports.MarketParams = exports.Market = exports.Holding = exports.ExchangeRateWrappedToken = exports.Eip5267Domain = exports.ConstantWrappedToken = exports.AssetBalances = exports.AccrualVaultV2MorphoVaultV1Adapter = exports.AccrualVaultV2MorphoMarketV1AdapterV2 = exports.AccrualVaultV2MorphoMarketV1Adapter = exports.AccrualVaultV2 = exports.AccrualVault = exports.AccrualPosition = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "AccrualPosition", { enumerable: true, get: function () { return blue_sdk_1.AccrualPosition; } });
|
|
6
6
|
Object.defineProperty(exports, "AccrualVault", { enumerable: true, get: function () { return blue_sdk_1.AccrualVault; } });
|
|
@@ -24,8 +24,6 @@ Object.defineProperty(exports, "Vault", { enumerable: true, get: function () { r
|
|
|
24
24
|
Object.defineProperty(exports, "VaultConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultConfig; } });
|
|
25
25
|
Object.defineProperty(exports, "VaultMarketAllocation", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketAllocation; } });
|
|
26
26
|
Object.defineProperty(exports, "VaultMarketConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketConfig; } });
|
|
27
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `VaultV2BlueMarketPublicAllocatorConfig`. */
|
|
28
|
-
Object.defineProperty(exports, "VaultMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketPublicAllocatorConfig; } });
|
|
29
27
|
Object.defineProperty(exports, "VaultToken", { enumerable: true, get: function () { return blue_sdk_1.VaultToken; } });
|
|
30
28
|
Object.defineProperty(exports, "VaultUser", { enumerable: true, get: function () { return blue_sdk_1.VaultUser; } });
|
|
31
29
|
Object.defineProperty(exports, "VaultV2", { enumerable: true, get: function () { return blue_sdk_1.VaultV2; } });
|
package/lib/cjs/blue/fetch.d.ts
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition, fetchPreLiquidationParams, fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig,
|
|
2
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `fetchVaultV2BlueMarketPublicAllocatorConfig`. */
|
|
3
|
-
fetchVaultMarketPublicAllocatorConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
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/cjs/blue/fetch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchVaultV2MorphoVaultV1Adapter = exports.fetchVaultV2MorphoMarketV1AdapterV2 = exports.fetchVaultV2MorphoMarketV1Adapter = exports.fetchVaultV2BluePublicAllocatorData = exports.fetchVaultV2BluePublicAllocatorConfig = exports.fetchVaultV2BlueMarketPublicAllocatorConfig = exports.fetchVaultV2Adapter = exports.fetchVaultV2 = exports.fetchVaultUser = exports.
|
|
3
|
+
exports.fetchVaultV2MorphoVaultV1Adapter = exports.fetchVaultV2MorphoMarketV1AdapterV2 = exports.fetchVaultV2MorphoMarketV1Adapter = exports.fetchVaultV2BluePublicAllocatorData = exports.fetchVaultV2BluePublicAllocatorConfig = exports.fetchVaultV2BlueMarketPublicAllocatorConfig = exports.fetchVaultV2Adapter = exports.fetchVaultV2 = exports.fetchVaultUser = exports.fetchVaultMarketConfig = exports.fetchVaultMarketAllocation = exports.fetchVaultConfig = exports.fetchVault = exports.fetchUser = exports.fetchToken = exports.fetchPreLiquidationPosition = exports.fetchPreLiquidationParams = exports.fetchPosition = exports.fetchMarketParams = exports.fetchMarket = exports.fetchHolding = exports.fetchAccrualVaultV2MorphoVaultV1Adapter = exports.fetchAccrualVaultV2MorphoMarketV1AdapterV2 = exports.fetchAccrualVaultV2MorphoMarketV1Adapter = exports.fetchAccrualVaultV2Adapter = exports.fetchAccrualVaultV2 = exports.fetchAccrualVault = exports.fetchAccrualPosition = void 0;
|
|
4
4
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
5
5
|
Object.defineProperty(exports, "fetchAccrualPosition", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualPosition; } });
|
|
6
6
|
Object.defineProperty(exports, "fetchAccrualVault", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVault; } });
|
|
@@ -21,8 +21,6 @@ Object.defineProperty(exports, "fetchVault", { enumerable: true, get: function (
|
|
|
21
21
|
Object.defineProperty(exports, "fetchVaultConfig", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultConfig; } });
|
|
22
22
|
Object.defineProperty(exports, "fetchVaultMarketAllocation", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultMarketAllocation; } });
|
|
23
23
|
Object.defineProperty(exports, "fetchVaultMarketConfig", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultMarketConfig; } });
|
|
24
|
-
/** @deprecated Vault V1 PublicAllocator support will be removed in the next major. Use `fetchVaultV2BlueMarketPublicAllocatorConfig`. */
|
|
25
|
-
Object.defineProperty(exports, "fetchVaultMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultMarketPublicAllocatorConfig; } });
|
|
26
24
|
Object.defineProperty(exports, "fetchVaultUser", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultUser; } });
|
|
27
25
|
Object.defineProperty(exports, "fetchVaultV2", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2; } });
|
|
28
26
|
Object.defineProperty(exports, "fetchVaultV2Adapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2Adapter; } });
|
package/lib/cjs/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";
|