@compass-labs/api-sdk 1.0.4 → 1.0.6

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 (317) hide show
  1. package/README.md +11 -0
  2. package/bin/mcp-server.js +2824 -1896
  3. package/bin/mcp-server.js.map +37 -19
  4. package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.d.ts +4 -0
  5. package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.js +4 -0
  7. package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.js.map +1 -1
  8. package/dist/commonjs/funcs/ethenaEthenaDeposit.d.ts +27 -0
  9. package/dist/commonjs/funcs/ethenaEthenaDeposit.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/ethenaEthenaDeposit.js +127 -0
  11. package/dist/commonjs/funcs/ethenaEthenaDeposit.js.map +1 -0
  12. package/dist/commonjs/funcs/ethenaEthenaRequest.d.ts +34 -0
  13. package/dist/commonjs/funcs/ethenaEthenaRequest.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/ethenaEthenaRequest.js +134 -0
  15. package/dist/commonjs/funcs/ethenaEthenaRequest.js.map +1 -0
  16. package/dist/commonjs/funcs/ethenaEthenaVault.d.ts +16 -0
  17. package/dist/commonjs/funcs/ethenaEthenaVault.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/ethenaEthenaVault.js +121 -0
  19. package/dist/commonjs/funcs/ethenaEthenaVault.js.map +1 -0
  20. package/dist/commonjs/funcs/ethenaEthenaWithdraw.d.ts +29 -0
  21. package/dist/commonjs/funcs/ethenaEthenaWithdraw.d.ts.map +1 -0
  22. package/dist/commonjs/funcs/ethenaEthenaWithdraw.js +129 -0
  23. package/dist/commonjs/funcs/ethenaEthenaWithdraw.js.map +1 -0
  24. package/dist/commonjs/lib/config.d.ts +2 -2
  25. package/dist/commonjs/lib/config.js +2 -2
  26. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  27. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  28. package/dist/commonjs/mcp-server/server.js +9 -1
  29. package/dist/commonjs/mcp-server/server.js.map +1 -1
  30. package/dist/commonjs/mcp-server/tools/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
  31. package/dist/commonjs/mcp-server/tools/aaveV3AaveHistoricalTransactions.js +5 -1
  32. package/dist/commonjs/mcp-server/tools/aaveV3AaveHistoricalTransactions.js.map +1 -1
  33. package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.d.ts +8 -0
  34. package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.d.ts.map +1 -0
  35. package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.js +74 -0
  36. package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.js.map +1 -0
  37. package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.d.ts +8 -0
  38. package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.d.ts.map +1 -0
  39. package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.js +81 -0
  40. package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.js.map +1 -0
  41. package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.d.ts +8 -0
  42. package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.d.ts.map +1 -0
  43. package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.js +62 -0
  44. package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.js.map +1 -0
  45. package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.d.ts +8 -0
  46. package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.d.ts.map +1 -0
  47. package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.js +76 -0
  48. package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.js.map +1 -0
  49. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts +10 -4
  50. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js +8 -6
  52. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js.map +1 -1
  53. package/dist/commonjs/models/components/cooldownposition.d.ts +66 -0
  54. package/dist/commonjs/models/components/cooldownposition.d.ts.map +1 -0
  55. package/dist/commonjs/models/components/cooldownposition.js +115 -0
  56. package/dist/commonjs/models/components/cooldownposition.js.map +1 -0
  57. package/dist/commonjs/models/components/ethenadepositparams.d.ts +63 -0
  58. package/dist/commonjs/models/components/ethenadepositparams.d.ts.map +1 -0
  59. package/dist/commonjs/models/components/ethenadepositparams.js +105 -0
  60. package/dist/commonjs/models/components/ethenadepositparams.js.map +1 -0
  61. package/dist/commonjs/models/components/ethenadepositrequest.d.ts +93 -0
  62. package/dist/commonjs/models/components/ethenadepositrequest.d.ts.map +1 -0
  63. package/dist/commonjs/models/components/ethenadepositrequest.js +127 -0
  64. package/dist/commonjs/models/components/ethenadepositrequest.js.map +1 -0
  65. package/dist/commonjs/models/components/ethenagetvaultresponse.d.ts +80 -0
  66. package/dist/commonjs/models/components/ethenagetvaultresponse.d.ts.map +1 -0
  67. package/dist/commonjs/models/components/ethenagetvaultresponse.js +114 -0
  68. package/dist/commonjs/models/components/ethenagetvaultresponse.js.map +1 -0
  69. package/dist/commonjs/models/components/ethenarequesttowithdrawparams.d.ts +34 -0
  70. package/dist/commonjs/models/components/ethenarequesttowithdrawparams.d.ts.map +1 -0
  71. package/dist/commonjs/models/components/ethenarequesttowithdrawparams.js +80 -0
  72. package/dist/commonjs/models/components/ethenarequesttowithdrawparams.js.map +1 -0
  73. package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.d.ts +64 -0
  74. package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.d.ts.map +1 -0
  75. package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.js +102 -0
  76. package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.js.map +1 -0
  77. package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.d.ts +64 -0
  78. package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.d.ts.map +1 -0
  79. package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.js +122 -0
  80. package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.js.map +1 -0
  81. package/dist/commonjs/models/components/ethenawithdrawparams.d.ts +39 -0
  82. package/dist/commonjs/models/components/ethenawithdrawparams.d.ts.map +1 -0
  83. package/dist/commonjs/models/components/ethenawithdrawparams.js +82 -0
  84. package/dist/commonjs/models/components/ethenawithdrawparams.js.map +1 -0
  85. package/dist/commonjs/models/components/ethenawithdrawrequest.d.ts +69 -0
  86. package/dist/commonjs/models/components/ethenawithdrawrequest.d.ts.map +1 -0
  87. package/dist/commonjs/models/components/ethenawithdrawrequest.js +104 -0
  88. package/dist/commonjs/models/components/ethenawithdrawrequest.js.map +1 -0
  89. package/dist/commonjs/models/components/index.d.ts +10 -1
  90. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  91. package/dist/commonjs/models/components/index.js +10 -1
  92. package/dist/commonjs/models/components/index.js.map +1 -1
  93. package/dist/commonjs/models/components/setallowanceparams.d.ts +3 -0
  94. package/dist/commonjs/models/components/setallowanceparams.d.ts.map +1 -1
  95. package/dist/commonjs/models/components/setallowanceparams.js +1 -0
  96. package/dist/commonjs/models/components/setallowanceparams.js.map +1 -1
  97. package/dist/commonjs/models/components/setallowancerequest.d.ts +3 -0
  98. package/dist/commonjs/models/components/setallowancerequest.d.ts.map +1 -1
  99. package/dist/commonjs/models/components/setallowancerequest.js +1 -0
  100. package/dist/commonjs/models/components/setallowancerequest.js.map +1 -1
  101. package/dist/commonjs/models/components/underlyingtoken.d.ts +35 -0
  102. package/dist/commonjs/models/components/underlyingtoken.d.ts.map +1 -0
  103. package/dist/commonjs/models/components/underlyingtoken.js +75 -0
  104. package/dist/commonjs/models/components/underlyingtoken.js.map +1 -0
  105. package/dist/commonjs/models/components/useroperation.d.ts +27 -0
  106. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  107. package/dist/commonjs/models/components/useroperation.js +27 -0
  108. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  109. package/dist/commonjs/models/components/vaultgetvaultresponse.d.ts +3 -3
  110. package/dist/commonjs/models/components/vaultgetvaultresponse.d.ts.map +1 -1
  111. package/dist/commonjs/models/components/vaultgetvaultresponse.js +5 -3
  112. package/dist/commonjs/models/components/vaultgetvaultresponse.js.map +1 -1
  113. package/dist/commonjs/models/operations/index.d.ts +1 -0
  114. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  115. package/dist/commonjs/models/operations/index.js +1 -0
  116. package/dist/commonjs/models/operations/index.js.map +1 -1
  117. package/dist/commonjs/models/operations/v1ethenavault.d.ts +62 -0
  118. package/dist/commonjs/models/operations/v1ethenavault.d.ts.map +1 -0
  119. package/dist/commonjs/models/operations/v1ethenavault.js +100 -0
  120. package/dist/commonjs/models/operations/v1ethenavault.js.map +1 -0
  121. package/dist/commonjs/models/operations/v1genericallowance.d.ts +3 -0
  122. package/dist/commonjs/models/operations/v1genericallowance.d.ts.map +1 -1
  123. package/dist/commonjs/models/operations/v1genericallowance.js +1 -0
  124. package/dist/commonjs/models/operations/v1genericallowance.js.map +1 -1
  125. package/dist/commonjs/sdk/aavev3.d.ts +4 -0
  126. package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
  127. package/dist/commonjs/sdk/aavev3.js +4 -0
  128. package/dist/commonjs/sdk/aavev3.js.map +1 -1
  129. package/dist/commonjs/sdk/ethena.d.ts +67 -0
  130. package/dist/commonjs/sdk/ethena.d.ts.map +1 -0
  131. package/dist/commonjs/sdk/ethena.js +85 -0
  132. package/dist/commonjs/sdk/ethena.js.map +1 -0
  133. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  134. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  135. package/dist/commonjs/sdk/sdk.js +4 -0
  136. package/dist/commonjs/sdk/sdk.js.map +1 -1
  137. package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.d.ts +4 -0
  138. package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
  139. package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.js +4 -0
  140. package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.js.map +1 -1
  141. package/dist/esm/funcs/ethenaEthenaDeposit.d.ts +27 -0
  142. package/dist/esm/funcs/ethenaEthenaDeposit.d.ts.map +1 -0
  143. package/dist/esm/funcs/ethenaEthenaDeposit.js +91 -0
  144. package/dist/esm/funcs/ethenaEthenaDeposit.js.map +1 -0
  145. package/dist/esm/funcs/ethenaEthenaRequest.d.ts +34 -0
  146. package/dist/esm/funcs/ethenaEthenaRequest.d.ts.map +1 -0
  147. package/dist/esm/funcs/ethenaEthenaRequest.js +98 -0
  148. package/dist/esm/funcs/ethenaEthenaRequest.js.map +1 -0
  149. package/dist/esm/funcs/ethenaEthenaVault.d.ts +16 -0
  150. package/dist/esm/funcs/ethenaEthenaVault.d.ts.map +1 -0
  151. package/dist/esm/funcs/ethenaEthenaVault.js +85 -0
  152. package/dist/esm/funcs/ethenaEthenaVault.js.map +1 -0
  153. package/dist/esm/funcs/ethenaEthenaWithdraw.d.ts +29 -0
  154. package/dist/esm/funcs/ethenaEthenaWithdraw.d.ts.map +1 -0
  155. package/dist/esm/funcs/ethenaEthenaWithdraw.js +93 -0
  156. package/dist/esm/funcs/ethenaEthenaWithdraw.js.map +1 -0
  157. package/dist/esm/lib/config.d.ts +2 -2
  158. package/dist/esm/lib/config.js +2 -2
  159. package/dist/esm/mcp-server/mcp-server.js +1 -1
  160. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  161. package/dist/esm/mcp-server/server.js +9 -1
  162. package/dist/esm/mcp-server/server.js.map +1 -1
  163. package/dist/esm/mcp-server/tools/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
  164. package/dist/esm/mcp-server/tools/aaveV3AaveHistoricalTransactions.js +5 -1
  165. package/dist/esm/mcp-server/tools/aaveV3AaveHistoricalTransactions.js.map +1 -1
  166. package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.d.ts +8 -0
  167. package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.d.ts.map +1 -0
  168. package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.js +38 -0
  169. package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.js.map +1 -0
  170. package/dist/esm/mcp-server/tools/ethenaEthenaRequest.d.ts +8 -0
  171. package/dist/esm/mcp-server/tools/ethenaEthenaRequest.d.ts.map +1 -0
  172. package/dist/esm/mcp-server/tools/ethenaEthenaRequest.js +45 -0
  173. package/dist/esm/mcp-server/tools/ethenaEthenaRequest.js.map +1 -0
  174. package/dist/esm/mcp-server/tools/ethenaEthenaVault.d.ts +8 -0
  175. package/dist/esm/mcp-server/tools/ethenaEthenaVault.d.ts.map +1 -0
  176. package/dist/esm/mcp-server/tools/ethenaEthenaVault.js +26 -0
  177. package/dist/esm/mcp-server/tools/ethenaEthenaVault.js.map +1 -0
  178. package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.d.ts +8 -0
  179. package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.d.ts.map +1 -0
  180. package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.js +40 -0
  181. package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.js.map +1 -0
  182. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts +10 -4
  183. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts.map +1 -1
  184. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js +8 -6
  185. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js.map +1 -1
  186. package/dist/esm/models/components/cooldownposition.d.ts +66 -0
  187. package/dist/esm/models/components/cooldownposition.d.ts.map +1 -0
  188. package/dist/esm/models/components/cooldownposition.js +75 -0
  189. package/dist/esm/models/components/cooldownposition.js.map +1 -0
  190. package/dist/esm/models/components/ethenadepositparams.d.ts +63 -0
  191. package/dist/esm/models/components/ethenadepositparams.d.ts.map +1 -0
  192. package/dist/esm/models/components/ethenadepositparams.js +65 -0
  193. package/dist/esm/models/components/ethenadepositparams.js.map +1 -0
  194. package/dist/esm/models/components/ethenadepositrequest.d.ts +93 -0
  195. package/dist/esm/models/components/ethenadepositrequest.d.ts.map +1 -0
  196. package/dist/esm/models/components/ethenadepositrequest.js +87 -0
  197. package/dist/esm/models/components/ethenadepositrequest.js.map +1 -0
  198. package/dist/esm/models/components/ethenagetvaultresponse.d.ts +80 -0
  199. package/dist/esm/models/components/ethenagetvaultresponse.d.ts.map +1 -0
  200. package/dist/esm/models/components/ethenagetvaultresponse.js +76 -0
  201. package/dist/esm/models/components/ethenagetvaultresponse.js.map +1 -0
  202. package/dist/esm/models/components/ethenarequesttowithdrawparams.d.ts +34 -0
  203. package/dist/esm/models/components/ethenarequesttowithdrawparams.d.ts.map +1 -0
  204. package/dist/esm/models/components/ethenarequesttowithdrawparams.js +42 -0
  205. package/dist/esm/models/components/ethenarequesttowithdrawparams.js.map +1 -0
  206. package/dist/esm/models/components/ethenarequesttowithdrawrequest.d.ts +64 -0
  207. package/dist/esm/models/components/ethenarequesttowithdrawrequest.d.ts.map +1 -0
  208. package/dist/esm/models/components/ethenarequesttowithdrawrequest.js +64 -0
  209. package/dist/esm/models/components/ethenarequesttowithdrawrequest.js.map +1 -0
  210. package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.d.ts +64 -0
  211. package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.d.ts.map +1 -0
  212. package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.js +82 -0
  213. package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.js.map +1 -0
  214. package/dist/esm/models/components/ethenawithdrawparams.d.ts +39 -0
  215. package/dist/esm/models/components/ethenawithdrawparams.d.ts.map +1 -0
  216. package/dist/esm/models/components/ethenawithdrawparams.js +44 -0
  217. package/dist/esm/models/components/ethenawithdrawparams.js.map +1 -0
  218. package/dist/esm/models/components/ethenawithdrawrequest.d.ts +69 -0
  219. package/dist/esm/models/components/ethenawithdrawrequest.d.ts.map +1 -0
  220. package/dist/esm/models/components/ethenawithdrawrequest.js +66 -0
  221. package/dist/esm/models/components/ethenawithdrawrequest.js.map +1 -0
  222. package/dist/esm/models/components/index.d.ts +10 -1
  223. package/dist/esm/models/components/index.d.ts.map +1 -1
  224. package/dist/esm/models/components/index.js +10 -1
  225. package/dist/esm/models/components/index.js.map +1 -1
  226. package/dist/esm/models/components/setallowanceparams.d.ts +3 -0
  227. package/dist/esm/models/components/setallowanceparams.d.ts.map +1 -1
  228. package/dist/esm/models/components/setallowanceparams.js +1 -0
  229. package/dist/esm/models/components/setallowanceparams.js.map +1 -1
  230. package/dist/esm/models/components/setallowancerequest.d.ts +3 -0
  231. package/dist/esm/models/components/setallowancerequest.d.ts.map +1 -1
  232. package/dist/esm/models/components/setallowancerequest.js +1 -0
  233. package/dist/esm/models/components/setallowancerequest.js.map +1 -1
  234. package/dist/esm/models/components/underlyingtoken.d.ts +35 -0
  235. package/dist/esm/models/components/underlyingtoken.d.ts.map +1 -0
  236. package/dist/esm/models/components/underlyingtoken.js +37 -0
  237. package/dist/esm/models/components/underlyingtoken.js.map +1 -0
  238. package/dist/esm/models/components/useroperation.d.ts +27 -0
  239. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  240. package/dist/esm/models/components/useroperation.js +27 -0
  241. package/dist/esm/models/components/useroperation.js.map +1 -1
  242. package/dist/esm/models/components/vaultgetvaultresponse.d.ts +3 -3
  243. package/dist/esm/models/components/vaultgetvaultresponse.d.ts.map +1 -1
  244. package/dist/esm/models/components/vaultgetvaultresponse.js +5 -3
  245. package/dist/esm/models/components/vaultgetvaultresponse.js.map +1 -1
  246. package/dist/esm/models/operations/index.d.ts +1 -0
  247. package/dist/esm/models/operations/index.d.ts.map +1 -1
  248. package/dist/esm/models/operations/index.js +1 -0
  249. package/dist/esm/models/operations/index.js.map +1 -1
  250. package/dist/esm/models/operations/v1ethenavault.d.ts +62 -0
  251. package/dist/esm/models/operations/v1ethenavault.d.ts.map +1 -0
  252. package/dist/esm/models/operations/v1ethenavault.js +62 -0
  253. package/dist/esm/models/operations/v1ethenavault.js.map +1 -0
  254. package/dist/esm/models/operations/v1genericallowance.d.ts +3 -0
  255. package/dist/esm/models/operations/v1genericallowance.d.ts.map +1 -1
  256. package/dist/esm/models/operations/v1genericallowance.js +1 -0
  257. package/dist/esm/models/operations/v1genericallowance.js.map +1 -1
  258. package/dist/esm/sdk/aavev3.d.ts +4 -0
  259. package/dist/esm/sdk/aavev3.d.ts.map +1 -1
  260. package/dist/esm/sdk/aavev3.js +4 -0
  261. package/dist/esm/sdk/aavev3.js.map +1 -1
  262. package/dist/esm/sdk/ethena.d.ts +67 -0
  263. package/dist/esm/sdk/ethena.d.ts.map +1 -0
  264. package/dist/esm/sdk/ethena.js +81 -0
  265. package/dist/esm/sdk/ethena.js.map +1 -0
  266. package/dist/esm/sdk/sdk.d.ts +3 -0
  267. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  268. package/dist/esm/sdk/sdk.js +4 -0
  269. package/dist/esm/sdk/sdk.js.map +1 -1
  270. package/docs/sdks/aavev3/README.md +4 -0
  271. package/docs/sdks/ethena/README.md +354 -0
  272. package/jsr.json +1 -1
  273. package/package.json +1 -1
  274. package/src/funcs/aaveV3AaveHistoricalTransactions.ts +4 -0
  275. package/src/funcs/ethenaEthenaDeposit.ts +178 -0
  276. package/src/funcs/ethenaEthenaRequest.ts +189 -0
  277. package/src/funcs/ethenaEthenaVault.ts +173 -0
  278. package/src/funcs/ethenaEthenaWithdraw.ts +180 -0
  279. package/src/lib/config.ts +2 -2
  280. package/src/mcp-server/mcp-server.ts +1 -1
  281. package/src/mcp-server/server.ts +9 -1
  282. package/src/mcp-server/tools/aaveV3AaveHistoricalTransactions.ts +5 -1
  283. package/src/mcp-server/tools/ethenaEthenaDeposit.ts +47 -0
  284. package/src/mcp-server/tools/ethenaEthenaRequest.ts +54 -0
  285. package/src/mcp-server/tools/ethenaEthenaVault.ts +35 -0
  286. package/src/mcp-server/tools/ethenaEthenaWithdraw.ts +49 -0
  287. package/src/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.ts +18 -10
  288. package/src/models/components/cooldownposition.ts +151 -0
  289. package/src/models/components/ethenadepositparams.ts +142 -0
  290. package/src/models/components/ethenadepositrequest.ts +182 -0
  291. package/src/models/components/ethenagetvaultresponse.ts +188 -0
  292. package/src/models/components/ethenarequesttowithdrawparams.ts +88 -0
  293. package/src/models/components/ethenarequesttowithdrawrequest.ts +130 -0
  294. package/src/models/components/ethenarequesttowithdrawtransactionresponse.ts +208 -0
  295. package/src/models/components/ethenawithdrawparams.ts +89 -0
  296. package/src/models/components/ethenawithdrawrequest.ts +129 -0
  297. package/src/models/components/index.ts +10 -1
  298. package/src/models/components/setallowanceparams.ts +1 -0
  299. package/src/models/components/setallowancerequest.ts +1 -0
  300. package/src/models/components/underlyingtoken.ts +76 -0
  301. package/src/models/components/useroperation.ts +96 -0
  302. package/src/models/components/vaultgetvaultresponse.ts +12 -10
  303. package/src/models/operations/index.ts +1 -0
  304. package/src/models/operations/v1ethenavault.ts +116 -0
  305. package/src/models/operations/v1genericallowance.ts +1 -0
  306. package/src/sdk/aavev3.ts +4 -0
  307. package/src/sdk/ethena.ts +115 -0
  308. package/src/sdk/sdk.ts +6 -0
  309. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts +0 -35
  310. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts.map +0 -1
  311. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js +0 -75
  312. package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js.map +0 -1
  313. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts +0 -35
  314. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts.map +0 -1
  315. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js +0 -37
  316. package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js.map +0 -1
  317. package/src/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.ts +0 -92
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { ethenaEthenaRequest } from "../../funcs/ethenaEthenaRequest.js";
6
+ import * as components from "../../models/components/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: components.EthenaRequestToWithdrawRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$ethenaEthenaRequest: ToolDefinition<typeof args> = {
14
+ name: "ethena-ethena-request",
15
+ description: `Request to Withdraw USDe
16
+
17
+ Request to withdraw deposited USDe from Ethena's vault.
18
+
19
+ The Ethena vault requires a cooldown period. Once a request to withdraw a specified
20
+ amount of USDe has been submitted, the alloted cooldown period must pass before the
21
+ withdraw USDe transaction can be submitted.
22
+
23
+ If an additional amount of USDe is requested to be withdrawn anytime before
24
+ withdrawing the originally requested amount, the cooldown period restarts.
25
+
26
+ Yield is not earned on USDe while in its cooldown period.
27
+ <Info>
28
+ **Required Allowances**
29
+
30
+ In order to make this transaction, token allowances need to be set for the following contracts.
31
+
32
+ - \`EthenaVault\`
33
+ </Info>
34
+ `,
35
+ args,
36
+ tool: async (client, args, ctx) => {
37
+ const [result, apiCall] = await ethenaEthenaRequest(
38
+ client,
39
+ args.request,
40
+ { fetchOptions: { signal: ctx.signal } },
41
+ ).$inspect();
42
+
43
+ if (!result.ok) {
44
+ return {
45
+ content: [{ type: "text", text: result.error.message }],
46
+ isError: true,
47
+ };
48
+ }
49
+
50
+ const value = result.value;
51
+
52
+ return formatResult(value, apiCall);
53
+ },
54
+ };
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { ethenaEthenaVault } from "../../funcs/ethenaEthenaVault.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.V1EthenaVaultRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$ethenaEthenaVault: ToolDefinition<typeof args> = {
14
+ name: "ethena-ethena-vault",
15
+ description: `Get Vault & User Position`,
16
+ args,
17
+ tool: async (client, args, ctx) => {
18
+ const [result, apiCall] = await ethenaEthenaVault(
19
+ client,
20
+ args.request,
21
+ { fetchOptions: { signal: ctx.signal } },
22
+ ).$inspect();
23
+
24
+ if (!result.ok) {
25
+ return {
26
+ content: [{ type: "text", text: result.error.message }],
27
+ isError: true,
28
+ };
29
+ }
30
+
31
+ const value = result.value;
32
+
33
+ return formatResult(value, apiCall);
34
+ },
35
+ };
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { ethenaEthenaWithdraw } from "../../funcs/ethenaEthenaWithdraw.js";
6
+ import * as components from "../../models/components/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: components.EthenaWithdrawRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$ethenaEthenaWithdraw: ToolDefinition<typeof args> = {
14
+ name: "ethena-ethena-withdraw",
15
+ description: `Withdraw USDe
16
+
17
+ Withdraw deposited USDe from Ethena's vault and cease earning passive yield.
18
+
19
+ The passive yield earned on USDe deposits is represented by the increased value of
20
+ the shares received (sUSDe) upon depositing USDe. Trade in these shares in exchange
21
+ for the intial USDe deposited and any accrued yield since depositing.
22
+ <Info>
23
+ **Required Allowances**
24
+
25
+ In order to make this transaction, token allowances need to be set for the following contracts.
26
+
27
+ - \`EthenaVault\`
28
+ </Info>
29
+ `,
30
+ args,
31
+ tool: async (client, args, ctx) => {
32
+ const [result, apiCall] = await ethenaEthenaWithdraw(
33
+ client,
34
+ args.request,
35
+ { fetchOptions: { signal: ctx.signal } },
36
+ ).$inspect();
37
+
38
+ if (!result.ok) {
39
+ return {
40
+ content: [{ type: "text", text: result.error.message }],
41
+ isError: true,
42
+ };
43
+ }
44
+
45
+ const value = result.value;
46
+
47
+ return formatResult(value, apiCall);
48
+ },
49
+ };
@@ -9,8 +9,14 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type CompassApiBackendModelsVaultsReadResponseVaultUserPosition = {
12
- shares: number;
13
- tokenAmount: string;
12
+ /**
13
+ * The number of vault share tokens representing the user’s proportional ownership of the assets in the vault.
14
+ */
15
+ amountOfShares: string;
16
+ /**
17
+ * The equivalent value of the user’s vault shares, denominated in the vault’s underlying asset (deposit token).
18
+ */
19
+ amountInUnderlyingToken: string;
14
20
  };
