@compass-labs/api-sdk 0.0.23 → 0.0.25

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 (303) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +720 -418
  3. package/bin/mcp-server.js.map +33 -34
  4. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts +27 -0
  5. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js +126 -0
  7. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js.map +1 -0
  8. package/dist/commonjs/lib/config.d.ts +3 -3
  9. package/dist/commonjs/lib/config.js +3 -3
  10. package/dist/commonjs/lib/config.js.map +1 -1
  11. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  12. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  13. package/dist/commonjs/mcp-server/server.js +3 -1
  14. package/dist/commonjs/mcp-server/server.js.map +1 -1
  15. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts +8 -0
  16. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +1 -0
  17. package/dist/commonjs/{models/components/action.js → mcp-server/tools/transactionBatchingAaveLoop.js} +35 -27
  18. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js.map +1 -0
  19. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts +92 -5
  20. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js +121 -6
  22. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js.map +1 -1
  23. package/dist/commonjs/models/components/aavelooprequest.d.ts +109 -0
  24. package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -0
  25. package/dist/commonjs/models/components/aavelooprequest.js +132 -0
  26. package/dist/commonjs/models/components/aavelooprequest.js.map +1 -0
  27. package/dist/commonjs/models/components/borrow.d.ts +69 -12
  28. package/dist/commonjs/models/components/borrow.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/borrow.js +39 -13
  30. package/dist/commonjs/models/components/borrow.js.map +1 -1
  31. package/dist/commonjs/models/components/index.d.ts +1 -4
  32. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/index.js +1 -4
  34. package/dist/commonjs/models/components/index.js.map +1 -1
  35. package/dist/commonjs/models/components/liquidationcall.d.ts +32 -14
  36. package/dist/commonjs/models/components/liquidationcall.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/liquidationcall.js +23 -14
  38. package/dist/commonjs/models/components/liquidationcall.js.map +1 -1
  39. package/dist/commonjs/models/components/morphoborrowrequest.d.ts +27 -5
  40. package/dist/commonjs/models/components/morphoborrowrequest.d.ts.map +1 -1
  41. package/dist/commonjs/models/components/morphoborrowrequest.js +22 -4
  42. package/dist/commonjs/models/components/morphoborrowrequest.js.map +1 -1
  43. package/dist/commonjs/models/components/morphodepositrequest.d.ts +27 -5
  44. package/dist/commonjs/models/components/morphodepositrequest.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/morphodepositrequest.js +22 -4
  46. package/dist/commonjs/models/components/morphodepositrequest.js.map +1 -1
  47. package/dist/commonjs/models/components/morphorepayrequest.d.ts +27 -5
  48. package/dist/commonjs/models/components/morphorepayrequest.d.ts.map +1 -1
  49. package/dist/commonjs/models/components/morphorepayrequest.js +22 -4
  50. package/dist/commonjs/models/components/morphorepayrequest.js.map +1 -1
  51. package/dist/commonjs/models/components/morphosetvaultallowancerequest.d.ts +27 -5
  52. package/dist/commonjs/models/components/morphosetvaultallowancerequest.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/morphosetvaultallowancerequest.js +22 -4
  54. package/dist/commonjs/models/components/morphosetvaultallowancerequest.js.map +1 -1
  55. package/dist/commonjs/models/components/morphosupplycollateralrequest.d.ts +27 -5
  56. package/dist/commonjs/models/components/morphosupplycollateralrequest.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/morphosupplycollateralrequest.js +22 -4
  58. package/dist/commonjs/models/components/morphosupplycollateralrequest.js.map +1 -1
  59. package/dist/commonjs/models/components/morphowithdrawcollateralrequest.d.ts +27 -5
  60. package/dist/commonjs/models/components/morphowithdrawcollateralrequest.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/morphowithdrawcollateralrequest.js +22 -4
  62. package/dist/commonjs/models/components/morphowithdrawcollateralrequest.js.map +1 -1
  63. package/dist/commonjs/models/components/morphowithdrawrequest.d.ts +27 -5
  64. package/dist/commonjs/models/components/morphowithdrawrequest.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/morphowithdrawrequest.js +22 -4
  66. package/dist/commonjs/models/components/morphowithdrawrequest.js.map +1 -1
  67. package/dist/commonjs/models/components/redeemunderlying.d.ts +32 -4
  68. package/dist/commonjs/models/components/redeemunderlying.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/redeemunderlying.js +14 -4
  70. package/dist/commonjs/models/components/redeemunderlying.js.map +1 -1
  71. package/dist/commonjs/models/components/repay.d.ts +29 -4
  72. package/dist/commonjs/models/components/repay.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/repay.js +14 -4
  74. package/dist/commonjs/models/components/repay.js.map +1 -1
  75. package/dist/commonjs/models/components/reserve.d.ts +25 -3
  76. package/dist/commonjs/models/components/reserve.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/reserve.js +9 -4
  78. package/dist/commonjs/models/components/reserve.js.map +1 -1
  79. package/dist/commonjs/models/components/supply.d.ts +32 -4
  80. package/dist/commonjs/models/components/supply.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/supply.js +14 -4
  82. package/dist/commonjs/models/components/supply.js.map +1 -1
  83. package/dist/commonjs/models/components/swapborrowrate.d.ts +27 -8
  84. package/dist/commonjs/models/components/swapborrowrate.d.ts.map +1 -1
  85. package/dist/commonjs/models/components/swapborrowrate.js +18 -8
  86. package/dist/commonjs/models/components/swapborrowrate.js.map +1 -1
  87. package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +15 -15
  88. package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
  89. package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +18 -20
  90. package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
  91. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +15 -15
  92. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
  93. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +18 -20
  94. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
  95. package/dist/commonjs/models/components/usageascollateral.d.ts +26 -4
  96. package/dist/commonjs/models/components/usageascollateral.d.ts.map +1 -1
  97. package/dist/commonjs/models/components/usageascollateral.js +14 -4
  98. package/dist/commonjs/models/components/usageascollateral.js.map +1 -1
  99. package/dist/commonjs/models/operations/morphomarketposition.d.ts +3 -15
  100. package/dist/commonjs/models/operations/morphomarketposition.d.ts.map +1 -1
  101. package/dist/commonjs/models/operations/morphomarketposition.js +1 -5
  102. package/dist/commonjs/models/operations/morphomarketposition.js.map +1 -1
  103. package/dist/commonjs/models/operations/morphomarkets.d.ts +3 -15
  104. package/dist/commonjs/models/operations/morphomarkets.d.ts.map +1 -1
  105. package/dist/commonjs/models/operations/morphomarkets.js +1 -5
  106. package/dist/commonjs/models/operations/morphomarkets.js.map +1 -1
  107. package/dist/commonjs/models/operations/morphovaultposition.d.ts +3 -15
  108. package/dist/commonjs/models/operations/morphovaultposition.d.ts.map +1 -1
  109. package/dist/commonjs/models/operations/morphovaultposition.js +1 -5
  110. package/dist/commonjs/models/operations/morphovaultposition.js.map +1 -1
  111. package/dist/commonjs/models/operations/morphovaults.d.ts +5 -17
  112. package/dist/commonjs/models/operations/morphovaults.d.ts.map +1 -1
  113. package/dist/commonjs/models/operations/morphovaults.js +3 -7
  114. package/dist/commonjs/models/operations/morphovaults.js.map +1 -1
  115. package/dist/commonjs/sdk/transactionbatching.d.ts +17 -0
  116. package/dist/commonjs/sdk/transactionbatching.d.ts.map +1 -1
  117. package/dist/commonjs/sdk/transactionbatching.js +20 -0
  118. package/dist/commonjs/sdk/transactionbatching.js.map +1 -1
  119. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts +27 -0
  120. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts.map +1 -0
  121. package/dist/esm/funcs/transactionBatchingAaveLoop.js +90 -0
  122. package/dist/esm/funcs/transactionBatchingAaveLoop.js.map +1 -0
  123. package/dist/esm/lib/config.d.ts +3 -3
  124. package/dist/esm/lib/config.js +3 -3
  125. package/dist/esm/lib/config.js.map +1 -1
  126. package/dist/esm/mcp-server/mcp-server.js +1 -1
  127. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  128. package/dist/esm/mcp-server/server.js +3 -1
  129. package/dist/esm/mcp-server/server.js.map +1 -1
  130. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts +8 -0
  131. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +1 -0
  132. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js +38 -0
  133. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js.map +1 -0
  134. package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts +92 -5
  135. package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -1
  136. package/dist/esm/models/components/aavehistoricaltransactionsresponse.js +118 -5
  137. package/dist/esm/models/components/aavehistoricaltransactionsresponse.js.map +1 -1
  138. package/dist/esm/models/components/aavelooprequest.d.ts +109 -0
  139. package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -0
  140. package/dist/esm/models/components/aavelooprequest.js +92 -0
  141. package/dist/esm/models/components/aavelooprequest.js.map +1 -0
  142. package/dist/esm/models/components/borrow.d.ts +69 -12
  143. package/dist/esm/models/components/borrow.d.ts.map +1 -1
  144. package/dist/esm/models/components/borrow.js +38 -12
  145. package/dist/esm/models/components/borrow.js.map +1 -1
  146. package/dist/esm/models/components/index.d.ts +1 -4
  147. package/dist/esm/models/components/index.d.ts.map +1 -1
  148. package/dist/esm/models/components/index.js +1 -4
  149. package/dist/esm/models/components/index.js.map +1 -1
  150. package/dist/esm/models/components/liquidationcall.d.ts +32 -14
  151. package/dist/esm/models/components/liquidationcall.d.ts.map +1 -1
  152. package/dist/esm/models/components/liquidationcall.js +23 -14
  153. package/dist/esm/models/components/liquidationcall.js.map +1 -1
  154. package/dist/esm/models/components/morphoborrowrequest.d.ts +27 -5
  155. package/dist/esm/models/components/morphoborrowrequest.d.ts.map +1 -1
  156. package/dist/esm/models/components/morphoborrowrequest.js +21 -3
  157. package/dist/esm/models/components/morphoborrowrequest.js.map +1 -1
  158. package/dist/esm/models/components/morphodepositrequest.d.ts +27 -5
  159. package/dist/esm/models/components/morphodepositrequest.d.ts.map +1 -1
  160. package/dist/esm/models/components/morphodepositrequest.js +21 -3
  161. package/dist/esm/models/components/morphodepositrequest.js.map +1 -1
  162. package/dist/esm/models/components/morphorepayrequest.d.ts +27 -5
  163. package/dist/esm/models/components/morphorepayrequest.d.ts.map +1 -1
  164. package/dist/esm/models/components/morphorepayrequest.js +21 -3
  165. package/dist/esm/models/components/morphorepayrequest.js.map +1 -1
  166. package/dist/esm/models/components/morphosetvaultallowancerequest.d.ts +27 -5
  167. package/dist/esm/models/components/morphosetvaultallowancerequest.d.ts.map +1 -1
  168. package/dist/esm/models/components/morphosetvaultallowancerequest.js +21 -3
  169. package/dist/esm/models/components/morphosetvaultallowancerequest.js.map +1 -1
  170. package/dist/esm/models/components/morphosupplycollateralrequest.d.ts +27 -5
  171. package/dist/esm/models/components/morphosupplycollateralrequest.d.ts.map +1 -1
  172. package/dist/esm/models/components/morphosupplycollateralrequest.js +21 -3
  173. package/dist/esm/models/components/morphosupplycollateralrequest.js.map +1 -1
  174. package/dist/esm/models/components/morphowithdrawcollateralrequest.d.ts +27 -5
  175. package/dist/esm/models/components/morphowithdrawcollateralrequest.d.ts.map +1 -1
  176. package/dist/esm/models/components/morphowithdrawcollateralrequest.js +21 -3
  177. package/dist/esm/models/components/morphowithdrawcollateralrequest.js.map +1 -1
  178. package/dist/esm/models/components/morphowithdrawrequest.d.ts +27 -5
  179. package/dist/esm/models/components/morphowithdrawrequest.d.ts.map +1 -1
  180. package/dist/esm/models/components/morphowithdrawrequest.js +21 -3
  181. package/dist/esm/models/components/morphowithdrawrequest.js.map +1 -1
  182. package/dist/esm/models/components/redeemunderlying.d.ts +32 -4
  183. package/dist/esm/models/components/redeemunderlying.d.ts.map +1 -1
  184. package/dist/esm/models/components/redeemunderlying.js +14 -4
  185. package/dist/esm/models/components/redeemunderlying.js.map +1 -1
  186. package/dist/esm/models/components/repay.d.ts +29 -4
  187. package/dist/esm/models/components/repay.d.ts.map +1 -1
  188. package/dist/esm/models/components/repay.js +14 -4
  189. package/dist/esm/models/components/repay.js.map +1 -1
  190. package/dist/esm/models/components/reserve.d.ts +25 -3
  191. package/dist/esm/models/components/reserve.d.ts.map +1 -1
  192. package/dist/esm/models/components/reserve.js +9 -4
  193. package/dist/esm/models/components/reserve.js.map +1 -1
  194. package/dist/esm/models/components/supply.d.ts +32 -4
  195. package/dist/esm/models/components/supply.d.ts.map +1 -1
  196. package/dist/esm/models/components/supply.js +14 -4
  197. package/dist/esm/models/components/supply.js.map +1 -1
  198. package/dist/esm/models/components/swapborrowrate.d.ts +27 -8
  199. package/dist/esm/models/components/swapborrowrate.d.ts.map +1 -1
  200. package/dist/esm/models/components/swapborrowrate.js +18 -8
  201. package/dist/esm/models/components/swapborrowrate.js.map +1 -1
  202. package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +15 -15
  203. package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
  204. package/dist/esm/models/components/uniswapbuyexactlyparams.js +15 -17
  205. package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
  206. package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +15 -15
  207. package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
  208. package/dist/esm/models/components/uniswapbuyexactlyrequest.js +15 -17
  209. package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
  210. package/dist/esm/models/components/usageascollateral.d.ts +26 -4
  211. package/dist/esm/models/components/usageascollateral.d.ts.map +1 -1
  212. package/dist/esm/models/components/usageascollateral.js +14 -4
  213. package/dist/esm/models/components/usageascollateral.js.map +1 -1
  214. package/dist/esm/models/operations/morphomarketposition.d.ts +3 -15
  215. package/dist/esm/models/operations/morphomarketposition.d.ts.map +1 -1
  216. package/dist/esm/models/operations/morphomarketposition.js +1 -5
  217. package/dist/esm/models/operations/morphomarketposition.js.map +1 -1
  218. package/dist/esm/models/operations/morphomarkets.d.ts +3 -15
  219. package/dist/esm/models/operations/morphomarkets.d.ts.map +1 -1
  220. package/dist/esm/models/operations/morphomarkets.js +1 -5
  221. package/dist/esm/models/operations/morphomarkets.js.map +1 -1
  222. package/dist/esm/models/operations/morphovaultposition.d.ts +3 -15
  223. package/dist/esm/models/operations/morphovaultposition.d.ts.map +1 -1
  224. package/dist/esm/models/operations/morphovaultposition.js +1 -5
  225. package/dist/esm/models/operations/morphovaultposition.js.map +1 -1
  226. package/dist/esm/models/operations/morphovaults.d.ts +5 -17
  227. package/dist/esm/models/operations/morphovaults.d.ts.map +1 -1
  228. package/dist/esm/models/operations/morphovaults.js +3 -7
  229. package/dist/esm/models/operations/morphovaults.js.map +1 -1
  230. package/dist/esm/sdk/transactionbatching.d.ts +17 -0
  231. package/dist/esm/sdk/transactionbatching.d.ts.map +1 -1
  232. package/dist/esm/sdk/transactionbatching.js +20 -0
  233. package/dist/esm/sdk/transactionbatching.js.map +1 -1
  234. package/docs/sdks/morpho/README.md +8 -18
  235. package/docs/sdks/transactionbatching/README.md +120 -2
  236. package/docs/sdks/uniswapv3/README.md +2 -2
  237. package/jsr.json +1 -1
  238. package/package.json +1 -1
  239. package/src/funcs/transactionBatchingAaveLoop.ts +173 -0
  240. package/src/lib/config.ts +3 -3
  241. package/src/mcp-server/mcp-server.ts +1 -1
  242. package/src/mcp-server/server.ts +3 -1
  243. package/src/mcp-server/tools/transactionBatchingAaveLoop.ts +47 -0
  244. package/src/models/components/aavehistoricaltransactionsresponse.ts +275 -13
  245. package/src/models/components/aavelooprequest.ts +219 -0
  246. package/src/models/components/borrow.ts +87 -24
  247. package/src/models/components/index.ts +1 -4
  248. package/src/models/components/liquidationcall.ts +58 -35
  249. package/src/models/components/morphoborrowrequest.ts +33 -7
  250. package/src/models/components/morphodepositrequest.ts +33 -7
  251. package/src/models/components/morphorepayrequest.ts +33 -7
  252. package/src/models/components/morphosetvaultallowancerequest.ts +35 -7
  253. package/src/models/components/morphosupplycollateralrequest.ts +34 -7
  254. package/src/models/components/morphowithdrawcollateralrequest.ts +36 -7
  255. package/src/models/components/morphowithdrawrequest.ts +33 -7
  256. package/src/models/components/redeemunderlying.ts +46 -8
  257. package/src/models/components/repay.ts +43 -8
  258. package/src/models/components/reserve.ts +37 -7
  259. package/src/models/components/supply.ts +46 -8
  260. package/src/models/components/swapborrowrate.ts +45 -16
  261. package/src/models/components/uniswapbuyexactlyparams.ts +26 -28
  262. package/src/models/components/uniswapbuyexactlyrequest.ts +26 -29
  263. package/src/models/components/usageascollateral.ts +40 -8
  264. package/src/models/operations/morphomarketposition.ts +1 -11
  265. package/src/models/operations/morphomarkets.ts +1 -11
  266. package/src/models/operations/morphovaultposition.ts +1 -11
  267. package/src/models/operations/morphovaults.ts +5 -15
  268. package/src/sdk/transactionbatching.ts +28 -0
  269. package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts +0 -57
  270. package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts.map +0 -1
  271. package/dist/commonjs/models/components/aavehistoricaltransactionbase.js +0 -97
  272. package/dist/commonjs/models/components/aavehistoricaltransactionbase.js.map +0 -1
  273. package/dist/commonjs/models/components/action.d.ts +0 -43
  274. package/dist/commonjs/models/components/action.d.ts.map +0 -1
  275. package/dist/commonjs/models/components/action.js.map +0 -1
  276. package/dist/commonjs/models/components/collateralreserve.d.ts +0 -31
  277. package/dist/commonjs/models/components/collateralreserve.d.ts.map +0 -1
  278. package/dist/commonjs/models/components/collateralreserve.js +0 -71
  279. package/dist/commonjs/models/components/collateralreserve.js.map +0 -1
  280. package/dist/commonjs/models/components/principalreserve.d.ts +0 -31
  281. package/dist/commonjs/models/components/principalreserve.d.ts.map +0 -1
  282. package/dist/commonjs/models/components/principalreserve.js +0 -71
  283. package/dist/commonjs/models/components/principalreserve.js.map +0 -1
  284. package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts +0 -57
  285. package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts.map +0 -1
  286. package/dist/esm/models/components/aavehistoricaltransactionbase.js +0 -59
  287. package/dist/esm/models/components/aavehistoricaltransactionbase.js.map +0 -1
  288. package/dist/esm/models/components/action.d.ts +0 -43
  289. package/dist/esm/models/components/action.d.ts.map +0 -1
  290. package/dist/esm/models/components/action.js +0 -30
  291. package/dist/esm/models/components/action.js.map +0 -1
  292. package/dist/esm/models/components/collateralreserve.d.ts +0 -31
  293. package/dist/esm/models/components/collateralreserve.d.ts.map +0 -1
  294. package/dist/esm/models/components/collateralreserve.js +0 -33
  295. package/dist/esm/models/components/collateralreserve.js.map +0 -1
  296. package/dist/esm/models/components/principalreserve.d.ts +0 -31
  297. package/dist/esm/models/components/principalreserve.d.ts.map +0 -1
  298. package/dist/esm/models/components/principalreserve.js +0 -33
  299. package/dist/esm/models/components/principalreserve.js.map +0 -1
  300. package/src/models/components/aavehistoricaltransactionbase.ts +0 -155
  301. package/src/models/components/action.ts +0 -36
  302. package/src/models/components/collateralreserve.ts +0 -70
  303. package/src/models/components/principalreserve.ts +0 -70
