@morpho-org/morpho-sdk 2.0.0 → 3.0.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.
Files changed (202) hide show
  1. package/lib/cjs/abis.d.ts +2816 -0
  2. package/lib/cjs/abis.js +1951 -0
  3. package/lib/cjs/actions/index.d.ts +3 -0
  4. package/lib/cjs/actions/marketV1/borrow.js +7 -10
  5. package/lib/cjs/actions/marketV1/buildReallocationActions.d.ts +2 -3
  6. package/lib/cjs/actions/marketV1/buildReallocationActions.js +1 -2
  7. package/lib/cjs/actions/marketV1/repay.d.ts +2 -0
  8. package/lib/cjs/actions/marketV1/repay.js +7 -8
  9. package/lib/cjs/actions/marketV1/repayWithdrawCollateral.d.ts +2 -0
  10. package/lib/cjs/actions/marketV1/repayWithdrawCollateral.js +9 -10
  11. package/lib/cjs/actions/marketV1/supplyCollateral.d.ts +2 -0
  12. package/lib/cjs/actions/marketV1/supplyCollateral.js +11 -12
  13. package/lib/cjs/actions/marketV1/supplyCollateralBorrow.d.ts +2 -0
  14. package/lib/cjs/actions/marketV1/supplyCollateralBorrow.js +13 -14
  15. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +2 -2
  16. package/lib/cjs/actions/requirements/getRequirementsAction.d.ts +28 -4
  17. package/lib/cjs/actions/requirements/getRequirementsAction.js +28 -4
  18. package/lib/cjs/actions/requirements/getRequirementsApproval.js +2 -2
  19. package/lib/cjs/actions/requirements/index.d.ts +1 -0
  20. package/lib/cjs/actions/requirements/index.js +1 -0
  21. package/lib/cjs/actions/vaultV1/deposit.d.ts +2 -0
  22. package/lib/cjs/actions/vaultV1/deposit.js +13 -14
  23. package/lib/cjs/actions/vaultV1/migrateToV2.d.ts +2 -0
  24. package/lib/cjs/actions/vaultV1/migrateToV2.js +11 -9
  25. package/lib/cjs/actions/vaultV2/deposit.d.ts +2 -0
  26. package/lib/cjs/actions/vaultV2/deposit.js +13 -14
  27. package/lib/cjs/addresses.d.ts +2 -0
  28. package/lib/cjs/addresses.js +18 -0
  29. package/lib/cjs/augment/AccrualPosition.d.ts +9 -0
  30. package/lib/cjs/augment/AccrualPosition.js +8 -0
  31. package/lib/cjs/augment/AccrualVault.d.ts +8 -0
  32. package/lib/cjs/augment/AccrualVault.js +7 -0
  33. package/lib/cjs/augment/Holding.d.ts +8 -0
  34. package/lib/cjs/augment/Holding.js +7 -0
  35. package/lib/cjs/augment/Market.d.ts +8 -0
  36. package/lib/cjs/augment/Market.js +7 -0
  37. package/lib/cjs/augment/MarketParams.d.ts +8 -0
  38. package/lib/cjs/augment/MarketParams.js +7 -0
  39. package/lib/cjs/augment/Position.d.ts +8 -0
  40. package/lib/cjs/augment/Position.js +7 -0
  41. package/lib/cjs/augment/Token.d.ts +8 -0
  42. package/lib/cjs/augment/Token.js +7 -0
  43. package/lib/cjs/augment/User.d.ts +8 -0
  44. package/lib/cjs/augment/User.js +7 -0
  45. package/lib/cjs/augment/Vault.d.ts +8 -0
  46. package/lib/cjs/augment/Vault.js +7 -0
  47. package/lib/cjs/augment/VaultConfig.d.ts +8 -0
  48. package/lib/cjs/augment/VaultConfig.js +7 -0
  49. package/lib/cjs/augment/VaultMarketAllocation.d.ts +8 -0
  50. package/lib/cjs/augment/VaultMarketAllocation.js +7 -0
  51. package/lib/cjs/augment/VaultMarketConfig.d.ts +8 -0
  52. package/lib/cjs/augment/VaultMarketConfig.js +7 -0
  53. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +8 -0
  54. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +8 -0
  55. package/lib/cjs/augment/VaultUser.d.ts +8 -0
  56. package/lib/cjs/augment/VaultUser.js +7 -0
  57. package/lib/cjs/augment.d.ts +14 -0
  58. package/lib/cjs/augment.js +16 -0
  59. package/lib/cjs/bundler/actions.d.ts +555 -0
  60. package/lib/cjs/bundler/actions.js +953 -0
  61. package/lib/cjs/bundler/index.d.ts +2 -0
  62. package/lib/cjs/bundler/index.js +18 -0
  63. package/lib/cjs/bundler/types.d.ts +181 -0
  64. package/lib/cjs/bundler/types.js +2 -0
  65. package/lib/cjs/constants.d.ts +3 -0
  66. package/lib/cjs/constants.js +32 -0
  67. package/lib/cjs/entities/index.d.ts +6 -3
  68. package/lib/cjs/entities/index.js +41 -17
  69. package/lib/cjs/entities/marketV1/marketV1.d.ts +45 -11
  70. package/lib/cjs/entities/marketV1/marketV1.js +45 -23
  71. package/lib/cjs/entities/reallocationData.d.ts +193 -0
  72. package/lib/cjs/entities/reallocationData.js +406 -0
  73. package/lib/cjs/entities/vaultV1/vaultV1.js +6 -2
  74. package/lib/cjs/entities/vaultV2/vaultV2.js +6 -1
  75. package/lib/cjs/errors.d.ts +2 -0
  76. package/lib/cjs/errors.js +18 -0
  77. package/lib/cjs/fetch.d.ts +1 -0
  78. package/lib/cjs/fetch.js +30 -0
  79. package/lib/cjs/format.d.ts +2 -0
  80. package/lib/cjs/format.js +22 -0
  81. package/lib/cjs/helpers/computeReallocations.d.ts +48 -8
  82. package/lib/cjs/helpers/computeReallocations.js +120 -32
  83. package/lib/cjs/helpers/constant.d.ts +17 -0
  84. package/lib/cjs/helpers/constant.js +30 -1
  85. package/lib/cjs/helpers/index.d.ts +1 -0
  86. package/lib/cjs/helpers/index.js +9 -1
  87. package/lib/cjs/helpers/metadata.d.ts +10 -0
  88. package/lib/cjs/helpers/metadata.js +20 -1
  89. package/lib/cjs/helpers/validate.d.ts +2 -0
  90. package/lib/cjs/helpers/validate.js +14 -2
  91. package/lib/cjs/index.d.ts +0 -1
  92. package/lib/cjs/index.js +0 -1
  93. package/lib/cjs/types/client.d.ts +1 -1
  94. package/lib/cjs/types/error.d.ts +91 -1
  95. package/lib/cjs/types/error.js +126 -1
  96. package/lib/cjs/types/sharedLiquidity.d.ts +43 -3
  97. package/lib/cjs/types.d.ts +3 -0
  98. package/lib/cjs/types.js +17 -0
  99. package/lib/cjs/utils.d.ts +9 -0
  100. package/lib/cjs/utils.js +65 -0
  101. package/lib/esm/abis.d.ts +2816 -0
  102. package/lib/esm/abis.js +1922 -0
  103. package/lib/esm/actions/index.d.ts +3 -0
  104. package/lib/esm/actions/marketV1/borrow.js +2 -5
  105. package/lib/esm/actions/marketV1/buildReallocationActions.d.ts +2 -3
  106. package/lib/esm/actions/marketV1/buildReallocationActions.js +1 -2
  107. package/lib/esm/actions/marketV1/repay.d.ts +2 -0
  108. package/lib/esm/actions/marketV1/repay.js +4 -5
  109. package/lib/esm/actions/marketV1/repayWithdrawCollateral.d.ts +2 -0
  110. package/lib/esm/actions/marketV1/repayWithdrawCollateral.js +4 -5
  111. package/lib/esm/actions/marketV1/supplyCollateral.d.ts +2 -0
  112. package/lib/esm/actions/marketV1/supplyCollateral.js +4 -5
  113. package/lib/esm/actions/marketV1/supplyCollateralBorrow.d.ts +2 -0
  114. package/lib/esm/actions/marketV1/supplyCollateralBorrow.js +4 -5
  115. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +1 -1
  116. package/lib/esm/actions/requirements/getRequirementsAction.d.ts +28 -4
  117. package/lib/esm/actions/requirements/getRequirementsAction.js +29 -5
  118. package/lib/esm/actions/requirements/getRequirementsApproval.js +1 -1
  119. package/lib/esm/actions/requirements/index.d.ts +1 -0
  120. package/lib/esm/actions/requirements/index.js +1 -0
  121. package/lib/esm/actions/vaultV1/deposit.d.ts +2 -0
  122. package/lib/esm/actions/vaultV1/deposit.js +3 -4
  123. package/lib/esm/actions/vaultV1/migrateToV2.d.ts +2 -0
  124. package/lib/esm/actions/vaultV1/migrateToV2.js +3 -1
  125. package/lib/esm/actions/vaultV2/deposit.d.ts +2 -0
  126. package/lib/esm/actions/vaultV2/deposit.js +3 -4
  127. package/lib/esm/addresses.d.ts +2 -0
  128. package/lib/esm/addresses.js +1 -0
  129. package/lib/esm/augment/AccrualPosition.d.ts +9 -0
  130. package/lib/esm/augment/AccrualPosition.js +5 -0
  131. package/lib/esm/augment/AccrualVault.d.ts +8 -0
  132. package/lib/esm/augment/AccrualVault.js +4 -0
  133. package/lib/esm/augment/Holding.d.ts +8 -0
  134. package/lib/esm/augment/Holding.js +4 -0
  135. package/lib/esm/augment/Market.d.ts +8 -0
  136. package/lib/esm/augment/Market.js +4 -0
  137. package/lib/esm/augment/MarketParams.d.ts +8 -0
  138. package/lib/esm/augment/MarketParams.js +4 -0
  139. package/lib/esm/augment/Position.d.ts +8 -0
  140. package/lib/esm/augment/Position.js +4 -0
  141. package/lib/esm/augment/Token.d.ts +8 -0
  142. package/lib/esm/augment/Token.js +4 -0
  143. package/lib/esm/augment/User.d.ts +8 -0
  144. package/lib/esm/augment/User.js +4 -0
  145. package/lib/esm/augment/Vault.d.ts +8 -0
  146. package/lib/esm/augment/Vault.js +4 -0
  147. package/lib/esm/augment/VaultConfig.d.ts +8 -0
  148. package/lib/esm/augment/VaultConfig.js +4 -0
  149. package/lib/esm/augment/VaultMarketAllocation.d.ts +8 -0
  150. package/lib/esm/augment/VaultMarketAllocation.js +4 -0
  151. package/lib/esm/augment/VaultMarketConfig.d.ts +8 -0
  152. package/lib/esm/augment/VaultMarketConfig.js +4 -0
  153. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +8 -0
  154. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +5 -0
  155. package/lib/esm/augment/VaultUser.d.ts +8 -0
  156. package/lib/esm/augment/VaultUser.js +4 -0
  157. package/lib/esm/augment.d.ts +14 -0
  158. package/lib/esm/augment.js +14 -0
  159. package/lib/esm/bundler/actions.d.ts +555 -0
  160. package/lib/esm/bundler/actions.js +950 -0
  161. package/lib/esm/bundler/index.d.ts +2 -0
  162. package/lib/esm/bundler/index.js +2 -0
  163. package/lib/esm/bundler/types.d.ts +181 -0
  164. package/lib/esm/bundler/types.js +1 -0
  165. package/lib/esm/constants.d.ts +3 -0
  166. package/lib/esm/constants.js +3 -0
  167. package/lib/esm/entities/index.d.ts +6 -3
  168. package/lib/esm/entities/index.js +5 -3
  169. package/lib/esm/entities/marketV1/marketV1.d.ts +45 -11
  170. package/lib/esm/entities/marketV1/marketV1.js +46 -24
  171. package/lib/esm/entities/reallocationData.d.ts +193 -0
  172. package/lib/esm/entities/reallocationData.js +402 -0
  173. package/lib/esm/entities/vaultV1/vaultV1.js +6 -2
  174. package/lib/esm/entities/vaultV2/vaultV2.js +6 -1
  175. package/lib/esm/errors.d.ts +2 -0
  176. package/lib/esm/errors.js +1 -0
  177. package/lib/esm/fetch.d.ts +1 -0
  178. package/lib/esm/fetch.js +1 -0
  179. package/lib/esm/format.d.ts +2 -0
  180. package/lib/esm/format.js +1 -0
  181. package/lib/esm/helpers/computeReallocations.d.ts +48 -8
  182. package/lib/esm/helpers/computeReallocations.js +119 -31
  183. package/lib/esm/helpers/constant.d.ts +17 -0
  184. package/lib/esm/helpers/constant.js +30 -1
  185. package/lib/esm/helpers/index.d.ts +1 -0
  186. package/lib/esm/helpers/index.js +1 -0
  187. package/lib/esm/helpers/metadata.d.ts +10 -0
  188. package/lib/esm/helpers/metadata.js +20 -1
  189. package/lib/esm/helpers/validate.d.ts +2 -0
  190. package/lib/esm/helpers/validate.js +12 -1
  191. package/lib/esm/index.d.ts +0 -1
  192. package/lib/esm/index.js +0 -1
  193. package/lib/esm/types/client.d.ts +1 -1
  194. package/lib/esm/types/error.d.ts +91 -1
  195. package/lib/esm/types/error.js +118 -0
  196. package/lib/esm/types/sharedLiquidity.d.ts +43 -3
  197. package/lib/esm/types.d.ts +3 -0
  198. package/lib/esm/types.js +1 -0
  199. package/lib/esm/utils.d.ts +9 -0
  200. package/lib/esm/utils.js +7 -0
  201. package/package.json +121 -14
  202. package/src/index.ts +0 -1
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.vaultV1MigrateToV2 = void 0;
4
4
  const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