15
21
 
16
22
  /** @internal */
@@ -20,19 +26,20 @@ export const CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundS
20
26
  z.ZodTypeDef,
21
27
  unknown
22
28
  > = z.object({
23
- shares: z.number().int(),
24
- token_amount: z.string(),
29
+ amount_of_shares: z.string(),
30
+ amount_in_underlying_token: z.string(),
25
31
  }).transform((v) => {
26
32
  return remap$(v, {
27
- "token_amount": "tokenAmount",
33
+ "amount_of_shares": "amountOfShares",
34
+ "amount_in_underlying_token": "amountInUnderlyingToken",
28
35
  });
29
36
  });
30
37
 
31
38
  /** @internal */
32
39
  export type CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound =
33
40
  {
34
- shares: number;
35
- token_amount: string;
41
+ amount_of_shares: string;
42
+ amount_in_underlying_token: string;
36
43
  };
37
44
 
38
45
  /** @internal */
@@ -42,11 +49,12 @@ export const CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outbound
42
49
  z.ZodTypeDef,
43
50
  CompassApiBackendModelsVaultsReadResponseVaultUserPosition
44
51
  > = z.object({
45
- shares: z.number().int(),
46
- tokenAmount: z.string(),
52
+ amountOfShares: z.string(),
53
+ amountInUnderlyingToken: z.string(),
47
54
  }).transform((v) => {
48
55
  return remap$(v, {
49
- tokenAmount: "token_amount",
56
+ amountOfShares: "amount_of_shares",
57
+ amountInUnderlyingToken: "amount_in_underlying_token",
50
58
  });
51
59
  });