@@ -4,9 +4,9 @@
4
4
 
5
5
  export * from "./aaveborrowparams.js";
6
6
  export * from "./aaveborrowrequest.js";
7
- export * from "./aavehistoricaltransactionbase.js";
8
7
  export * from "./aavehistoricaltransactionsresponse.js";
9
8
  export * from "./aaveliquiditychangeresponse.js";
9
+ export * from "./aavelooprequest.js";
10
10
  export * from "./aaverateresponse.js";
11
11
  export * from "./aaverepayparams.js";
12
12
  export * from "./aaverepayrequest.js";
@@ -18,7 +18,6 @@ export * from "./aaveuserpositionpertokenresponse.js";
18
18
  export * from "./aaveuserpositionsummaryresponse.js";
19
19
  export * from "./aavewithdrawparams.js";
20
20
  export * from "./aavewithdrawrequest.js";
21
- export * from "./action.js";
22
21
  export * from "./aerodromelppositionsresponse.js";
23
22
  export * from "./aerodromeposition.js";
24
23
  export * from "./aerodromeslipstreambuyexactlyparams.js";
@@ -36,7 +35,6 @@ export * from "./allowanceinforesponse.js";
36
35
  export * from "./borrow.js";
37
36
  export * from "./chain.js";
38
37
  export * from "./chaininfo.js";
