@morpho-org/morpho-sdk 6.0.0-next.2 → 6.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION-v5-to-v6.md +88 -32
- package/README.md +9 -7
- package/lib/cjs/abis.d.ts +7 -2844
- package/lib/cjs/abis.js +3 -1951
- package/lib/cjs/actions/blue/borrow.d.ts +3 -2
- package/lib/cjs/actions/blue/borrow.js +3 -2
- package/lib/cjs/actions/blue/common.js +1 -9
- package/lib/cjs/actions/blue/refinance.d.ts +2 -2
- package/lib/cjs/actions/blue/refinance.js +2 -2
- package/lib/cjs/actions/blue/repay.d.ts +1 -1
- package/lib/cjs/actions/blue/repay.js +1 -1
- package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +2 -2
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +2 -2
- package/lib/cjs/actions/blue/supply.d.ts +2 -2
- package/lib/cjs/actions/blue/supply.js +2 -2
- package/lib/cjs/actions/blue/supplyCollateral.d.ts +2 -2
- package/lib/cjs/actions/blue/supplyCollateral.js +2 -2
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +3 -2
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +3 -2
- package/lib/cjs/actions/blue/withdraw.d.ts +3 -3
- package/lib/cjs/actions/blue/withdraw.js +3 -3
- package/lib/cjs/actions/blue/withdrawCollateral.d.ts +2 -2
- package/lib/cjs/actions/blue/withdrawCollateral.js +2 -2
- package/lib/cjs/actions/bundles/common.d.ts +6 -2
- package/lib/cjs/actions/bundles/common.js +31 -5
- package/lib/cjs/actions/index.d.ts +0 -1
- package/lib/cjs/actions/index.js +0 -1
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -8
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +11 -16
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +4 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +6 -11
- package/lib/cjs/actions/requirements/encode/index.d.ts +0 -1
- package/lib/cjs/actions/requirements/encode/index.js +0 -1
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -6
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -6
- package/lib/cjs/actions/requirements/index.d.ts +0 -1
- package/lib/cjs/actions/requirements/index.js +0 -1
- package/lib/cjs/actions/vaultV1/deposit.d.ts +1 -2
- package/lib/cjs/actions/vaultV1/deposit.js +1 -2
- package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +7 -5
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +11 -7
- package/lib/cjs/actions/vaultV2/deposit.d.ts +1 -2
- package/lib/cjs/actions/vaultV2/deposit.js +1 -2
- package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +1 -1
- package/lib/cjs/actions/vaultV2/forceWithdraw.js +3 -3
- package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +7 -5
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +11 -7
- package/lib/cjs/augment/AccrualPosition.d.ts +1 -0
- package/lib/cjs/augment.d.ts +0 -1
- package/lib/cjs/augment.js +0 -1
- package/lib/cjs/blue/abis.d.ts +5 -5
- package/lib/cjs/blue/abis.js +3 -7
- package/lib/cjs/blue/entities.d.ts +10 -8
- package/lib/cjs/blue/entities.js +3 -3
- package/lib/cjs/blue/errors.d.ts +4 -2
- package/lib/cjs/blue/errors.js +3 -1
- package/lib/cjs/blue/fetch.d.ts +5 -3
- package/lib/cjs/blue/fetch.js +3 -3
- package/lib/cjs/blue/types.d.ts +2 -4
- package/lib/cjs/blue/utils.d.ts +6 -4
- package/lib/cjs/blue/utils.js +3 -3
- package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
- package/lib/cjs/client/morphoViemExtension.js +1 -1
- package/lib/cjs/constants.d.ts +3 -37
- package/lib/cjs/constants.js +1 -39
- package/lib/cjs/entities/blue/blue.d.ts +30 -265
- package/lib/cjs/entities/blue/blue.js +1 -205
- package/lib/cjs/entities/index.d.ts +11 -66
- package/lib/cjs/entities/index.js +3 -21
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -2
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +8 -3
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +13 -5
- package/lib/cjs/entities/vaultV1/vaultV1.js +16 -10
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +40 -19
- package/lib/cjs/entities/vaultV2/vaultV2.js +57 -26
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +4 -21
- package/lib/cjs/errors.d.ts +5 -47
- package/lib/cjs/errors.js +4 -46
- package/lib/cjs/fetch.d.ts +5 -17
- package/lib/cjs/fetch.js +3 -17
- package/lib/cjs/helpers/constant.d.ts +0 -2
- package/lib/cjs/helpers/constant.js +0 -2
- package/lib/cjs/helpers/index.d.ts +2 -3
- package/lib/cjs/helpers/index.js +1 -9
- package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +11 -5
- package/lib/cjs/helpers/slippage.d.ts +1 -103
- package/lib/cjs/helpers/slippage.js +0 -150
- package/lib/cjs/helpers/utilization.d.ts +12 -10
- package/lib/cjs/helpers/utilization.js +27 -12
- package/lib/cjs/helpers/validate.d.ts +1 -24
- package/lib/cjs/helpers/validate.js +2 -49
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +48 -15
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +48 -15
- package/lib/cjs/midnight/errors.d.ts +1 -1
- package/lib/cjs/midnight/errors.js +2 -1
- package/lib/cjs/types/action.d.ts +17 -65
- package/lib/cjs/types/action.js +11 -4
- package/lib/cjs/types/error.d.ts +50 -381
- package/lib/cjs/types/error.js +64 -395
- package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
- package/lib/cjs/types.d.ts +2 -18
- package/lib/cjs/utils.d.ts +10 -35
- package/lib/cjs/utils.js +4 -36
- package/lib/esm/abis.d.ts +7 -2844
- package/lib/esm/abis.js +7 -1950
- package/lib/esm/actions/blue/borrow.d.ts +3 -2
- package/lib/esm/actions/blue/borrow.js +3 -2
- package/lib/esm/actions/blue/common.js +1 -9
- package/lib/esm/actions/blue/refinance.d.ts +2 -2
- package/lib/esm/actions/blue/refinance.js +2 -2
- package/lib/esm/actions/blue/repay.d.ts +1 -1
- package/lib/esm/actions/blue/repay.js +1 -1
- package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +2 -2
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +2 -2
- package/lib/esm/actions/blue/supply.d.ts +2 -2
- package/lib/esm/actions/blue/supply.js +2 -2
- package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -2
- package/lib/esm/actions/blue/supplyCollateral.js +2 -2
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -2
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -2
- package/lib/esm/actions/blue/withdraw.d.ts +3 -3
- package/lib/esm/actions/blue/withdraw.js +3 -3
- package/lib/esm/actions/blue/withdrawCollateral.d.ts +2 -2
- package/lib/esm/actions/blue/withdrawCollateral.js +2 -2
- package/lib/esm/actions/bundles/common.d.ts +6 -2
- package/lib/esm/actions/bundles/common.js +32 -6
- package/lib/esm/actions/index.d.ts +0 -1
- package/lib/esm/actions/index.js +0 -1
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +6 -8
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +12 -17
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +5 -6
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +4 -5
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +4 -5
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +5 -5
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +6 -11
- package/lib/esm/actions/requirements/encode/index.d.ts +0 -1
- package/lib/esm/actions/requirements/encode/index.js +0 -1
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -6
- package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -6
- package/lib/esm/actions/requirements/index.d.ts +0 -1
- package/lib/esm/actions/requirements/index.js +0 -1
- package/lib/esm/actions/vaultV1/deposit.d.ts +1 -2
- package/lib/esm/actions/vaultV1/deposit.js +1 -2
- package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +7 -5
- package/lib/esm/actions/vaultV1/inKindRedeem.js +11 -7
- package/lib/esm/actions/vaultV2/deposit.d.ts +1 -2
- package/lib/esm/actions/vaultV2/deposit.js +1 -2
- package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +1 -1
- package/lib/esm/actions/vaultV2/forceWithdraw.js +3 -3
- package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +7 -5
- package/lib/esm/actions/vaultV2/inKindRedeem.js +11 -7
- package/lib/esm/augment/AccrualPosition.d.ts +1 -0
- package/lib/esm/augment.d.ts +0 -1
- package/lib/esm/augment.js +0 -1
- package/lib/esm/blue/abis.d.ts +5 -5
- package/lib/esm/blue/abis.js +5 -5
- package/lib/esm/blue/entities.d.ts +10 -8
- package/lib/esm/blue/entities.js +5 -3
- package/lib/esm/blue/errors.d.ts +4 -2
- package/lib/esm/blue/errors.js +4 -2
- package/lib/esm/blue/fetch.d.ts +5 -3
- package/lib/esm/blue/fetch.js +5 -3
- package/lib/esm/blue/types.d.ts +2 -4
- package/lib/esm/blue/utils.d.ts +6 -4
- package/lib/esm/blue/utils.js +6 -4
- package/lib/esm/client/morphoViemExtension.d.ts +1 -1
- package/lib/esm/client/morphoViemExtension.js +1 -1
- package/lib/esm/constants.d.ts +3 -37
- package/lib/esm/constants.js +3 -37
- package/lib/esm/entities/blue/blue.d.ts +30 -265
- package/lib/esm/entities/blue/blue.js +4 -208
- package/lib/esm/entities/index.d.ts +11 -66
- package/lib/esm/entities/index.js +5 -18
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -2
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +8 -3
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +13 -5
- package/lib/esm/entities/vaultV1/vaultV1.js +19 -13
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +40 -19
- package/lib/esm/entities/vaultV2/vaultV2.js +61 -30
- package/lib/esm/entities/vaultV2BlueReallocationData.js +2 -19
- package/lib/esm/errors.d.ts +5 -47
- package/lib/esm/errors.js +5 -47
- package/lib/esm/fetch.d.ts +5 -17
- package/lib/esm/fetch.js +5 -17
- package/lib/esm/helpers/constant.d.ts +0 -2
- package/lib/esm/helpers/constant.js +0 -2
- package/lib/esm/helpers/index.d.ts +2 -3
- package/lib/esm/helpers/index.js +2 -3
- package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +11 -5
- package/lib/esm/helpers/slippage.d.ts +1 -103
- package/lib/esm/helpers/slippage.js +1 -147
- package/lib/esm/helpers/utilization.d.ts +12 -10
- package/lib/esm/helpers/utilization.js +26 -11
- package/lib/esm/helpers/validate.d.ts +1 -24
- package/lib/esm/helpers/validate.js +2 -48
- package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/esm/helpers/validateRequirementSpender.js +1 -3
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +48 -15
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +48 -15
- package/lib/esm/midnight/errors.d.ts +1 -1
- package/lib/esm/midnight/errors.js +1 -1
- package/lib/esm/types/action.d.ts +17 -65
- package/lib/esm/types/action.js +12 -5
- package/lib/esm/types/error.d.ts +50 -381
- package/lib/esm/types/error.js +58 -377
- package/lib/esm/types/sharedLiquidity.d.ts +1 -117
- package/lib/esm/types.d.ts +2 -18
- package/lib/esm/utils.d.ts +10 -35
- package/lib/esm/utils.js +9 -34
- package/package.json +6 -17
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -88
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -152
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -53
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -74
- package/lib/cjs/actions/requirements/generalAdapter/index.d.ts +0 -3
- package/lib/cjs/actions/requirements/generalAdapter/index.js +0 -19
- package/lib/cjs/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
- package/lib/cjs/actions/signatures/getBlueAuthorizationAction.js +0 -48
- package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +0 -58
- package/lib/cjs/actions/signatures/getTokenRequirementActions.js +0 -119
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -45
- package/lib/cjs/actions/signatures/index.d.ts +0 -3
- package/lib/cjs/actions/signatures/index.js +0 -19
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +0 -8
- package/lib/cjs/bundler/actions.d.ts +0 -797
- package/lib/cjs/bundler/actions.js +0 -1371
- package/lib/cjs/bundler/index.d.ts +0 -2
- package/lib/cjs/bundler/index.js +0 -18
- package/lib/cjs/bundler/types.d.ts +0 -235
- package/lib/cjs/bundler/types.js +0 -2
- package/lib/cjs/entities/vaultV1ReallocationData.d.ts +0 -332
- package/lib/cjs/entities/vaultV1ReallocationData.js +0 -557
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -80
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -245
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -44
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -84
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -148
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -40
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -49
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -70
- package/lib/esm/actions/requirements/generalAdapter/index.d.ts +0 -3
- package/lib/esm/actions/requirements/generalAdapter/index.js +0 -3
- package/lib/esm/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
- package/lib/esm/actions/signatures/getBlueAuthorizationAction.js +0 -44
- package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +0 -58
- package/lib/esm/actions/signatures/getTokenRequirementActions.js +0 -115
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -50
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -41
- package/lib/esm/actions/signatures/index.d.ts +0 -3
- package/lib/esm/actions/signatures/index.js +0 -3
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -11
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -7
- package/lib/esm/bundler/actions.d.ts +0 -797
- package/lib/esm/bundler/actions.js +0 -1368
- package/lib/esm/bundler/index.d.ts +0 -2
- package/lib/esm/bundler/index.js +0 -2
- package/lib/esm/bundler/types.d.ts +0 -235
- package/lib/esm/bundler/types.js +0 -1
- package/lib/esm/entities/vaultV1ReallocationData.d.ts +0 -332
- package/lib/esm/entities/vaultV1ReallocationData.js +0 -559
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -80
- package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -241
|
@@ -1,41 +1,5 @@
|
|
|
1
|
-
import type { BigIntish,
|
|
1
|
+
import type { BigIntish, MarketParams } from "@morpho-org/blue-sdk";
|
|
2
2
|
import type { Address } from "viem";
|
|
3
|
-
/**
|
|
4
|
-
* Options controlling public allocator withdrawal discovery.
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
7
|
-
* {@link VaultV2BluePublicAllocatorOptions}.
|
|
8
|
-
*/
|
|
9
|
-
export interface PublicAllocatorOptions {
|
|
10
|
-
/** Whether public allocator reallocation discovery is enabled. */
|
|
11
|
-
readonly enabled?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Timestamp at which market interest and public allocator pending caps are evaluated.
|
|
14
|
-
* Defaults to the target market's last update timestamp.
|
|
15
|
-
*/
|
|
16
|
-
readonly timestamp?: BigIntish;
|
|
17
|
-
/**
|
|
18
|
-
* Vaults to consider for reallocation. They must have enabled the PublicAllocator.
|
|
19
|
-
* Arrays, readonly arrays, sets, and other iterables are accepted.
|
|
20
|
-
* Defaults to all vaults present in the reallocation data.
|
|
21
|
-
*/
|
|
22
|
-
readonly reallocatableVaults?: Iterable<Address>;
|
|
23
|
-
/**
|
|
24
|
-
* The maximum utilization each source market may reach when withdrawing
|
|
25
|
-
* shared liquidity, scaled by WAD.
|
|
26
|
-
*
|
|
27
|
-
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
28
|
-
* Use `VaultV2BluePublicAllocatorOptions.maxWithdrawalUtilization` with the Vault V2 planner.
|
|
29
|
-
*/
|
|
30
|
-
readonly maxWithdrawalUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
|
|
31
|
-
/**
|
|
32
|
-
* The default maximum utilization source markets may reach when withdrawing
|
|
33
|
-
* shared liquidity, scaled by WAD.
|
|
34
|
-
*
|
|
35
|
-
* @default 90% (900000000000000000n)
|
|
36
|
-
*/
|
|
37
|
-
readonly defaultMaxWithdrawalUtilization?: bigint;
|
|
38
|
-
}
|
|
39
3
|
/** Options controlling Vault V2 BluePublicAllocator reallocation discovery. */
|
|
40
4
|
export interface VaultV2BluePublicAllocatorOptions {
|
|
41
5
|
/** Whether Vault V2 public allocator discovery is enabled. */
|
|
@@ -64,48 +28,6 @@ export interface VaultV2BluePublicAllocatorOptions {
|
|
|
64
28
|
*/
|
|
65
29
|
readonly maxPenalty?: bigint;
|
|
66
30
|
}
|
|
67
|
-
/**
|
|
68
|
-
* A computed source-market withdrawal before it is grouped by vault.
|
|
69
|
-
*
|
|
70
|
-
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
71
|
-
* {@link VaultV2BlueReallocation}.
|
|
72
|
-
*/
|
|
73
|
-
export interface PublicReallocation {
|
|
74
|
-
/** Source market id to withdraw from. */
|
|
75
|
-
readonly id: MarketId;
|
|
76
|
-
/** Vault that can perform the public allocator reallocation. */
|
|
77
|
-
readonly vault: Address;
|
|
78
|
-
/** Assets to withdraw from the source market. */
|
|
79
|
-
readonly assets: bigint;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A single withdrawal from a source market within a vault reallocation.
|
|
83
|
-
*
|
|
84
|
-
* @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
|
|
85
|
-
* {@link VaultV2BlueReallocation}.
|
|
86
|
-
*/
|
|
87
|
-
export interface ReallocationWithdrawal {
|
|
88
|
-
/** Source market parameters to pass to the public allocator. */
|
|
89
|
-
readonly marketParams: MarketParams;
|
|
90
|
-
/** Asset amount to withdraw from the source market. */
|
|
91
|
-
readonly amount: bigint;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* A computed reallocation for a single vault.
|
|
95
|
-
*
|
|
96
|
-
* Maps 1:1 to a `PublicAllocator.reallocateTo()` call.
|
|
97
|
-
* Withdraws from source markets and supplies to the target market.
|
|
98
|
-
*
|
|
99
|
-
* @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
|
|
100
|
-
* {@link VaultV2BlueReallocation}.
|
|
101
|
-
*/
|
|
102
|
-
export interface VaultV1Reallocation {
|
|
103
|
-
readonly vault: Address;
|
|
104
|
-
/** Fee in native token (ETH) paid to the PublicAllocator for this vault. */
|
|
105
|
-
readonly fee: bigint;
|
|
106
|
-
/** Source markets to withdraw from before supplying to the target market. */
|
|
107
|
-
readonly withdrawals: readonly ReallocationWithdrawal[];
|
|
108
|
-
}
|
|
109
31
|
/** Source of a Vault V2 BluePublicAllocator reallocation. */
|
|
110
32
|
export type VaultV2BlueReallocationSource = {
|
|
111
33
|
/** Reallocate from a Morpho Blue market. */
|
|
@@ -137,41 +59,3 @@ export interface VaultV2BlueReallocation {
|
|
|
137
59
|
/** Vault-configured WAD-scaled penalty rate passed to the allocator. */
|
|
138
60
|
readonly penalty: bigint;
|
|
139
61
|
}
|
|
140
|
-
/**
|
|
141
|
-
* Deprecated name for a Vault V1 reallocation.
|
|
142
|
-
*
|
|
143
|
-
* @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
|
|
144
|
-
* {@link VaultV2BlueReallocation}.
|
|
145
|
-
*/
|
|
146
|
-
export type VaultReallocation = VaultV1Reallocation;
|
|
147
|
-
/**
|
|
148
|
-
* Options for computing vault reallocations via the public allocator.
|
|
149
|
-
*
|
|
150
|
-
* Extends {@link PublicAllocatorOptions} with supply-side utilization targets
|
|
151
|
-
* that determine when reallocation is triggered.
|
|
152
|
-
*
|
|
153
|
-
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
154
|
-
* {@link VaultV2BluePublicAllocatorOptions}.
|
|
155
|
-
*/
|
|
156
|
-
export interface ReallocationComputeOptions extends PublicAllocatorOptions {
|
|
157
|
-
/**
|
|
158
|
-
* Per-market target utilization above which the shared liquidity algorithm
|
|
159
|
-
* is triggered (scaled by WAD). Overrides `defaultSupplyTargetUtilization`
|
|
160
|
-
* for the specified market.
|
|
161
|
-
*
|
|
162
|
-
* @deprecated The supply-target trigger is fixed at 90%
|
|
163
|
-
* ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
|
|
164
|
-
* in the next major. Per-market overrides are still honored for now.
|
|
165
|
-
*/
|
|
166
|
-
readonly supplyTargetUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
|
|
167
|
-
/**
|
|
168
|
-
* The default target utilization above which the shared liquidity algorithm
|
|
169
|
-
* is triggered (scaled by WAD).
|
|
170
|
-
*
|
|
171
|
-
* @default 90% (900000000000000000n)
|
|
172
|
-
* @deprecated The supply-target trigger is fixed at 90%
|
|
173
|
-
* ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
|
|
174
|
-
* in the next major. Overrides are still honored for now.
|
|
175
|
-
*/
|
|
176
|
-
readonly defaultSupplyTargetUtilization?: bigint;
|
|
177
|
-
}
|
package/lib/cjs/types.d.ts
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams as BlueInputMarketParams,
|
|
2
|
-
|
|
3
|
-
InputMarketParams, IPermit2Allowance, Loadable, MarketId as BlueMarketId,
|
|
4
|
-
/** @deprecated Use `BlueMarketId` or the raw `/blue/types` subpath. */
|
|
5
|
-
MarketId, MaxBorrowOptions as BlueMaxBorrowOptions,
|
|
6
|
-
/** @deprecated Use `BlueMaxBorrowOptions` or the raw `/blue/types` subpath. */
|
|
7
|
-
MaxBorrowOptions, MaxPositionCapacities as BlueMaxPositionCapacities,
|
|
8
|
-
/** @deprecated Use `BlueMaxPositionCapacities` or the raw `/blue/types` subpath. */
|
|
9
|
-
MaxPositionCapacities, MaxWithdrawCollateralOptions as BlueMaxWithdrawCollateralOptions,
|
|
10
|
-
/** @deprecated Use `BlueMaxWithdrawCollateralOptions` or the raw `/blue/types` subpath. */
|
|
11
|
-
MaxWithdrawCollateralOptions, Pending, Permit2Allowance, } from "@morpho-org/blue-sdk";
|
|
12
|
-
export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs,
|
|
13
|
-
/** @deprecated Args for the deprecated getDaiPermitTypedData; scheduled for removal in the next major. */
|
|
14
|
-
DaiPermitArgs, DeploylessFetchParameters as BlueDeploylessFetchParameters,
|
|
15
|
-
/** @deprecated Use `BlueDeploylessFetchParameters` or the raw `/blue/types` subpath. */
|
|
16
|
-
DeploylessFetchParameters, FetchParameters as BlueFetchParameters,
|
|
17
|
-
/** @deprecated Use `BlueFetchParameters` or the raw `/blue/types` subpath. */
|
|
18
|
-
FetchParameters, InputAllocation as BlueInputAllocation, MetaMorphoCall as BlueMetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs as PermitTypedDataArgs, } from "@morpho-org/blue-sdk-viem";
|
|
1
|
+
export type { BigIntish, CollateralAllocation, Eip712Field, Erc20AllowanceRecipient, Failable, Fetchable, InputMarketParams as BlueInputMarketParams, Loadable, MarketId as BlueMarketId, MaxBorrowOptions as BlueMaxBorrowOptions, MaxPositionCapacities as BlueMaxPositionCapacities, MaxWithdrawCollateralOptions as BlueMaxWithdrawCollateralOptions, Pending, } from "@morpho-org/blue-sdk";
|
|
2
|
+
export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs, DeploylessFetchParameters as BlueDeploylessFetchParameters, FetchParameters as BlueFetchParameters, InputAllocation as BlueInputAllocation, MetaMorphoCall as BlueMetaMorphoCall, Permit2PermitArgs, Permit2TransferFromArgs, PermitArgs as PermitTypedDataArgs, } from "@morpho-org/blue-sdk-viem";
|
|
19
3
|
export type { BuildFixedRateOfferChainParams as MidnightBuildFixedRateOfferChainParams, DecodedEcrecoverRatifierData as MidnightDecodedEcrecoverRatifierData, DecodedSetterRatifierData as MidnightDecodedSetterRatifierData, DeploylessFetchParameters as MidnightDeploylessFetchParameters, EcrecoverRatificationTypedData as MidnightEcrecoverRatificationTypedData, EcrecoverRatifierDataDigestParams as MidnightEcrecoverRatifierDataDigestParams, EcrecoverRatifierDataParams as MidnightEcrecoverRatifierDataParams, EcrecoverRatifierDataVerificationParams as MidnightEcrecoverRatifierDataVerificationParams, EcrecoverRatifierRatifyParams as MidnightEcrecoverRatifierRatifyParams, EcrecoverRatifierRootDigestParams as MidnightEcrecoverRatifierRootDigestParams, EcrecoverRatifierTypedDataParams as MidnightEcrecoverRatifierTypedDataParams, EcrecoverSignatureInput as MidnightEcrecoverSignatureInput, FixedRateOfferChainLeg as MidnightFixedRateOfferChainLeg, GetRatifierInfoParams as MidnightGetRatifierInfoParams, MidnightCallParameters, MidnightFetchParams, RatifierInfo as MidnightRatifierInfo, SetterRatifierDataParams as MidnightSetterRatifierDataParams, SetterRatifierDataVerificationParams as MidnightSetterRatifierDataVerificationParams, VerifiedEcrecoverRatifierData as MidnightVerifiedEcrecoverRatifierData, } from "@morpho-org/midnight-sdk";
|
|
20
4
|
export type { ChainMetadata } from "@morpho-org/morpho-ts";
|
|
21
5
|
export * from "./types/index.js";
|
package/lib/cjs/utils.d.ts
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
export type { CapacityLimit, RoundingDirection } from "@morpho-org/blue-sdk";
|
|
2
|
-
export { AdaptiveCurveIrmLib as BlueAdaptiveCurveIrmLib,
|
|
3
|
-
/** @deprecated
|
|
4
|
-
|
|
5
|
-
/** @deprecated
|
|
6
|
-
MarketUtils, MathLib, SharesMath as BlueSharesMath,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
/** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
|
|
11
|
-
getAuthorizationTypedData,
|
|
12
|
-
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
13
|
-
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
14
|
-
export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
|
|
15
|
-
/** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
|
|
16
|
-
EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
|
|
17
|
-
/** @deprecated Use MidnightGroupUtils or the raw protocol subpath. */
|
|
18
|
-
GroupUtils, MarketUtils as MidnightMarketUtils, OfferChainUtils as MidnightOfferChainUtils, OfferUtils as MidnightOfferUtils,
|
|
19
|
-
/** @deprecated Use MidnightOfferUtils or the raw protocol subpath. */
|
|
20
|
-
OfferUtils, Payload as MidnightPayload,
|
|
21
|
-
/** @deprecated Use MidnightPayload or the raw protocol subpath. */
|
|
22
|
-
Payload, PositionUtils as MidnightPositionUtils, RatifierUtils as MidnightRatifierUtils,
|
|
23
|
-
/** @deprecated Use MidnightRatifierUtils or the raw protocol subpath. */
|
|
24
|
-
RatifierUtils, SetterRatifierUtils as MidnightSetterRatifierUtils,
|
|
25
|
-
/** @deprecated Use MidnightSetterRatifierUtils or the raw protocol subpath. */
|
|
26
|
-
SetterRatifierUtils, TakeAmountsLib as MidnightTakeAmountsLib,
|
|
27
|
-
/** @deprecated Use MidnightTakeAmountsLib or the raw protocol subpath. */
|
|
28
|
-
TakeAmountsLib, TickLib as MidnightTickLib,
|
|
29
|
-
/** @deprecated Use MidnightTickLib or the raw protocol subpath. */
|
|
30
|
-
TickLib, TreeUtils as MidnightTreeUtils,
|
|
31
|
-
/** @deprecated Use MidnightTreeUtils or the raw protocol subpath. */
|
|
32
|
-
TreeUtils, } from "@morpho-org/midnight-sdk";
|
|
33
|
-
export type { ArrayElementType, DeepPartial, DottedKeys, FieldType, PartialDottedKeys, WithId, WithIndex, } from "@morpho-org/morpho-ts";
|
|
2
|
+
export { AdaptiveCurveIrmLib as BlueAdaptiveCurveIrmLib, CapacityLimitReason,
|
|
3
|
+
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
4
|
+
defaultPreLiquidationParamsRegistry as blueDefaultPreLiquidationParamsRegistry,
|
|
5
|
+
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
6
|
+
getDefaultPreLiquidationParams as getBlueDefaultPreLiquidationParams, MarketUtils as BlueMarketUtils, MathLib, SharesMath as BlueSharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
7
|
+
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
8
|
+
export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils, MarketUtils as MidnightMarketUtils, OfferChainUtils as MidnightOfferChainUtils, OfferUtils as MidnightOfferUtils, Payload as MidnightPayload, PositionUtils as MidnightPositionUtils, RatifierUtils as MidnightRatifierUtils, SetterRatifierUtils as MidnightSetterRatifierUtils, TakeAmountsLib as MidnightTakeAmountsLib, TickLib as MidnightTickLib, TreeUtils as MidnightTreeUtils, } from "@morpho-org/midnight-sdk";
|
|
9
|
+
export type { ArrayElementType, DeepPartial, DottedKeys, FieldType, PartialDottedKeys, } from "@morpho-org/morpho-ts";
|
|
34
10
|
export { bigIntComparator, createGetValue, createHasValue, deepFreeze, entries, filterDefined, fromEntries, getLast, getLastDefined, getSubdomainBaseUrl, getValue, hasValue, isDefined, isNotNull, isNotUndefined, keys, mergeEntries, retryPromiseLinearBackoff, Time, transformValue, values, } from "@morpho-org/morpho-ts";
|
|
35
|
-
export { computeReallocations, computeVaultV1Reallocations, } from "./helpers/computeVaultV1Reallocations.js";
|
|
36
11
|
export { addTransactionMetadata } from "./helpers/metadata.js";
|
|
37
12
|
export { type PreviewVaultV2ForceWithdrawParams, previewVaultV2ForceWithdraw, type VaultV2ForceWithdrawPreview, } from "./helpers/previewVaultV2ForceWithdraw.js";
|
|
38
13
|
export { type PreviewVaultV2InKindRedeemParams, previewVaultV2InKindRedeem, type VaultV2InKindRedeemMarketPreview, } from "./helpers/previewVaultV2InKindRedeem.js";
|
|
39
|
-
export {
|
|
40
|
-
export { validateAccrualPosition, validateChainId, validateNativeAsset, validatePositionHealth, validatePositionHealthAfterWithdraw,
|
|
14
|
+
export { computeMinForceWithdrawSharePrice } from "./helpers/slippage.js";
|
|
15
|
+
export { validateAccrualPosition, validateChainId, validateNativeAsset, validatePositionHealth, validatePositionHealthAfterWithdraw, validateRepayAmount, validateRepayShares, validateSlippageTolerance, validateUserAddress, } from "./helpers/validate.js";
|
|
41
16
|
export { computeVaultV2ForceWithdrawFeeSharesMinted, computeVaultV2ForceWithdrawMinSharesBurnt, computeVaultV2ForceWithdrawPlan, computeVaultV2ForceWithdrawSharesBurnt, resolveVaultV2ForceWithdrawEligibility, type VaultV2ForceWithdrawEligibility, type VaultV2ForceWithdrawPlan, } from "./helpers/vaultV2ForceWithdrawPlan.js";
|
package/lib/cjs/utils.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.resolveVaultV2ForceWithdrawEligibility = exports.computeVaultV2ForceWithdrawSharesBurnt = exports.computeVaultV2ForceWithdrawPlan = exports.computeVaultV2ForceWithdrawMinSharesBurnt = exports.computeVaultV2ForceWithdrawFeeSharesMinted = exports.validateUserAddress = exports.validateSlippageTolerance = exports.validateRepayShares = exports.validateRepayAmount = exports.
|
|
3
|
+
exports.isNotNull = exports.isDefined = exports.hasValue = exports.getValue = exports.getSubdomainBaseUrl = exports.getLastDefined = exports.getLast = exports.fromEntries = exports.filterDefined = exports.entries = exports.deepFreeze = exports.createHasValue = exports.createGetValue = exports.bigIntComparator = exports.MidnightTreeUtils = exports.MidnightTickLib = exports.MidnightTakeAmountsLib = exports.MidnightSetterRatifierUtils = exports.MidnightRatifierUtils = exports.MidnightPositionUtils = exports.MidnightPayload = exports.MidnightOfferUtils = exports.MidnightOfferChainUtils = exports.MidnightMarketUtils = exports.MidnightGroupUtils = exports.eip712Digest = exports.MidnightEcrecoverRatifierUtils = exports.safeParseUnits = exports.safeParseNumber = exports.safeGetAddress = exports.restructure = exports.readContractRestructured = exports.optionalBoolean = exports.BlueMetaMorphoAction = exports.getPermitTypedData = exports.getPermit2TransferFromTypedData = exports.getPermit2PermitTypedData = exports.getBlueAuthorizationTypedData = exports.decodeBytes32String = exports.VaultV2Utils = exports.VaultV2BluePublicAllocatorConfigUtils = exports.VaultV2BlueMarketPublicAllocatorConfigUtils = exports.VaultUtils = exports.BlueSharesMath = exports.MathLib = exports.BlueMarketUtils = exports.getBlueDefaultPreLiquidationParams = exports.blueDefaultPreLiquidationParamsRegistry = exports.CapacityLimitReason = exports.BlueAdaptiveCurveIrmLib = void 0;
|
|
4
|
+
exports.resolveVaultV2ForceWithdrawEligibility = exports.computeVaultV2ForceWithdrawSharesBurnt = exports.computeVaultV2ForceWithdrawPlan = exports.computeVaultV2ForceWithdrawMinSharesBurnt = exports.computeVaultV2ForceWithdrawFeeSharesMinted = exports.validateUserAddress = exports.validateSlippageTolerance = exports.validateRepayShares = exports.validateRepayAmount = exports.validatePositionHealthAfterWithdraw = exports.validatePositionHealth = exports.validateNativeAsset = exports.validateChainId = exports.validateAccrualPosition = exports.computeMinForceWithdrawSharePrice = exports.previewVaultV2InKindRedeem = exports.previewVaultV2ForceWithdraw = exports.addTransactionMetadata = exports.values = exports.transformValue = exports.Time = exports.retryPromiseLinearBackoff = exports.mergeEntries = exports.keys = exports.isNotUndefined = void 0;
|
|
5
5
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
6
6
|
Object.defineProperty(exports, "BlueAdaptiveCurveIrmLib", { enumerable: true, get: function () { return blue_sdk_1.AdaptiveCurveIrmLib; } });
|
|
7
|
-
/** @deprecated Use BlueAdaptiveCurveIrmLib or the raw protocol subpath. */
|
|
8
|
-
Object.defineProperty(exports, "AdaptiveCurveIrmLib", { enumerable: true, get: function () { return blue_sdk_1.AdaptiveCurveIrmLib; } });
|
|
9
7
|
Object.defineProperty(exports, "CapacityLimitReason", { enumerable: true, get: function () { return blue_sdk_1.CapacityLimitReason; } });
|
|
8
|
+
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
10
9
|
Object.defineProperty(exports, "blueDefaultPreLiquidationParamsRegistry", { enumerable: true, get: function () { return blue_sdk_1.defaultPreLiquidationParamsRegistry; } });
|
|
10
|
+
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
11
11
|
Object.defineProperty(exports, "getBlueDefaultPreLiquidationParams", { enumerable: true, get: function () { return blue_sdk_1.getDefaultPreLiquidationParams; } });
|
|
12
12
|
Object.defineProperty(exports, "BlueMarketUtils", { enumerable: true, get: function () { return blue_sdk_1.MarketUtils; } });
|
|
13
|
-
/** @deprecated Use BlueMarketUtils or the raw protocol subpath. */
|
|
14
|
-
Object.defineProperty(exports, "MarketUtils", { enumerable: true, get: function () { return blue_sdk_1.MarketUtils; } });
|
|
15
13
|
Object.defineProperty(exports, "MathLib", { enumerable: true, get: function () { return blue_sdk_1.MathLib; } });
|
|
16
14
|
Object.defineProperty(exports, "BlueSharesMath", { enumerable: true, get: function () { return blue_sdk_1.SharesMath; } });
|
|
17
|
-
/** @deprecated Use BlueSharesMath or the raw protocol subpath. */
|
|
18
|
-
Object.defineProperty(exports, "SharesMath", { enumerable: true, get: function () { return blue_sdk_1.SharesMath; } });
|
|
19
15
|
Object.defineProperty(exports, "VaultUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultUtils; } });
|
|
20
16
|
Object.defineProperty(exports, "VaultV2BlueMarketPublicAllocatorConfigUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BlueMarketPublicAllocatorConfigUtils; } });
|
|
21
17
|
Object.defineProperty(exports, "VaultV2BluePublicAllocatorConfigUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BluePublicAllocatorConfigUtils; } });
|
|
@@ -23,10 +19,6 @@ Object.defineProperty(exports, "VaultV2Utils", { enumerable: true, get: function
|
|
|
23
19
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
24
20
|
Object.defineProperty(exports, "decodeBytes32String", { enumerable: true, get: function () { return blue_sdk_viem_1.decodeBytes32String; } });
|
|
25
21
|
Object.defineProperty(exports, "getBlueAuthorizationTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getAuthorizationTypedData; } });
|
|
26
|
-
/** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
|
|
27
|
-
Object.defineProperty(exports, "getAuthorizationTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getAuthorizationTypedData; } });
|
|
28
|
-
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
29
|
-
Object.defineProperty(exports, "getDaiPermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getDaiPermitTypedData; } });
|
|
30
22
|
Object.defineProperty(exports, "getPermit2PermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermit2PermitTypedData; } });
|
|
31
23
|
Object.defineProperty(exports, "getPermit2TransferFromTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermit2TransferFromTypedData; } });
|
|
32
24
|
Object.defineProperty(exports, "getPermitTypedData", { enumerable: true, get: function () { return blue_sdk_viem_1.getPermitTypedData; } });
|
|
@@ -39,36 +31,18 @@ Object.defineProperty(exports, "safeParseNumber", { enumerable: true, get: funct
|
|
|
39
31
|
Object.defineProperty(exports, "safeParseUnits", { enumerable: true, get: function () { return blue_sdk_viem_1.safeParseUnits; } });
|
|
40
32
|
var midnight_sdk_1 = require("@morpho-org/midnight-sdk");
|
|
41
33
|
Object.defineProperty(exports, "MidnightEcrecoverRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.EcrecoverRatifierUtils; } });
|
|
42
|
-
/** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
|
|
43
|
-
Object.defineProperty(exports, "EcrecoverRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.EcrecoverRatifierUtils; } });
|
|
44
34
|
Object.defineProperty(exports, "eip712Digest", { enumerable: true, get: function () { return midnight_sdk_1.eip712Digest; } });
|
|
45
35
|
Object.defineProperty(exports, "MidnightGroupUtils", { enumerable: true, get: function () { return midnight_sdk_1.GroupUtils; } });
|
|
46
|
-
/** @deprecated Use MidnightGroupUtils or the raw protocol subpath. */
|
|
47
|
-
Object.defineProperty(exports, "GroupUtils", { enumerable: true, get: function () { return midnight_sdk_1.GroupUtils; } });
|
|
48
36
|
Object.defineProperty(exports, "MidnightMarketUtils", { enumerable: true, get: function () { return midnight_sdk_1.MarketUtils; } });
|
|
49
37
|
Object.defineProperty(exports, "MidnightOfferChainUtils", { enumerable: true, get: function () { return midnight_sdk_1.OfferChainUtils; } });
|
|
50
38
|
Object.defineProperty(exports, "MidnightOfferUtils", { enumerable: true, get: function () { return midnight_sdk_1.OfferUtils; } });
|
|
51
|
-
/** @deprecated Use MidnightOfferUtils or the raw protocol subpath. */
|
|
52
|
-
Object.defineProperty(exports, "OfferUtils", { enumerable: true, get: function () { return midnight_sdk_1.OfferUtils; } });
|
|
53
39
|
Object.defineProperty(exports, "MidnightPayload", { enumerable: true, get: function () { return midnight_sdk_1.Payload; } });
|
|
54
|
-
/** @deprecated Use MidnightPayload or the raw protocol subpath. */
|
|
55
|
-
Object.defineProperty(exports, "Payload", { enumerable: true, get: function () { return midnight_sdk_1.Payload; } });
|
|
56
40
|
Object.defineProperty(exports, "MidnightPositionUtils", { enumerable: true, get: function () { return midnight_sdk_1.PositionUtils; } });
|
|
57
41
|
Object.defineProperty(exports, "MidnightRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.RatifierUtils; } });
|
|
58
|
-
/** @deprecated Use MidnightRatifierUtils or the raw protocol subpath. */
|
|
59
|
-
Object.defineProperty(exports, "RatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.RatifierUtils; } });
|
|
60
42
|
Object.defineProperty(exports, "MidnightSetterRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.SetterRatifierUtils; } });
|
|
61
|
-
/** @deprecated Use MidnightSetterRatifierUtils or the raw protocol subpath. */
|
|
62
|
-
Object.defineProperty(exports, "SetterRatifierUtils", { enumerable: true, get: function () { return midnight_sdk_1.SetterRatifierUtils; } });
|
|
63
43
|
Object.defineProperty(exports, "MidnightTakeAmountsLib", { enumerable: true, get: function () { return midnight_sdk_1.TakeAmountsLib; } });
|
|
64
|
-
/** @deprecated Use MidnightTakeAmountsLib or the raw protocol subpath. */
|
|
65
|
-
Object.defineProperty(exports, "TakeAmountsLib", { enumerable: true, get: function () { return midnight_sdk_1.TakeAmountsLib; } });
|
|
66
44
|
Object.defineProperty(exports, "MidnightTickLib", { enumerable: true, get: function () { return midnight_sdk_1.TickLib; } });
|
|
67
|
-
/** @deprecated Use MidnightTickLib or the raw protocol subpath. */
|
|
68
|
-
Object.defineProperty(exports, "TickLib", { enumerable: true, get: function () { return midnight_sdk_1.TickLib; } });
|
|
69
45
|
Object.defineProperty(exports, "MidnightTreeUtils", { enumerable: true, get: function () { return midnight_sdk_1.TreeUtils; } });
|
|
70
|
-
/** @deprecated Use MidnightTreeUtils or the raw protocol subpath. */
|
|
71
|
-
Object.defineProperty(exports, "TreeUtils", { enumerable: true, get: function () { return midnight_sdk_1.TreeUtils; } });
|
|
72
46
|
var morpho_ts_1 = require("@morpho-org/morpho-ts");
|
|
73
47
|
Object.defineProperty(exports, "bigIntComparator", { enumerable: true, get: function () { return morpho_ts_1.bigIntComparator; } });
|
|
74
48
|
Object.defineProperty(exports, "createGetValue", { enumerable: true, get: function () { return morpho_ts_1.createGetValue; } });
|
|
@@ -91,9 +65,6 @@ Object.defineProperty(exports, "retryPromiseLinearBackoff", { enumerable: true,
|
|
|
91
65
|
Object.defineProperty(exports, "Time", { enumerable: true, get: function () { return morpho_ts_1.Time; } });
|
|
92
66
|
Object.defineProperty(exports, "transformValue", { enumerable: true, get: function () { return morpho_ts_1.transformValue; } });
|
|
93
67
|
Object.defineProperty(exports, "values", { enumerable: true, get: function () { return morpho_ts_1.values; } });
|
|
94
|
-
var computeVaultV1Reallocations_js_1 = require("./helpers/computeVaultV1Reallocations.js");
|
|
95
|
-
Object.defineProperty(exports, "computeReallocations", { enumerable: true, get: function () { return computeVaultV1Reallocations_js_1.computeReallocations; } });
|
|
96
|
-
Object.defineProperty(exports, "computeVaultV1Reallocations", { enumerable: true, get: function () { return computeVaultV1Reallocations_js_1.computeVaultV1Reallocations; } });
|
|
97
68
|
var metadata_js_1 = require("./helpers/metadata.js");
|
|
98
69
|
Object.defineProperty(exports, "addTransactionMetadata", { enumerable: true, get: function () { return metadata_js_1.addTransactionMetadata; } });
|
|
99
70
|
var previewVaultV2ForceWithdraw_js_1 = require("./helpers/previewVaultV2ForceWithdraw.js");
|
|
@@ -101,8 +72,6 @@ Object.defineProperty(exports, "previewVaultV2ForceWithdraw", { enumerable: true
|
|
|
101
72
|
var previewVaultV2InKindRedeem_js_1 = require("./helpers/previewVaultV2InKindRedeem.js");
|
|
102
73
|
Object.defineProperty(exports, "previewVaultV2InKindRedeem", { enumerable: true, get: function () { return previewVaultV2InKindRedeem_js_1.previewVaultV2InKindRedeem; } });
|
|
103
74
|
var slippage_js_1 = require("./helpers/slippage.js");
|
|
104
|
-
Object.defineProperty(exports, "computeMaxRepaySharePrice", { enumerable: true, get: function () { return slippage_js_1.computeMaxRepaySharePrice; } });
|
|
105
|
-
Object.defineProperty(exports, "computeMinBorrowSharePrice", { enumerable: true, get: function () { return slippage_js_1.computeMinBorrowSharePrice; } });
|
|
106
75
|
Object.defineProperty(exports, "computeMinForceWithdrawSharePrice", { enumerable: true, get: function () { return slippage_js_1.computeMinForceWithdrawSharePrice; } });
|
|
107
76
|
var validate_js_1 = require("./helpers/validate.js");
|
|
108
77
|
Object.defineProperty(exports, "validateAccrualPosition", { enumerable: true, get: function () { return validate_js_1.validateAccrualPosition; } });
|
|
@@ -110,7 +79,6 @@ Object.defineProperty(exports, "validateChainId", { enumerable: true, get: funct
|
|
|
110
79
|
Object.defineProperty(exports, "validateNativeAsset", { enumerable: true, get: function () { return validate_js_1.validateNativeAsset; } });
|
|
111
80
|
Object.defineProperty(exports, "validatePositionHealth", { enumerable: true, get: function () { return validate_js_1.validatePositionHealth; } });
|
|
112
81
|
Object.defineProperty(exports, "validatePositionHealthAfterWithdraw", { enumerable: true, get: function () { return validate_js_1.validatePositionHealthAfterWithdraw; } });
|
|
113
|
-
Object.defineProperty(exports, "validateReallocations", { enumerable: true, get: function () { return validate_js_1.validateReallocations; } });
|
|
114
82
|
Object.defineProperty(exports, "validateRepayAmount", { enumerable: true, get: function () { return validate_js_1.validateRepayAmount; } });
|
|
115
83
|
Object.defineProperty(exports, "validateRepayShares", { enumerable: true, get: function () { return validate_js_1.validateRepayShares; } });
|
|
116
84
|
Object.defineProperty(exports, "validateSlippageTolerance", { enumerable: true, get: function () { return validate_js_1.validateSlippageTolerance; } });
|