52
60
 
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * When the cooldown period ends. ISO 8601 format. UTC timezone.
13
+ */
14
+ export type CooldownEnd = Date | boolean;
15
+
16
+ export type CooldownPosition = {
17
+ /**
18
+ * The amount of USDe currently in a cooldown period.
19
+ */
20
+ amountInUnderlyingAsset: string;
21
+ /**
22
+ * When the cooldown period ends. ISO 8601 format. UTC timezone.
23
+ */
24
+ cooldownEnd: Date | boolean;
25
+ /**
26
+ * Whether the USDe in cooldown can be withdrawn at this moment.
27
+ */
28
+ canBeWithdrawn: boolean;
29
+ };
30
+
31
+ /** @internal */
32
+ export const CooldownEnd$inboundSchema: z.ZodType<
33
+ CooldownEnd,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.union([
37
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
38
+ z.boolean(),
39
+ ]);
40
+
41
+ /** @internal */
42
+ export type CooldownEnd$Outbound = string | boolean;
43
+
44
+ /** @internal */
45
+ export const CooldownEnd$outboundSchema: z.ZodType<
46
+ CooldownEnd$Outbound,
47
+ z.ZodTypeDef,
48
+ CooldownEnd
49
+ > = z.union([z.date().transform(v => v.toISOString()), z.boolean()]);
50
+
51
+ /**
52
+ * @internal
53
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
54
+ */
55
+ export namespace CooldownEnd$ {
56
+ /** @deprecated use `CooldownEnd$inboundSchema` instead. */
57
+ export const inboundSchema = CooldownEnd$inboundSchema;
58
+ /** @deprecated use `CooldownEnd$outboundSchema` instead. */
59
+ export const outboundSchema = CooldownEnd$outboundSchema;
60
+ /** @deprecated use `CooldownEnd$Outbound` instead. */
61
+ export type Outbound = CooldownEnd$Outbound;
62
+ }
63
+
64
+ export function cooldownEndToJSON(cooldownEnd: CooldownEnd): string {
65
+ return JSON.stringify(CooldownEnd$outboundSchema.parse(cooldownEnd));
66
+ }
67
+
68
+ export function cooldownEndFromJSON(
69
+ jsonString: string,
70
+ ): SafeParseResult<CooldownEnd, SDKValidationError> {
71
+ return safeParse(
72
+ jsonString,
73
+ (x) => CooldownEnd$inboundSchema.parse(JSON.parse(x)),
74
+ `Failed to parse 'CooldownEnd' from JSON`,
75
+ );
76
+ }
77
+
78
+ /** @internal */
79
+ export const CooldownPosition$inboundSchema: z.ZodType<
80
+ CooldownPosition,
81
+ z.ZodTypeDef,
82
+ unknown
83
+ > = z.object({
84
+ amount_in_underlying_asset: z.string(),
85
+ cooldown_end: z.union([
86
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
87
+ z.boolean(),
88
+ ]),
89
+ can_be_withdrawn: z.boolean(),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "amount_in_underlying_asset": "amountInUnderlyingAsset",
93
+ "cooldown_end": "cooldownEnd",
94
+ "can_be_withdrawn": "canBeWithdrawn",
95
+ });
96
+ });
97
+
98
+ /** @internal */
99
+ export type CooldownPosition$Outbound = {
100
+ amount_in_underlying_asset: string;
101
+ cooldown_end: string | boolean;
102
+ can_be_withdrawn: boolean;
103
+ };
104
+
105
+ /** @internal */
106
+ export const CooldownPosition$outboundSchema: z.ZodType<
107
+ CooldownPosition$Outbound,
108
+ z.ZodTypeDef,
109
+ CooldownPosition
110
+ > = z.object({
111
+ amountInUnderlyingAsset: z.string(),
112
+ cooldownEnd: z.union([z.date().transform(v => v.toISOString()), z.boolean()]),
113
+ canBeWithdrawn: z.boolean(),
114
+ }).transform((v) => {
115
+ return remap$(v, {
116
+ amountInUnderlyingAsset: "amount_in_underlying_asset",
117
+ cooldownEnd: "cooldown_end",
118
+ canBeWithdrawn: "can_be_withdrawn",
119
+ });
120
+ });
121
+
122
+ /**
123
+ * @internal
124
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
125
+ */
126
+ export namespace CooldownPosition$ {
127
+ /** @deprecated use `CooldownPosition$inboundSchema` instead. */
128
+ export const inboundSchema = CooldownPosition$inboundSchema;
129
+ /** @deprecated use `CooldownPosition$outboundSchema` instead. */
130
+ export const outboundSchema = CooldownPosition$outboundSchema;
131
+ /** @deprecated use `CooldownPosition$Outbound` instead. */
132
+ export type Outbound = CooldownPosition$Outbound;
133
+ }
134
+
135
+ export function cooldownPositionToJSON(
136
+ cooldownPosition: CooldownPosition,
137
+ ): string {
138
+ return JSON.stringify(
139
+ CooldownPosition$outboundSchema.parse(cooldownPosition),
140
+ );
141
+ }
142
+
143
+ export function cooldownPositionFromJSON(
144
+ jsonString: string,
145
+ ): SafeParseResult<CooldownPosition, SDKValidationError> {
146
+ return safeParse(
147
+ jsonString,
148
+ (x) => CooldownPosition$inboundSchema.parse(JSON.parse(x)),
149
+ `Failed to parse 'CooldownPosition' from JSON`,
150
+ );
151
+ }
@@ -0,0 +1,142 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The amount of USDe to deposit into Ethena's vault.
13
+ */
14
+ export type EthenaDepositParamsAmount = number | string;
15
+
16
+ export type EthenaDepositParams = {
17
+ actionType?: "ETHENA_DEPOSIT" | undefined;
18
+ /**
19
+ * The amount of USDe to deposit into Ethena's vault.
20
+ */
21
+ amount: number | string;
22
+ /**
23
+ * The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender.
24
+ */
25
+ receiver?: string | null | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const EthenaDepositParamsAmount$inboundSchema: z.ZodType<
30
+ EthenaDepositParamsAmount,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.union([z.number(), z.string()]);
34
+
35
+ /** @internal */
36
+ export type EthenaDepositParamsAmount$Outbound = number | string;
37
+
38
+ /** @internal */
39
+ export const EthenaDepositParamsAmount$outboundSchema: z.ZodType<
40
+ EthenaDepositParamsAmount$Outbound,
41
+ z.ZodTypeDef,
42
+ EthenaDepositParamsAmount
43
+ > = z.union([z.number(), z.string()]);
44
+
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ export namespace EthenaDepositParamsAmount$ {
50
+ /** @deprecated use `EthenaDepositParamsAmount$inboundSchema` instead. */
51
+ export const inboundSchema = EthenaDepositParamsAmount$inboundSchema;
52
+ /** @deprecated use `EthenaDepositParamsAmount$outboundSchema` instead. */
53
+ export const outboundSchema = EthenaDepositParamsAmount$outboundSchema;
54
+ /** @deprecated use `EthenaDepositParamsAmount$Outbound` instead. */
55
+ export type Outbound = EthenaDepositParamsAmount$Outbound;
56
+ }
57
+
58
+ export function ethenaDepositParamsAmountToJSON(
59
+ ethenaDepositParamsAmount: EthenaDepositParamsAmount,
60
+ ): string {
61
+ return JSON.stringify(
62
+ EthenaDepositParamsAmount$outboundSchema.parse(ethenaDepositParamsAmount),
63
+ );
64
+ }
65
+
66
+ export function ethenaDepositParamsAmountFromJSON(
67
+ jsonString: string,
68
+ ): SafeParseResult<EthenaDepositParamsAmount, SDKValidationError> {
69
+ return safeParse(
70
+ jsonString,
71
+ (x) => EthenaDepositParamsAmount$inboundSchema.parse(JSON.parse(x)),
72
+ `Failed to parse 'EthenaDepositParamsAmount' from JSON`,
73
+ );
74
+ }
75
+
76
+ /** @internal */
77
+ export const EthenaDepositParams$inboundSchema: z.ZodType<
78
+ EthenaDepositParams,
79
+ z.ZodTypeDef,
80
+ unknown
81
+ > = z.object({
82
+ action_type: z.literal("ETHENA_DEPOSIT").default("ETHENA_DEPOSIT"),
83
+ amount: z.union([z.number(), z.string()]),
84
+ receiver: z.nullable(z.string()).optional(),
85
+ }).transform((v) => {
86
+ return remap$(v, {
87
+ "action_type": "actionType",
88
+ });
89
+ });
90
+
91
+ /** @internal */
92
+ export type EthenaDepositParams$Outbound = {
93
+ action_type: "ETHENA_DEPOSIT";
94
+ amount: number | string;
95
+ receiver?: string | null | undefined;
96
+ };
97
+
98
+ /** @internal */
99
+ export const EthenaDepositParams$outboundSchema: z.ZodType<
100
+ EthenaDepositParams$Outbound,
101
+ z.ZodTypeDef,
102
+ EthenaDepositParams
103
+ > = z.object({
104
+ actionType: z.literal("ETHENA_DEPOSIT").default("ETHENA_DEPOSIT" as const),
105
+ amount: z.union([z.number(), z.string()]),
106
+ receiver: z.nullable(z.string()).optional(),
107
+ }).transform((v) => {
108
+ return remap$(v, {
109
+ actionType: "action_type",
110
+ });
111
+ });
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 EthenaDepositParams$ {
118
+ /** @deprecated use `EthenaDepositParams$inboundSchema` instead. */
119
+ export const inboundSchema = EthenaDepositParams$inboundSchema;
120
+ /** @deprecated use `EthenaDepositParams$outboundSchema` instead. */
121
+ export const outboundSchema = EthenaDepositParams$outboundSchema;
122
+ /** @deprecated use `EthenaDepositParams$Outbound` instead. */
123
+ export type Outbound = EthenaDepositParams$Outbound;
124
+ }
125
+
126
+ export function ethenaDepositParamsToJSON(
127
+ ethenaDepositParams: EthenaDepositParams,
128
+ ): string {
129
+ return JSON.stringify(
130
+ EthenaDepositParams$outboundSchema.parse(ethenaDepositParams),
131
+ );
132
+ }
133
+
134
+ export function ethenaDepositParamsFromJSON(
135
+ jsonString: string,
136
+ ): SafeParseResult<EthenaDepositParams, SDKValidationError> {
137
+ return safeParse(
138
+ jsonString,
139
+ (x) => EthenaDepositParams$inboundSchema.parse(JSON.parse(x)),
140
+ `Failed to parse 'EthenaDepositParams' from JSON`,
141
+ );
142
+ }
@@ -0,0 +1,182 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The amount of USDe to deposit into Ethena's vault.
14
+ */
15
+ export type EthenaDepositRequestAmount = number | string;
16
+
17
+ export const EthenaDepositRequestChain = {
18
+ Ethereum: "ethereum",
19
+ } as const;
20
+ export type EthenaDepositRequestChain = ClosedEnum<
21
+ typeof EthenaDepositRequestChain
22
+ >;
23
+
24
+ export type EthenaDepositRequest = {
25
+ actionType?: "ETHENA_DEPOSIT" | undefined;
26
+ /**
27
+ * The amount of USDe to deposit into Ethena's vault.
28
+ */
29
+ amount: number | string;
30
+ /**
31
+ * The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender.
32
+ */
33
+ receiver?: string | null | undefined;
34
+ chain: EthenaDepositRequestChain;
35
+ /**
36
+ * The address of the transaction sender.
37
+ */
38
+ sender: string;
39
+ };
40
+
41
+ /** @internal */
42
+ export const EthenaDepositRequestAmount$inboundSchema: z.ZodType<
43
+ EthenaDepositRequestAmount,
44
+ z.ZodTypeDef,
45
+ unknown
46
+ > = z.union([z.number(), z.string()]);
47
+
48
+ /** @internal */
49
+ export type EthenaDepositRequestAmount$Outbound = number | string;
50
+
51
+ /** @internal */
52
+ export const EthenaDepositRequestAmount$outboundSchema: z.ZodType<
53
+ EthenaDepositRequestAmount$Outbound,
54
+ z.ZodTypeDef,
55
+ EthenaDepositRequestAmount
56
+ > = z.union([z.number(), z.string()]);
57
+
58
+ /**
59
+ * @internal
60
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
61
+ */
62
+ export namespace EthenaDepositRequestAmount$ {
63
+ /** @deprecated use `EthenaDepositRequestAmount$inboundSchema` instead. */
64
+ export const inboundSchema = EthenaDepositRequestAmount$inboundSchema;
65
+ /** @deprecated use `EthenaDepositRequestAmount$outboundSchema` instead. */
66
+ export const outboundSchema = EthenaDepositRequestAmount$outboundSchema;
67
+ /** @deprecated use `EthenaDepositRequestAmount$Outbound` instead. */
68
+ export type Outbound = EthenaDepositRequestAmount$Outbound;
69
+ }
70
+
71
+ export function ethenaDepositRequestAmountToJSON(
72
+ ethenaDepositRequestAmount: EthenaDepositRequestAmount,
73
+ ): string {
74
+ return JSON.stringify(
75
+ EthenaDepositRequestAmount$outboundSchema.parse(ethenaDepositRequestAmount),
76
+ );
77
+ }
78
+
79
+ export function ethenaDepositRequestAmountFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<EthenaDepositRequestAmount, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => EthenaDepositRequestAmount$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'EthenaDepositRequestAmount' from JSON`,
86
+ );
87
+ }
88
+
89
+ /** @internal */
90
+ export const EthenaDepositRequestChain$inboundSchema: z.ZodNativeEnum<
91
+ typeof EthenaDepositRequestChain
92
+ > = z.nativeEnum(EthenaDepositRequestChain);
93
+
94
+ /** @internal */
95
+ export const EthenaDepositRequestChain$outboundSchema: z.ZodNativeEnum<
96
+ typeof EthenaDepositRequestChain
97
+ > = EthenaDepositRequestChain$inboundSchema;
98
+
99
+ /**
100
+ * @internal
101
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
102
+ */
103
+ export namespace EthenaDepositRequestChain$ {
104
+ /** @deprecated use `EthenaDepositRequestChain$inboundSchema` instead. */
105
+ export const inboundSchema = EthenaDepositRequestChain$inboundSchema;
106
+ /** @deprecated use `EthenaDepositRequestChain$outboundSchema` instead. */
107
+ export const outboundSchema = EthenaDepositRequestChain$outboundSchema;
108
+ }
109
+
110
+ /** @internal */
111
+ export const EthenaDepositRequest$inboundSchema: z.ZodType<
112
+ EthenaDepositRequest,
113
+ z.ZodTypeDef,
114
+ unknown
115
+ > = z.object({
116
+ action_type: z.literal("ETHENA_DEPOSIT").default("ETHENA_DEPOSIT"),
117
+ amount: z.union([z.number(), z.string()]),
118
+ receiver: z.nullable(z.string()).optional(),
119
+ chain: EthenaDepositRequestChain$inboundSchema,
120
+ sender: z.string(),
121
+ }).transform((v) => {
122
+ return remap$(v, {
123
+ "action_type": "actionType",
124
+ });
125
+ });
126
+
127
+ /** @internal */
128
+ export type EthenaDepositRequest$Outbound = {
129
+ action_type: "ETHENA_DEPOSIT";
130
+ amount: number | string;
131
+ receiver?: string | null | undefined;
132
+ chain: string;
133
+ sender: string;
134
+ };
135
+
136
+ /** @internal */
137
+ export const EthenaDepositRequest$outboundSchema: z.ZodType<
138
+ EthenaDepositRequest$Outbound,
139
+ z.ZodTypeDef,
140
+ EthenaDepositRequest
141
+ > = z.object({
142
+ actionType: z.literal("ETHENA_DEPOSIT").default("ETHENA_DEPOSIT" as const),
143
+ amount: z.union([z.number(), z.string()]),
144
+ receiver: z.nullable(z.string()).optional(),
145
+ chain: EthenaDepositRequestChain$outboundSchema,
146
+ sender: z.string(),
147
+ }).transform((v) => {
148
+ return remap$(v, {
149
+ actionType: "action_type",
150
+ });
151
+ });
152
+
153
+ /**
154
+ * @internal
155
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
156
+ */
157
+ export namespace EthenaDepositRequest$ {
158
+ /** @deprecated use `EthenaDepositRequest$inboundSchema` instead. */
159
+ export const inboundSchema = EthenaDepositRequest$inboundSchema;
160
+ /** @deprecated use `EthenaDepositRequest$outboundSchema` instead. */
161
+ export const outboundSchema = EthenaDepositRequest$outboundSchema;
162
+ /** @deprecated use `EthenaDepositRequest$Outbound` instead. */
163
+ export type Outbound = EthenaDepositRequest$Outbound;
164
+ }
165
+
166
+ export function ethenaDepositRequestToJSON(
167
+ ethenaDepositRequest: EthenaDepositRequest,
168
+ ): string {
169
+ return JSON.stringify(
170
+ EthenaDepositRequest$outboundSchema.parse(ethenaDepositRequest),
171
+ );
172
+ }
173
+
174
+ export function ethenaDepositRequestFromJSON(
175
+ jsonString: string,
176
+ ): SafeParseResult<EthenaDepositRequest, SDKValidationError> {
177
+ return safeParse(
178
+ jsonString,
179
+ (x) => EthenaDepositRequest$inboundSchema.parse(JSON.parse(x)),
180
+ `Failed to parse 'EthenaDepositRequest' from JSON`,
181
+ );
182
+ }