39
- export * from "./collateralreserve.js";
40
38
  export * from "./compassapibackendmodelsmorphoreadresponsegetmarketsasset.js";
41
39
  export * from "./compassapibackendmodelsmorphoreadresponsegetvaultsasset.js";
42
40
  export * from "./contractname.js";
@@ -68,7 +66,6 @@ export * from "./multicallauthorizationrequest.js";
68
66
  export * from "./multicallauthorizationresponse.js";
69
67
  export * from "./multicallexecuterequest.js";
70
68
  export * from "./portfolio.js";
71
- export * from "./principalreserve.js";
72
69
  export * from "./redeemunderlying.js";
73
70
  export * from "./repay.js";
74
71
  export * from "./reserve.js";
@@ -7,25 +7,33 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
  import {
10
- CollateralReserve,
11
- CollateralReserve$inboundSchema,
12
- CollateralReserve$Outbound,
13
- CollateralReserve$outboundSchema,
14
- } from "./collateralreserve.js";
15
- import {
16
- PrincipalReserve,
17
- PrincipalReserve$inboundSchema,
18
- PrincipalReserve$Outbound,
19
- PrincipalReserve$outboundSchema,
20
- } from "./principalreserve.js";
10
+ Reserve,
11
+ Reserve$inboundSchema,
12
+ Reserve$Outbound,
13
+ Reserve$outboundSchema,
14
+ } from "./reserve.js";
21
15
 
