@morpho-org/morpho-sdk 8.2.0-next.0 → 8.2.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-v7-to-v8.md +7 -3
- package/README.md +10 -0
- package/lib/cjs/abis.d.ts +1 -1
- package/lib/cjs/abis.js +1 -5
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +1 -0
- package/lib/cjs/actions/blue/supply.js +7 -5
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +10 -8
- package/lib/cjs/actions/blue/withdraw.js +10 -6
- package/lib/cjs/blue/abis.d.ts +1 -1
- package/lib/cjs/blue/abis.js +1 -5
- package/lib/cjs/blue/entities.d.ts +4 -4
- package/lib/cjs/blue/entities.js +1 -3
- package/lib/cjs/blue/errors.d.ts +2 -2
- package/lib/cjs/blue/errors.js +1 -5
- package/lib/cjs/blue/fetch.d.ts +2 -2
- package/lib/cjs/blue/fetch.js +1 -3
- package/lib/cjs/blue/utils.d.ts +1 -1
- package/lib/cjs/blue/utils.js +1 -2
- package/lib/cjs/entities/index.d.ts +4 -4
- package/lib/cjs/entities/index.js +1 -3
- package/lib/cjs/entities/midnight/types.d.ts +4 -3
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +9 -33
- package/lib/cjs/entities/vaultV2/vaultV2.js +1 -33
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +3 -5
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +3 -9
- package/lib/cjs/errors.d.ts +4 -4
- package/lib/cjs/errors.js +5 -10
- package/lib/cjs/fetch.d.ts +2 -2
- package/lib/cjs/fetch.js +1 -3
- package/lib/cjs/midnight/errors.d.ts +1 -2
- package/lib/cjs/midnight/errors.js +4 -5
- package/lib/cjs/types/action.d.ts +22 -0
- package/lib/cjs/utils.d.ts +2 -2
- package/lib/cjs/utils.js +2 -4
- package/lib/esm/abis.d.ts +1 -1
- package/lib/esm/abis.js +1 -1
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +1 -0
- package/lib/esm/actions/blue/supply.js +2 -0
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +2 -0
- package/lib/esm/actions/blue/withdraw.js +4 -0
- 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/index.d.ts +4 -4
- package/lib/esm/entities/index.js +2 -2
- package/lib/esm/entities/midnight/types.d.ts +4 -3
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +9 -33
- package/lib/esm/entities/vaultV2/vaultV2.js +1 -33
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +3 -5
- package/lib/esm/entities/vaultV2BlueReallocationData.js +3 -9
- 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/midnight/errors.d.ts +1 -2
- package/lib/esm/midnight/errors.js +1 -2
- package/lib/esm/types/action.d.ts +22 -0
- package/lib/esm/utils.d.ts +2 -2
- package/lib/esm/utils.js +2 -2
- package/package.json +6 -6
package/MIGRATION-v7-to-v8.md
CHANGED
|
@@ -142,9 +142,13 @@ Get `positionData` from
|
|
|
142
142
|
`midnight.getPositionData({ marketId: marketData.id, accountAddress })`. For each collateral index,
|
|
143
143
|
read `price()` from the oracle at `marketData.params.collateralParams[i].oracle` with viem's
|
|
144
144
|
`readContract`. Prices use `ORACLE_PRICE_SCALE` and must be in the same index order as the market's
|
|
145
|
-
collateral parameters.
|
|
146
|
-
debt
|
|
147
|
-
|
|
145
|
+
collateral parameters. `takeBorrow` and `supplyCollateralTakeBorrow` always need prices, because
|
|
146
|
+
debt after a borrow is always positive. `takeRepayWithdrawCollateral` and
|
|
147
|
+
`repayWithdrawCollateral` need prices only when `collateralWithdrawals` is non-empty and the SDK's
|
|
148
|
+
conservative post-operation debt is positive. For these two methods, pass `collateralPrices: []`
|
|
149
|
+
when there is no collateral withdrawal, including a partial repayment that leaves debt, or when the
|
|
150
|
+
conservative post-operation debt is zero, such as after a `full` repay, a repayment units target
|
|
151
|
+
covering `positionData.debt`, or `minUnits` / `repay.assets` covering it. For example:
|
|
148
152
|
|
|
149
153
|
```ts
|
|
150
154
|
midnight.takeBorrow({
|
package/README.md
CHANGED
|
@@ -78,6 +78,16 @@ prerequisites.
|
|
|
78
78
|
- **`getRequirements()`** — async; the on-chain prerequisites to satisfy first: ERC-20 approvals, permit / Permit2 signatures, Morpho authorization, or (for Midnight) operator authorization.
|
|
79
79
|
- **`buildTx(signatures?)`** — synchronous; the final, deep-frozen viem transaction. Pass any signatures collected from the requirements.
|
|
80
80
|
|
|
81
|
+
Every transaction carries `tx.action` — typed metadata describing the encoded call (`type` plus
|
|
82
|
+
the normalized `args`, including `referralFeeAssets`: the exact referral-fee amount the
|
|
83
|
+
BlueBundlesV1 call charges, where derivable; it is omitted in exact-shares mode
|
|
84
|
+
(`blueWithdraw`, `blueRepay` and `blueRepayWithdrawCollateral` with a shares input),
|
|
85
|
+
where the underlying amount is resolved at execution. On the repay actions it is set
|
|
86
|
+
only for an exact-assets repay (`repayAssets > 0n`), so it is also omitted when
|
|
87
|
+
`blueRepayWithdrawCollateral` has no repay leg).
|
|
88
|
+
`@morpho-org/evm-simulation`'s `toSimulationLimits` consumes this metadata to derive simulation
|
|
89
|
+
limits from an action.
|
|
90
|
+
|
|
81
91
|
```typescript
|
|
82
92
|
const vaultData = await vault.getData();
|
|
83
93
|
const { buildTx, getRequirements } = vault.deposit({ amount, userAddress, vaultData });
|
package/lib/cjs/abis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { marketParamsAbi as blueMarketParamsAbi } from "@morpho-org/blue-sdk";
|
|
2
|
-
export { adaptiveCurveIrmAbi as blueAdaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi,
|
|
2
|
+
export { adaptiveCurveIrmAbi as blueAdaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, 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 as bluePreLiquidationAbi,
|
|
5
5
|
/** @deprecated Pre-liquidation support is deprecated and will be removed in the next major. */
|
package/lib/cjs/abis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.blueBundlesV1Abi = exports.vaultBundlesV1Abi = exports.vaultExitBundlesV1Abi = exports.midnightSetterRatifierAbi = exports.midnightRateRatifierV1Abi = exports.midnightPriceRatifierV1Abi = exports.midnightBundlesV2Abi = exports.midnightAbi = exports.midnightEcrecoverRatifierAbi = exports.midnightBlueBuyCallbackFactoryAbi = exports.wstEthAbi = exports.wrappedBackedTokenAbi = exports.whitelistControllerAggregatorV2Abi = exports.vaultV2FactoryAbi = exports.vaultV2BluePublicAllocatorAbi = exports.vaultV2Abi = exports.bluePreLiquidationFactoryAbi = exports.bluePreLiquidationAbi = exports.permit2Abi = exports.permissionedErc20WrapperAbi = exports.morphoVaultV1AdapterFactoryAbi = exports.morphoVaultV1AdapterAbi = exports.morphoMarketV1AdapterV2FactoryAbi = exports.morphoMarketV1AdapterV2Abi = exports.morphoMarketV1AdapterFactoryAbi = exports.morphoMarketV1AdapterAbi = exports.
|
|
3
|
+
exports.blueBundlesV1Abi = exports.vaultBundlesV1Abi = exports.vaultExitBundlesV1Abi = exports.midnightSetterRatifierAbi = exports.midnightRateRatifierV1Abi = exports.midnightPriceRatifierV1Abi = exports.midnightBundlesV2Abi = exports.midnightAbi = exports.midnightEcrecoverRatifierAbi = exports.midnightBlueBuyCallbackFactoryAbi = exports.wstEthAbi = exports.wrappedBackedTokenAbi = exports.whitelistControllerAggregatorV2Abi = exports.vaultV2FactoryAbi = exports.vaultV2BluePublicAllocatorAbi = exports.vaultV2Abi = exports.bluePreLiquidationFactoryAbi = exports.bluePreLiquidationAbi = exports.permit2Abi = exports.permissionedErc20WrapperAbi = exports.morphoVaultV1AdapterFactoryAbi = exports.morphoVaultV1AdapterAbi = exports.morphoMarketV1AdapterV2FactoryAbi = exports.morphoMarketV1AdapterV2Abi = exports.morphoMarketV1AdapterFactoryAbi = exports.morphoMarketV1AdapterAbi = exports.metaMorphoFactoryAbi = exports.metaMorphoAbi = exports.erc5267Abi = exports.erc2612Abi = exports.blueOracleAbi = exports.blueAbi = exports.blueAdaptiveCurveIrmAbi = exports.blueMarketParamsAbi = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "blueMarketParamsAbi", { enumerable: true, get: function () { return blue_sdk_1.marketParamsAbi; } });
|
|
6
6
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
@@ -11,10 +11,6 @@ Object.defineProperty(exports, "erc2612Abi", { enumerable: true, get: function (
|
|
|
11
11
|
Object.defineProperty(exports, "erc5267Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.erc5267Abi; } });
|
|
12
12
|
Object.defineProperty(exports, "metaMorphoAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.metaMorphoAbi; } });
|
|
13
13
|
Object.defineProperty(exports, "metaMorphoFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.metaMorphoFactoryAbi; } });
|
|
14
|
-
Object.defineProperty(exports, "midnightAdapterAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterAbi; } });
|
|
15
|
-
Object.defineProperty(exports, "midnightAdapterFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterFactoryAbi; } });
|
|
16
|
-
Object.defineProperty(exports, "midnightAdapterPriceRatifierV1Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterPriceRatifierV1Abi; } });
|
|
17
|
-
Object.defineProperty(exports, "midnightAdapterRateRatifierV1Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterRateRatifierV1Abi; } });
|
|
18
14
|
Object.defineProperty(exports, "morphoMarketV1AdapterAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.morphoMarketV1AdapterAbi; } });
|
|
19
15
|
Object.defineProperty(exports, "morphoMarketV1AdapterFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.morphoMarketV1AdapterFactoryAbi; } });
|
|
20
16
|
Object.defineProperty(exports, "morphoMarketV1AdapterV2Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.morphoMarketV1AdapterV2Abi; } });
|
|
@@ -175,6 +175,7 @@ const blueRepayWithdrawCollateral = (params) => {
|
|
|
175
175
|
nativeAmount: value > 0n ? value : undefined,
|
|
176
176
|
referralFeePct,
|
|
177
177
|
referralFeeRecipient,
|
|
178
|
+
referralFeeAssets: repayAssets > 0n ? minimumRepayAssets - repayAssets : undefined,
|
|
178
179
|
deadline: params.args.deadline,
|
|
179
180
|
},
|
|
180
181
|
},
|
|
@@ -5,7 +5,8 @@ const viem_1 = require("viem");
|
|
|
5
5
|
const abis_js_1 = require("../../abis.js");
|
|
6
6
|
const validate_js_1 = require("../../helpers/validate.js");
|
|
7
7
|
const index_js_1 = require("../../types/index.js");
|
|
8
|
-
const common_js_1 = require("
|
|
8
|
+
const common_js_1 = require("../bundles/common.js");
|
|
9
|
+
const common_js_2 = require("./common.js");
|
|
9
10
|
/**
|
|
10
11
|
* Encodes a direct BlueBundlesV1 loan-asset supply transaction.
|
|
11
12
|
*
|
|
@@ -74,22 +75,22 @@ const blueSupply = (params) => {
|
|
|
74
75
|
referralFeeRecipient: params.args.referralFeeRecipient,
|
|
75
76
|
metadata: params.metadata,
|
|
76
77
|
};
|
|
77
|
-
const { referralFeePct, referralFeeRecipient } = (0,
|
|
78
|
-
const value = (0,
|
|
78
|
+
const { referralFeePct, referralFeeRecipient } = (0, common_js_2.normalizeBlueBundlesV1CommonParams)(common);
|
|
79
|
+
const value = (0, common_js_2.validateBlueBundlesV1NativeFunding)({
|
|
79
80
|
chainId,
|
|
80
81
|
token: marketParams.loanToken,
|
|
81
82
|
fundedAmount: assets,
|
|
82
83
|
nativeAmount: params.args.nativeAmount,
|
|
83
84
|
requirementSignature,
|
|
84
85
|
});
|
|
85
|
-
const tokenPermit = (0,
|
|
86
|
+
const tokenPermit = (0, common_js_2.getBlueBundlesV1TokenPermit)({
|
|
86
87
|
chainId,
|
|
87
88
|
userAddress,
|
|
88
89
|
token: marketParams.loanToken,
|
|
89
90
|
amount: assets,
|
|
90
91
|
requirementSignature,
|
|
91
92
|
});
|
|
92
|
-
return (0,
|
|
93
|
+
return (0, common_js_2.finalizeBlueBundlesV1Transaction)({
|
|
93
94
|
common,
|
|
94
95
|
value,
|
|
95
96
|
data: (0, viem_1.encodeFunctionData)({
|
|
@@ -113,6 +114,7 @@ const blueSupply = (params) => {
|
|
|
113
114
|
nativeAmount: value > 0n ? value : undefined,
|
|
114
115
|
referralFeePct,
|
|
115
116
|
referralFeeRecipient,
|
|
117
|
+
referralFeeAssets: (0, common_js_1.getBundlesReferralFeeAssets)(assets, referralFeePct),
|
|
116
118
|
deadline: params.args.deadline,
|
|
117
119
|
},
|
|
118
120
|
},
|
|
@@ -5,7 +5,8 @@ const viem_1 = require("viem");
|
|
|
5
5
|
const abis_js_1 = require("../../abis.js");
|
|
6
6
|
const validate_js_1 = require("../../helpers/validate.js");
|
|
7
7
|
const index_js_1 = require("../../types/index.js");
|
|
8
|
-
const common_js_1 = require("
|
|
8
|
+
const common_js_1 = require("../bundles/common.js");
|
|
9
|
+
const common_js_2 = require("./common.js");
|
|
9
10
|
/**
|
|
10
11
|
* Encodes a direct BlueBundlesV1 collateral supply and/or borrow transaction.
|
|
11
12
|
*
|
|
@@ -104,28 +105,28 @@ const blueSupplyCollateralBorrow = (params) => {
|
|
|
104
105
|
referralFeeRecipient: params.args.referralFeeRecipient,
|
|
105
106
|
metadata: params.metadata,
|
|
106
107
|
};
|
|
107
|
-
const { referralFeePct, referralFeeRecipient } = (0,
|
|
108
|
-
const value = (0,
|
|
108
|
+
const { referralFeePct, referralFeeRecipient } = (0, common_js_2.normalizeBlueBundlesV1CommonParams)(common);
|
|
109
|
+
const value = (0, common_js_2.validateBlueBundlesV1NativeFunding)({
|
|
109
110
|
chainId,
|
|
110
111
|
token: marketParams.collateralToken,
|
|
111
112
|
fundedAmount: collateralAssets,
|
|
112
113
|
nativeAmount: params.args.nativeAmount,
|
|
113
114
|
requirementSignature,
|
|
114
115
|
});
|
|
115
|
-
const collateralPermit = (0,
|
|
116
|
+
const collateralPermit = (0, common_js_2.getBlueBundlesV1TokenPermit)({
|
|
116
117
|
chainId,
|
|
117
118
|
userAddress,
|
|
118
119
|
token: marketParams.collateralToken,
|
|
119
120
|
amount: collateralAssets,
|
|
120
121
|
requirementSignature,
|
|
121
122
|
});
|
|
122
|
-
const signedAuthorization = (0,
|
|
123
|
+
const signedAuthorization = (0, common_js_2.getBlueBundlesV1SignedAuthorization)({
|
|
123
124
|
chainId,
|
|
124
125
|
userAddress,
|
|
125
126
|
authorizationSignature,
|
|
126
127
|
});
|
|
127
|
-
const publicAllocations = (0,
|
|
128
|
-
const reallocationPenaltyAssets = (0,
|
|
128
|
+
const publicAllocations = (0, common_js_2.getBlueBundlesV1PublicAllocations)(reallocations, marketParams);
|
|
129
|
+
const reallocationPenaltyAssets = (0, common_js_2.getBlueBundlesV1PenaltyAssets)(publicAllocations);
|
|
129
130
|
if (reallocationPenaltyAssets > borrowAssets) {
|
|
130
131
|
throw new index_js_1.InputExceedsMaxError({
|
|
131
132
|
field: "reallocationPenaltyAssets",
|
|
@@ -133,7 +134,7 @@ const blueSupplyCollateralBorrow = (params) => {
|
|
|
133
134
|
max: borrowAssets,
|
|
134
135
|
});
|
|
135
136
|
}
|
|
136
|
-
return (0,
|
|
137
|
+
return (0, common_js_2.finalizeBlueBundlesV1Transaction)({
|
|
137
138
|
common,
|
|
138
139
|
value,
|
|
139
140
|
data: (0, viem_1.encodeFunctionData)({
|
|
@@ -165,6 +166,7 @@ const blueSupplyCollateralBorrow = (params) => {
|
|
|
165
166
|
reallocationPenaltyAssets,
|
|
166
167
|
referralFeePct,
|
|
167
168
|
referralFeeRecipient,
|
|
169
|
+
referralFeeAssets: (0, common_js_1.getBundlesReferralFeeAssets)(borrowAssets - reallocationPenaltyAssets, referralFeePct),
|
|
168
170
|
deadline: params.args.deadline,
|
|
169
171
|
},
|
|
170
172
|
},
|
|
@@ -5,7 +5,8 @@ const viem_1 = require("viem");
|
|
|
5
5
|
const abis_js_1 = require("../../abis.js");
|
|
6
6
|
const validate_js_1 = require("../../helpers/validate.js");
|
|
7
7
|
const index_js_1 = require("../../types/index.js");
|
|
8
|
-
const common_js_1 = require("
|
|
8
|
+
const common_js_1 = require("../bundles/common.js");
|
|
9
|
+
const common_js_2 = require("./common.js");
|
|
9
10
|
/**
|
|
10
11
|
* Encodes a direct BlueBundlesV1 loan-asset withdrawal transaction.
|
|
11
12
|
*
|
|
@@ -82,14 +83,14 @@ const blueWithdraw = (params) => {
|
|
|
82
83
|
referralFeeRecipient: params.args.referralFeeRecipient,
|
|
83
84
|
metadata: params.metadata,
|
|
84
85
|
};
|
|
85
|
-
const { referralFeePct, referralFeeRecipient } = (0,
|
|
86
|
-
const signedAuthorization = (0,
|
|
86
|
+
const { referralFeePct, referralFeeRecipient } = (0, common_js_2.normalizeBlueBundlesV1CommonParams)(common);
|
|
87
|
+
const signedAuthorization = (0, common_js_2.getBlueBundlesV1SignedAuthorization)({
|
|
87
88
|
chainId,
|
|
88
89
|
userAddress,
|
|
89
90
|
authorizationSignature,
|
|
90
91
|
});
|
|
91
|
-
const publicAllocations = (0,
|
|
92
|
-
const reallocationPenaltyAssets = (0,
|
|
92
|
+
const publicAllocations = (0, common_js_2.getBlueBundlesV1PublicAllocations)([...(params.args.reallocations ?? [])], marketParams);
|
|
93
|
+
const reallocationPenaltyAssets = (0, common_js_2.getBlueBundlesV1PenaltyAssets)(publicAllocations);
|
|
93
94
|
if (withdrawAssets > 0n && reallocationPenaltyAssets > withdrawAssets) {
|
|
94
95
|
throw new index_js_1.InputExceedsMaxError({
|
|
95
96
|
field: "reallocationPenaltyAssets",
|
|
@@ -97,7 +98,7 @@ const blueWithdraw = (params) => {
|
|
|
97
98
|
max: withdrawAssets,
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
|
-
return (0,
|
|
101
|
+
return (0, common_js_2.finalizeBlueBundlesV1Transaction)({
|
|
101
102
|
common,
|
|
102
103
|
value: 0n,
|
|
103
104
|
data: (0, viem_1.encodeFunctionData)({
|
|
@@ -125,6 +126,9 @@ const blueWithdraw = (params) => {
|
|
|
125
126
|
reallocationPenaltyAssets,
|
|
126
127
|
referralFeePct,
|
|
127
128
|
referralFeeRecipient,
|
|
129
|
+
referralFeeAssets: withdrawAssets > 0n
|
|
130
|
+
? (0, common_js_1.getBundlesReferralFeeAssets)(withdrawAssets - reallocationPenaltyAssets, referralFeePct)
|
|
131
|
+
: undefined,
|
|
128
132
|
deadline: params.args.deadline,
|
|
129
133
|
},
|
|
130
134
|
},
|
package/lib/cjs/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,
|
|
2
|
+
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, 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/cjs/blue/abis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wstEthAbi = exports.wrappedBackedTokenAbi = exports.whitelistControllerAggregatorV2Abi = exports.vaultV2FactoryAbi = exports.vaultV2BluePublicAllocatorAbi = exports.vaultV2Abi = exports.preLiquidationFactoryAbi = exports.preLiquidationAbi = exports.permit2Abi = exports.permissionedErc20WrapperAbi = exports.morphoVaultV1AdapterFactoryAbi = exports.morphoVaultV1AdapterAbi = exports.morphoMarketV1AdapterV2FactoryAbi = exports.morphoMarketV1AdapterV2Abi = exports.morphoMarketV1AdapterFactoryAbi = exports.morphoMarketV1AdapterAbi = exports.
|
|
3
|
+
exports.wstEthAbi = exports.wrappedBackedTokenAbi = exports.whitelistControllerAggregatorV2Abi = exports.vaultV2FactoryAbi = exports.vaultV2BluePublicAllocatorAbi = exports.vaultV2Abi = exports.preLiquidationFactoryAbi = exports.preLiquidationAbi = exports.permit2Abi = exports.permissionedErc20WrapperAbi = exports.morphoVaultV1AdapterFactoryAbi = exports.morphoVaultV1AdapterAbi = exports.morphoMarketV1AdapterV2FactoryAbi = exports.morphoMarketV1AdapterV2Abi = exports.morphoMarketV1AdapterFactoryAbi = exports.morphoMarketV1AdapterAbi = exports.metaMorphoFactoryAbi = exports.metaMorphoAbi = exports.erc5267Abi = exports.erc2612Abi = exports.blueOracleAbi = exports.blueAbi = exports.adaptiveCurveIrmAbi = exports.marketParamsAbi = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "marketParamsAbi", { enumerable: true, get: function () { return blue_sdk_1.marketParamsAbi; } });
|
|
6
6
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
@@ -11,10 +11,6 @@ Object.defineProperty(exports, "erc2612Abi", { enumerable: true, get: function (
|
|
|
11
11
|
Object.defineProperty(exports, "erc5267Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.erc5267Abi; } });
|
|
12
12
|
Object.defineProperty(exports, "metaMorphoAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.metaMorphoAbi; } });
|
|
13
13
|
Object.defineProperty(exports, "metaMorphoFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.metaMorphoFactoryAbi; } });
|
|
14
|
-
Object.defineProperty(exports, "midnightAdapterAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterAbi; } });
|
|
15
|
-
Object.defineProperty(exports, "midnightAdapterFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterFactoryAbi; } });
|
|
16
|
-
Object.defineProperty(exports, "midnightAdapterPriceRatifierV1Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterPriceRatifierV1Abi; } });
|
|
17
|
-
Object.defineProperty(exports, "midnightAdapterRateRatifierV1Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.midnightAdapterRateRatifierV1Abi; } });
|
|
18
14
|
Object.defineProperty(exports, "morphoMarketV1AdapterAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.morphoMarketV1AdapterAbi; } });
|
|
19
15
|
Object.defineProperty(exports, "morphoMarketV1AdapterFactoryAbi", { enumerable: true, get: function () { return blue_sdk_viem_1.morphoMarketV1AdapterFactoryAbi; } });
|
|
20
16
|
Object.defineProperty(exports, "morphoMarketV1AdapterV2Abi", { enumerable: true, get: function () { return blue_sdk_viem_1.morphoMarketV1AdapterV2Abi; } });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter,
|
|
1
|
+
export type { IAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, 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,
|
|
6
|
-
export { AccrualPosition, AccrualVault, AccrualVaultV2,
|
|
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,
|
|
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,
|
|
10
|
+
PreLiquidationPosition, Token, User, Vault, VaultConfig, VaultMarketAllocation, VaultMarketConfig, VaultToken, VaultUser, VaultV2, VaultV2Adapter, VaultV2BlueMarketPublicAllocatorConfig, VaultV2BluePublicAllocatorConfig, VaultV2MorphoMarketV1Adapter, VaultV2MorphoMarketV1AdapterV2, VaultV2MorphoVaultV1Adapter, WrappedToken, } from "@morpho-org/blue-sdk";
|
package/lib/cjs/blue/entities.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WrappedToken = exports.VaultV2MorphoVaultV1Adapter = exports.VaultV2MorphoMarketV1AdapterV2 = exports.VaultV2MorphoMarketV1Adapter = exports.
|
|
3
|
+
exports.WrappedToken = exports.VaultV2MorphoVaultV1Adapter = exports.VaultV2MorphoMarketV1AdapterV2 = exports.VaultV2MorphoMarketV1Adapter = exports.VaultV2BluePublicAllocatorConfig = exports.VaultV2BlueMarketPublicAllocatorConfig = exports.VaultV2Adapter = exports.VaultV2 = exports.VaultUser = exports.VaultToken = exports.VaultMarketConfig = exports.VaultMarketAllocation = exports.VaultConfig = exports.Vault = exports.User = exports.Token = exports.PreLiquidationPosition = exports.PreLiquidationParams = exports.Position = exports.MarketParams = exports.Market = exports.Holding = exports.ExchangeRateWrappedToken = exports.Eip5267Domain = exports.ConstantWrappedToken = exports.AssetBalances = exports.AccrualVaultV2MorphoVaultV1Adapter = exports.AccrualVaultV2MorphoMarketV1AdapterV2 = exports.AccrualVaultV2MorphoMarketV1Adapter = exports.AccrualVaultV2 = exports.AccrualVault = exports.AccrualPosition = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "AccrualPosition", { enumerable: true, get: function () { return blue_sdk_1.AccrualPosition; } });
|
|
6
6
|
Object.defineProperty(exports, "AccrualVault", { enumerable: true, get: function () { return blue_sdk_1.AccrualVault; } });
|
|
7
7
|
Object.defineProperty(exports, "AccrualVaultV2", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2; } });
|
|
8
|
-
Object.defineProperty(exports, "AccrualVaultV2MidnightAdapter", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MidnightAdapter; } });
|
|
9
8
|
Object.defineProperty(exports, "AccrualVaultV2MorphoMarketV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MorphoMarketV1Adapter; } });
|
|
10
9
|
Object.defineProperty(exports, "AccrualVaultV2MorphoMarketV1AdapterV2", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MorphoMarketV1AdapterV2; } });
|
|
11
10
|
Object.defineProperty(exports, "AccrualVaultV2MorphoVaultV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MorphoVaultV1Adapter; } });
|
|
@@ -33,7 +32,6 @@ Object.defineProperty(exports, "VaultV2", { enumerable: true, get: function () {
|
|
|
33
32
|
Object.defineProperty(exports, "VaultV2Adapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2Adapter; } });
|
|
34
33
|
Object.defineProperty(exports, "VaultV2BlueMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BlueMarketPublicAllocatorConfig; } });
|
|
35
34
|
Object.defineProperty(exports, "VaultV2BluePublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BluePublicAllocatorConfig; } });
|
|
36
|
-
Object.defineProperty(exports, "VaultV2MidnightAdapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MidnightAdapter; } });
|
|
37
35
|
Object.defineProperty(exports, "VaultV2MorphoMarketV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MorphoMarketV1Adapter; } });
|
|
38
36
|
Object.defineProperty(exports, "VaultV2MorphoMarketV1AdapterV2", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MorphoMarketV1AdapterV2; } });
|
|
39
37
|
Object.defineProperty(exports, "VaultV2MorphoVaultV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MorphoVaultV1Adapter; } });
|
package/lib/cjs/blue/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidAddressError, InvalidBitLengthError, InvalidMarketParamsError,
|
|
1
|
+
export { BlueErrors, DivisionByZeroError, IncompleteChainRegistryError, InvalidAddressError, InvalidBitLengthError, InvalidMarketParamsError, 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,
|
|
4
|
+
export { getUnsupportedVaultV2Adapter, InvalidNumberError, InvalidPermitDomainChainIdError, InvalidPermitDomainVerifyingContractError, isUnknownOfFactoryError, MalformedTokenMetadataError, MarketParamsIdMismatchError, MissingPermitDomainNameError, NonTupleReturnValueError, UnknownAbiFunctionError, UnnamedAbiOutputsError, UnsupportedPermitDomainExtensionsError, } from "@morpho-org/blue-sdk-viem";
|
package/lib/cjs/blue/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnsupportedPermitDomainExtensionsError = exports.
|
|
3
|
+
exports.UnsupportedPermitDomainExtensionsError = exports.UnnamedAbiOutputsError = exports.UnknownAbiFunctionError = exports.NonTupleReturnValueError = exports.MissingPermitDomainNameError = exports.MarketParamsIdMismatchError = exports.MalformedTokenMetadataError = exports.isUnknownOfFactoryError = exports.InvalidPermitDomainVerifyingContractError = exports.InvalidPermitDomainChainIdError = exports.InvalidNumberError = exports.getUnsupportedVaultV2Adapter = exports.VaultV2Errors = exports.UnsupportedVaultV2AdapterError = exports.UnsupportedPreLiquidationParamsError = exports.UnsupportedMarketIrmError = exports.UnsupportedChainIdError = exports.UnknownVaultConfigError = exports.UnknownTokenPriceError = exports.UnknownTokenError = exports.UnknownOfFactory = exports.UnknownMarketParamsError = exports.UnknownMarketAllocationError = exports.UnknownFactory = exports.UnknownDataError = exports.UnknownAddressError = exports.RegistryValueAlreadyRegisteredError = exports.InvalidMarketParamsError = exports.InvalidBitLengthError = exports.InvalidAddressError = exports.IncompleteChainRegistryError = exports.DivisionByZeroError = exports.BlueErrors = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "BlueErrors", { enumerable: true, get: function () { return blue_sdk_1.BlueErrors; } });
|
|
6
6
|
Object.defineProperty(exports, "DivisionByZeroError", { enumerable: true, get: function () { return blue_sdk_1.DivisionByZeroError; } });
|
|
@@ -8,9 +8,6 @@ Object.defineProperty(exports, "IncompleteChainRegistryError", { enumerable: tru
|
|
|
8
8
|
Object.defineProperty(exports, "InvalidAddressError", { enumerable: true, get: function () { return blue_sdk_1.InvalidAddressError; } });
|
|
9
9
|
Object.defineProperty(exports, "InvalidBitLengthError", { enumerable: true, get: function () { return blue_sdk_1.InvalidBitLengthError; } });
|
|
10
10
|
Object.defineProperty(exports, "InvalidMarketParamsError", { enumerable: true, get: function () { return blue_sdk_1.InvalidMarketParamsError; } });
|
|
11
|
-
Object.defineProperty(exports, "InvalidPositionAccrualStateError", { enumerable: true, get: function () { return blue_sdk_1.InvalidPositionAccrualStateError; } });
|
|
12
|
-
Object.defineProperty(exports, "InvalidPositionLossFactorError", { enumerable: true, get: function () { return blue_sdk_1.InvalidPositionLossFactorError; } });
|
|
13
|
-
Object.defineProperty(exports, "InvalidVaultV2MidnightAdapterMarketsError", { enumerable: true, get: function () { return blue_sdk_1.InvalidVaultV2MidnightAdapterMarketsError; } });
|
|
14
11
|
Object.defineProperty(exports, "RegistryValueAlreadyRegisteredError", { enumerable: true, get: function () { return blue_sdk_1.RegistryValueAlreadyRegisteredError; } });
|
|
15
12
|
Object.defineProperty(exports, "UnknownAddressError", { enumerable: true, get: function () { return blue_sdk_1.UnknownAddressError; } });
|
|
16
13
|
Object.defineProperty(exports, "UnknownDataError", { enumerable: true, get: function () { return blue_sdk_1.UnknownDataError; } });
|
|
@@ -39,5 +36,4 @@ Object.defineProperty(exports, "MissingPermitDomainNameError", { enumerable: tru
|
|
|
39
36
|
Object.defineProperty(exports, "NonTupleReturnValueError", { enumerable: true, get: function () { return blue_sdk_viem_1.NonTupleReturnValueError; } });
|
|
40
37
|
Object.defineProperty(exports, "UnknownAbiFunctionError", { enumerable: true, get: function () { return blue_sdk_viem_1.UnknownAbiFunctionError; } });
|
|
41
38
|
Object.defineProperty(exports, "UnnamedAbiOutputsError", { enumerable: true, get: function () { return blue_sdk_viem_1.UnnamedAbiOutputsError; } });
|
|
42
|
-
Object.defineProperty(exports, "UnresolvedBlockNumberError", { enumerable: true, get: function () { return blue_sdk_viem_1.UnresolvedBlockNumberError; } });
|
|
43
39
|
Object.defineProperty(exports, "UnsupportedPermitDomainExtensionsError", { enumerable: true, get: function () { return blue_sdk_viem_1.UnsupportedPermitDomainExtensionsError; } });
|
package/lib/cjs/blue/fetch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter,
|
|
1
|
+
export { fetchAccrualPosition, fetchAccrualVault, fetchAccrualVaultV2, fetchAccrualVaultV2Adapter, 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,
|
|
5
|
+
fetchPreLiquidationPosition, fetchToken, fetchUser, fetchVault, fetchVaultConfig, fetchVaultMarketAllocation, fetchVaultMarketConfig, fetchVaultUser, fetchVaultV2, fetchVaultV2Adapter, fetchVaultV2BlueMarketPublicAllocatorConfig, fetchVaultV2BluePublicAllocatorConfig, fetchVaultV2BluePublicAllocatorData, fetchVaultV2MorphoMarketV1Adapter, fetchVaultV2MorphoMarketV1AdapterV2, fetchVaultV2MorphoVaultV1Adapter, } from "@morpho-org/blue-sdk-viem";
|
package/lib/cjs/blue/fetch.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchVaultV2MorphoVaultV1Adapter = exports.fetchVaultV2MorphoMarketV1AdapterV2 = exports.fetchVaultV2MorphoMarketV1Adapter = exports.
|
|
3
|
+
exports.fetchVaultV2MorphoVaultV1Adapter = exports.fetchVaultV2MorphoMarketV1AdapterV2 = exports.fetchVaultV2MorphoMarketV1Adapter = exports.fetchVaultV2BluePublicAllocatorData = exports.fetchVaultV2BluePublicAllocatorConfig = exports.fetchVaultV2BlueMarketPublicAllocatorConfig = exports.fetchVaultV2Adapter = exports.fetchVaultV2 = exports.fetchVaultUser = exports.fetchVaultMarketConfig = exports.fetchVaultMarketAllocation = exports.fetchVaultConfig = exports.fetchVault = exports.fetchUser = exports.fetchToken = exports.fetchPreLiquidationPosition = exports.fetchPreLiquidationParams = exports.fetchPosition = exports.fetchMarketParams = exports.fetchMarket = exports.fetchHolding = exports.fetchAccrualVaultV2MorphoVaultV1Adapter = exports.fetchAccrualVaultV2MorphoMarketV1AdapterV2 = exports.fetchAccrualVaultV2MorphoMarketV1Adapter = exports.fetchAccrualVaultV2Adapter = exports.fetchAccrualVaultV2 = exports.fetchAccrualVault = exports.fetchAccrualPosition = void 0;
|
|
4
4
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
5
5
|
Object.defineProperty(exports, "fetchAccrualPosition", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualPosition; } });
|
|
6
6
|
Object.defineProperty(exports, "fetchAccrualVault", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVault; } });
|
|
7
7
|
Object.defineProperty(exports, "fetchAccrualVaultV2", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVaultV2; } });
|
|
8
8
|
Object.defineProperty(exports, "fetchAccrualVaultV2Adapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVaultV2Adapter; } });
|
|
9
|
-
Object.defineProperty(exports, "fetchAccrualVaultV2MidnightAdapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVaultV2MidnightAdapter; } });
|
|
10
9
|
Object.defineProperty(exports, "fetchAccrualVaultV2MorphoMarketV1Adapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVaultV2MorphoMarketV1Adapter; } });
|
|
11
10
|
Object.defineProperty(exports, "fetchAccrualVaultV2MorphoMarketV1AdapterV2", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVaultV2MorphoMarketV1AdapterV2; } });
|
|
12
11
|
Object.defineProperty(exports, "fetchAccrualVaultV2MorphoVaultV1Adapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchAccrualVaultV2MorphoVaultV1Adapter; } });
|
|
@@ -30,7 +29,6 @@ Object.defineProperty(exports, "fetchVaultV2Adapter", { enumerable: true, get: f
|
|
|
30
29
|
Object.defineProperty(exports, "fetchVaultV2BlueMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2BlueMarketPublicAllocatorConfig; } });
|
|
31
30
|
Object.defineProperty(exports, "fetchVaultV2BluePublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2BluePublicAllocatorConfig; } });
|
|
32
31
|
Object.defineProperty(exports, "fetchVaultV2BluePublicAllocatorData", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2BluePublicAllocatorData; } });
|
|
33
|
-
Object.defineProperty(exports, "fetchVaultV2MidnightAdapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2MidnightAdapter; } });
|
|
34
32
|
Object.defineProperty(exports, "fetchVaultV2MorphoMarketV1Adapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2MorphoMarketV1Adapter; } });
|
|
35
33
|
Object.defineProperty(exports, "fetchVaultV2MorphoMarketV1AdapterV2", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2MorphoMarketV1AdapterV2; } });
|
|
36
34
|
Object.defineProperty(exports, "fetchVaultV2MorphoVaultV1Adapter", { enumerable: true, get: function () { return blue_sdk_viem_1.fetchVaultV2MorphoVaultV1Adapter; } });
|
package/lib/cjs/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,
|
|
6
|
+
getDefaultPreLiquidationParams, MarketUtils, MathLib, SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, 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/cjs/blue/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.safeParseUnits = exports.safeParseNumber = exports.safeGetAddress = exports.restructure = exports.readContractRestructured = exports.optionalBoolean = exports.MetaMorphoAction = exports.isUndecodableResultError = exports.isTransportError = exports.isContractRevertError = exports.getPermitTypedData = exports.getPermit2TransferFromTypedData = exports.getPermit2PermitTypedData = exports.getAuthorizationTypedData = exports.decodeBytes32String = exports.catchRevertOnly = exports.VaultV2Utils = exports.
|
|
3
|
+
exports.safeParseUnits = exports.safeParseNumber = exports.safeGetAddress = exports.restructure = exports.readContractRestructured = exports.optionalBoolean = exports.MetaMorphoAction = exports.isUndecodableResultError = exports.isTransportError = exports.isContractRevertError = exports.getPermitTypedData = exports.getPermit2TransferFromTypedData = exports.getPermit2PermitTypedData = exports.getAuthorizationTypedData = exports.decodeBytes32String = exports.catchRevertOnly = exports.VaultV2Utils = exports.VaultV2BluePublicAllocatorConfigUtils = exports.VaultV2BlueMarketPublicAllocatorConfigUtils = exports.VaultUtils = exports.SharesMath = exports.MathLib = exports.MarketUtils = exports.getDefaultPreLiquidationParams = exports.defaultPreLiquidationParamsRegistry = exports.CapacityLimitReason = exports.AdaptiveCurveIrmLib = void 0;
|
|
4
4
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
5
|
Object.defineProperty(exports, "AdaptiveCurveIrmLib", { enumerable: true, get: function () { return blue_sdk_1.AdaptiveCurveIrmLib; } });
|
|
6
6
|
Object.defineProperty(exports, "CapacityLimitReason", { enumerable: true, get: function () { return blue_sdk_1.CapacityLimitReason; } });
|
|
@@ -14,7 +14,6 @@ Object.defineProperty(exports, "SharesMath", { enumerable: true, get: function (
|
|
|
14
14
|
Object.defineProperty(exports, "VaultUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultUtils; } });
|
|
15
15
|
Object.defineProperty(exports, "VaultV2BlueMarketPublicAllocatorConfigUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BlueMarketPublicAllocatorConfigUtils; } });
|
|
16
16
|
Object.defineProperty(exports, "VaultV2BluePublicAllocatorConfigUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BluePublicAllocatorConfigUtils; } });
|
|
17
|
-
Object.defineProperty(exports, "VaultV2MidnightAdapterUtils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MidnightAdapterUtils; } });
|
|
18
17
|
Object.defineProperty(exports, "VaultV2Utils", { enumerable: true, get: function () { return blue_sdk_1.VaultV2Utils; } });
|
|
19
18
|
var blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
20
19
|
Object.defineProperty(exports, "catchRevertOnly", { enumerable: true, get: function () { return blue_sdk_viem_1.catchRevertOnly; } });
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export type { IAccrualPosition as IBlueAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter,
|
|
1
|
+
export type { IAccrualPosition as IBlueAccrualPosition, IAccrualVault, IAccrualVaultV2, IAccrualVaultV2Adapter, 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,
|
|
6
|
-
export { AccrualPosition as BlueAccrualPosition, AccrualVault, AccrualVaultV2,
|
|
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,
|
|
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,
|
|
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";
|
|
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";
|
|
@@ -14,12 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.VaultV2BlueReallocationData = exports.MorphoVaultV2 = exports.MorphoVaultV1 = exports.MorphoMidnight = exports.MorphoBlue = exports.MidnightTree = exports.MidnightPosition = exports.MidnightOffer = exports.MidnightMarketParams = exports.MidnightMarket = exports.MidnightGroup = exports.MidnightAccrualPosition = exports.WrappedToken = exports.VaultV2MorphoVaultV1Adapter = exports.VaultV2MorphoMarketV1AdapterV2 = exports.VaultV2MorphoMarketV1Adapter = exports.
|
|
17
|
+
exports.VaultV2BlueReallocationData = exports.MorphoVaultV2 = exports.MorphoVaultV1 = exports.MorphoMidnight = exports.MorphoBlue = exports.MidnightTree = exports.MidnightPosition = exports.MidnightOffer = exports.MidnightMarketParams = exports.MidnightMarket = exports.MidnightGroup = exports.MidnightAccrualPosition = exports.WrappedToken = exports.VaultV2MorphoVaultV1Adapter = exports.VaultV2MorphoMarketV1AdapterV2 = exports.VaultV2MorphoMarketV1Adapter = exports.VaultV2BluePublicAllocatorConfig = exports.VaultV2BlueMarketPublicAllocatorConfig = exports.VaultV2Adapter = exports.VaultV2 = exports.VaultUser = exports.VaultToken = exports.VaultMarketConfig = exports.VaultMarketAllocation = exports.VaultConfig = exports.Vault = exports.BlueUser = exports.Token = exports.BluePreLiquidationPosition = exports.BluePreLiquidationParams = exports.BluePosition = exports.BlueMarketParams = exports.BlueMarket = exports.Holding = exports.ExchangeRateWrappedToken = exports.Eip5267Domain = exports.ConstantWrappedToken = exports.AssetBalances = exports.AccrualVaultV2MorphoVaultV1Adapter = exports.AccrualVaultV2MorphoMarketV1AdapterV2 = exports.AccrualVaultV2MorphoMarketV1Adapter = exports.AccrualVaultV2 = exports.AccrualVault = exports.BlueAccrualPosition = void 0;
|
|
18
18
|
var blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
19
19
|
Object.defineProperty(exports, "BlueAccrualPosition", { enumerable: true, get: function () { return blue_sdk_1.AccrualPosition; } });
|
|
20
20
|
Object.defineProperty(exports, "AccrualVault", { enumerable: true, get: function () { return blue_sdk_1.AccrualVault; } });
|
|
21
21
|
Object.defineProperty(exports, "AccrualVaultV2", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2; } });
|
|
22
|
-
Object.defineProperty(exports, "AccrualVaultV2MidnightAdapter", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MidnightAdapter; } });
|
|
23
22
|
Object.defineProperty(exports, "AccrualVaultV2MorphoMarketV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MorphoMarketV1Adapter; } });
|
|
24
23
|
Object.defineProperty(exports, "AccrualVaultV2MorphoMarketV1AdapterV2", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MorphoMarketV1AdapterV2; } });
|
|
25
24
|
Object.defineProperty(exports, "AccrualVaultV2MorphoVaultV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.AccrualVaultV2MorphoVaultV1Adapter; } });
|
|
@@ -47,7 +46,6 @@ Object.defineProperty(exports, "VaultV2", { enumerable: true, get: function () {
|
|
|
47
46
|
Object.defineProperty(exports, "VaultV2Adapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2Adapter; } });
|
|
48
47
|
Object.defineProperty(exports, "VaultV2BlueMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BlueMarketPublicAllocatorConfig; } });
|
|
49
48
|
Object.defineProperty(exports, "VaultV2BluePublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultV2BluePublicAllocatorConfig; } });
|
|
50
|
-
Object.defineProperty(exports, "VaultV2MidnightAdapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MidnightAdapter; } });
|
|
51
49
|
Object.defineProperty(exports, "VaultV2MorphoMarketV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MorphoMarketV1Adapter; } });
|
|
52
50
|
Object.defineProperty(exports, "VaultV2MorphoMarketV1AdapterV2", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MorphoMarketV1AdapterV2; } });
|
|
53
51
|
Object.defineProperty(exports, "VaultV2MorphoVaultV1Adapter", { enumerable: true, get: function () { return blue_sdk_1.VaultV2MorphoVaultV1Adapter; } });
|
|
@@ -155,9 +155,10 @@ export interface MidnightPositionHealthParams {
|
|
|
155
155
|
/** Owner-bound snapshot returned by `getPositionData`. */
|
|
156
156
|
readonly positionData: AccrualPosition;
|
|
157
157
|
/** Values from `price()` on each `marketData.params.collateralParams[i].oracle`,
|
|
158
|
-
* indexed like `positionData.collateral` and scaled by `ORACLE_PRICE_SCALE`.
|
|
159
|
-
*
|
|
160
|
-
*
|
|
158
|
+
* indexed like `positionData.collateral` and scaled by `ORACLE_PRICE_SCALE`. Borrow methods always
|
|
159
|
+
* need prices. `takeRepayWithdrawCollateral` and `repayWithdrawCollateral` need them only when
|
|
160
|
+
* `collateralWithdrawals` is non-empty and the SDK's conservative post-operation debt is positive;
|
|
161
|
+
* otherwise an empty array is safe.
|
|
161
162
|
*/
|
|
162
163
|
readonly collateralPrices: readonly bigint[];
|
|
163
164
|
}
|
|
@@ -69,9 +69,8 @@ export interface VaultV2Actions {
|
|
|
69
69
|
* owner is consumed and none was passed explicitly.
|
|
70
70
|
* @throws {Permit2SignatureTransferNonceAlreadyUsedError} from `getRequirements()` when the
|
|
71
71
|
* explicit Permit2 nonce is consumed.
|
|
72
|
-
* @throws {InputExceedsMaxError} when funding or the deadline exceeds uint256,
|
|
73
|
-
*
|
|
74
|
-
* fits and `max` is `0n`), or from `getRequirements()` when the Permit2 nonce exceeds uint256.
|
|
72
|
+
* @throws {InputExceedsMaxError} when funding or the deadline exceeds uint256, or from
|
|
73
|
+
* `getRequirements()` when the Permit2 nonce exceeds uint256.
|
|
75
74
|
* @throws {AmbiguousRequirementSignaturesError} from `buildTx()` when multiple token signatures are supplied.
|
|
76
75
|
* @throws {UnexpectedRequirementSignatureError} from `buildTx()` when an unsupported signature is supplied.
|
|
77
76
|
* @throws {BundlesPermitMismatchError} from `buildTx()` when the signature's spender, amount or
|
|
@@ -154,9 +153,7 @@ export interface VaultV2Actions {
|
|
|
154
153
|
* @throws {NonPositiveInputError} when `amount` or the computed share cap is not positive.
|
|
155
154
|
* @throws {ExpiredDeadlineError} when `deadline` is not in the future at handle creation or
|
|
156
155
|
* at any `getRequirements()` call.
|
|
157
|
-
* @throws {InputExceedsMaxError} when `amount` or `deadline` exceeds uint256 at handle creation
|
|
158
|
-
* or when the vault's liquidity adapter is a Midnight adapter and `amount` exceeds the vault's
|
|
159
|
-
* idle assets.
|
|
156
|
+
* @throws {InputExceedsMaxError} when `amount` or `deadline` exceeds uint256 at handle creation.
|
|
160
157
|
* @throws {NegativeInputError} when `referralFeePct` or `slippageTolerance` is negative.
|
|
161
158
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD.
|
|
162
159
|
* @throws {ReferralFeeRecipientMissingError} when a positive referral fee has no nonzero recipient.
|
|
@@ -221,24 +218,7 @@ export interface VaultV2Actions {
|
|
|
221
218
|
* @throws {NonPositiveInputError} when `shares` is not positive.
|
|
222
219
|
* @throws {ExpiredDeadlineError} when `deadline` is not in the future at handle creation or
|
|
223
220
|
* requirement resolution.
|
|
224
|
-
* @throws {InputExceedsMaxError} when `shares` or `deadline` exceeds uint256
|
|
225
|
-
* `getRequirements()` when the vault's liquidity adapter is a Midnight adapter and `shares`
|
|
226
|
-
* are worth more than the vault's idle assets.
|
|
227
|
-
* @throws {UnknownBlueFactory} from `getRequirements()` when the configured chain has no VaultV2 factory.
|
|
228
|
-
* @throws {UnknownBlueOfFactory} from `getRequirements()` when the vault is not a VaultV2 from the
|
|
229
|
-
* configured factory.
|
|
230
|
-
* @throws {UnsupportedBlueVaultV2AdapterError} from `getRequirements()` when the vault or one of its
|
|
231
|
-
* adapters uses an unsupported adapter class.
|
|
232
|
-
* @throws {UnsupportedBlueMarketIrmError} from `getRequirements()` when the vault's liquidity adapter
|
|
233
|
-
* is a Midnight adapter and accrual projects an underlying market with positive debt that uses an
|
|
234
|
-
* unsupported IRM.
|
|
235
|
-
* @throws {UnknownBlueMarketAllocationError} from `getRequirements()` when the vault's liquidity
|
|
236
|
-
* adapter is a Midnight adapter and accrual meets a nested Vault V1 withdraw queue market without
|
|
237
|
-
* allocation data.
|
|
238
|
-
* @throws {InvalidMidnightPositionLossFactorError} from `getRequirements()` when the vault's liquidity
|
|
239
|
-
* adapter is a Midnight adapter and accrual meets a market loss factor below a position's.
|
|
240
|
-
* @throws {InvalidMidnightPositionAccrualStateError} from `getRequirements()` when the vault's
|
|
241
|
-
* liquidity adapter is a Midnight adapter and accrual meets invalid Midnight position inputs.
|
|
221
|
+
* @throws {InputExceedsMaxError} when `shares` or `deadline` exceeds uint256.
|
|
242
222
|
* @throws {NegativeInputError} when `referralFeePct` is negative.
|
|
243
223
|
* @throws {ReferralFeePctExceededError} when `referralFeePct` is not below WAD.
|
|
244
224
|
* @throws {ReferralFeeRecipientMissingError} when a positive fee has no non-zero recipient.
|
|
@@ -246,7 +226,7 @@ export interface VaultV2Actions {
|
|
|
246
226
|
* @throws {UnknownAddressError} when VaultBundlesV1 is not registered on the target chain.
|
|
247
227
|
* @throws {MissingContractCodeError} from `getRequirements()` when a fixed bundles or protocol
|
|
248
228
|
* contract has no code at its registered address.
|
|
249
|
-
* @throws {viem.BaseError} from `getRequirements()` when
|
|
229
|
+
* @throws {viem.BaseError} from `getRequirements()` when an allowance, nonce, `eth_chainId`, or
|
|
250
230
|
* `eth_getCode` read fails.
|
|
251
231
|
* @throws {UnknownTokenError} from `getRequirements()` when the share token fetched by
|
|
252
232
|
* `getData()` has unusable decimals.
|
|
@@ -323,11 +303,9 @@ export interface VaultV2Actions {
|
|
|
323
303
|
* @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
|
|
324
304
|
* @throws {ExpiredDeadlineError} when `deadline` is not in the future at handle creation or
|
|
325
305
|
* requirement resolution.
|
|
326
|
-
* @throws {VaultV2SingleAdapterRequiredError} when the vault does not have one adapter
|
|
327
|
-
* a vault that mixes Blue and Midnight adapters.
|
|
306
|
+
* @throws {VaultV2SingleAdapterRequiredError} when the vault does not have one adapter.
|
|
328
307
|
* @throws {AdapterNotPartOfVaultError} when `adapter` is not the vault's adapter.
|
|
329
|
-
* @throws {VaultV2UnsupportedExitAdapterError} when the adapter is not a MorphoMarketV1AdapterV2
|
|
330
|
-
* including a Midnight adapter.
|
|
308
|
+
* @throws {VaultV2UnsupportedExitAdapterError} when the adapter is not a MorphoMarketV1AdapterV2.
|
|
331
309
|
* @throws {InKindRedeemCoverageError} when the deduplicated list cannot cover the exit.
|
|
332
310
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
333
311
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
@@ -451,11 +429,9 @@ export interface VaultV2Actions {
|
|
|
451
429
|
* @throws {ExpiredDeadlineError} when `deadline` is not in the future at handle creation or
|
|
452
430
|
* requirement resolution.
|
|
453
431
|
* @throws {ExcessiveSlippageToleranceError} when `slippageTolerance` exceeds the SDK maximum.
|
|
454
|
-
* @throws {VaultV2SingleAdapterRequiredError} when the vault does not have exactly one adapter
|
|
455
|
-
* including a vault that mixes Blue and Midnight adapters.
|
|
432
|
+
* @throws {VaultV2SingleAdapterRequiredError} when the vault does not have exactly one adapter.
|
|
456
433
|
* @throws {AdapterNotPartOfVaultError} when `adapter` is not the vault's adapter.
|
|
457
|
-
* @throws {VaultV2UnsupportedExitAdapterError} when the adapter is not a MorphoMarketV1AdapterV2
|
|
458
|
-
* including a Midnight adapter.
|
|
434
|
+
* @throws {VaultV2UnsupportedExitAdapterError} when the adapter is not a MorphoMarketV1AdapterV2.
|
|
459
435
|
* @throws {VaultV2UnsupportedLiquidityAdapterError} when the vault routes liquidity through
|
|
460
436
|
* another adapter.
|
|
461
437
|
* @throws {VaultV2UndecodableLiquidityDataError} when the vault's `liquidityData` does not decode
|