@morpho-org/morpho-sdk 5.8.0 → 5.10.1
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/README.md +4 -0
- package/lib/cjs/abis.d.ts +543 -0
- package/lib/cjs/abis.js +738 -0
- package/lib/cjs/actions/blue/borrow.d.ts +5 -2
- package/lib/cjs/actions/blue/borrow.js +1 -1
- package/lib/cjs/actions/blue/refinance.d.ts +7 -2
- package/lib/cjs/actions/blue/refinance.js +3 -1
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +6 -2
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +2 -1
- package/lib/cjs/actions/blue/withdraw.d.ts +2 -1
- package/lib/cjs/actions/blue/withdraw.js +1 -1
- package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.d.ts +2 -2
- package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +2 -2
- package/lib/cjs/actions/midnight/takeBorrow.d.ts +2 -2
- package/lib/cjs/actions/midnight/takeBorrow.js +2 -2
- package/lib/cjs/actions/midnight/takeLend.d.ts +2 -2
- package/lib/cjs/actions/midnight/takeLend.js +2 -2
- package/lib/cjs/blue/types.d.ts +3 -1
- package/lib/cjs/blue/utils.d.ts +3 -1
- package/lib/cjs/blue/utils.js +1 -0
- package/lib/cjs/bundler/actions.d.ts +2 -0
- package/lib/cjs/bundler/actions.js +2 -0
- package/lib/cjs/bundler/types.d.ts +10 -1
- package/lib/cjs/entities/blue/blue.d.ts +30 -5
- package/lib/cjs/entities/blue/blue.js +8 -2
- package/lib/cjs/entities/midnight/midnight.d.ts +2 -2
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +69 -12
- package/lib/cjs/entities/vaultV1/vaultV1.js +11 -14
- package/lib/cjs/entities/vaultV1ReallocationData.d.ts +18 -3
- package/lib/cjs/entities/vaultV1ReallocationData.js +11 -1
- package/lib/cjs/entities/vaultV2/vaultV2.js +6 -18
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +5 -1
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +4 -1
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +4 -1
- package/lib/cjs/helpers/metadata.d.ts +3 -5
- package/lib/cjs/helpers/metadata.js +4 -6
- package/lib/cjs/helpers/validate.d.ts +2 -0
- package/lib/cjs/helpers/validate.js +2 -0
- package/lib/cjs/types/error.d.ts +34 -6
- package/lib/cjs/types/error.js +34 -6
- package/lib/cjs/types/sharedLiquidity.d.ts +26 -3
- package/lib/cjs/types.d.ts +3 -1
- package/lib/cjs/utils.d.ts +3 -1
- package/lib/cjs/utils.js +1 -0
- package/lib/esm/abis.d.ts +543 -0
- package/lib/esm/abis.js +737 -0
- package/lib/esm/actions/blue/borrow.d.ts +5 -2
- package/lib/esm/actions/blue/borrow.js +1 -1
- package/lib/esm/actions/blue/refinance.d.ts +7 -2
- package/lib/esm/actions/blue/refinance.js +3 -1
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +6 -2
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +2 -1
- package/lib/esm/actions/blue/withdraw.d.ts +2 -1
- package/lib/esm/actions/blue/withdraw.js +1 -1
- package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.d.ts +2 -2
- package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +2 -2
- package/lib/esm/actions/midnight/takeBorrow.d.ts +2 -2
- package/lib/esm/actions/midnight/takeBorrow.js +2 -2
- package/lib/esm/actions/midnight/takeLend.d.ts +2 -2
- package/lib/esm/actions/midnight/takeLend.js +2 -2
- package/lib/esm/blue/types.d.ts +3 -1
- package/lib/esm/blue/utils.d.ts +3 -1
- package/lib/esm/blue/utils.js +3 -1
- package/lib/esm/bundler/actions.d.ts +2 -0
- package/lib/esm/bundler/actions.js +2 -0
- package/lib/esm/bundler/types.d.ts +10 -1
- package/lib/esm/entities/blue/blue.d.ts +30 -5
- package/lib/esm/entities/blue/blue.js +8 -2
- package/lib/esm/entities/midnight/midnight.d.ts +2 -2
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +69 -12
- package/lib/esm/entities/vaultV1/vaultV1.js +11 -14
- package/lib/esm/entities/vaultV1ReallocationData.d.ts +18 -3
- package/lib/esm/entities/vaultV1ReallocationData.js +13 -2
- package/lib/esm/entities/vaultV2/vaultV2.js +7 -19
- package/lib/esm/entities/vaultV2BlueReallocationData.js +5 -1
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +4 -1
- package/lib/esm/helpers/computeVaultV1Reallocations.js +4 -1
- package/lib/esm/helpers/metadata.d.ts +3 -5
- package/lib/esm/helpers/metadata.js +4 -6
- package/lib/esm/helpers/validate.d.ts +2 -0
- package/lib/esm/helpers/validate.js +2 -0
- package/lib/esm/types/error.d.ts +34 -6
- package/lib/esm/types/error.js +34 -6
- package/lib/esm/types/sharedLiquidity.d.ts +26 -3
- package/lib/esm/types.d.ts +3 -1
- package/lib/esm/utils.d.ts +3 -1
- package/lib/esm/utils.js +3 -1
- package/package.json +8 -8
package/lib/esm/utils.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ MarketUtils, MathLib, SharesMath as BlueSharesMath,
|
|
|
8
8
|
SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
9
9
|
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData,
|
|
10
10
|
/** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
|
|
11
|
-
getAuthorizationTypedData,
|
|
11
|
+
getAuthorizationTypedData,
|
|
12
|
+
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
13
|
+
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
12
14
|
export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
|
|
13
15
|
/** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
|
|
14
16
|
EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
|
package/lib/esm/utils.js
CHANGED
|
@@ -7,7 +7,9 @@ MarketUtils, MathLib, SharesMath as BlueSharesMath,
|
|
|
7
7
|
SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
8
8
|
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData,
|
|
9
9
|
/** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
|
|
10
|
-
getAuthorizationTypedData,
|
|
10
|
+
getAuthorizationTypedData,
|
|
11
|
+
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
12
|
+
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
11
13
|
export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
|
|
12
14
|
/** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
|
|
13
15
|
EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/morpho-sdk",
|
|
3
3
|
"description": "Abstraction layer for Morpho's complexity.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.10.1",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Foulks-Plb <https://x.com/FoulkPlb>"
|
|
@@ -161,10 +161,10 @@
|
|
|
161
161
|
],
|
|
162
162
|
"dependencies": {
|
|
163
163
|
"zod": "^4.4.3",
|
|
164
|
-
"@morpho-org/blue-sdk": "^6.
|
|
165
|
-
"@morpho-org/blue-sdk-viem": "^5.
|
|
166
|
-
"@morpho-org/midnight-sdk": "^1.
|
|
167
|
-
"@morpho-org/morpho-ts": "^2.
|
|
164
|
+
"@morpho-org/blue-sdk": "^6.8.0",
|
|
165
|
+
"@morpho-org/blue-sdk-viem": "^5.6.1",
|
|
166
|
+
"@morpho-org/midnight-sdk": "^1.4.0",
|
|
167
|
+
"@morpho-org/morpho-ts": "^2.12.0"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"viem": "^2.0.0"
|
|
@@ -172,14 +172,14 @@
|
|
|
172
172
|
"devDependencies": {
|
|
173
173
|
"dotenv": "^17.4.2",
|
|
174
174
|
"fast-check": "^4.9.0",
|
|
175
|
-
"typescript": "
|
|
175
|
+
"typescript": "7.0.2",
|
|
176
176
|
"viem": "^2.55.10",
|
|
177
177
|
"vitest": "^4.1.10",
|
|
178
178
|
"@morpho-org/test": "^2.10.0"
|
|
179
179
|
},
|
|
180
180
|
"scripts": {
|
|
181
|
-
"prepublish": "
|
|
182
|
-
"build": "tsc --noEmit &&
|
|
181
|
+
"prepublish": "pnpm build",
|
|
182
|
+
"build": "tsc --noEmit && pnpm build:cjs && pnpm build:esm",
|
|
183
183
|
"build:cjs": "tsc --build tsconfig.build.cjs.json && echo '{\"type\":\"commonjs\"}' > lib/cjs/package.json",
|
|
184
184
|
"build:esm": "tsc --build tsconfig.build.esm.json && echo '{\"type\":\"module\"}' > lib/esm/package.json",
|
|
185
185
|
"test": "vitest --root ../.. --project morpho-sdk --project morpho-sdk-fork"
|