22
16
  export type LiquidationCall = {
23
- collateralAmount: string;
24
- collateralReserve: CollateralReserve;
25
- principalAmount: string;
26
- principalReserve: PrincipalReserve;
27
- collateralAssetPriceUSD: string;
28
- borrowAssetPriceUSD: string;
17
+ /**
18
+ * The id of a historical transaction on aave
19
+ */
20
+ id: string;
21
+ /**
22
+ * Timestamp in unix time
23
+ */
24
+ timestamp: number;
25
+ /**
26
+ * Transaction hash. You can paste these into the search bar on etherscan
27
+ */
28
+ txHash: string;
29
+ collateralAmount: number;
30
+ collateralReserve: Reserve;
31
+ principalAmount: number;
32
+ principalReserve: Reserve;
33
+ collateralAssetPriceUSD: number;
34
+ borrowAssetPriceUSD: number;
35
+ action?: "LiquidationCall" | undefined;
36
+ block: number;
29
37
  };
30
38
 
31
39
  /** @internal */
@@ -34,22 +42,32 @@ export const LiquidationCall$inboundSchema: z.ZodType<
34
42
  z.ZodTypeDef,
35
43
  unknown
36
44
  > = z.object({
37
- collateralAmount: z.string(),
38
- collateralReserve: CollateralReserve$inboundSchema,
39
- principalAmount: z.string(),
40
- principalReserve: PrincipalReserve$inboundSchema,
41
- collateralAssetPriceUSD: z.string(),
42
- borrowAssetPriceUSD: z.string(),
45
+ id: z.string(),
46
+ timestamp: z.number().int(),
47
+ txHash: z.string(),
48
+ collateralAmount: z.number(),
49
+ collateralReserve: Reserve$inboundSchema,
50
+ principalAmount: z.number(),
51
+ principalReserve: Reserve$inboundSchema,
52
+ collateralAssetPriceUSD: z.number(),
53
+ borrowAssetPriceUSD: z.number(),
54
+ action: z.literal("LiquidationCall").optional(),
55
+ block: z.number().int(),
43
56
  });