- const bundler_sdk_viem_1 = require("@morpho-org/bundler-sdk-viem");
6
5
  const morpho_ts_1 = require("@morpho-org/morpho-ts");
7
6
  const viem_1 = require("viem");
8
- const index_js_1 = require("../../helpers/index.js");
9
- const index_js_2 = require("../../types/index.js");
7
+ const index_js_1 = require("../../bundler/index.js");
8
+ const index_js_2 = require("../../helpers/index.js");
9
+ const index_js_3 = require("../../types/index.js");
10
10
  const getRequirementsAction_js_1 = require("../requirements/getRequirementsAction.js");
11
11
  /**
12
12
  * Prepares an atomic full-migration transaction from VaultV1 to VaultV2.
@@ -46,6 +46,8 @@ const getRequirementsAction_js_1 = require("../requirements/getRequirementsActio
46
46
  * is provided and the signed asset differs from `vault.address` (the V1 share token).
47
47
  * @throws {DepositAmountMismatchError} from `getRequirementsAction` when `requirementSignature`
48
48
  * is provided and the signed amount differs from `args.shares`.
49
+ * @throws {Permit2ExpirationMissingError} from `getRequirementsAction` when a Permit2 requirement
50
+ * signature is missing its expiration.
49
51
  * @example
50
52
  * ```ts
51
53
  * import { vaultV1MigrateToV2 } from "@morpho-org/morpho-sdk";
@@ -68,16 +70,16 @@ const vaultV1MigrateToV2 = ({ vault: { chainId, address: sourceVault, asset: sou
68
70
  // Both bundle legs use maxUint256: an asset mismatch leaves the redeemed
69
71
  // source asset stranded on GA1 while the user receives only dust shares.
70
72
  if (!(0, viem_1.isAddressEqual)(sourceAsset, targetAsset)) {
71
- throw new index_js_2.VaultAssetMismatchError(sourceAsset, targetAsset);
73
+ throw new index_js_3.VaultAssetMismatchError(sourceAsset, targetAsset);
72
74
  }
73
75
  if (shares <= 0n) {
74
- throw new index_js_2.NonPositiveSharesAmountError(sourceVault);
76
+ throw new index_js_3.NonPositiveSharesAmountError(sourceVault);
75
77
  }
76
78
  if (minSharePriceVaultV1 < 0n) {
77
- throw new index_js_2.NegativeMinSharePriceError(sourceVault);
79
+ throw new index_js_3.NegativeMinSharePriceError(sourceVault);
78
80
  }
79
81
  if (maxSharePriceVaultV2 <= 0n) {
80
- throw new index_js_2.NonPositiveMaxSharePriceError(targetVault);
82
+ throw new index_js_3.NonPositiveMaxSharePriceError(targetVault);
81
83
  }
82
84
  const { bundler3: { generalAdapter1 }, } = (0, blue_sdk_1.getChainAddresses)(chainId);
83
85
  const actions = [];
@@ -121,9 +123,9 @@ const vaultV1MigrateToV2 = ({ vault: { chainId, address: sourceVault, asset: sou
121
123
  false /* skipRevert */,
