@morpho-org/morpho-sdk 8.3.0 → 9.1.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION-v8-to-v9.md +54 -0
- package/README.md +13 -7
- package/lib/cjs/abis.d.ts +1 -1
- package/lib/cjs/abis.js +5 -1
- package/lib/cjs/actions/bundles/common.d.ts +4 -7
- package/lib/cjs/actions/bundles/common.js +8 -14
- package/lib/cjs/actions/bundles/resolveBundlesTokenRequirements.d.ts +1 -5
- package/lib/cjs/actions/bundles/resolveBundlesTokenRequirements.js +1 -8
- package/lib/cjs/actions/midnight/authorization.d.ts +3 -1
- package/lib/cjs/actions/midnight/authorization.js +11 -1
- package/lib/cjs/actions/midnight/cancelAndMake.d.ts +2 -0
- package/lib/cjs/actions/midnight/cancelAndMake.js +10 -2
- package/lib/cjs/actions/midnight/redeem.d.ts +3 -1
- package/lib/cjs/actions/midnight/redeem.js +9 -3
- package/lib/cjs/actions/midnight/repayWithdrawCollateral.d.ts +1 -0
- package/lib/cjs/actions/midnight/repayWithdrawCollateral.js +7 -3
- package/lib/cjs/actions/midnight/supplyCollateral.d.ts +4 -1
- package/lib/cjs/actions/midnight/supplyCollateral.js +10 -3
- package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.d.ts +3 -1
- package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +9 -3
- package/lib/cjs/actions/midnight/takeBorrow.d.ts +3 -1
- package/lib/cjs/actions/midnight/takeBorrow.js +9 -3
- package/lib/cjs/actions/midnight/takeLend.d.ts +1 -0
- package/lib/cjs/actions/midnight/takeLend.js +7 -2
- package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.d.ts +1 -0
- package/lib/cjs/actions/midnight/takeRepayWithdrawCollateral.js +8 -2
- package/lib/cjs/actions/midnight/takeWithdraw.d.ts +3 -1
- package/lib/cjs/actions/midnight/takeWithdraw.js +10 -3
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +1 -5
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +5 -7
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +7 -11
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +8 -15
- package/lib/cjs/actions/requirements/midnight/getMidnightApprovalRequirements.d.ts +5 -10
- package/lib/cjs/actions/requirements/midnight/getMidnightApprovalRequirements.js +11 -8
- package/lib/cjs/actions/requirements/midnight/getMidnightAuthorizationRequirement.d.ts +2 -0
- package/lib/cjs/actions/requirements/midnight/getMidnightAuthorizationRequirement.js +5 -0
- package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +1 -1
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +1 -1
- package/lib/cjs/actions/vaultV1/withdraw.d.ts +4 -4
- package/lib/cjs/actions/vaultV1/withdraw.js +4 -4
- package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +1 -1
- package/lib/cjs/actions/vaultV2/forceWithdraw.js +1 -1
- package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +1 -1
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +1 -1
- package/lib/cjs/actions/vaultV2/withdraw.d.ts +4 -4
- package/lib/cjs/actions/vaultV2/withdraw.js +4 -4
- package/lib/cjs/blue/abis.d.ts +1 -1
- package/lib/cjs/blue/abis.js +5 -1
- package/lib/cjs/blue/entities.d.ts +4 -4
- package/lib/cjs/blue/entities.js +3 -1
- package/lib/cjs/blue/errors.d.ts +2 -2
- package/lib/cjs/blue/errors.js +5 -1
- package/lib/cjs/blue/fetch.d.ts +2 -2
- package/lib/cjs/blue/fetch.js +3 -1
- package/lib/cjs/blue/utils.d.ts +1 -1
- package/lib/cjs/blue/utils.js +2 -1
- package/lib/cjs/entities/blue/blue.d.ts +2 -12
- package/lib/cjs/entities/blue/blue.js +0 -4
- package/lib/cjs/entities/index.d.ts +4 -4
- package/lib/cjs/entities/index.js +3 -1
- package/lib/cjs/entities/midnight/midnight.d.ts +63 -18
- package/lib/cjs/entities/midnight/midnight.js +138 -53
- package/lib/cjs/entities/midnight/types.d.ts +3 -10
- package/lib/cjs/entities/requirements/getBundlesTokenRequirements.d.ts +0 -4
- package/lib/cjs/entities/requirements/getBundlesTokenRequirements.js +0 -7
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -14
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +8 -20
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +40 -37
- package/lib/cjs/entities/vaultV1/vaultV1.js +5 -34
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +69 -43
- package/lib/cjs/entities/vaultV2/vaultV2.js +41 -35
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +5 -3
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +9 -3
- package/lib/cjs/errors.d.ts +4 -4
- package/lib/cjs/errors.js +10 -5
- package/lib/cjs/fetch.d.ts +2 -2
- package/lib/cjs/fetch.js +3 -1
- package/lib/cjs/helpers/encodeMidnightCalldata.d.ts +48 -0
- package/lib/cjs/helpers/encodeMidnightCalldata.js +74 -0
- package/lib/cjs/helpers/slippage.d.ts +9 -25
- package/lib/cjs/helpers/slippage.js +10 -27
- package/lib/cjs/helpers/validate.d.ts +1 -0
- package/lib/cjs/helpers/validate.js +5 -0
- package/lib/cjs/helpers/validateMidnightAccount.d.ts +34 -0
- package/lib/cjs/helpers/validateMidnightAccount.js +47 -0
- package/lib/cjs/helpers/validateMidnightAuthorizationTarget.d.ts +1 -0
- package/lib/cjs/helpers/validateMidnightAuthorizationTarget.js +4 -0
- package/lib/cjs/helpers/validateMidnightMarket.d.ts +2 -0
- package/lib/cjs/helpers/validateMidnightMarket.js +5 -0
- package/lib/cjs/helpers/validateMidnightPublication.d.ts +11 -0
- package/lib/cjs/helpers/validateMidnightPublication.js +12 -1
- package/lib/cjs/helpers/validateMidnightReceiver.d.ts +1 -0
- package/lib/cjs/helpers/validateMidnightReceiver.js +8 -0
- package/lib/cjs/helpers/validateTakeableOffers.d.ts +2 -1
- package/lib/cjs/helpers/validateTakeableOffers.js +4 -3
- package/lib/cjs/midnight/errors.d.ts +2 -1
- package/lib/cjs/midnight/errors.js +5 -4
- package/lib/cjs/types/action.d.ts +3 -1
- package/lib/cjs/types/error.d.ts +60 -6
- package/lib/cjs/types/error.js +143 -11
- package/lib/cjs/utils.d.ts +2 -2
- package/lib/cjs/utils.js +4 -2
- package/lib/esm/abis.d.ts +1 -1
- package/lib/esm/abis.js +1 -1
- package/lib/esm/actions/bundles/common.d.ts +4 -7
- package/lib/esm/actions/bundles/common.js +8 -14
- package/lib/esm/actions/bundles/resolveBundlesTokenRequirements.d.ts +1 -5
- package/lib/esm/actions/bundles/resolveBundlesTokenRequirements.js +2 -9
- package/lib/esm/actions/midnight/authorization.d.ts +3 -1
- package/lib/esm/actions/midnight/authorization.js +12 -2
- package/lib/esm/actions/midnight/cancelAndMake.d.ts +2 -0
- package/lib/esm/actions/midnight/cancelAndMake.js +11 -3
- package/lib/esm/actions/midnight/redeem.d.ts +3 -1
- package/lib/esm/actions/midnight/redeem.js +10 -4
- package/lib/esm/actions/midnight/repayWithdrawCollateral.d.ts +1 -0
- package/lib/esm/actions/midnight/repayWithdrawCollateral.js +8 -4
- package/lib/esm/actions/midnight/supplyCollateral.d.ts +4 -1
- package/lib/esm/actions/midnight/supplyCollateral.js +11 -4
- package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.d.ts +3 -1
- package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +10 -4
- package/lib/esm/actions/midnight/takeBorrow.d.ts +3 -1
- package/lib/esm/actions/midnight/takeBorrow.js +10 -4
- package/lib/esm/actions/midnight/takeLend.d.ts +1 -0
- package/lib/esm/actions/midnight/takeLend.js +8 -3
- package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.d.ts +1 -0
- package/lib/esm/actions/midnight/takeRepayWithdrawCollateral.js +9 -3
- package/lib/esm/actions/midnight/takeWithdraw.d.ts +3 -1
- package/lib/esm/actions/midnight/takeWithdraw.js +11 -4
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +1 -5
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +6 -8
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +7 -11
- package/lib/esm/actions/requirements/getRequirementsApproval.js +9 -16
- package/lib/esm/actions/requirements/midnight/getMidnightApprovalRequirements.d.ts +5 -10
- package/lib/esm/actions/requirements/midnight/getMidnightApprovalRequirements.js +12 -9
- package/lib/esm/actions/requirements/midnight/getMidnightAuthorizationRequirement.d.ts +2 -0
- package/lib/esm/actions/requirements/midnight/getMidnightAuthorizationRequirement.js +5 -0
- package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +1 -1
- package/lib/esm/actions/vaultV1/inKindRedeem.js +1 -1
- package/lib/esm/actions/vaultV1/withdraw.d.ts +4 -4
- package/lib/esm/actions/vaultV1/withdraw.js +4 -4
- package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +1 -1
- package/lib/esm/actions/vaultV2/forceWithdraw.js +1 -1
- package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +1 -1
- package/lib/esm/actions/vaultV2/inKindRedeem.js +1 -1
- package/lib/esm/actions/vaultV2/withdraw.d.ts +4 -4
- package/lib/esm/actions/vaultV2/withdraw.js +4 -4
- package/lib/esm/blue/abis.d.ts +1 -1
- package/lib/esm/blue/abis.js +1 -1
- package/lib/esm/blue/entities.d.ts +4 -4
- package/lib/esm/blue/entities.js +2 -2
- package/lib/esm/blue/errors.d.ts +2 -2
- package/lib/esm/blue/errors.js +2 -2
- package/lib/esm/blue/fetch.d.ts +2 -2
- package/lib/esm/blue/fetch.js +2 -2
- package/lib/esm/blue/utils.d.ts +1 -1
- package/lib/esm/blue/utils.js +1 -1
- package/lib/esm/entities/blue/blue.d.ts +2 -12
- package/lib/esm/entities/blue/blue.js +0 -4
- package/lib/esm/entities/index.d.ts +4 -4
- package/lib/esm/entities/index.js +2 -2
- package/lib/esm/entities/midnight/midnight.d.ts +63 -18
- package/lib/esm/entities/midnight/midnight.js +139 -54
- package/lib/esm/entities/midnight/types.d.ts +3 -10
- package/lib/esm/entities/requirements/getBundlesTokenRequirements.d.ts +0 -4
- package/lib/esm/entities/requirements/getBundlesTokenRequirements.js +1 -8
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.d.ts +5 -14
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +9 -21
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +40 -37
- package/lib/esm/entities/vaultV1/vaultV1.js +6 -35
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +69 -43
- package/lib/esm/entities/vaultV2/vaultV2.js +41 -35
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +5 -3
- package/lib/esm/entities/vaultV2BlueReallocationData.js +9 -3
- package/lib/esm/errors.d.ts +4 -4
- package/lib/esm/errors.js +4 -4
- package/lib/esm/fetch.d.ts +2 -2
- package/lib/esm/fetch.js +2 -2
- package/lib/esm/helpers/encodeMidnightCalldata.d.ts +48 -0
- package/lib/esm/helpers/encodeMidnightCalldata.js +69 -0
- package/lib/esm/helpers/slippage.d.ts +9 -25
- package/lib/esm/helpers/slippage.js +9 -25
- package/lib/esm/helpers/validate.d.ts +1 -0
- package/lib/esm/helpers/validate.js +5 -0
- package/lib/esm/helpers/validateMidnightAccount.d.ts +34 -0
- package/lib/esm/helpers/validateMidnightAccount.js +43 -0
- package/lib/esm/helpers/validateMidnightAuthorizationTarget.d.ts +1 -0
- package/lib/esm/helpers/validateMidnightAuthorizationTarget.js +4 -0
- package/lib/esm/helpers/validateMidnightMarket.d.ts +2 -0
- package/lib/esm/helpers/validateMidnightMarket.js +5 -0
- package/lib/esm/helpers/validateMidnightPublication.d.ts +11 -0
- package/lib/esm/helpers/validateMidnightPublication.js +10 -0
- package/lib/esm/helpers/validateMidnightReceiver.d.ts +1 -0
- package/lib/esm/helpers/validateMidnightReceiver.js +8 -0
- package/lib/esm/helpers/validateTakeableOffers.d.ts +2 -1
- package/lib/esm/helpers/validateTakeableOffers.js +4 -3
- package/lib/esm/midnight/errors.d.ts +2 -1
- package/lib/esm/midnight/errors.js +2 -1
- package/lib/esm/types/action.d.ts +3 -1
- package/lib/esm/types/error.d.ts +60 -6
- package/lib/esm/types/error.js +138 -7
- package/lib/esm/utils.d.ts +2 -2
- package/lib/esm/utils.js +2 -2
- package/package.json +8 -7
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { erc20Abi
|
|
1
|
+
import { erc20Abi } from "viem";
|
|
2
2
|
import { readContract } from "viem/actions";
|
|
3
3
|
import { validateChainId, validateRequirementSpender, } from "../../../helpers/index.js";
|
|
4
4
|
import { validateUint256Field } from "../../../helpers/validate.js";
|
|
5
|
+
import { validateMidnightAccount, validateMidnightAddress, } from "../../../helpers/validateMidnightAccount.js";
|
|
5
6
|
import { getRequirementsApproval } from "../getRequirementsApproval.js";
|
|
6
7
|
import { validateClientChainId } from "../validateClientChainId.js";
|
|
7
8
|
/**
|
|
@@ -14,7 +15,7 @@ import { validateClientChainId } from "../validateClientChainId.js";
|
|
|
14
15
|
* The returned approval sets an unlimited allowance (`maxUint256`, capped per
|
|
15
16
|
* token by `MAX_TOKEN_APPROVALS`) whenever the current allowance is below
|
|
16
17
|
* `amount`, because all of an account's Midnight offers and bundle calls share
|
|
17
|
-
* one allowance per token.
|
|
18
|
+
* one allowance per token.
|
|
18
19
|
*
|
|
19
20
|
* @param params.viemClient - Viem client used to read ERC20 allowance.
|
|
20
21
|
* @param params.chainId - Chain id expected by the viem client.
|
|
@@ -22,14 +23,14 @@ import { validateClientChainId } from "../validateClientChainId.js";
|
|
|
22
23
|
* @param params.owner - Token owner.
|
|
23
24
|
* @param params.spender - Midnight spender that will pull tokens.
|
|
24
25
|
* @param params.amount - Minimum allowance the spender needs.
|
|
25
|
-
* @param params.approvalAmount - Allowance to approve when one is needed; defaults to `maxUint256` and must be at least `amount`.
|
|
26
26
|
* @returns Approval transactions required for `spender` to pull `amount`.
|
|
27
27
|
* @throws {ChainIdMismatchError} when the client declares, or its RPC reports via `eth_chainId`,
|
|
28
28
|
* another chain than `params.chainId`.
|
|
29
|
+
* @throws {MidnightCalldataEncodingError} when `owner`, `token` or `spender` is not a well-formed address.
|
|
30
|
+
* @throws {MidnightZeroAccountError} when `owner` is the zero address.
|
|
29
31
|
* @throws {viem.BaseError} when the `eth_chainId` request or allowance read fails.
|
|
30
|
-
* @throws {NegativeInputError} when `amount`
|
|
31
|
-
* @throws {InputExceedsMaxError} when `amount`
|
|
32
|
-
* @throws {ApprovalAmountLessThanSpendAmountError} when `approvalAmount < amount`.
|
|
32
|
+
* @throws {NegativeInputError} when `amount` is negative.
|
|
33
|
+
* @throws {InputExceedsMaxError} when `amount` exceeds `maxUint256`.
|
|
33
34
|
* @throws {UnsupportedErc20ApprovalSpenderError} when `spender` is not the chain's Midnight or MidnightBundlesV2 deployment.
|
|
34
35
|
* @example
|
|
35
36
|
* ```ts
|
|
@@ -55,10 +56,13 @@ import { validateClientChainId } from "../validateClientChainId.js";
|
|
|
55
56
|
* ```
|
|
56
57
|
*/
|
|
57
58
|
export const getMidnightApprovalRequirements = async (params) => {
|
|
59
|
+
// Reject the zero account before reading state for it.
|
|
60
|
+
validateMidnightAccount("owner", params.owner);
|
|
61
|
+
// Reject malformed addresses typed before the spender comparison and the allowance read.
|
|
62
|
+
validateMidnightAddress("token", params.token);
|
|
63
|
+
validateMidnightAddress("spender", params.spender);
|
|
58
64
|
validateChainId(params.viemClient.chain?.id, params.chainId);
|
|
59
65
|
validateUint256Field("amount", params.amount);
|
|
60
|
-
if (params.approvalAmount !== undefined)
|
|
61
|
-
validateUint256Field("approvalAmount", params.approvalAmount);
|
|
62
66
|
// Validate the target even when no approval transaction needs to be encoded.
|
|
63
67
|
validateRequirementSpender({
|
|
64
68
|
chainId: params.chainId,
|
|
@@ -80,7 +84,6 @@ export const getMidnightApprovalRequirements = async (params) => {
|
|
|
80
84
|
args: {
|
|
81
85
|
spender: params.spender,
|
|
82
86
|
spendAmount: params.amount,
|
|
83
|
-
approvalAmount: params.approvalAmount ?? maxUint256,
|
|
84
87
|
},
|
|
85
88
|
allowances: allowance,
|
|
86
89
|
});
|
|
@@ -23,6 +23,8 @@ export interface GetMidnightAuthorizationRequirementParams {
|
|
|
23
23
|
* @returns Authorization transaction, or `null` when already authorized.
|
|
24
24
|
* @throws {ChainIdMismatchError} when the client declares, or its RPC reports via `eth_chainId`,
|
|
25
25
|
* another chain than `params.chainId`.
|
|
26
|
+
* @throws {MidnightCalldataEncodingError} when `owner` or `authorized` is not a well-formed address.
|
|
27
|
+
* @throws {MidnightZeroAccountError} when `owner` is the zero address.
|
|
26
28
|
* @throws {viem.BaseError} when the `eth_chainId` request or authorization read fails.
|
|
27
29
|
* @throws {UnsupportedMidnightAuthorizationTargetError} when `authorized` is not MidnightBundlesV2.
|
|
28
30
|
* @example
|
|
@@ -3,6 +3,7 @@ import { deepFreeze, getChainAddress } from "@morpho-org/morpho-ts";
|
|
|
3
3
|
import { encodeFunctionData } from "viem";
|
|
4
4
|
import { readContract } from "viem/actions";
|
|
5
5
|
import { validateChainId } from "../../../helpers/index.js";
|
|
6
|
+
import { validateMidnightAccount } from "../../../helpers/validateMidnightAccount.js";
|
|
6
7
|
import { validateMidnightAuthorizationTarget } from "../../../helpers/validateMidnightAuthorizationTarget.js";
|
|
7
8
|
import { validateClientChainId } from "../validateClientChainId.js";
|
|
8
9
|
/**
|
|
@@ -21,6 +22,8 @@ import { validateClientChainId } from "../validateClientChainId.js";
|
|
|
21
22
|
* @returns Authorization transaction, or `null` when already authorized.
|
|
22
23
|
* @throws {ChainIdMismatchError} when the client declares, or its RPC reports via `eth_chainId`,
|
|
23
24
|
* another chain than `params.chainId`.
|
|
25
|
+
* @throws {MidnightCalldataEncodingError} when `owner` or `authorized` is not a well-formed address.
|
|
26
|
+
* @throws {MidnightZeroAccountError} when `owner` is the zero address.
|
|
24
27
|
* @throws {viem.BaseError} when the `eth_chainId` request or authorization read fails.
|
|
25
28
|
* @throws {UnsupportedMidnightAuthorizationTargetError} when `authorized` is not MidnightBundlesV2.
|
|
26
29
|
* @example
|
|
@@ -46,6 +49,8 @@ import { validateClientChainId } from "../validateClientChainId.js";
|
|
|
46
49
|
* ```
|
|
47
50
|
*/
|
|
48
51
|
export const getMidnightAuthorizationRequirement = async (params) => {
|
|
52
|
+
// Reject the zero account before reading state for it.
|
|
53
|
+
validateMidnightAccount("owner", params.owner);
|
|
49
54
|
validateChainId(params.viemClient.chain?.id, params.chainId);
|
|
50
55
|
// Reject unknown operators before reading authorization state.
|
|
51
56
|
validateMidnightAuthorizationTarget({
|
|
@@ -31,7 +31,7 @@ export interface VaultV1InKindRedeemParams {
|
|
|
31
31
|
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
32
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
|
-
* @param params.args.requirementSignature - Optional
|
|
34
|
+
* @param params.args.requirementSignature - Optional unlimited 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.
|
|
@@ -20,7 +20,7 @@ import { getBundlesSharesPermit } from "../bundles/common.js";
|
|
|
20
20
|
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
21
21
|
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
22
22
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
23
|
-
* @param params.args.requirementSignature - Optional
|
|
23
|
+
* @param params.args.requirementSignature - Optional unlimited Vault V1 shares permit.
|
|
24
24
|
* @param params.metadata - Optional analytics metadata.
|
|
25
25
|
* @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
|
|
26
26
|
* `data`, and the typed action discriminator.
|
|
@@ -21,8 +21,8 @@ export interface VaultV1WithdrawParams {
|
|
|
21
21
|
/**
|
|
22
22
|
* Encodes an exact-assets Vault V1 withdrawal through VaultBundlesV1.
|
|
23
23
|
*
|
|
24
|
-
* This low-level builder does not bind `permit.value` to
|
|
25
|
-
* `MorphoVaultV1.withdraw().buildTx()` to validate it against the
|
|
24
|
+
* This low-level builder does not bind `permit.value` to the required share amount; use
|
|
25
|
+
* `MorphoVaultV1.withdraw().buildTx()` to validate it against the minimum derived from the handle's `vaultData`.
|
|
26
26
|
*
|
|
27
27
|
* @param params.vault.chainId - Chain containing the vault and its registered VaultBundlesV1 contract.
|
|
28
28
|
* @param params.vault.address - Vault V1 whose shares are burned for the withdrawal.
|
|
@@ -31,7 +31,7 @@ export interface VaultV1WithdrawParams {
|
|
|
31
31
|
* @param params.args.recipient - Unsupported; net assets are always paid to the transaction sender.
|
|
32
32
|
* @param params.args.onBehalf - Unsupported; VaultBundlesV1 always burns the transaction sender's shares.
|
|
33
33
|
* @param params.args.requirementSignature - Optional ERC-2612 vault-share permit for `userAddress`
|
|
34
|
-
* and the registered VaultBundlesV1 spender. Omit when the
|
|
34
|
+
* and the registered VaultBundlesV1 spender. Omit when the share allowance meets the required amount.
|
|
35
35
|
* @param params.args.referralFeePct - Optional WAD-scaled fee in [0, 1e18), defaulting to zero.
|
|
36
36
|
* The fee is rounded down and deducted from the gross withdrawn assets.
|
|
37
37
|
* @param params.args.referralFeeRecipient - Optional fee recipient; a nonzero address is required
|
|
@@ -60,7 +60,7 @@ export interface VaultV1WithdrawParams {
|
|
|
60
60
|
*
|
|
61
61
|
* export function buildUsdcWithdrawal(userAddress: Address, deadline: bigint) {
|
|
62
62
|
* const vault = "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB";
|
|
63
|
-
* //
|
|
63
|
+
* // Satisfy the required vault-share allowance before submitting; the entity API derives it.
|
|
64
64
|
* const tx = vaultV1Withdraw({
|
|
65
65
|
* vault: { chainId: mainnet.id, address: vault },
|
|
66
66
|
* args: { amount: 1_000_000n, userAddress, deadline },
|
|
@@ -7,8 +7,8 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
7
7
|
/**
|
|
8
8
|
* Encodes an exact-assets Vault V1 withdrawal through VaultBundlesV1.
|
|
9
9
|
*
|
|
10
|
-
* This low-level builder does not bind `permit.value` to
|
|
11
|
-
* `MorphoVaultV1.withdraw().buildTx()` to validate it against the
|
|
10
|
+
* This low-level builder does not bind `permit.value` to the required share amount; use
|
|
11
|
+
* `MorphoVaultV1.withdraw().buildTx()` to validate it against the minimum derived from the handle's `vaultData`.
|
|
12
12
|
*
|
|
13
13
|
* @param params.vault.chainId - Chain containing the vault and its registered VaultBundlesV1 contract.
|
|
14
14
|
* @param params.vault.address - Vault V1 whose shares are burned for the withdrawal.
|
|
@@ -17,7 +17,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
17
17
|
* @param params.args.recipient - Unsupported; net assets are always paid to the transaction sender.
|
|
18
18
|
* @param params.args.onBehalf - Unsupported; VaultBundlesV1 always burns the transaction sender's shares.
|
|
19
19
|
* @param params.args.requirementSignature - Optional ERC-2612 vault-share permit for `userAddress`
|
|
20
|
-
* and the registered VaultBundlesV1 spender. Omit when the
|
|
20
|
+
* and the registered VaultBundlesV1 spender. Omit when the share allowance meets the required amount.
|
|
21
21
|
* @param params.args.referralFeePct - Optional WAD-scaled fee in [0, 1e18), defaulting to zero.
|
|
22
22
|
* The fee is rounded down and deducted from the gross withdrawn assets.
|
|
23
23
|
* @param params.args.referralFeeRecipient - Optional fee recipient; a nonzero address is required
|
|
@@ -46,7 +46,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
46
46
|
*
|
|
47
47
|
* export function buildUsdcWithdrawal(userAddress: Address, deadline: bigint) {
|
|
48
48
|
* const vault = "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB";
|
|
49
|
-
* //
|
|
49
|
+
* // Satisfy the required vault-share allowance before submitting; the entity API derives it.
|
|
50
50
|
* const tx = vaultV1Withdraw({
|
|
51
51
|
* vault: { chainId: mainnet.id, address: vault },
|
|
52
52
|
* args: { amount: 1_000_000n, userAddress, deadline },
|
|
@@ -50,7 +50,7 @@ export interface VaultV2ForceWithdrawParams {
|
|
|
50
50
|
* is outside that bound's protection.
|
|
51
51
|
* @param params.args.referralFeeRecipient - Optional referral fee recipient. Defaults to the zero
|
|
52
52
|
* address, which is only valid alongside a zero `referralFeePct`.
|
|
53
|
-
* @param params.args.requirementSignature - Optional
|
|
53
|
+
* @param params.args.requirementSignature - Optional unlimited Vault V2 shares permit.
|
|
54
54
|
* @param params.metadata - Optional analytics metadata.
|
|
55
55
|
* @returns A deep-frozen `Readonly<Transaction<VaultV2ForceWithdrawAction>>` with `to`, `value`,
|
|
56
56
|
* `data`, and the typed action discriminator.
|
|
@@ -37,7 +37,7 @@ import { getBundlesSharesPermit } from "../bundles/common.js";
|
|
|
37
37
|
* is outside that bound's protection.
|
|
38
38
|
* @param params.args.referralFeeRecipient - Optional referral fee recipient. Defaults to the zero
|
|
39
39
|
* address, which is only valid alongside a zero `referralFeePct`.
|
|
40
|
-
* @param params.args.requirementSignature - Optional
|
|
40
|
+
* @param params.args.requirementSignature - Optional unlimited Vault V2 shares permit.
|
|
41
41
|
* @param params.metadata - Optional analytics metadata.
|
|
42
42
|
* @returns A deep-frozen `Readonly<Transaction<VaultV2ForceWithdrawAction>>` with `to`, `value`,
|
|
43
43
|
* `data`, and the typed action discriminator.
|
|
@@ -34,7 +34,7 @@ export interface VaultV2InKindRedeemParams {
|
|
|
34
34
|
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
35
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
|
-
* @param params.args.requirementSignature - Optional
|
|
37
|
+
* @param params.args.requirementSignature - Optional unlimited 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.
|
|
@@ -22,7 +22,7 @@ import { getBundlesSharesPermit } from "../bundles/common.js";
|
|
|
22
22
|
* the expected owner of an optional `requirementSignature` permit. VaultExitBundlesV1 burns
|
|
23
23
|
* `msg.sender`'s vault shares, so the submitting account must equal this address.
|
|
24
24
|
* @param params.args.deadline - Permit and bundle deadline.
|
|
25
|
-
* @param params.args.requirementSignature - Optional
|
|
25
|
+
* @param params.args.requirementSignature - Optional unlimited Vault V2 shares permit.
|
|
26
26
|
* @param params.metadata - Optional analytics metadata.
|
|
27
27
|
* @returns A deep-frozen `Readonly<Transaction<VaultV2InKindRedeemAction>>` with `to`, `value`,
|
|
28
28
|
* `data`, and the typed action discriminator.
|
|
@@ -21,8 +21,8 @@ export interface VaultV2WithdrawParams {
|
|
|
21
21
|
/**
|
|
22
22
|
* Encodes an exact-assets Vault V2 withdrawal through VaultBundlesV1.
|
|
23
23
|
*
|
|
24
|
-
* This low-level builder does not bind `permit.value` to
|
|
25
|
-
* `MorphoVaultV2.withdraw().buildTx()` to validate it against the
|
|
24
|
+
* This low-level builder does not bind `permit.value` to the required share amount; use
|
|
25
|
+
* `MorphoVaultV2.withdraw().buildTx()` to validate it against the minimum derived from the handle's `vaultData`.
|
|
26
26
|
*
|
|
27
27
|
* @param params.vault.chainId - Chain containing the vault and its registered VaultBundlesV1 contract.
|
|
28
28
|
* @param params.vault.address - Vault V2 whose shares are burned for the withdrawal.
|
|
@@ -31,7 +31,7 @@ export interface VaultV2WithdrawParams {
|
|
|
31
31
|
* @param params.args.recipient - Unsupported; net assets are always paid to the transaction sender.
|
|
32
32
|
* @param params.args.onBehalf - Unsupported; VaultBundlesV1 always burns the transaction sender's shares.
|
|
33
33
|
* @param params.args.requirementSignature - Optional ERC-2612 vault-share permit for `userAddress`
|
|
34
|
-
* and the registered VaultBundlesV1 spender. Omit when the
|
|
34
|
+
* and the registered VaultBundlesV1 spender. Omit when the share allowance meets the required amount.
|
|
35
35
|
* @param params.args.referralFeePct - Optional WAD-scaled fee in [0, 1e18), defaulting to zero.
|
|
36
36
|
* The fee is rounded down and deducted from the gross withdrawn assets.
|
|
37
37
|
* @param params.args.referralFeeRecipient - Optional fee recipient; a nonzero address is required
|
|
@@ -60,7 +60,7 @@ export interface VaultV2WithdrawParams {
|
|
|
60
60
|
*
|
|
61
61
|
* export function buildUsdcWithdrawal(userAddress: Address, deadline: bigint) {
|
|
62
62
|
* const vault = "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145";
|
|
63
|
-
* //
|
|
63
|
+
* // Satisfy the required vault-share allowance before submitting; the entity API derives it.
|
|
64
64
|
* const tx = vaultV2Withdraw({
|
|
65
65
|
* vault: { chainId: mainnet.id, address: vault },
|
|
66
66
|
* args: { amount: 1_000_000n, userAddress, deadline },
|
|
@@ -7,8 +7,8 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
7
7
|
/**
|
|
8
8
|
* Encodes an exact-assets Vault V2 withdrawal through VaultBundlesV1.
|
|
9
9
|
*
|
|
10
|
-
* This low-level builder does not bind `permit.value` to
|
|
11
|
-
* `MorphoVaultV2.withdraw().buildTx()` to validate it against the
|
|
10
|
+
* This low-level builder does not bind `permit.value` to the required share amount; use
|
|
11
|
+
* `MorphoVaultV2.withdraw().buildTx()` to validate it against the minimum derived from the handle's `vaultData`.
|
|
12
12
|
*
|
|
13
13
|
* @param params.vault.chainId - Chain containing the vault and its registered VaultBundlesV1 contract.
|
|
14
14
|
* @param params.vault.address - Vault V2 whose shares are burned for the withdrawal.
|
|
@@ -17,7 +17,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
17
17
|
* @param params.args.recipient - Unsupported; net assets are always paid to the transaction sender.
|
|
18
18
|
* @param params.args.onBehalf - Unsupported; VaultBundlesV1 always burns the transaction sender's shares.
|
|
19
19
|
* @param params.args.requirementSignature - Optional ERC-2612 vault-share permit for `userAddress`
|
|
20
|
-
* and the registered VaultBundlesV1 spender. Omit when the
|
|
20
|
+
* and the registered VaultBundlesV1 spender. Omit when the share allowance meets the required amount.
|
|
21
21
|
* @param params.args.referralFeePct - Optional WAD-scaled fee in [0, 1e18), defaulting to zero.
|
|
22
22
|
* The fee is rounded down and deducted from the gross withdrawn assets.
|
|
23
23
|
* @param params.args.referralFeeRecipient - Optional fee recipient; a nonzero address is required
|
|
@@ -46,7 +46,7 @@ import { finalizeVaultBundlesV1Transaction, getBundlesReferralFeeAssets, getBund
|
|
|
46
46
|
*
|
|
47
47
|
* export function buildUsdcWithdrawal(userAddress: Address, deadline: bigint) {
|
|
48
48
|
* const vault = "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145";
|
|
49
|
-
* //
|
|
49
|
+
* // Satisfy the required vault-share allowance before submitting; the entity API derives it.
|
|
50
50
|
* const tx = vaultV2Withdraw({
|
|
51
51
|
* vault: { chainId: mainnet.id, address: vault },
|
|
52
52
|
* args: { amount: 1_000_000n, userAddress, deadline },
|
package/lib/esm/blue/abis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, midnightAdapterAbi, midnightAdapterFactoryAbi, midnightAdapterPriceRatifierV1Abi, midnightAdapterRateRatifierV1Abi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi,
|
|
3
3
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
4
4
|
preLiquidationAbi,
|
|
5
5
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
package/lib/esm/blue/abis.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, midnightAdapterAbi, midnightAdapterFactoryAbi, midnightAdapterPriceRatifierV1Abi, midnightAdapterRateRatifierV1Abi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi,
|
|
3
3
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
4
4
|
preLiquidationAbi,
|
|
5
5
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket, IMarketParams, IPosition,
|
|
1
|
+
export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MidnightAdapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket, IMarketParams, IPosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
IPreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, } from "@morpho-org/blue-sdk";
|
|
6
|
-
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position,
|
|
5
|
+
IPreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MidnightAdapter, IVaultV2MidnightAdapterAccrualMarket, IVaultV2MidnightAdapterCollateralParams, IVaultV2MidnightAdapterMarket, IVaultV2MidnightAdapterMarketData, IVaultV2MidnightAdapterMarketState, IVaultV2MidnightAdapterPosition, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, VaultV2MidnightAdapterAccrualMarket, VaultV2MidnightAdapterMarketData, } from "@morpho-org/blue-sdk";
|
|
6
|
+
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MidnightAdapter, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position,
|
|
7
7
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
8
8
|
PreLiquidationParams,
|
|
9
9
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
10
|
-
PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
10
|
+
PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MidnightAdapter, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
package/lib/esm/blue/entities.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position,
|
|
1
|
+
export { AccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MidnightAdapter, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market, MarketParams, Position,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
PreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
5
|
+
PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MidnightAdapter, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
package/lib/esm/blue/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidAddressError, InvalidBitLengthError, InvalidMarketParamsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError,
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidAddressError, InvalidBitLengthError, InvalidMarketParamsError, InvalidPositionAccrualStateError, InvalidPositionLossFactorError, InvalidVaultV2MidnightAdapterMarketsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
UnsupportedPreLiquidationParamsError, UnsupportedVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
4
|
-
export { getUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, MalformedTokenMetadataError, MarketParamsIdMismatchError, MissingPermitDomainNameError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
4
|
+
export { getUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, MalformedTokenMetadataError, MarketParamsIdMismatchError, MissingPermitDomainNameError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnresolvedBlockNumberError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/errors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidAddressError, InvalidBitLengthError, InvalidMarketParamsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError,
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidAddressError, InvalidBitLengthError, InvalidMarketParamsError, InvalidPositionAccrualStateError, InvalidPositionLossFactorError, InvalidVaultV2MidnightAdapterMarketsError, RegistryValueAlreadyRegisteredError, UnknownAddressError, UnknownDataError, UnknownFactory, UnknownMarketAllocationError, UnknownMarketParamsError, UnknownOfFactory, UnknownTokenError, UnknownTokenPriceError, UnknownVaultConfigError, UnsupportedChainIdError, UnsupportedMarketIrmError,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
UnsupportedPreLiquidationParamsError, UnsupportedVaultV2AdapterError, VaultV2Errors, } from "@morpho-org/blue-sdk";
|
|
4
|
-
export { getUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, MalformedTokenMetadataError, MarketParamsIdMismatchError, MissingPermitDomainNameError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
|
4
|
+
export { getUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, MalformedTokenMetadataError, MarketParamsIdMismatchError, MissingPermitDomainNameError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnresolvedBlockNumberError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/fetch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition,
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MidnightAdapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
fetchPreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
+
fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MidnightAdapter, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/fetch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition,
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, fetchAccrualVaultV2MidnightAdapter, fetchAccrualVaultV2MorphoMarketV1Adapter, fetchAccrualVaultV2MorphoMarketV1AdapterV2, fetchAccrualVaultV2MorphoVaultV1Adapter, fetchHolding, fetchMarket, fetchMarketParams, fetchPosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
fetchPreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
|
5
|
+
fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MidnightAdapter, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/utils.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export { AdaptiveCurveIrmLib, CapacityLimitReason,
|
|
|
3
3
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
4
4
|
defaultPreLiquidationParamsRegistry,
|
|
5
5
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
6
|
-
getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
6
|
+
getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2MidnightAdapterUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
7
7
|
export { catchRevertOnly, decodeBytes32String, getAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, isContractRevertError, isTransportError, isUndecodableResultError, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
package/lib/esm/blue/utils.js
CHANGED
|
@@ -2,5 +2,5 @@ export { AdaptiveCurveIrmLib, CapacityLimitReason,
|
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
defaultPreLiquidationParamsRegistry,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
5
|
+
getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2MidnightAdapterUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
6
6
|
export { catchRevertOnly, decodeBytes32String, getAuthorizationTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, isContractRevertError, isTransportError, isUndecodableResultError, MetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
@@ -18,11 +18,6 @@ export interface BlueTokenRequirementsParams {
|
|
|
18
18
|
readonly useSimplePermit?: boolean;
|
|
19
19
|
/** Explicit unused Permit2 SignatureTransfer unordered nonce; defaults to the lowest unused nonce. */
|
|
20
20
|
readonly permit2Nonce?: bigint;
|
|
21
|
-
/**
|
|
22
|
-
* Classic ERC-20 allowance to set when an approval is needed, enabling a reusable approval (for
|
|
23
|
-
* example `maxUint256`). Defaults to the exact pulled amount. Ignored by signature paths.
|
|
24
|
-
*/
|
|
25
|
-
readonly approvalAmount?: bigint;
|
|
26
21
|
}
|
|
27
22
|
/** Action surface for Morpho Blue reads and writes; writes route through BlueBundlesV1. */
|
|
28
23
|
export interface BlueActions {
|
|
@@ -169,7 +164,6 @@ export interface BlueActions {
|
|
|
169
164
|
* @throws {ReferralFeeRecipientMissingError} when a positive fee has no recipient.
|
|
170
165
|
* @throws {NoUnusedPermit2NonceError} from `getRequirements()` when every Permit2 nonce for the owner is consumed and none was passed explicitly.
|
|
171
166
|
* @throws {Permit2SignatureTransferNonceAlreadyUsedError} from `getRequirements()` when the explicit Permit2 nonce is consumed.
|
|
172
|
-
* @throws {ApprovalAmountLessThanSpendAmountError} from `getRequirements()` when a classic `approvalAmount` is below the funded `assets`.
|
|
173
167
|
* @throws {AmbiguousRequirementSignaturesError} from `buildTx()` when multiple token signatures are supplied.
|
|
174
168
|
* @throws {UnexpectedRequirementSignatureError} from `buildTx()` when the route cannot consume a supplied signature.
|
|
175
169
|
* @throws {DepositOwnerMismatchError} from `buildTx()` when the signed owner differs from `userAddress`.
|
|
@@ -405,8 +399,6 @@ export interface BlueActions {
|
|
|
405
399
|
* @throws {RepayExceedsDebtError} when an exact asset repay exceeds current debt.
|
|
406
400
|
* @throws {RepaySharesExceedDebtError} when non-saturated shares exceed current debt shares.
|
|
407
401
|
* @throws {InputExceedsMaxError} when a fee is out of bounds or a share quote deadline is too far away.
|
|
408
|
-
* @throws {ApprovalAmountLessThanSpendAmountError} from `getRequirements()` when a classic
|
|
409
|
-
* `approvalAmount` is below the derived `maxRepayAssets`.
|
|
410
402
|
* @throws {MaxRepayAssetsBelowRepayAssetsError} when a signed share cap no longer covers the fresh quote.
|
|
411
403
|
* @throws {ReferralFeeRecipientMissingError} when a positive fee has no recipient.
|
|
412
404
|
* @throws {NativeFundingAmountMismatchError} when native funding is partial or mixed.
|
|
@@ -550,8 +542,8 @@ export interface BlueActions {
|
|
|
550
542
|
* saturated full close; the entity derives `maxRepayAssets` from debt projected through the
|
|
551
543
|
* requested deadline plus the referral fee, and the contract refunds unused funding. A
|
|
552
544
|
* previously signed share-mode cap remains valid when it still covers the fresh derived minimum.
|
|
553
|
-
* Full-repay requirements
|
|
554
|
-
*
|
|
545
|
+
* Full-repay requirements use unlimited classic approvals while the transaction remains bounded
|
|
546
|
+
* by the derived `maxRepayAssets` cap.
|
|
555
547
|
* Share-mode deadlines cannot exceed the two-hour quote horizon. Blue authorization is required
|
|
556
548
|
* only for collateral withdrawal. Pure repay uses `maxLtv = maxUint256`; withdrawals use buffered
|
|
557
549
|
* LLTV. No share-price or `slippageTolerance` input exists.
|
|
@@ -582,8 +574,6 @@ export interface BlueActions {
|
|
|
582
574
|
* @throws {WithdrawMakesPositionUnhealthyError} when the post-repay withdrawal exceeds buffered LLTV.
|
|
583
575
|
* @throws {ExpiredDeadlineError} when the deadline is stale.
|
|
584
576
|
* @throws {InputExceedsMaxError} when the referral fee is at least WAD or a share-mode deadline exceeds the funding quote horizon.
|
|
585
|
-
* @throws {ApprovalAmountLessThanSpendAmountError} from `getRequirements()` when a classic
|
|
586
|
-
* `approvalAmount` is below the derived `maxRepayAssets`.
|
|
587
577
|
* @throws {MaxRepayAssetsBelowRepayAssetsError} from `buildTx()` when a previously signed share-mode cap no longer covers the fresh derived minimum.
|
|
588
578
|
* @throws {ReferralFeeRecipientMissingError} when a positive fee has no recipient.
|
|
589
579
|
* @throws {NativeFundingAmountMismatchError} when native funding is partial or mixed.
|
|
@@ -84,7 +84,6 @@ export class MorphoBlue {
|
|
|
84
84
|
supportDeployless: this.client.options.supportDeployless,
|
|
85
85
|
useSimplePermit: params.useSimplePermit,
|
|
86
86
|
permit2Nonce: params.permit2Nonce,
|
|
87
|
-
approvalAmount: params.approvalAmount,
|
|
88
87
|
now: params.now,
|
|
89
88
|
});
|
|
90
89
|
}
|
|
@@ -144,7 +143,6 @@ export class MorphoBlue {
|
|
|
144
143
|
now,
|
|
145
144
|
useSimplePermit: requirementsParams?.useSimplePermit,
|
|
146
145
|
permit2Nonce: requirementsParams?.permit2Nonce,
|
|
147
|
-
approvalAmount: requirementsParams?.approvalAmount,
|
|
148
146
|
});
|
|
149
147
|
});
|
|
150
148
|
},
|
|
@@ -482,7 +480,6 @@ export class MorphoBlue {
|
|
|
482
480
|
? this.getTokenRequirements({
|
|
483
481
|
token: this.marketParams.loanToken,
|
|
484
482
|
amount: maxRepayAssets,
|
|
485
|
-
approvalAmount: requirementsParams?.approvalAmount,
|
|
486
483
|
userAddress,
|
|
487
484
|
deadline,
|
|
488
485
|
now,
|
|
@@ -594,7 +591,6 @@ export class MorphoBlue {
|
|
|
594
591
|
? this.getTokenRequirements({
|
|
595
592
|
token: this.marketParams.collateralToken,
|
|
596
593
|
amount: collateralAssets,
|
|
597
|
-
approvalAmount: requirementsParams?.approvalAmount,
|
|
598
594
|
userAddress,
|
|
599
595
|
deadline,
|
|
600
596
|
now,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export type { IAccrualPosition as IBlueAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket as IBlueMarket, IMarketParams as IBlueMarketParams, IPosition as IBluePosition,
|
|
1
|
+
export type { IAccrualPosition as IBlueAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, IAccrualVaultV2MidnightAdapter, IAccrualVaultV2MorphoMarketV1Adapter, IAccrualVaultV2MorphoMarketV1AdapterV2, IAccrualVaultV2MorphoVaultV1Adapter, IAssetBalances, IEip5267Domain, IHolding, IMarket as IBlueMarket, IMarketParams as IBlueMarketParams, IPosition as IBluePosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
IPreLiquidationParams as IBluePreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
IPreLiquidationPosition as IBluePreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, } from "@morpho-org/blue-sdk";
|
|
6
|
-
export { AccrualPosition as BlueAccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market as BlueMarket, MarketParams as BlueMarketParams, Position as BluePosition,
|
|
5
|
+
IPreLiquidationPosition as IBluePreLiquidationPosition, IToken, IVault, IVaultConfig, IVaultMarketAllocation, IVaultMarketConfig, IVaultToken, IVaultUser, IVaultV2, IVaultV2Adapter, IVaultV2Allocation, IVaultV2BlueMarketPublicAllocatorConfig, IVaultV2BluePublicAllocatorConfig, IVaultV2MidnightAdapter, IVaultV2MidnightAdapterAccrualMarket, IVaultV2MidnightAdapterCollateralParams, IVaultV2MidnightAdapterMarket, IVaultV2MidnightAdapterMarketData, IVaultV2MidnightAdapterMarketState, IVaultV2MidnightAdapterPosition, IVaultV2MorphoMarketV1Adapter, IVaultV2MorphoMarketV1AdapterV2, IVaultV2MorphoVaultV1Adapter, PeripheralBalance, PeripheralBalanceType, VaultV2MidnightAdapterAccrualMarket, VaultV2MidnightAdapterMarketData, } from "@morpho-org/blue-sdk";
|
|
6
|
+
export { AccrualPosition as BlueAccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MidnightAdapter, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market as BlueMarket, MarketParams as BlueMarketParams, Position as BluePosition,
|
|
7
7
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
8
8
|
PreLiquidationParams as BluePreLiquidationParams,
|
|
9
9
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
10
|
-
PreLiquidationPosition as BluePreLiquidationPosition, Token, User as BlueUser, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
10
|
+
PreLiquidationPosition as BluePreLiquidationPosition, Token, User as BlueUser, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MidnightAdapter, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
11
11
|
export type { AnyTree as MidnightAnyTree, AnyTreeSnapshot as MidnightAnyTreeSnapshot, BuildOfferParams as MidnightBuildOfferParams, CollateralParams as MidnightCollateralParams, EcrecoverTreeCreateRequest as MidnightEcrecoverTreeCreateRequest, GroupInput as MidnightGroupInput, IAccrualPosition as IMidnightAccrualPosition, ICollateralParams as IMidnightCollateralParams, IGroup as IMidnightGroup, IMarket as IMidnightMarket, IMarketParams as IMidnightMarketParams, IOffer as IMidnightOffer, IPosition as IMidnightPosition, MarketInput as MidnightMarketInput, OfferStruct as MidnightOfferStruct, PriceRatifierV1TreeCreateRequest as MidnightPriceRatifierV1TreeCreateRequest, RateRatifierV1TreeCreateRequest as MidnightRateRatifierV1TreeCreateRequest, RatifierKind as MidnightRatifierKind, RatifierTreeInput as MidnightRatifierTreeInput, RatifierTypes as MidnightRatifierTypes, SetterTreeCreateRequest as MidnightSetterTreeCreateRequest, SettlementFeeCbps as MidnightSettlementFeeCbps, TreeCreateParams as MidnightTreeCreateParams, TreeCreateRequest as MidnightTreeCreateRequest, TreeData as MidnightTreeData, TreeDescriptor as MidnightTreeDescriptor, TreeEntry as MidnightTreeEntry, TreeInput as MidnightTreeInput, TreeLike as MidnightTreeLike, TreeMempoolValidateParams as MidnightTreeMempoolValidateParams, TreeMempoolValidateRatification as MidnightTreeMempoolValidateRatification, TreeProof as MidnightTreeProof, TreeSnapshot as MidnightTreeSnapshot, TypedRatifierTreeInput as MidnightTypedRatifierTreeInput, TypedTreeMempoolValidateParams as MidnightTypedTreeMempoolValidateParams, } from "@morpho-org/midnight-sdk";
|
|
12
12
|
export { AccrualPosition as MidnightAccrualPosition, Group as MidnightGroup, Market as MidnightMarket, MarketParams as MidnightMarketParams, Offer as MidnightOffer, Position as MidnightPosition, Tree as MidnightTree, } from "@morpho-org/midnight-sdk";
|
|
13
13
|
export type { BlueActions, BlueTokenRequirementsParams, } from "./blue/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AccrualPosition as BlueAccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market as BlueMarket, MarketParams as BlueMarketParams, Position as BluePosition,
|
|
1
|
+
export { AccrualPosition as BlueAccrualPosition, AccrualVault, AccrualVaultV2, AccrualVaultV2MidnightAdapter, AccrualVaultV2MorphoMarketV1Adapter, AccrualVaultV2MorphoMarketV1AdapterV2, AccrualVaultV2MorphoVaultV1Adapter, AssetBalances, ConstantWrappedToken, Eip5267Domain, ExchangeRateWrappedToken, Holding, Market as BlueMarket, MarketParams as BlueMarketParams, Position as BluePosition,
|
|
2
2
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
3
3
|
PreLiquidationParams as BluePreLiquidationParams,
|
|
4
4
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
|
5
|
-
PreLiquidationPosition as BluePreLiquidationPosition, Token, User as BlueUser, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
5
|
+
PreLiquidationPosition as BluePreLiquidationPosition, Token, User as BlueUser, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MidnightAdapter, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
|
6
6
|
export { AccrualPosition as MidnightAccrualPosition, Group as MidnightGroup, Market as MidnightMarket, MarketParams as MidnightMarketParams, Offer as MidnightOffer, Position as MidnightPosition, Tree as MidnightTree, } from "@morpho-org/midnight-sdk";
|
|
7
7
|
export { MorphoBlue } from "./blue/index.js";
|
|
8
8
|
export { MorphoMidnight, } from "./midnight/index.js";
|