44
57
 
45
58
  /** @internal */
46
59
  export type LiquidationCall$Outbound = {
47
- collateralAmount: string;
48
- collateralReserve: CollateralReserve$Outbound;
49
- principalAmount: string;
50
- principalReserve: PrincipalReserve$Outbound;
51
- collateralAssetPriceUSD: string;
52
- borrowAssetPriceUSD: string;
60
+ id: string;
61
+ timestamp: number;
62
+ txHash: string;
63
+ collateralAmount: number;
64
+ collateralReserve: Reserve$Outbound;
65
+ principalAmount: number;
66
+ principalReserve: Reserve$Outbound;
67
+ collateralAssetPriceUSD: number;
68
+ borrowAssetPriceUSD: number;
69
+ action: "LiquidationCall";
70
+ block: number;
53
71
  };
54
72
 
55
73
  /** @internal */
@@ -58,12 +76,17 @@ export const LiquidationCall$outboundSchema: z.ZodType<
58
76
  z.ZodTypeDef,
59
77
  LiquidationCall
60
78
  > = z.object({
61
- collateralAmount: z.string(),
62
- collateralReserve: CollateralReserve$outboundSchema,
63
- principalAmount: z.string(),
64
- principalReserve: PrincipalReserve$outboundSchema,
65
- collateralAssetPriceUSD: z.string(),
66
- borrowAssetPriceUSD: z.string(),
79
+ id: z.string(),
80
+ timestamp: z.number().int(),
81
+ txHash: z.string(),
82
+ collateralAmount: z.number(),
83
+ collateralReserve: Reserve$outboundSchema,
84
+ principalAmount: z.number(),
85
+ principalReserve: Reserve$outboundSchema,
86
+ collateralAssetPriceUSD: z.number(),
87
+ borrowAssetPriceUSD: z.number(),
88
+ action: z.literal("LiquidationCall").default("LiquidationCall" as const),
89
+ block: z.number().int(),
67
90
  });
68
91
 
69
92
  /**
@@ -5,15 +5,23 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
11
 
12
12
  /**
13
13
  * Amount of the token to borrow from the market.
14
14
  */
15
15
  export type MorphoBorrowRequestAmount = number | string;
16
16
 
17
+ export const MorphoBorrowRequestChain = {
18
+ EthereumMainnet: "ethereum:mainnet",
19
+ BaseMainnet: "base:mainnet",
20
+ } as const;
21
+ export type MorphoBorrowRequestChain = ClosedEnum<
22
+ typeof MorphoBorrowRequestChain
23
+ >;
24
+
17
25
  export type MorphoBorrowRequest = {
18
26
  /**
19
27
  * Amount of the token to borrow from the market.
@@ -31,10 +39,7 @@ export type MorphoBorrowRequest = {
31
39
  * The address of the receiver of the tokens borrowed. Defaults to the transaction sender.
32
40
  */
33
41
  receiver?: string | null | undefined;
34
- /**
35
- * The chain to use.
36
- */
37
- chain: Chain;
42
+ chain: MorphoBorrowRequestChain;
38
43
  /**
39
44
  * The address of the transaction sender.
40
45
  */
@@ -89,6 +94,27 @@ export function morphoBorrowRequestAmountFromJSON(
89
94
  );
90
95
  }
91
96
 
97
+ /** @internal */
98
+ export const MorphoBorrowRequestChain$inboundSchema: z.ZodNativeEnum<
99
+ typeof MorphoBorrowRequestChain
100
+ > = z.nativeEnum(MorphoBorrowRequestChain);
101
+
102
+ /** @internal */
103
+ export const MorphoBorrowRequestChain$outboundSchema: z.ZodNativeEnum<
104
+ typeof MorphoBorrowRequestChain
105
+ > = MorphoBorrowRequestChain$inboundSchema;
106
+
107
+ /**
108
+ * @internal
109
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
110
+ */
111
+ export namespace MorphoBorrowRequestChain$ {
112
+ /** @deprecated use `MorphoBorrowRequestChain$inboundSchema` instead. */
113
+ export const inboundSchema = MorphoBorrowRequestChain$inboundSchema;
114
+ /** @deprecated use `MorphoBorrowRequestChain$outboundSchema` instead. */
115
+ export const outboundSchema = MorphoBorrowRequestChain$outboundSchema;
116
+ }
117
+
92
118
  /** @internal */
93
119
  export const MorphoBorrowRequest$inboundSchema: z.ZodType<
94
120
  MorphoBorrowRequest,
@@ -99,7 +125,7 @@ export const MorphoBorrowRequest$inboundSchema: z.ZodType<
99
125
  unique_market_key: z.string(),
100
126
  on_behalf_of: z.nullable(z.string()).optional(),
101
127
  receiver: z.nullable(z.string()).optional(),
102
- chain: Chain$inboundSchema,
128
+ chain: MorphoBorrowRequestChain$inboundSchema,
103
129
  sender: z.string(),