122
124
  ],
123
125
  });
124
- let tx = bundler_sdk_viem_1.BundlerAction.encodeBundle(chainId, actions);
126
+ let tx = index_js_1.BundlerAction.encodeBundle(chainId, actions);
125
127
  if (metadata) {
126
- tx = (0, index_js_1.addTransactionMetadata)(tx, metadata);
128
+ tx = (0, index_js_2.addTransactionMetadata)(tx, metadata);
127
129
  }
128
130
  return (0, morpho_ts_1.deepFreeze)({
129
131
  ...tx,
@@ -53,6 +53,8 @@ export interface VaultV2DepositParams {
53
53
  * signature is ignored on the native-only path (`amount === 0n` with `nativeAmount > 0n`).
54
54
  * @throws {DepositAmountMismatchError} from `getRequirementsAction` when `amount > 0n` and
55
55
  * `requirementSignature` is provided and the signed amount differs from `args.amount`.
56
+ * @throws {Permit2ExpirationMissingError} from `getRequirementsAction` when `amount > 0n` and a
57
+ * Permit2 requirement signature is missing its expiration.
56
58
  * @throws {ZeroDepositAmountError} when both `amount` and `nativeAmount` resolve to zero.
57
59
  * @example
58
60
  * ```ts
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.vaultV2Deposit = void 0;
4
4
  const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
- const bundler_sdk_viem_1 = require("@morpho-org/bundler-sdk-viem");
6
5
  const morpho_ts_1 = require("@morpho-org/morpho-ts");
7
6
  const viem_1 = require("viem");
8
- const index_js_1 = require("../../helpers/index.js");
9
- const index_js_2 = require("../../types/index.js");
7
+ const index_js_1 = require("../../bundler/index.js");
8
+ const index_js_2 = require("../../helpers/index.js");
9
+ const index_js_3 = require("../../types/index.js");
10
10
  const getRequirementsAction_js_1 = require("../requirements/getRequirementsAction.js");
11
11
  /**
12
12
  * Prepares a deposit transaction for a VaultV2 contract.
@@ -47,6 +47,8 @@ const getRequirementsAction_js_1 = require("../requirements/getRequirementsActio
47
47
  * signature is ignored on the native-only path (`amount === 0n` with `nativeAmount > 0n`).
48
48
  * @throws {DepositAmountMismatchError} from `getRequirementsAction` when `amount > 0n` and
49
49
  * `requirementSignature` is provided and the signed amount differs from `args.amount`.
50
+ * @throws {Permit2ExpirationMissingError} from `getRequirementsAction` when `amount > 0n` and a
51
+ * Permit2 requirement signature is missing its expiration.
50
52
  * @throws {ZeroDepositAmountError} when both `amount` and `nativeAmount` resolve to zero.
51
53
  * @example
52
54
  * ```ts
@@ -65,22 +67,22 @@ const getRequirementsAction_js_1 = require("../requirements/getRequirementsActio
65
67
  */
66
68
  const vaultV2Deposit = ({ vault: { chainId, address: vaultAddress, asset }, args: { amount = 0n, maxSharePrice, recipient, requirementSignature, nativeAmount, }, metadata, }) => {
67
69
  if (amount < 0n) {
68
- throw new index_js_2.NonPositiveAssetAmountError(asset);
70
+ throw new index_js_3.NonPositiveAssetAmountError(asset);
69
71
  }
70
72
  if (maxSharePrice <= 0n) {
71
- throw new index_js_2.NonPositiveMaxSharePriceError(vaultAddress);
73
+ throw new index_js_3.NonPositiveMaxSharePriceError(vaultAddress);
72
74
  }
73
75
  const actions = [];
74
76
  const { bundler3: { generalAdapter1, bundler3 }, wNative, } = (0, blue_sdk_1.getChainAddresses)(chainId);
75
77
  if (nativeAmount) {
76
78
  if (nativeAmount < 0n) {
77
- throw new index_js_2.NegativeNativeAmountError(nativeAmount);
79
+ throw new index_js_3.NegativeNativeAmountError(nativeAmount);
78
80
  }
79
81
  if (!(0, morpho_ts_1.isDefined)(wNative)) {
80
- throw new index_js_2.ChainWNativeMissingError(chainId);
82
+ throw new index_js_3.ChainWNativeMissingError(chainId);
81
83
  }
82
84
  if (!(0, viem_1.isAddressEqual)(asset, wNative)) {
83
- throw new index_js_2.NativeAmountOnNonWNativeVaultError(asset, wNative);
85
+ throw new index_js_3.NativeAmountOnNonWNativeVaultError(asset, wNative);
84
86
  }
85
87
  actions.push(
86
88
  // Transfers native token from Bundler3 to GeneralAdapter1 for wrapping.
@@ -110,7 +112,7 @@ const vaultV2Deposit = ({ vault: { chainId, address: vaultAddress, asset }, args
110
112
  }
111
113
  const totalAssets = amount + (nativeAmount ?? 0n);
112
114
  if (totalAssets === 0n) {
113
- throw new index_js_2.ZeroDepositAmountError(vaultAddress);
115
+ throw new index_js_3.ZeroDepositAmountError(vaultAddress);
114
116
  }
115
117
  actions.push({
116
118
  type: "erc4626Deposit",
@@ -122,12 +124,9 @@ const vaultV2Deposit = ({ vault: { chainId, address: vaultAddress, asset }, args
122
124
  false /* skipRevert */,
123
125
  ],
124
126
  });
125
- let tx = bundler_sdk_viem_1.BundlerAction.encodeBundle(chainId, actions);
126
- if (nativeAmount) {
127
- tx = { ...tx, value: nativeAmount };
128
- }
127
+ let tx = index_js_1.BundlerAction.encodeBundle(chainId, actions);
129
128
  if (metadata) {
130
- tx = (0, index_js_1.addTransactionMetadata)(tx, metadata);
129
+ tx = (0, index_js_2.addTransactionMetadata)(tx, metadata);
131
130
  }
132
131
  return (0, morpho_ts_1.deepFreeze)({
133
132
  ...tx,
@@ -0,0 +1,2 @@
1
+ export type { AddressLabel, ChainAddresses, ChainDeployments, } from "@morpho-org/blue-sdk";
2
+ export { addresses, addressesRegistry, convexWrapperTokens, deployments, erc20WrapperTokens, getChainAddresses, getPermissionedCoinbaseTokens, getUnwrappedToken, NATIVE_ADDRESS, permissionedBackedTokens, permissionedCoinbaseTokens, permissionedWrapperTokens, registerCustomAddresses, unwrappedTokensMapping, } from "@morpho-org/blue-sdk";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unwrappedTokensMapping = exports.registerCustomAddresses = exports.permissionedWrapperTokens = exports.permissionedCoinbaseTokens = exports.permissionedBackedTokens = exports.NATIVE_ADDRESS = exports.getUnwrappedToken = exports.getPermissionedCoinbaseTokens = exports.getChainAddresses = exports.erc20WrapperTokens = exports.deployments = exports.convexWrapperTokens = exports.addressesRegistry = exports.addresses = void 0;
4
+ var blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "addresses", { enumerable: true, get: function () { return blue_sdk_1.addresses; } });
6
+ Object.defineProperty(exports, "addressesRegistry", { enumerable: true, get: function () { return blue_sdk_1.addressesRegistry; } });
7
+ Object.defineProperty(exports, "convexWrapperTokens", { enumerable: true, get: function () { return blue_sdk_1.convexWrapperTokens; } });
8
+ Object.defineProperty(exports, "deployments", { enumerable: true, get: function () { return blue_sdk_1.deployments; } });
9
+ Object.defineProperty(exports, "erc20WrapperTokens", { enumerable: true, get: function () { return blue_sdk_1.erc20WrapperTokens; } });
10
+ Object.defineProperty(exports, "getChainAddresses", { enumerable: true, get: function () { return blue_sdk_1.getChainAddresses; } });
11
+ Object.defineProperty(exports, "getPermissionedCoinbaseTokens", { enumerable: true, get: function () { return blue_sdk_1.getPermissionedCoinbaseTokens; } });
12
+ Object.defineProperty(exports, "getUnwrappedToken", { enumerable: true, get: function () { return blue_sdk_1.getUnwrappedToken; } });
13
+ Object.defineProperty(exports, "NATIVE_ADDRESS", { enumerable: true, get: function () { return blue_sdk_1.NATIVE_ADDRESS; } });
14
+ Object.defineProperty(exports, "permissionedBackedTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedBackedTokens; } });
15
+ Object.defineProperty(exports, "permissionedCoinbaseTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedCoinbaseTokens; } });
16
+ Object.defineProperty(exports, "permissionedWrapperTokens", { enumerable: true, get: function () { return blue_sdk_1.permissionedWrapperTokens; } });
17
+ Object.defineProperty(exports, "registerCustomAddresses", { enumerable: true, get: function () { return blue_sdk_1.registerCustomAddresses; } });
18
+ Object.defineProperty(exports, "unwrappedTokensMapping", { enumerable: true, get: function () { return blue_sdk_1.unwrappedTokensMapping; } });
@@ -0,0 +1,9 @@
1
+ import { AccrualPosition as BlueAccrualPosition } from "@morpho-org/blue-sdk";
2
+ import { fetchAccrualPosition, fetchPreLiquidationPosition } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace AccrualPosition {
5
+ let fetch: typeof fetchAccrualPosition;
6
+ let fetchPreLiquidation: typeof fetchPreLiquidationPosition;
7
+ }
8
+ }
9
+ export { BlueAccrualPosition as AccrualPosition };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccrualPosition = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "AccrualPosition", { enumerable: true, get: function () { return blue_sdk_1.AccrualPosition; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.AccrualPosition.fetch = blue_sdk_viem_1.fetchAccrualPosition;
8
+ blue_sdk_1.AccrualPosition.fetchPreLiquidation = blue_sdk_viem_1.fetchPreLiquidationPosition;
@@ -0,0 +1,8 @@
1
+ import { AccrualVault as BlueAccrualVault } from "@morpho-org/blue-sdk";
2
+ import { fetchAccrualVault } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace AccrualVault {
5
+ let fetch: typeof fetchAccrualVault;
6
+ }
7
+ }
8
+ export { BlueAccrualVault as AccrualVault };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccrualVault = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "AccrualVault", { enumerable: true, get: function () { return blue_sdk_1.AccrualVault; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.AccrualVault.fetch = blue_sdk_viem_1.fetchAccrualVault;
@@ -0,0 +1,8 @@
1
+ import { Holding as BlueHolding } from "@morpho-org/blue-sdk";
2
+ import { fetchHolding } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace Holding {
5
+ let fetch: typeof fetchHolding;
6
+ }
7
+ }
8
+ export { BlueHolding as Holding };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Holding = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "Holding", { enumerable: true, get: function () { return blue_sdk_1.Holding; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.Holding.fetch = blue_sdk_viem_1.fetchHolding;
@@ -0,0 +1,8 @@
1
+ import { Market as BlueMarket } from "@morpho-org/blue-sdk";
2
+ import { fetchMarket } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace Market {
5
+ let fetch: typeof fetchMarket;
6
+ }
7
+ }
8
+ export { BlueMarket as Market };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Market = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "Market", { enumerable: true, get: function () { return blue_sdk_1.Market; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.Market.fetch = blue_sdk_viem_1.fetchMarket;
@@ -0,0 +1,8 @@
1
+ import { MarketParams as BlueMarketParams } from "@morpho-org/blue-sdk";
2
+ import { fetchMarketParams } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace MarketParams {
5
+ let fetch: typeof fetchMarketParams;
6
+ }
7
+ }
8
+ export { BlueMarketParams as MarketParams };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarketParams = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "MarketParams", { enumerable: true, get: function () { return blue_sdk_1.MarketParams; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.MarketParams.fetch = blue_sdk_viem_1.fetchMarketParams;
@@ -0,0 +1,8 @@
1
+ import { Position as BluePosition } from "@morpho-org/blue-sdk";
2
+ import { fetchPosition } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace Position {
5
+ let fetch: typeof fetchPosition;
6
+ }
7
+ }
8
+ export { BluePosition as Position };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Position = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "Position", { enumerable: true, get: function () { return blue_sdk_1.Position; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.Position.fetch = blue_sdk_viem_1.fetchPosition;
@@ -0,0 +1,8 @@
1
+ import { Token as BlueToken } from "@morpho-org/blue-sdk";
2
+ import { fetchToken } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace Token {
5
+ let fetch: typeof fetchToken;
6
+ }
7
+ }
8
+ export { BlueToken as Token };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Token = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return blue_sdk_1.Token; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.Token.fetch = blue_sdk_viem_1.fetchToken;
@@ -0,0 +1,8 @@
1
+ import { User as BlueUser } from "@morpho-org/blue-sdk";
2
+ import { fetchUser } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace User {
5
+ let fetch: typeof fetchUser;
6
+ }
7
+ }
8
+ export { BlueUser as User };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.User = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "User", { enumerable: true, get: function () { return blue_sdk_1.User; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.User.fetch = blue_sdk_viem_1.fetchUser;
@@ -0,0 +1,8 @@
1
+ import { Vault as BlueVault } from "@morpho-org/blue-sdk";
2
+ import { fetchVault } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace Vault {
5
+ let fetch: typeof fetchVault;
6
+ }
7
+ }
8
+ export { BlueVault as Vault };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Vault = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "Vault", { enumerable: true, get: function () { return blue_sdk_1.Vault; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.Vault.fetch = blue_sdk_viem_1.fetchVault;
@@ -0,0 +1,8 @@
1
+ import { VaultConfig as BlueVaultConfig } from "@morpho-org/blue-sdk";
2
+ import { fetchVaultConfig } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace VaultConfig {
5
+ let fetch: typeof fetchVaultConfig;
6
+ }
7
+ }
8
+ export { BlueVaultConfig as VaultConfig };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultConfig = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "VaultConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultConfig; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.VaultConfig.fetch = blue_sdk_viem_1.fetchVaultConfig;
@@ -0,0 +1,8 @@
1
+ import { VaultMarketAllocation as BlueVaultMarketAllocation } from "@morpho-org/blue-sdk";
2
+ import { fetchVaultMarketAllocation } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace VaultMarketAllocation {
5
+ let fetch: typeof fetchVaultMarketAllocation;
6
+ }
7
+ }
8
+ export { BlueVaultMarketAllocation as VaultMarketAllocation };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultMarketAllocation = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "VaultMarketAllocation", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketAllocation; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.VaultMarketAllocation.fetch = blue_sdk_viem_1.fetchVaultMarketAllocation;
@@ -0,0 +1,8 @@
1
+ import { VaultMarketConfig as BlueVaultMarketConfig } from "@morpho-org/blue-sdk";
2
+ import { fetchVaultMarketConfig } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace VaultMarketConfig {
5
+ let fetch: typeof fetchVaultMarketConfig;
6
+ }
7
+ }
8
+ export { BlueVaultMarketConfig as VaultMarketConfig };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultMarketConfig = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "VaultMarketConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketConfig; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.VaultMarketConfig.fetch = blue_sdk_viem_1.fetchVaultMarketConfig;
@@ -0,0 +1,8 @@
1
+ import { VaultMarketPublicAllocatorConfig as BlueVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk";
2
+ import { fetchVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace VaultMarketPublicAllocatorConfig {
5
+ let fetch: typeof fetchVaultMarketPublicAllocatorConfig;
6
+ }
7
+ }
8
+ export { BlueVaultMarketPublicAllocatorConfig as VaultMarketPublicAllocatorConfig, };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultMarketPublicAllocatorConfig = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "VaultMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketPublicAllocatorConfig; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.VaultMarketPublicAllocatorConfig.fetch =
8
+ blue_sdk_viem_1.fetchVaultMarketPublicAllocatorConfig;
@@ -0,0 +1,8 @@
1
+ import { VaultUser as BlueVaultUser } from "@morpho-org/blue-sdk";
2
+ import { fetchVaultUser } from "@morpho-org/blue-sdk-viem";
3
+ declare module "@morpho-org/blue-sdk" {
4
+ namespace VaultUser {
5
+ let fetch: typeof fetchVaultUser;
6
+ }
7
+ }
8
+ export { BlueVaultUser as VaultUser };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultUser = void 0;
4
+ const blue_sdk_1 = require("@morpho-org/blue-sdk");
5
+ Object.defineProperty(exports, "VaultUser", { enumerable: true, get: function () { return blue_sdk_1.VaultUser; } });
6
+ const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
7
+ blue_sdk_1.VaultUser.fetch = blue_sdk_viem_1.fetchVaultUser;
@@ -0,0 +1,14 @@
1
+ import "./augment/AccrualPosition.js";
2
+ import "./augment/AccrualVault.js";
3
+ import "./augment/Holding.js";
4
+ import "./augment/Market.js";
5
+ import "./augment/MarketParams.js";
6
+ import "./augment/Position.js";
7
+ import "./augment/Token.js";
8
+ import "./augment/User.js";
9
+ import "./augment/Vault.js";
10
+ import "./augment/VaultConfig.js";
11
+ import "./augment/VaultMarketAllocation.js";
12
+ import "./augment/VaultMarketConfig.js";
13
+ import "./augment/VaultMarketPublicAllocatorConfig.js";
14
+ import "./augment/VaultUser.js";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("./augment/AccrualPosition.js");
4
+ require("./augment/AccrualVault.js");
5
+ require("./augment/Holding.js");
6
+ require("./augment/Market.js");
7
+ require("./augment/MarketParams.js");
8
+ require("./augment/Position.js");
9
+ require("./augment/Token.js");
10
+ require("./augment/User.js");
11
+ require("./augment/Vault.js");
12
+ require("./augment/VaultConfig.js");
13
+ require("./augment/VaultMarketAllocation.js");
14
+ require("./augment/VaultMarketConfig.js");
15
+ require("./augment/VaultMarketPublicAllocatorConfig.js");
16
+ require("./augment/VaultUser.js");