@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,188 @@
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
+ import {
11
+ Apy,
12
+ Apy$inboundSchema,
13
+ Apy$Outbound,
14
+ Apy$outboundSchema,
15
+ } from "./apy.js";
16
+ import {
17
+ CompassApiBackendModelsVaultsReadResponseVaultUserPosition,
18
+ CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundSchema,
19
+ CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound,
20
+ CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outboundSchema,
21
+ } from "./compassapibackendmodelsvaultsreadresponsevaultuserposition.js";
22
+ import {
23
+ CooldownPosition,
24
+ CooldownPosition$inboundSchema,
25
+ CooldownPosition$Outbound,
26
+ CooldownPosition$outboundSchema,
27
+ } from "./cooldownposition.js";
28
+ import {
29
+ UnderlyingToken,
30
+ UnderlyingToken$inboundSchema,
31
+ UnderlyingToken$Outbound,
32
+ UnderlyingToken$outboundSchema,
33
+ } from "./underlyingtoken.js";
34
+
35
+ export type EthenaGetVaultResponse = {
36
+ /**
37
+ * Name of the vault.
38
+ */
39
+ name: string;
40
+ /**
41
+ * Symbol of the vault.
42
+ */
43
+ symbol: string;
44
+ /**
45
+ * Number of decimals used for the vault's share precision.
46
+ */
47
+ decimals: number;
48
+ /**
49
+ * Total amount of assets deposited in the vault.
50
+ */
51
+ totalAssets: string;
52
+ /**
53
+ * Total amount of shares issued from the vault.
54
+ */
55
+ totalSupply: string;
56
+ /**
57
+ * The price of one vault share in terms of the underlying asset.
58
+ */
59
+ sharePrice: string;
60
+ underlyingToken: UnderlyingToken;
61
+ apy: Apy;
62
+ /**
63
+ * The user's position in the vault.
64
+ */
65
+ userPosition?:
66
+ | CompassApiBackendModelsVaultsReadResponseVaultUserPosition
67
+ | null
68
+ | undefined;
69
+ /**
70
+ * The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made.
71
+ */
72
+ cooldownDurationDays: number;
73
+ /**
74
+ * The user's cooldown position.
75
+ */
76
+ cooldownPosition?: CooldownPosition | null | undefined;
77
+ };
78
+
79
+ /** @internal */
80
+ export const EthenaGetVaultResponse$inboundSchema: z.ZodType<
81
+ EthenaGetVaultResponse,
82
+ z.ZodTypeDef,
83
+ unknown
84
+ > = z.object({
85
+ name: z.string(),
86
+ symbol: z.string(),
87
+ decimals: z.number().int(),
88
+ total_assets: z.string(),
89
+ total_supply: z.string(),
90
+ share_price: z.string(),
91
+ underlying_token: UnderlyingToken$inboundSchema,
92
+ apy: Apy$inboundSchema,
93
+ user_position: z.nullable(
94
+ CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundSchema,
95
+ ).optional(),
96
+ cooldown_duration_days: z.number().int(),
97
+ cooldown_position: z.nullable(CooldownPosition$inboundSchema).optional(),
98
+ }).transform((v) => {
99
+ return remap$(v, {
100
+ "total_assets": "totalAssets",
101
+ "total_supply": "totalSupply",
102
+ "share_price": "sharePrice",
103
+ "underlying_token": "underlyingToken",
104
+ "user_position": "userPosition",
105
+ "cooldown_duration_days": "cooldownDurationDays",
106
+ "cooldown_position": "cooldownPosition",
107
+ });
108
+ });
109
+
110
+ /** @internal */
111
+ export type EthenaGetVaultResponse$Outbound = {
112
+ name: string;
113
+ symbol: string;
114
+ decimals: number;
115
+ total_assets: string;
116
+ total_supply: string;
117
+ share_price: string;
118
+ underlying_token: UnderlyingToken$Outbound;
119
+ apy: Apy$Outbound;
120
+ user_position?:
121
+ | CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound
122
+ | null
123
+ | undefined;
124
+ cooldown_duration_days: number;
125
+ cooldown_position?: CooldownPosition$Outbound | null | undefined;
126
+ };
127
+
128
+ /** @internal */
129
+ export const EthenaGetVaultResponse$outboundSchema: z.ZodType<
130
+ EthenaGetVaultResponse$Outbound,
131
+ z.ZodTypeDef,
132
+ EthenaGetVaultResponse
133
+ > = z.object({
134
+ name: z.string(),
135
+ symbol: z.string(),
136
+ decimals: z.number().int(),
137
+ totalAssets: z.string(),
138
+ totalSupply: z.string(),
139
+ sharePrice: z.string(),
140
+ underlyingToken: UnderlyingToken$outboundSchema,
141
+ apy: Apy$outboundSchema,
142
+ userPosition: z.nullable(
143
+ CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outboundSchema,
144
+ ).optional(),
145
+ cooldownDurationDays: z.number().int(),
146
+ cooldownPosition: z.nullable(CooldownPosition$outboundSchema).optional(),
147
+ }).transform((v) => {
148
+ return remap$(v, {
149
+ totalAssets: "total_assets",
150
+ totalSupply: "total_supply",
151
+ sharePrice: "share_price",
152
+ underlyingToken: "underlying_token",
153
+ userPosition: "user_position",
154
+ cooldownDurationDays: "cooldown_duration_days",
155
+ cooldownPosition: "cooldown_position",
156
+ });
157
+ });
158
+
159
+ /**
160
+ * @internal
161
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
162
+ */
163
+ export namespace EthenaGetVaultResponse$ {
164
+ /** @deprecated use `EthenaGetVaultResponse$inboundSchema` instead. */
165
+ export const inboundSchema = EthenaGetVaultResponse$inboundSchema;
166
+ /** @deprecated use `EthenaGetVaultResponse$outboundSchema` instead. */
167
+ export const outboundSchema = EthenaGetVaultResponse$outboundSchema;
168
+ /** @deprecated use `EthenaGetVaultResponse$Outbound` instead. */
169
+ export type Outbound = EthenaGetVaultResponse$Outbound;
170
+ }
171
+
172
+ export function ethenaGetVaultResponseToJSON(
173
+ ethenaGetVaultResponse: EthenaGetVaultResponse,
174
+ ): string {
175
+ return JSON.stringify(
176
+ EthenaGetVaultResponse$outboundSchema.parse(ethenaGetVaultResponse),
177
+ );
178
+ }
179
+
180
+ export function ethenaGetVaultResponseFromJSON(
181
+ jsonString: string,
182
+ ): SafeParseResult<EthenaGetVaultResponse, SDKValidationError> {
183
+ return safeParse(
184
+ jsonString,
185
+ (x) => EthenaGetVaultResponse$inboundSchema.parse(JSON.parse(x)),
186
+ `Failed to parse 'EthenaGetVaultResponse' from JSON`,
187
+ );
188
+ }
@@ -0,0 +1,88 @@
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
+ export type EthenaRequestToWithdrawParams = {
12
+ actionType?: "ETHENA_REQUEST_WITHDRAW" | undefined;
13
+ /**
14
+ * The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn.
15
+ */
16
+ amount?: any | undefined;
17
+ };
18
+
19
+ /** @internal */
20
+ export const EthenaRequestToWithdrawParams$inboundSchema: z.ZodType<
21
+ EthenaRequestToWithdrawParams,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ action_type: z.literal("ETHENA_REQUEST_WITHDRAW").default(
26
+ "ETHENA_REQUEST_WITHDRAW",
27
+ ),
28
+ amount: z.any().optional(),
29
+ }).transform((v) => {
30
+ return remap$(v, {
31
+ "action_type": "actionType",
32
+ });
33
+ });
34
+
35
+ /** @internal */
36
+ export type EthenaRequestToWithdrawParams$Outbound = {
37
+ action_type: "ETHENA_REQUEST_WITHDRAW";
38
+ amount?: any | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const EthenaRequestToWithdrawParams$outboundSchema: z.ZodType<
43
+ EthenaRequestToWithdrawParams$Outbound,
44
+ z.ZodTypeDef,
45
+ EthenaRequestToWithdrawParams
46
+ > = z.object({
47
+ actionType: z.literal("ETHENA_REQUEST_WITHDRAW").default(
48
+ "ETHENA_REQUEST_WITHDRAW" as const,
49
+ ),
50
+ amount: z.any().optional(),
51
+ }).transform((v) => {
52
+ return remap$(v, {
53
+ actionType: "action_type",
54
+ });
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace EthenaRequestToWithdrawParams$ {
62
+ /** @deprecated use `EthenaRequestToWithdrawParams$inboundSchema` instead. */
63
+ export const inboundSchema = EthenaRequestToWithdrawParams$inboundSchema;
64
+ /** @deprecated use `EthenaRequestToWithdrawParams$outboundSchema` instead. */
65
+ export const outboundSchema = EthenaRequestToWithdrawParams$outboundSchema;
66
+ /** @deprecated use `EthenaRequestToWithdrawParams$Outbound` instead. */
67
+ export type Outbound = EthenaRequestToWithdrawParams$Outbound;
68
+ }
69
+
70
+ export function ethenaRequestToWithdrawParamsToJSON(
71
+ ethenaRequestToWithdrawParams: EthenaRequestToWithdrawParams,
72
+ ): string {
73
+ return JSON.stringify(
74
+ EthenaRequestToWithdrawParams$outboundSchema.parse(
75
+ ethenaRequestToWithdrawParams,
76
+ ),
77
+ );
78
+ }
79
+
80
+ export function ethenaRequestToWithdrawParamsFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<EthenaRequestToWithdrawParams, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => EthenaRequestToWithdrawParams$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'EthenaRequestToWithdrawParams' from JSON`,
87
+ );
88
+ }
@@ -0,0 +1,130 @@
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
+ export const EthenaRequestToWithdrawRequestChain = {
13
+ Ethereum: "ethereum",
14
+ } as const;
15
+ export type EthenaRequestToWithdrawRequestChain = ClosedEnum<
16
+ typeof EthenaRequestToWithdrawRequestChain
17
+ >;
18
+
19
+ export type EthenaRequestToWithdrawRequest = {
20
+ actionType?: "ETHENA_REQUEST_WITHDRAW" | undefined;
21
+ /**
22
+ * The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn.
23
+ */
24
+ amount?: any | undefined;
25
+ chain: EthenaRequestToWithdrawRequestChain;
26
+ /**
27
+ * The address of the transaction sender.
28
+ */
29
+ sender: string;
30
+ };
31
+
32
+ /** @internal */
33
+ export const EthenaRequestToWithdrawRequestChain$inboundSchema: z.ZodNativeEnum<
34
+ typeof EthenaRequestToWithdrawRequestChain
35
+ > = z.nativeEnum(EthenaRequestToWithdrawRequestChain);
36
+
37
+ /** @internal */
38
+ export const EthenaRequestToWithdrawRequestChain$outboundSchema:
39
+ z.ZodNativeEnum<typeof EthenaRequestToWithdrawRequestChain> =
40
+ EthenaRequestToWithdrawRequestChain$inboundSchema;
41
+
42
+ /**
43
+ * @internal
44
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
45
+ */
46
+ export namespace EthenaRequestToWithdrawRequestChain$ {
47
+ /** @deprecated use `EthenaRequestToWithdrawRequestChain$inboundSchema` instead. */
48
+ export const inboundSchema =
49
+ EthenaRequestToWithdrawRequestChain$inboundSchema;
50
+ /** @deprecated use `EthenaRequestToWithdrawRequestChain$outboundSchema` instead. */
51
+ export const outboundSchema =
52
+ EthenaRequestToWithdrawRequestChain$outboundSchema;
53
+ }
54
+
55
+ /** @internal */
56
+ export const EthenaRequestToWithdrawRequest$inboundSchema: z.ZodType<
57
+ EthenaRequestToWithdrawRequest,
58
+ z.ZodTypeDef,
59
+ unknown
60
+ > = z.object({
61
+ action_type: z.literal("ETHENA_REQUEST_WITHDRAW").default(
62
+ "ETHENA_REQUEST_WITHDRAW",
63
+ ),
64
+ amount: z.any().optional(),
65
+ chain: EthenaRequestToWithdrawRequestChain$inboundSchema,
66
+ sender: z.string(),
67
+ }).transform((v) => {
68
+ return remap$(v, {
69
+ "action_type": "actionType",
70
+ });
71
+ });
72
+
73
+ /** @internal */
74
+ export type EthenaRequestToWithdrawRequest$Outbound = {
75
+ action_type: "ETHENA_REQUEST_WITHDRAW";
76
+ amount?: any | undefined;
77
+ chain: string;
78
+ sender: string;
79
+ };
80
+
81
+ /** @internal */
82
+ export const EthenaRequestToWithdrawRequest$outboundSchema: z.ZodType<
83
+ EthenaRequestToWithdrawRequest$Outbound,
84
+ z.ZodTypeDef,
85
+ EthenaRequestToWithdrawRequest
86
+ > = z.object({
87
+ actionType: z.literal("ETHENA_REQUEST_WITHDRAW").default(
88
+ "ETHENA_REQUEST_WITHDRAW" as const,
89
+ ),
90
+ amount: z.any().optional(),
91
+ chain: EthenaRequestToWithdrawRequestChain$outboundSchema,
92
+ sender: z.string(),
93
+ }).transform((v) => {
94
+ return remap$(v, {
95
+ actionType: "action_type",
96
+ });
97
+ });
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 EthenaRequestToWithdrawRequest$ {
104
+ /** @deprecated use `EthenaRequestToWithdrawRequest$inboundSchema` instead. */
105
+ export const inboundSchema = EthenaRequestToWithdrawRequest$inboundSchema;
106
+ /** @deprecated use `EthenaRequestToWithdrawRequest$outboundSchema` instead. */
107
+ export const outboundSchema = EthenaRequestToWithdrawRequest$outboundSchema;
108
+ /** @deprecated use `EthenaRequestToWithdrawRequest$Outbound` instead. */
109
+ export type Outbound = EthenaRequestToWithdrawRequest$Outbound;
110
+ }
111
+
112
+ export function ethenaRequestToWithdrawRequestToJSON(
113
+ ethenaRequestToWithdrawRequest: EthenaRequestToWithdrawRequest,
114
+ ): string {
115
+ return JSON.stringify(
116
+ EthenaRequestToWithdrawRequest$outboundSchema.parse(
117
+ ethenaRequestToWithdrawRequest,
118
+ ),
119
+ );
120
+ }
121
+
122
+ export function ethenaRequestToWithdrawRequestFromJSON(
123
+ jsonString: string,
124
+ ): SafeParseResult<EthenaRequestToWithdrawRequest, SDKValidationError> {
125
+ return safeParse(
126
+ jsonString,
127
+ (x) => EthenaRequestToWithdrawRequest$inboundSchema.parse(JSON.parse(x)),
128
+ `Failed to parse 'EthenaRequestToWithdrawRequest' from JSON`,
129
+ );
130
+ }
@@ -0,0 +1,208 @@
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
+ import {
11
+ UnsignedMulticallTransaction,
12
+ UnsignedMulticallTransaction$inboundSchema,
13
+ UnsignedMulticallTransaction$Outbound,
14
+ UnsignedMulticallTransaction$outboundSchema,
15
+ } from "./unsignedmulticalltransaction.js";
16
+ import {
17
+ UnsignedTransaction,
18
+ UnsignedTransaction$inboundSchema,
19
+ UnsignedTransaction$Outbound,
20
+ UnsignedTransaction$outboundSchema,
21
+ } from "./unsignedtransaction.js";
22
+ import {
23
+ UserOperationResponse,
24
+ UserOperationResponse$inboundSchema,
25
+ UserOperationResponse$Outbound,
26
+ UserOperationResponse$outboundSchema,
27
+ } from "./useroperationresponse.js";
28
+
29
+ /**
30
+ * The unsigned transaction data. User must sign and broadcast to network.
31
+ */
32
+ export type EthenaRequestToWithdrawTransactionResponseTransaction =
33
+ | UnsignedTransaction
34
+ | UnsignedMulticallTransaction
35
+ | UserOperationResponse;
36
+
37
+ export type EthenaRequestToWithdrawTransactionResponse = {
38
+ /**
39
+ * The unsigned transaction data. User must sign and broadcast to network.
40
+ */
41
+ transaction:
42
+ | UnsignedTransaction
43
+ | UnsignedMulticallTransaction
44
+ | UserOperationResponse;
45
+ /**
46
+ * The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made.
47
+ */
48
+ cooldownDurationDays: number;
49
+ };
50
+
51
+ /** @internal */
52
+ export const EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema:
53
+ z.ZodType<
54
+ EthenaRequestToWithdrawTransactionResponseTransaction,
55
+ z.ZodTypeDef,
56
+ unknown
57
+ > = z.union([
58
+ UnsignedTransaction$inboundSchema,
59
+ UnsignedMulticallTransaction$inboundSchema,
60
+ UserOperationResponse$inboundSchema,
61
+ ]);
62
+
63
+ /** @internal */
64
+ export type EthenaRequestToWithdrawTransactionResponseTransaction$Outbound =
65
+ | UnsignedTransaction$Outbound
66
+ | UnsignedMulticallTransaction$Outbound
67
+ | UserOperationResponse$Outbound;
68
+
69
+ /** @internal */
70
+ export const EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema:
71
+ z.ZodType<
72
+ EthenaRequestToWithdrawTransactionResponseTransaction$Outbound,
73
+ z.ZodTypeDef,
74
+ EthenaRequestToWithdrawTransactionResponseTransaction
75
+ > = z.union([
76
+ UnsignedTransaction$outboundSchema,
77
+ UnsignedMulticallTransaction$outboundSchema,
78
+ UserOperationResponse$outboundSchema,
79
+ ]);
80
+
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ export namespace EthenaRequestToWithdrawTransactionResponseTransaction$ {
86
+ /** @deprecated use `EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema` instead. */
87
+ export const inboundSchema =
88
+ EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema;
89
+ /** @deprecated use `EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema` instead. */
90
+ export const outboundSchema =
91
+ EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema;
92
+ /** @deprecated use `EthenaRequestToWithdrawTransactionResponseTransaction$Outbound` instead. */
93
+ export type Outbound =
94
+ EthenaRequestToWithdrawTransactionResponseTransaction$Outbound;
95
+ }
96
+
97
+ export function ethenaRequestToWithdrawTransactionResponseTransactionToJSON(
98
+ ethenaRequestToWithdrawTransactionResponseTransaction:
99
+ EthenaRequestToWithdrawTransactionResponseTransaction,
100
+ ): string {
101
+ return JSON.stringify(
102
+ EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema.parse(
103
+ ethenaRequestToWithdrawTransactionResponseTransaction,
104
+ ),
105
+ );
106
+ }
107
+
108
+ export function ethenaRequestToWithdrawTransactionResponseTransactionFromJSON(
109
+ jsonString: string,
110
+ ): SafeParseResult<
111
+ EthenaRequestToWithdrawTransactionResponseTransaction,
112
+ SDKValidationError
113
+ > {
114
+ return safeParse(
115
+ jsonString,
116
+ (x) =>
117
+ EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema.parse(
118
+ JSON.parse(x),
119
+ ),
120
+ `Failed to parse 'EthenaRequestToWithdrawTransactionResponseTransaction' from JSON`,
121
+ );
122
+ }
123
+
124
+ /** @internal */
125
+ export const EthenaRequestToWithdrawTransactionResponse$inboundSchema:
126
+ z.ZodType<EthenaRequestToWithdrawTransactionResponse, z.ZodTypeDef, unknown> =
127
+ z.object({
128
+ transaction: z.union([
129
+ UnsignedTransaction$inboundSchema,
130
+ UnsignedMulticallTransaction$inboundSchema,
131
+ UserOperationResponse$inboundSchema,
132
+ ]),
133
+ cooldown_duration_days: z.number().int(),
134
+ }).transform((v) => {
135
+ return remap$(v, {
136
+ "cooldown_duration_days": "cooldownDurationDays",
137
+ });
138
+ });
139
+
140
+ /** @internal */
141
+ export type EthenaRequestToWithdrawTransactionResponse$Outbound = {
142
+ transaction:
143
+ | UnsignedTransaction$Outbound
144
+ | UnsignedMulticallTransaction$Outbound
145
+ | UserOperationResponse$Outbound;
146
+ cooldown_duration_days: number;
147
+ };
148
+
149
+ /** @internal */
150
+ export const EthenaRequestToWithdrawTransactionResponse$outboundSchema:
151
+ z.ZodType<
152
+ EthenaRequestToWithdrawTransactionResponse$Outbound,
153
+ z.ZodTypeDef,
154
+ EthenaRequestToWithdrawTransactionResponse
155
+ > = z.object({
156
+ transaction: z.union([
157
+ UnsignedTransaction$outboundSchema,
158
+ UnsignedMulticallTransaction$outboundSchema,
159
+ UserOperationResponse$outboundSchema,
160
+ ]),
161
+ cooldownDurationDays: z.number().int(),
162
+ }).transform((v) => {
163
+ return remap$(v, {
164
+ cooldownDurationDays: "cooldown_duration_days",
165
+ });
166
+ });
167
+
168
+ /**
169
+ * @internal
170
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
171
+ */
172
+ export namespace EthenaRequestToWithdrawTransactionResponse$ {
173
+ /** @deprecated use `EthenaRequestToWithdrawTransactionResponse$inboundSchema` instead. */
174
+ export const inboundSchema =
175
+ EthenaRequestToWithdrawTransactionResponse$inboundSchema;
176
+ /** @deprecated use `EthenaRequestToWithdrawTransactionResponse$outboundSchema` instead. */
177
+ export const outboundSchema =
178
+ EthenaRequestToWithdrawTransactionResponse$outboundSchema;
179
+ /** @deprecated use `EthenaRequestToWithdrawTransactionResponse$Outbound` instead. */
180
+ export type Outbound = EthenaRequestToWithdrawTransactionResponse$Outbound;
181
+ }
182
+
183
+ export function ethenaRequestToWithdrawTransactionResponseToJSON(
184
+ ethenaRequestToWithdrawTransactionResponse:
185
+ EthenaRequestToWithdrawTransactionResponse,
186
+ ): string {
187
+ return JSON.stringify(
188
+ EthenaRequestToWithdrawTransactionResponse$outboundSchema.parse(
189
+ ethenaRequestToWithdrawTransactionResponse,
190
+ ),
191
+ );
192
+ }
193
+
194
+ export function ethenaRequestToWithdrawTransactionResponseFromJSON(
195
+ jsonString: string,
196
+ ): SafeParseResult<
197
+ EthenaRequestToWithdrawTransactionResponse,
198
+ SDKValidationError
199
+ > {
200
+ return safeParse(
201
+ jsonString,
202
+ (x) =>
203
+ EthenaRequestToWithdrawTransactionResponse$inboundSchema.parse(
204
+ JSON.parse(x),
205
+ ),
206
+ `Failed to parse 'EthenaRequestToWithdrawTransactionResponse' from JSON`,
207
+ );
208
+ }
@@ -0,0 +1,89 @@
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
+ export type EthenaWithdrawParams = {
12
+ actionType?: "ETHENA_WITHDRAW" | undefined;
13
+ /**
14
+ * The amount of USDe to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be withdrawn.
15
+ */
16
+ amount?: any | undefined;
17
+ /**
18
+ * The address which will receive the USDe withdrawn. Defaults to the sender.
19
+ */
20
+ receiver?: string | null | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const EthenaWithdrawParams$inboundSchema: z.ZodType<
25
+ EthenaWithdrawParams,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ action_type: z.literal("ETHENA_WITHDRAW").default("ETHENA_WITHDRAW"),
30
+ amount: z.any().optional(),
31
+ receiver: z.nullable(z.string()).optional(),
32
+ }).transform((v) => {
33
+ return remap$(v, {
34
+ "action_type": "actionType",
35
+ });
36
+ });
37
+
38
+ /** @internal */
39
+ export type EthenaWithdrawParams$Outbound = {
40
+ action_type: "ETHENA_WITHDRAW";
41
+ amount?: any | undefined;
42
+ receiver?: string | null | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export const EthenaWithdrawParams$outboundSchema: z.ZodType<
47
+ EthenaWithdrawParams$Outbound,
48
+ z.ZodTypeDef,
49
+ EthenaWithdrawParams
50
+ > = z.object({
51
+ actionType: z.literal("ETHENA_WITHDRAW").default("ETHENA_WITHDRAW" as const),
52
+ amount: z.any().optional(),
53
+ receiver: z.nullable(z.string()).optional(),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ actionType: "action_type",
57
+ });
58
+ });
59
+
60
+ /**
61
+ * @internal
62
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
+ */
64
+ export namespace EthenaWithdrawParams$ {
65
+ /** @deprecated use `EthenaWithdrawParams$inboundSchema` instead. */
66
+ export const inboundSchema = EthenaWithdrawParams$inboundSchema;
67
+ /** @deprecated use `EthenaWithdrawParams$outboundSchema` instead. */
68
+ export const outboundSchema = EthenaWithdrawParams$outboundSchema;
69
+ /** @deprecated use `EthenaWithdrawParams$Outbound` instead. */
70
+ export type Outbound = EthenaWithdrawParams$Outbound;
71
+ }
72
+
73
+ export function ethenaWithdrawParamsToJSON(
74
+ ethenaWithdrawParams: EthenaWithdrawParams,
75
+ ): string {
76
+ return JSON.stringify(
77
+ EthenaWithdrawParams$outboundSchema.parse(ethenaWithdrawParams),
78
+ );
79
+ }
80
+
81
+ export function ethenaWithdrawParamsFromJSON(
82
+ jsonString: string,
83
+ ): SafeParseResult<EthenaWithdrawParams, SDKValidationError> {
84
+ return safeParse(
85
+ jsonString,
86
+ (x) => EthenaWithdrawParams$inboundSchema.parse(JSON.parse(x)),
87
+ `Failed to parse 'EthenaWithdrawParams' from JSON`,
88
+ );
89
+ }