@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.
Files changed (88) hide show
  1. package/README.md +4 -0
  2. package/lib/cjs/abis.d.ts +543 -0
  3. package/lib/cjs/abis.js +738 -0
  4. package/lib/cjs/actions/blue/borrow.d.ts +5 -2
  5. package/lib/cjs/actions/blue/borrow.js +1 -1
  6. package/lib/cjs/actions/blue/refinance.d.ts +7 -2
  7. package/lib/cjs/actions/blue/refinance.js +3 -1
  8. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +6 -2
  9. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +2 -1
  10. package/lib/cjs/actions/blue/withdraw.d.ts +2 -1
  11. package/lib/cjs/actions/blue/withdraw.js +1 -1
  12. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.d.ts +2 -2
  13. package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +2 -2
  14. package/lib/cjs/actions/midnight/takeBorrow.d.ts +2 -2
  15. package/lib/cjs/actions/midnight/takeBorrow.js +2 -2
  16. package/lib/cjs/actions/midnight/takeLend.d.ts +2 -2
  17. package/lib/cjs/actions/midnight/takeLend.js +2 -2
  18. package/lib/cjs/blue/types.d.ts +3 -1
  19. package/lib/cjs/blue/utils.d.ts +3 -1
  20. package/lib/cjs/blue/utils.js +1 -0
  21. package/lib/cjs/bundler/actions.d.ts +2 -0
  22. package/lib/cjs/bundler/actions.js +2 -0
  23. package/lib/cjs/bundler/types.d.ts +10 -1
  24. package/lib/cjs/entities/blue/blue.d.ts +30 -5
  25. package/lib/cjs/entities/blue/blue.js +8 -2
  26. package/lib/cjs/entities/midnight/midnight.d.ts +2 -2
  27. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +69 -12
  28. package/lib/cjs/entities/vaultV1/vaultV1.js +11 -14
  29. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +18 -3
  30. package/lib/cjs/entities/vaultV1ReallocationData.js +11 -1
  31. package/lib/cjs/entities/vaultV2/vaultV2.js +6 -18
  32. package/lib/cjs/entities/vaultV2BlueReallocationData.js +5 -1
  33. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +4 -1
  34. package/lib/cjs/helpers/computeVaultV1Reallocations.js +4 -1
  35. package/lib/cjs/helpers/metadata.d.ts +3 -5
  36. package/lib/cjs/helpers/metadata.js +4 -6
  37. package/lib/cjs/helpers/validate.d.ts +2 -0
  38. package/lib/cjs/helpers/validate.js +2 -0
  39. package/lib/cjs/types/error.d.ts +34 -6
  40. package/lib/cjs/types/error.js +34 -6
  41. package/lib/cjs/types/sharedLiquidity.d.ts +26 -3
  42. package/lib/cjs/types.d.ts +3 -1
  43. package/lib/cjs/utils.d.ts +3 -1
  44. package/lib/cjs/utils.js +1 -0
  45. package/lib/esm/abis.d.ts +543 -0
  46. package/lib/esm/abis.js +737 -0
  47. package/lib/esm/actions/blue/borrow.d.ts +5 -2
  48. package/lib/esm/actions/blue/borrow.js +1 -1
  49. package/lib/esm/actions/blue/refinance.d.ts +7 -2
  50. package/lib/esm/actions/blue/refinance.js +3 -1
  51. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +6 -2
  52. package/lib/esm/actions/blue/supplyCollateralBorrow.js +2 -1
  53. package/lib/esm/actions/blue/withdraw.d.ts +2 -1
  54. package/lib/esm/actions/blue/withdraw.js +1 -1
  55. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.d.ts +2 -2
  56. package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +2 -2
  57. package/lib/esm/actions/midnight/takeBorrow.d.ts +2 -2
  58. package/lib/esm/actions/midnight/takeBorrow.js +2 -2
  59. package/lib/esm/actions/midnight/takeLend.d.ts +2 -2
  60. package/lib/esm/actions/midnight/takeLend.js +2 -2
  61. package/lib/esm/blue/types.d.ts +3 -1
  62. package/lib/esm/blue/utils.d.ts +3 -1
  63. package/lib/esm/blue/utils.js +3 -1
  64. package/lib/esm/bundler/actions.d.ts +2 -0
  65. package/lib/esm/bundler/actions.js +2 -0
  66. package/lib/esm/bundler/types.d.ts +10 -1
  67. package/lib/esm/entities/blue/blue.d.ts +30 -5
  68. package/lib/esm/entities/blue/blue.js +8 -2
  69. package/lib/esm/entities/midnight/midnight.d.ts +2 -2
  70. package/lib/esm/entities/vaultV1/vaultV1.d.ts +69 -12
  71. package/lib/esm/entities/vaultV1/vaultV1.js +11 -14
  72. package/lib/esm/entities/vaultV1ReallocationData.d.ts +18 -3
  73. package/lib/esm/entities/vaultV1ReallocationData.js +13 -2
  74. package/lib/esm/entities/vaultV2/vaultV2.js +7 -19
  75. package/lib/esm/entities/vaultV2BlueReallocationData.js +5 -1
  76. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +4 -1
  77. package/lib/esm/helpers/computeVaultV1Reallocations.js +4 -1
  78. package/lib/esm/helpers/metadata.d.ts +3 -5
  79. package/lib/esm/helpers/metadata.js +4 -6
  80. package/lib/esm/helpers/validate.d.ts +2 -0
  81. package/lib/esm/helpers/validate.js +2 -0
  82. package/lib/esm/types/error.d.ts +34 -6
  83. package/lib/esm/types/error.js +34 -6
  84. package/lib/esm/types/sharedLiquidity.d.ts +26 -3
  85. package/lib/esm/types.d.ts +3 -1
  86. package/lib/esm/utils.d.ts +3 -1
  87. package/lib/esm/utils.js +3 -1
  88. package/package.json +8 -8
@@ -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, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
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, getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
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.8.0",
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.7.0",
165
- "@morpho-org/blue-sdk-viem": "^5.4.0",
166
- "@morpho-org/midnight-sdk": "^1.3.0",
167
- "@morpho-org/morpho-ts": "^2.11.0"
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": "^7.0.2",
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": "$npm_execpath build",
182
- "build": "tsc --noEmit && $npm_execpath build:cjs && $npm_execpath build:esm",
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"