104
130
  }).transform((v) => {
105
131
  return remap$(v, {
@@ -128,7 +154,7 @@ export const MorphoBorrowRequest$outboundSchema: z.ZodType<
128
154
  uniqueMarketKey: z.string(),
129
155
  onBehalfOf: z.nullable(z.string()).optional(),
130
156
  receiver: z.nullable(z.string()).optional(),
131
- chain: Chain$outboundSchema,
157
+ chain: MorphoBorrowRequestChain$outboundSchema,
132
158
  sender: z.string(),
133
159
  }).transform((v) => {
134
160
  return remap$(v, {
@@ -5,15 +5,23 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
11
 
12
12
  /**
13
13
  * The amount of tokens to deposit into the vault.
14
14
  */
15
15
  export type MorphoDepositRequestAmount = number | string;
16
16
 
17
+ export const MorphoDepositRequestChain = {
18
+ EthereumMainnet: "ethereum:mainnet",
19
+ BaseMainnet: "base:mainnet",
20
+ } as const;
21
+ export type MorphoDepositRequestChain = ClosedEnum<
22
+ typeof MorphoDepositRequestChain
23
+ >;
24
+
17
25
  export type MorphoDepositRequest = {
18
26
  /**
19
27
  * The vault address you are depositing to.
@@ -27,10 +35,7 @@ export type MorphoDepositRequest = {
27
35
  * The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
28
36
  */
29
37
  receiver?: string | null | undefined;
30
- /**
31
- * The chain to use.
32
- */
33
- chain: Chain;
38
+ chain: MorphoDepositRequestChain;
34
39
  /**
35
40
  * The address of the transaction sender.
36
41
  */
@@ -85,6 +90,27 @@ export function morphoDepositRequestAmountFromJSON(
85
90
  );
86
91
  }
87
92
 
93
+ /** @internal */
94
+ export const MorphoDepositRequestChain$inboundSchema: z.ZodNativeEnum<
95
+ typeof MorphoDepositRequestChain
96
+ > = z.nativeEnum(MorphoDepositRequestChain);
97
+
98
+ /** @internal */
99
+ export const MorphoDepositRequestChain$outboundSchema: z.ZodNativeEnum<
100
+ typeof MorphoDepositRequestChain
101
+ > = MorphoDepositRequestChain$inboundSchema;
102
+
103
+ /**
104
+ * @internal
105
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
106
+ */
107
+ export namespace MorphoDepositRequestChain$ {
108
+ /** @deprecated use `MorphoDepositRequestChain$inboundSchema` instead. */
109
+ export const inboundSchema = MorphoDepositRequestChain$inboundSchema;
110
+ /** @deprecated use `MorphoDepositRequestChain$outboundSchema` instead. */
111
+ export const outboundSchema = MorphoDepositRequestChain$outboundSchema;
112
+ }
113
+
88
114
  /** @internal */
89
115
  export const MorphoDepositRequest$inboundSchema: z.ZodType<
90
116
  MorphoDepositRequest,
@@ -94,7 +120,7 @@ export const MorphoDepositRequest$inboundSchema: z.ZodType<
94
120
  vault_address: z.string(),
95
121
  amount: z.union([z.number(), z.string()]),
96
122
  receiver: z.nullable(z.string()).optional(),
97
- chain: Chain$inboundSchema,
123
+ chain: MorphoDepositRequestChain$inboundSchema,
98
124
  sender: z.string(),
99
125
  }).transform((v) => {
100
126
  return remap$(v, {
@@ -120,7 +146,7 @@ export const MorphoDepositRequest$outboundSchema: z.ZodType<
120
146
  vaultAddress: z.string(),
121
147
  amount: z.union([z.number(), z.string()]),
122
148
  receiver: z.nullable(z.string()).optional(),
123
- chain: Chain$outboundSchema,
149
+ chain: MorphoDepositRequestChain$outboundSchema,
124
150
  sender: z.string(),
125
151
  }).transform((v) => {
126
152
  return remap$(v, {
@@ -6,9 +6,17 @@ import * as z from "zod";
6
6
  import * as b64$ from "../../lib/base64.js";
7
7
  import { remap as remap$ } from "../../lib/primitives.js";
8
8
  import { safeParse } from "../../lib/schemas.js";
9
+ import { ClosedEnum } from "../../types/enums.js";
9
10
  import { Result as SafeParseResult } from "../../types/fp.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
12
+
13
+ export const MorphoRepayRequestChain = {
14
+ EthereumMainnet: "ethereum:mainnet",
15
+ BaseMainnet: "base:mainnet",
16
+ } as const;
17
+ export type MorphoRepayRequestChain = ClosedEnum<
18
+ typeof MorphoRepayRequestChain
19
+ >;
12
20
 
13
21
  export type MorphoRepayRequest = {
14
22
  /**
@@ -27,16 +35,34 @@ export type MorphoRepayRequest = {
27
35
  * An optional field for callback byte data that will be triggered upon successful repaying of debt.
28
36
  */
29
37
  callbackData?: Uint8Array | string | null | undefined;
30
- /**
31
- * The chain to use.
32
- */
33
- chain: Chain;
38
+ chain: MorphoRepayRequestChain;
34
39
  /**
35
40
  * The address of the transaction sender.
36
41
  */
37
42
  sender: string;
38
43
  };
39
44
 
45
+ /** @internal */
46
+ export const MorphoRepayRequestChain$inboundSchema: z.ZodNativeEnum<
47
+ typeof MorphoRepayRequestChain
48
+ > = z.nativeEnum(MorphoRepayRequestChain);
49
+
50
+ /** @internal */
51
+ export const MorphoRepayRequestChain$outboundSchema: z.ZodNativeEnum<
52
+ typeof MorphoRepayRequestChain
53
+ > = MorphoRepayRequestChain$inboundSchema;
54
+
55
+ /**
56
+ * @internal
57
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
58
+ */
59
+ export namespace MorphoRepayRequestChain$ {
60
+ /** @deprecated use `MorphoRepayRequestChain$inboundSchema` instead. */
61
+ export const inboundSchema = MorphoRepayRequestChain$inboundSchema;
62
+ /** @deprecated use `MorphoRepayRequestChain$outboundSchema` instead. */
63
+ export const outboundSchema = MorphoRepayRequestChain$outboundSchema;
64
+ }
65
+
40
66
  /** @internal */
41
67
  export const MorphoRepayRequest$inboundSchema: z.ZodType<
42
68
  MorphoRepayRequest,
@@ -47,7 +73,7 @@ export const MorphoRepayRequest$inboundSchema: z.ZodType<
47
73
  unique_market_key: z.string(),
48
74
  on_behalf_of: z.nullable(z.string()).optional(),
49
75
  callback_data: z.nullable(b64$.zodInbound).optional(),
50
- chain: Chain$inboundSchema,
76
+ chain: MorphoRepayRequestChain$inboundSchema,
51
77
  sender: z.string(),
52
78
  }).transform((v) => {
53
79
  return remap$(v, {
@@ -77,7 +103,7 @@ export const MorphoRepayRequest$outboundSchema: z.ZodType<
77
103
  uniqueMarketKey: z.string(),
78
104
  onBehalfOf: z.nullable(z.string()).optional(),
79
105
  callbackData: z.nullable(b64$.zodOutbound).optional(),
80
- chain: Chain$outboundSchema,
106
+ chain: MorphoRepayRequestChain$outboundSchema,
81
107
  sender: z.string(),
82
108
  }).transform((v) => {
83
109
  return remap$(v, {
@@ -5,15 +5,23 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
11
 
12
12
  /**
13
13
  * The amount of tokens to increase the allowance by.
14
14
  */
15
15
  export type MorphoSetVaultAllowanceRequestAmount = number | string;
16
16
 
17
+ export const MorphoSetVaultAllowanceRequestChain = {
18
+ EthereumMainnet: "ethereum:mainnet",
19
+ BaseMainnet: "base:mainnet",
20
+ } as const;
21
+ export type MorphoSetVaultAllowanceRequestChain = ClosedEnum<
22
+ typeof MorphoSetVaultAllowanceRequestChain
23
+ >;
24
+
17
25
  export type MorphoSetVaultAllowanceRequest = {
18
26
  /**
19
27
  * The vault address you are increasing the allowance for.
@@ -23,10 +31,7 @@ export type MorphoSetVaultAllowanceRequest = {
23
31
  * The amount of tokens to increase the allowance by.
24
32
  */
25
33
  amount: number | string;
26
- /**
27
- * The chain to use.
28
- */
29
- chain: Chain;
34
+ chain: MorphoSetVaultAllowanceRequestChain;
30
35
  /**
31
36
  * The address of the transaction sender.
32
37
  */
@@ -86,6 +91,29 @@ export function morphoSetVaultAllowanceRequestAmountFromJSON(
86
91
  );
87
92
  }
88
93
 
94
+ /** @internal */
95
+ export const MorphoSetVaultAllowanceRequestChain$inboundSchema: z.ZodNativeEnum<
96
+ typeof MorphoSetVaultAllowanceRequestChain
97
+ > = z.nativeEnum(MorphoSetVaultAllowanceRequestChain);
98
+
99
+ /** @internal */
100
+ export const MorphoSetVaultAllowanceRequestChain$outboundSchema:
101
+ z.ZodNativeEnum<typeof MorphoSetVaultAllowanceRequestChain> =
102
+ MorphoSetVaultAllowanceRequestChain$inboundSchema;
103
+
104
+ /**
105
+ * @internal
106
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
107
+ */
108
+ export namespace MorphoSetVaultAllowanceRequestChain$ {
109
+ /** @deprecated use `MorphoSetVaultAllowanceRequestChain$inboundSchema` instead. */
110
+ export const inboundSchema =
111
+ MorphoSetVaultAllowanceRequestChain$inboundSchema;
112
+ /** @deprecated use `MorphoSetVaultAllowanceRequestChain$outboundSchema` instead. */
113
+ export const outboundSchema =
114
+ MorphoSetVaultAllowanceRequestChain$outboundSchema;
115
+ }
116
+
89
117
  /** @internal */
90
118
  export const MorphoSetVaultAllowanceRequest$inboundSchema: z.ZodType<
91
119
  MorphoSetVaultAllowanceRequest,
@@ -94,7 +122,7 @@ export const MorphoSetVaultAllowanceRequest$inboundSchema: z.ZodType<
94
122
  > = z.object({
95
123
  vault_address: z.string(),
96
124
  amount: z.union([z.number(), z.string()]),
97
- chain: Chain$inboundSchema,
125
+ chain: MorphoSetVaultAllowanceRequestChain$inboundSchema,
98
126
  sender: z.string(),
99
127
  }).transform((v) => {
100
128
  return remap$(v, {
@@ -118,7 +146,7 @@ export const MorphoSetVaultAllowanceRequest$outboundSchema: z.ZodType<
118
146
  > = z.object({
119
147
  vaultAddress: z.string(),
120
148
  amount: z.union([z.number(), z.string()]),
121
- chain: Chain$outboundSchema,
149
+ chain: MorphoSetVaultAllowanceRequestChain$outboundSchema,
122
150
  sender: z.string(),
123
151
  }).transform((v) => {
124
152
  return remap$(v, {
@@ -6,15 +6,23 @@ import * as z from "zod";
6
6
  import * as b64$ from "../../lib/base64.js";
7
7
  import { remap as remap$ } from "../../lib/primitives.js";
8
8
  import { safeParse } from "../../lib/schemas.js";
9
+ import { ClosedEnum } from "../../types/enums.js";
9
10
  import { Result as SafeParseResult } from "../../types/fp.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
12
12
 
13
13
  /**
14
14
  * Amount of the token to supply to the market as collateral.
15
15
  */
16
16
  export type MorphoSupplyCollateralRequestAmount = number | string;
17
17
 
18
+ export const MorphoSupplyCollateralRequestChain = {
19
+ EthereumMainnet: "ethereum:mainnet",
20
+ BaseMainnet: "base:mainnet",
21
+ } as const;
22
+ export type MorphoSupplyCollateralRequestChain = ClosedEnum<
23
+ typeof MorphoSupplyCollateralRequestChain
24
+ >;
25
+
18
26
  export type MorphoSupplyCollateralRequest = {
19
27
  /**
20
28
  * Amount of the token to supply to the market as collateral.
@@ -32,10 +40,7 @@ export type MorphoSupplyCollateralRequest = {
32
40
  * An optional field for callback byte data that will be triggered upon successful supplying of collateral.
33
41
  */
34
42
  callbackData?: Uint8Array | string | null | undefined;
35
- /**
36
- * The chain to use.
37
- */
38
- chain: Chain;
43
+ chain: MorphoSupplyCollateralRequestChain;
39
44
  /**
40
45
  * The address of the transaction sender.
41
46
  */
@@ -95,6 +100,28 @@ export function morphoSupplyCollateralRequestAmountFromJSON(
95
100
  );
96
101
  }
97
102
 
103
+ /** @internal */
104
+ export const MorphoSupplyCollateralRequestChain$inboundSchema: z.ZodNativeEnum<
105
+ typeof MorphoSupplyCollateralRequestChain
106
+ > = z.nativeEnum(MorphoSupplyCollateralRequestChain);
107
+
108
+ /** @internal */
109
+ export const MorphoSupplyCollateralRequestChain$outboundSchema: z.ZodNativeEnum<
110
+ typeof MorphoSupplyCollateralRequestChain
111
+ > = MorphoSupplyCollateralRequestChain$inboundSchema;
112
+
113
+ /**
114
+ * @internal
115
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
116
+ */
117
+ export namespace MorphoSupplyCollateralRequestChain$ {
118
+ /** @deprecated use `MorphoSupplyCollateralRequestChain$inboundSchema` instead. */
119
+ export const inboundSchema = MorphoSupplyCollateralRequestChain$inboundSchema;
120
+ /** @deprecated use `MorphoSupplyCollateralRequestChain$outboundSchema` instead. */
121
+ export const outboundSchema =
122
+ MorphoSupplyCollateralRequestChain$outboundSchema;
123
+ }
124
+
98
125
  /** @internal */
99
126
  export const MorphoSupplyCollateralRequest$inboundSchema: z.ZodType<
100
127
  MorphoSupplyCollateralRequest,
@@ -105,7 +132,7 @@ export const MorphoSupplyCollateralRequest$inboundSchema: z.ZodType<
105
132
  unique_market_key: z.string(),
106
133
  on_behalf_of: z.nullable(z.string()).optional(),
107
134
  callback_data: z.nullable(b64$.zodInbound).optional(),
108
- chain: Chain$inboundSchema,
135
+ chain: MorphoSupplyCollateralRequestChain$inboundSchema,
109
136
  sender: z.string(),
110
137
  }).transform((v) => {
111
138
  return remap$(v, {
@@ -135,7 +162,7 @@ export const MorphoSupplyCollateralRequest$outboundSchema: z.ZodType<
135
162
  uniqueMarketKey: z.string(),
136
163
  onBehalfOf: z.nullable(z.string()).optional(),
137
164
  callbackData: z.nullable(b64$.zodOutbound).optional(),
138
- chain: Chain$outboundSchema,
165
+ chain: MorphoSupplyCollateralRequestChain$outboundSchema,
139
166
  sender: z.string(),
140
167
  }).transform((v) => {
141
168
  return remap$(v, {
@@ -5,15 +5,23 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
11
 
12
12
  /**
13
13
  * Amount of the token to supply to the market as collateral.
14
14
  */
15
15
  export type MorphoWithdrawCollateralRequestAmount = number | string;
16
16
 
17
+ export const MorphoWithdrawCollateralRequestChain = {
18
+ EthereumMainnet: "ethereum:mainnet",
19
+ BaseMainnet: "base:mainnet",
20
+ } as const;
21
+ export type MorphoWithdrawCollateralRequestChain = ClosedEnum<
22
+ typeof MorphoWithdrawCollateralRequestChain
23
+ >;
24
+
17
25
  export type MorphoWithdrawCollateralRequest = {
18
26
  /**
19
27
  * Amount of the token to supply to the market as collateral.
@@ -31,10 +39,7 @@ export type MorphoWithdrawCollateralRequest = {
31
39
  * The address where the withdrawn collateral will be received. Defaults to sender.
32
40
  */
33
41
  receiver?: string | null | undefined;
34
- /**
35
- * The chain to use.
36
- */
37
- chain: Chain;
42
+ chain: MorphoWithdrawCollateralRequestChain;
38
43
  /**
39
44
  * The address of the transaction sender.
40
45
  */
@@ -94,6 +99,30 @@ export function morphoWithdrawCollateralRequestAmountFromJSON(
94
99
  );
95
100
  }
96
101
 
102
+ /** @internal */
103
+ export const MorphoWithdrawCollateralRequestChain$inboundSchema:
104
+ z.ZodNativeEnum<typeof MorphoWithdrawCollateralRequestChain> = z.nativeEnum(
105
+ MorphoWithdrawCollateralRequestChain,
106
+ );
107
+
108
+ /** @internal */
109
+ export const MorphoWithdrawCollateralRequestChain$outboundSchema:
110
+ z.ZodNativeEnum<typeof MorphoWithdrawCollateralRequestChain> =
111
+ MorphoWithdrawCollateralRequestChain$inboundSchema;
112
+
113
+ /**
114
+ * @internal
115
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
116
+ */
117
+ export namespace MorphoWithdrawCollateralRequestChain$ {
118
+ /** @deprecated use `MorphoWithdrawCollateralRequestChain$inboundSchema` instead. */
119
+ export const inboundSchema =
120
+ MorphoWithdrawCollateralRequestChain$inboundSchema;
121
+ /** @deprecated use `MorphoWithdrawCollateralRequestChain$outboundSchema` instead. */
122
+ export const outboundSchema =
123
+ MorphoWithdrawCollateralRequestChain$outboundSchema;
124
+ }
125
+
97
126
  /** @internal */
98
127
  export const MorphoWithdrawCollateralRequest$inboundSchema: z.ZodType<
99
128
  MorphoWithdrawCollateralRequest,
@@ -104,7 +133,7 @@ export const MorphoWithdrawCollateralRequest$inboundSchema: z.ZodType<
104
133
  unique_market_key: z.string(),
105
134
  on_behalf_of: z.nullable(z.string()).optional(),
106
135
  receiver: z.nullable(z.string()).optional(),
107
- chain: Chain$inboundSchema,
136
+ chain: MorphoWithdrawCollateralRequestChain$inboundSchema,
108
137
  sender: z.string(),
109
138
  }).transform((v) => {
110
139
  return remap$(v, {
@@ -133,7 +162,7 @@ export const MorphoWithdrawCollateralRequest$outboundSchema: z.ZodType<
133
162
  uniqueMarketKey: z.string(),
134
163
  onBehalfOf: z.nullable(z.string()).optional(),
135
164
  receiver: z.nullable(z.string()).optional(),
136
- chain: Chain$outboundSchema,
165
+ chain: MorphoWithdrawCollateralRequestChain$outboundSchema,
137
166
  sender: z.string(),
138
167
  }).transform((v) => {
139
168
  return remap$(v, {