@compass-labs/api-sdk 0.5.13 → 0.5.15

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 (283) hide show
  1. package/README.md +9 -0
  2. package/bin/mcp-server.js +919 -384
  3. package/bin/mcp-server.js.map +33 -23
  4. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts +28 -0
  5. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js +128 -0
  7. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js.map +1 -0
  8. package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts +23 -0
  9. package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/transactionBatchingAuthorization.js +123 -0
  11. package/dist/commonjs/funcs/transactionBatchingAuthorization.js.map +1 -0
  12. package/dist/commonjs/funcs/transactionBatchingExecute.d.ts +24 -0
  13. package/dist/commonjs/funcs/transactionBatchingExecute.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/transactionBatchingExecute.js +124 -0
  15. package/dist/commonjs/funcs/transactionBatchingExecute.js.map +1 -0
  16. package/dist/commonjs/lib/config.d.ts +3 -3
  17. package/dist/commonjs/lib/config.js +3 -3
  18. package/dist/commonjs/lib/files.d.ts +5 -0
  19. package/dist/commonjs/lib/files.d.ts.map +1 -1
  20. package/dist/commonjs/lib/files.js +41 -0
  21. package/dist/commonjs/lib/files.js.map +1 -1
  22. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  23. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  24. package/dist/commonjs/mcp-server/server.js +7 -1
  25. package/dist/commonjs/mcp-server/server.js.map +1 -1
  26. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts +8 -0
  27. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js +74 -0
  29. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts +8 -0
  31. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts.map +1 -0
  32. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js +69 -0
  33. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -0
  34. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts +8 -0
  35. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -0
  36. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js +70 -0
  37. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js.map +1 -0
  38. package/dist/commonjs/models/components/aavelooprequest.d.ts +181 -0
  39. package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -0
  40. package/dist/commonjs/models/components/aavelooprequest.js +199 -0
  41. package/dist/commonjs/models/components/aavelooprequest.js.map +1 -0
  42. package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.d.ts +8 -8
  43. package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.js +8 -8
  45. package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.js.map +1 -1
  46. package/dist/commonjs/models/components/index.d.ts +4 -0
  47. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/index.js +4 -0
  49. package/dist/commonjs/models/components/index.js.map +1 -1
  50. package/dist/commonjs/models/components/metadata.d.ts +0 -4
  51. package/dist/commonjs/models/components/metadata.d.ts.map +1 -1
  52. package/dist/commonjs/models/components/metadata.js +0 -4
  53. package/dist/commonjs/models/components/metadata.js.map +1 -1
  54. package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts +49 -0
  55. package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts.map +1 -0
  56. package/dist/commonjs/models/components/multicallauthorizationrequest.js +72 -0
  57. package/dist/commonjs/models/components/multicallauthorizationrequest.js.map +1 -0
  58. package/dist/commonjs/models/components/multicallauthorizationresponse.d.ts +45 -0
  59. package/dist/commonjs/models/components/multicallauthorizationresponse.d.ts.map +1 -0
  60. package/dist/commonjs/models/components/multicallauthorizationresponse.js +73 -0
  61. package/dist/commonjs/models/components/multicallauthorizationresponse.js.map +1 -0
  62. package/dist/commonjs/models/components/multicallexecuterequest.d.ts +50 -0
  63. package/dist/commonjs/models/components/multicallexecuterequest.d.ts.map +1 -0
  64. package/dist/commonjs/models/components/multicallexecuterequest.js +87 -0
  65. package/dist/commonjs/models/components/multicallexecuterequest.js.map +1 -0
  66. package/dist/commonjs/models/components/pendleaddliquidityparams.d.ts +5 -0
  67. package/dist/commonjs/models/components/pendleaddliquidityparams.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/pendleaddliquidityparams.js +4 -0
  69. package/dist/commonjs/models/components/pendleaddliquidityparams.js.map +1 -1
  70. package/dist/commonjs/models/components/pendleaddliquidityrequest.d.ts +5 -0
  71. package/dist/commonjs/models/components/pendleaddliquidityrequest.d.ts.map +1 -1
  72. package/dist/commonjs/models/components/pendleaddliquidityrequest.js +4 -0
  73. package/dist/commonjs/models/components/pendleaddliquidityrequest.js.map +1 -1
  74. package/dist/commonjs/models/components/pendlebuyptparams.d.ts +5 -0
  75. package/dist/commonjs/models/components/pendlebuyptparams.d.ts.map +1 -1
  76. package/dist/commonjs/models/components/pendlebuyptparams.js +4 -0
  77. package/dist/commonjs/models/components/pendlebuyptparams.js.map +1 -1
  78. package/dist/commonjs/models/components/pendlebuyptrequest.d.ts +5 -0
  79. package/dist/commonjs/models/components/pendlebuyptrequest.d.ts.map +1 -1
  80. package/dist/commonjs/models/components/pendlebuyptrequest.js +4 -0
  81. package/dist/commonjs/models/components/pendlebuyptrequest.js.map +1 -1
  82. package/dist/commonjs/models/components/pendlebuyytparams.d.ts +5 -0
  83. package/dist/commonjs/models/components/pendlebuyytparams.d.ts.map +1 -1
  84. package/dist/commonjs/models/components/pendlebuyytparams.js +4 -0
  85. package/dist/commonjs/models/components/pendlebuyytparams.js.map +1 -1
  86. package/dist/commonjs/models/components/pendlebuyytrequest.d.ts +5 -0
  87. package/dist/commonjs/models/components/pendlebuyytrequest.d.ts.map +1 -1
  88. package/dist/commonjs/models/components/pendlebuyytrequest.js +4 -0
  89. package/dist/commonjs/models/components/pendlebuyytrequest.js.map +1 -1
  90. package/dist/commonjs/models/components/pendleremoveliquidityparams.d.ts +5 -0
  91. package/dist/commonjs/models/components/pendleremoveliquidityparams.d.ts.map +1 -1
  92. package/dist/commonjs/models/components/pendleremoveliquidityparams.js +4 -0
  93. package/dist/commonjs/models/components/pendleremoveliquidityparams.js.map +1 -1
  94. package/dist/commonjs/models/components/pendleremoveliquidityrequest.d.ts +5 -0
  95. package/dist/commonjs/models/components/pendleremoveliquidityrequest.d.ts.map +1 -1
  96. package/dist/commonjs/models/components/pendleremoveliquidityrequest.js +4 -0
  97. package/dist/commonjs/models/components/pendleremoveliquidityrequest.js.map +1 -1
  98. package/dist/commonjs/models/components/pendlesellptparams.d.ts +5 -0
  99. package/dist/commonjs/models/components/pendlesellptparams.d.ts.map +1 -1
  100. package/dist/commonjs/models/components/pendlesellptparams.js +4 -0
  101. package/dist/commonjs/models/components/pendlesellptparams.js.map +1 -1
  102. package/dist/commonjs/models/components/pendlesellptrequest.d.ts +5 -0
  103. package/dist/commonjs/models/components/pendlesellptrequest.d.ts.map +1 -1
  104. package/dist/commonjs/models/components/pendlesellptrequest.js +4 -0
  105. package/dist/commonjs/models/components/pendlesellptrequest.js.map +1 -1
  106. package/dist/commonjs/models/components/pendlesellytparams.d.ts +5 -0
  107. package/dist/commonjs/models/components/pendlesellytparams.d.ts.map +1 -1
  108. package/dist/commonjs/models/components/pendlesellytparams.js +4 -0
  109. package/dist/commonjs/models/components/pendlesellytparams.js.map +1 -1
  110. package/dist/commonjs/models/components/pendlesellytrequest.d.ts +5 -0
  111. package/dist/commonjs/models/components/pendlesellytrequest.d.ts.map +1 -1
  112. package/dist/commonjs/models/components/pendlesellytrequest.js +4 -0
  113. package/dist/commonjs/models/components/pendlesellytrequest.js.map +1 -1
  114. package/dist/commonjs/models/components/useroperation.d.ts +48 -48
  115. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  116. package/dist/commonjs/models/components/useroperation.js +56 -56
  117. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  118. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  119. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  120. package/dist/commonjs/sdk/sdk.js +4 -0
  121. package/dist/commonjs/sdk/sdk.js.map +1 -1
  122. package/dist/commonjs/sdk/transactionbatching.d.ts +47 -0
  123. package/dist/commonjs/sdk/transactionbatching.d.ts.map +1 -0
  124. package/dist/commonjs/sdk/transactionbatching.js +63 -0
  125. package/dist/commonjs/sdk/transactionbatching.js.map +1 -0
  126. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts +28 -0
  127. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts.map +1 -0
  128. package/dist/esm/funcs/transactionBatchingAaveLoop.js +92 -0
  129. package/dist/esm/funcs/transactionBatchingAaveLoop.js.map +1 -0
  130. package/dist/esm/funcs/transactionBatchingAuthorization.d.ts +23 -0
  131. package/dist/esm/funcs/transactionBatchingAuthorization.d.ts.map +1 -0
  132. package/dist/esm/funcs/transactionBatchingAuthorization.js +87 -0
  133. package/dist/esm/funcs/transactionBatchingAuthorization.js.map +1 -0
  134. package/dist/esm/funcs/transactionBatchingExecute.d.ts +24 -0
  135. package/dist/esm/funcs/transactionBatchingExecute.d.ts.map +1 -0
  136. package/dist/esm/funcs/transactionBatchingExecute.js +88 -0
  137. package/dist/esm/funcs/transactionBatchingExecute.js.map +1 -0
  138. package/dist/esm/lib/config.d.ts +3 -3
  139. package/dist/esm/lib/config.js +3 -3
  140. package/dist/esm/lib/files.d.ts +5 -0
  141. package/dist/esm/lib/files.d.ts.map +1 -1
  142. package/dist/esm/lib/files.js +40 -0
  143. package/dist/esm/lib/files.js.map +1 -1
  144. package/dist/esm/mcp-server/mcp-server.js +1 -1
  145. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  146. package/dist/esm/mcp-server/server.js +7 -1
  147. package/dist/esm/mcp-server/server.js.map +1 -1
  148. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts +8 -0
  149. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +1 -0
  150. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js +38 -0
  151. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js.map +1 -0
  152. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.d.ts +8 -0
  153. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.d.ts.map +1 -0
  154. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js +33 -0
  155. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -0
  156. package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts +8 -0
  157. package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -0
  158. package/dist/esm/mcp-server/tools/transactionBatchingExecute.js +34 -0
  159. package/dist/esm/mcp-server/tools/transactionBatchingExecute.js.map +1 -0
  160. package/dist/esm/models/components/aavelooprequest.d.ts +181 -0
  161. package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -0
  162. package/dist/esm/models/components/aavelooprequest.js +153 -0
  163. package/dist/esm/models/components/aavelooprequest.js.map +1 -0
  164. package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.d.ts +8 -8
  165. package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.d.ts.map +1 -1
  166. package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.js +8 -8
  167. package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.js.map +1 -1
  168. package/dist/esm/models/components/index.d.ts +4 -0
  169. package/dist/esm/models/components/index.d.ts.map +1 -1
  170. package/dist/esm/models/components/index.js +4 -0
  171. package/dist/esm/models/components/index.js.map +1 -1
  172. package/dist/esm/models/components/metadata.d.ts +0 -4
  173. package/dist/esm/models/components/metadata.d.ts.map +1 -1
  174. package/dist/esm/models/components/metadata.js +0 -4
  175. package/dist/esm/models/components/metadata.js.map +1 -1
  176. package/dist/esm/models/components/multicallauthorizationrequest.d.ts +49 -0
  177. package/dist/esm/models/components/multicallauthorizationrequest.d.ts.map +1 -0
  178. package/dist/esm/models/components/multicallauthorizationrequest.js +34 -0
  179. package/dist/esm/models/components/multicallauthorizationrequest.js.map +1 -0
  180. package/dist/esm/models/components/multicallauthorizationresponse.d.ts +45 -0
  181. package/dist/esm/models/components/multicallauthorizationresponse.d.ts.map +1 -0
  182. package/dist/esm/models/components/multicallauthorizationresponse.js +35 -0
  183. package/dist/esm/models/components/multicallauthorizationresponse.js.map +1 -0
  184. package/dist/esm/models/components/multicallexecuterequest.d.ts +50 -0
  185. package/dist/esm/models/components/multicallexecuterequest.d.ts.map +1 -0
  186. package/dist/esm/models/components/multicallexecuterequest.js +49 -0
  187. package/dist/esm/models/components/multicallexecuterequest.js.map +1 -0
  188. package/dist/esm/models/components/pendleaddliquidityparams.d.ts +5 -0
  189. package/dist/esm/models/components/pendleaddliquidityparams.d.ts.map +1 -1
  190. package/dist/esm/models/components/pendleaddliquidityparams.js +4 -0
  191. package/dist/esm/models/components/pendleaddliquidityparams.js.map +1 -1
  192. package/dist/esm/models/components/pendleaddliquidityrequest.d.ts +5 -0
  193. package/dist/esm/models/components/pendleaddliquidityrequest.d.ts.map +1 -1
  194. package/dist/esm/models/components/pendleaddliquidityrequest.js +4 -0
  195. package/dist/esm/models/components/pendleaddliquidityrequest.js.map +1 -1
  196. package/dist/esm/models/components/pendlebuyptparams.d.ts +5 -0
  197. package/dist/esm/models/components/pendlebuyptparams.d.ts.map +1 -1
  198. package/dist/esm/models/components/pendlebuyptparams.js +4 -0
  199. package/dist/esm/models/components/pendlebuyptparams.js.map +1 -1
  200. package/dist/esm/models/components/pendlebuyptrequest.d.ts +5 -0
  201. package/dist/esm/models/components/pendlebuyptrequest.d.ts.map +1 -1
  202. package/dist/esm/models/components/pendlebuyptrequest.js +4 -0
  203. package/dist/esm/models/components/pendlebuyptrequest.js.map +1 -1
  204. package/dist/esm/models/components/pendlebuyytparams.d.ts +5 -0
  205. package/dist/esm/models/components/pendlebuyytparams.d.ts.map +1 -1
  206. package/dist/esm/models/components/pendlebuyytparams.js +4 -0
  207. package/dist/esm/models/components/pendlebuyytparams.js.map +1 -1
  208. package/dist/esm/models/components/pendlebuyytrequest.d.ts +5 -0
  209. package/dist/esm/models/components/pendlebuyytrequest.d.ts.map +1 -1
  210. package/dist/esm/models/components/pendlebuyytrequest.js +4 -0
  211. package/dist/esm/models/components/pendlebuyytrequest.js.map +1 -1
  212. package/dist/esm/models/components/pendleremoveliquidityparams.d.ts +5 -0
  213. package/dist/esm/models/components/pendleremoveliquidityparams.d.ts.map +1 -1
  214. package/dist/esm/models/components/pendleremoveliquidityparams.js +4 -0
  215. package/dist/esm/models/components/pendleremoveliquidityparams.js.map +1 -1
  216. package/dist/esm/models/components/pendleremoveliquidityrequest.d.ts +5 -0
  217. package/dist/esm/models/components/pendleremoveliquidityrequest.d.ts.map +1 -1
  218. package/dist/esm/models/components/pendleremoveliquidityrequest.js +4 -0
  219. package/dist/esm/models/components/pendleremoveliquidityrequest.js.map +1 -1
  220. package/dist/esm/models/components/pendlesellptparams.d.ts +5 -0
  221. package/dist/esm/models/components/pendlesellptparams.d.ts.map +1 -1
  222. package/dist/esm/models/components/pendlesellptparams.js +4 -0
  223. package/dist/esm/models/components/pendlesellptparams.js.map +1 -1
  224. package/dist/esm/models/components/pendlesellptrequest.d.ts +5 -0
  225. package/dist/esm/models/components/pendlesellptrequest.d.ts.map +1 -1
  226. package/dist/esm/models/components/pendlesellptrequest.js +4 -0
  227. package/dist/esm/models/components/pendlesellptrequest.js.map +1 -1
  228. package/dist/esm/models/components/pendlesellytparams.d.ts +5 -0
  229. package/dist/esm/models/components/pendlesellytparams.d.ts.map +1 -1
  230. package/dist/esm/models/components/pendlesellytparams.js +4 -0
  231. package/dist/esm/models/components/pendlesellytparams.js.map +1 -1
  232. package/dist/esm/models/components/pendlesellytrequest.d.ts +5 -0
  233. package/dist/esm/models/components/pendlesellytrequest.d.ts.map +1 -1
  234. package/dist/esm/models/components/pendlesellytrequest.js +4 -0
  235. package/dist/esm/models/components/pendlesellytrequest.js.map +1 -1
  236. package/dist/esm/models/components/useroperation.d.ts +48 -48
  237. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  238. package/dist/esm/models/components/useroperation.js +56 -56
  239. package/dist/esm/models/components/useroperation.js.map +1 -1
  240. package/dist/esm/sdk/sdk.d.ts +3 -0
  241. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  242. package/dist/esm/sdk/sdk.js +4 -0
  243. package/dist/esm/sdk/sdk.js.map +1 -1
  244. package/dist/esm/sdk/transactionbatching.d.ts +47 -0
  245. package/dist/esm/sdk/transactionbatching.d.ts.map +1 -0
  246. package/dist/esm/sdk/transactionbatching.js +59 -0
  247. package/dist/esm/sdk/transactionbatching.js.map +1 -0
  248. package/docs/sdks/pendle/README.md +12 -0
  249. package/docs/sdks/transactionbatching/README.md +318 -0
  250. package/jsr.json +1 -1
  251. package/package.json +1 -1
  252. package/src/funcs/transactionBatchingAaveLoop.ts +179 -0
  253. package/src/funcs/transactionBatchingAuthorization.ts +175 -0
  254. package/src/funcs/transactionBatchingExecute.ts +175 -0
  255. package/src/lib/config.ts +3 -3
  256. package/src/lib/files.ts +42 -0
  257. package/src/mcp-server/mcp-server.ts +1 -1
  258. package/src/mcp-server/server.ts +7 -1
  259. package/src/mcp-server/tools/transactionBatchingAaveLoop.ts +47 -0
  260. package/src/mcp-server/tools/transactionBatchingAuthorization.ts +44 -0
  261. package/src/mcp-server/tools/transactionBatchingExecute.ts +43 -0
  262. package/src/models/components/aavelooprequest.ts +368 -0
  263. package/src/models/components/compassapibackendmodelsmorphoreadresponsegetmarketmarketstate.ts +16 -16
  264. package/src/models/components/index.ts +4 -0
  265. package/src/models/components/metadata.ts +0 -8
  266. package/src/models/components/multicallauthorizationrequest.ts +90 -0
  267. package/src/models/components/multicallauthorizationresponse.ts +88 -0
  268. package/src/models/components/multicallexecuterequest.ts +112 -0
  269. package/src/models/components/pendleaddliquidityparams.ts +9 -0
  270. package/src/models/components/pendleaddliquidityrequest.ts +9 -0
  271. package/src/models/components/pendlebuyptparams.ts +9 -0
  272. package/src/models/components/pendlebuyptrequest.ts +9 -0
  273. package/src/models/components/pendlebuyytparams.ts +9 -0
  274. package/src/models/components/pendlebuyytrequest.ts +9 -0
  275. package/src/models/components/pendleremoveliquidityparams.ts +9 -0
  276. package/src/models/components/pendleremoveliquidityrequest.ts +9 -0
  277. package/src/models/components/pendlesellptparams.ts +9 -0
  278. package/src/models/components/pendlesellptrequest.ts +9 -0
  279. package/src/models/components/pendlesellytparams.ts +9 -0
  280. package/src/models/components/pendlesellytrequest.ts +9 -0
  281. package/src/models/components/useroperation.ts +152 -152
  282. package/src/sdk/sdk.ts +8 -0
  283. package/src/sdk/transactionbatching.ts +84 -0
@@ -0,0 +1,175 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompassApiSDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Enable transaction bundling.
30
+ *
31
+ * @remarks
32
+ * Get authorization for bundling transactions.
33
+ *
34
+ * Currently this is required for every transaction bundle to prevent replay attacks
35
+ * and ensure transaction ordering when batching multiple actions into a single
36
+ * transaction. The authorization includes a nonce and chain ID to guarantee
37
+ * transaction uniqueness and proper network targeting.
38
+ */
39
+ export function transactionBatchingAuthorization(
40
+ client: CompassApiSDKCore,
41
+ request: components.MulticallAuthorizationRequest,
42
+ options?: RequestOptions,
43
+ ): APIPromise<
44
+ Result<
45
+ components.MulticallAuthorizationResponse,
46
+ | errors.HTTPValidationError
47
+ | CompassAPISDKError
48
+ | ResponseValidationError
49
+ | ConnectionError
50
+ | RequestAbortedError
51
+ | RequestTimeoutError
52
+ | InvalidRequestError
53
+ | UnexpectedClientError
54
+ | SDKValidationError
55
+ >
56
+ > {
57
+ return new APIPromise($do(
58
+ client,
59
+ request,
60
+ options,
61
+ ));
62
+ }
63
+
64
+ async function $do(
65
+ client: CompassApiSDKCore,
66
+ request: components.MulticallAuthorizationRequest,
67
+ options?: RequestOptions,
68
+ ): Promise<
69
+ [
70
+ Result<
71
+ components.MulticallAuthorizationResponse,
72
+ | errors.HTTPValidationError
73
+ | CompassAPISDKError
74
+ | ResponseValidationError
75
+ | ConnectionError
76
+ | RequestAbortedError
77
+ | RequestTimeoutError
78
+ | InvalidRequestError
79
+ | UnexpectedClientError
80
+ | SDKValidationError
81
+ >,
82
+ APICall,
83
+ ]
84
+ > {
85
+ const parsed = safeParse(
86
+ request,
87
+ (value) =>
88
+ components.MulticallAuthorizationRequest$outboundSchema.parse(value),
89
+ "Input validation failed",
90
+ );
91
+ if (!parsed.ok) {
92
+ return [parsed, { status: "invalid" }];
93
+ }
94
+ const payload = parsed.value;
95
+ const body = encodeJSON("body", payload, { explode: true });
96
+
97
+ const path = pathToFunc("/v0/multicall/authorization")();
98
+
99
+ const headers = new Headers(compactMap({
100
+ "Content-Type": "application/json",
101
+ Accept: "application/json",
102
+ }));
103
+
104
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
105
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
106
+ const requestSecurity = resolveGlobalSecurity(securityInput);
107
+
108
+ const context = {
109
+ options: client._options,
110
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
111
+ operationID: "multicall_authorization",
112
+ oAuth2Scopes: [],
113
+
114
+ resolvedSecurity: requestSecurity,
115
+
116
+ securitySource: client._options.apiKeyAuth,
117
+ retryConfig: options?.retries
118
+ || client._options.retryConfig
119
+ || { strategy: "none" },
120
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
121
+ };
122
+
123
+ const requestRes = client._createRequest(context, {
124
+ security: requestSecurity,
125
+ method: "POST",
126
+ baseURL: options?.serverURL,
127
+ path: path,
128
+ headers: headers,
129
+ body: body,
130
+ userAgent: client._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
132
+ }, options);
133
+ if (!requestRes.ok) {
134
+ return [requestRes, { status: "invalid" }];
135
+ }
136
+ const req = requestRes.value;
137
+
138
+ const doResult = await client._do(req, {
139
+ context,
140
+ errorCodes: ["422", "4XX", "5XX"],
141
+ retryConfig: context.retryConfig,
142
+ retryCodes: context.retryCodes,
143
+ });
144
+ if (!doResult.ok) {
145
+ return [doResult, { status: "request-error", request: req }];
146
+ }
147
+ const response = doResult.value;
148
+
149
+ const responseFields = {
150
+ HttpMeta: { Response: response, Request: req },
151
+ };
152
+
153
+ const [result] = await M.match<
154
+ components.MulticallAuthorizationResponse,
155
+ | errors.HTTPValidationError
156
+ | CompassAPISDKError
157
+ | ResponseValidationError
158
+ | ConnectionError
159
+ | RequestAbortedError
160
+ | RequestTimeoutError
161
+ | InvalidRequestError
162
+ | UnexpectedClientError
163
+ | SDKValidationError
164
+ >(
165
+ M.json(200, components.MulticallAuthorizationResponse$inboundSchema),
166
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
167
+ M.fail("4XX"),
168
+ M.fail("5XX"),
169
+ )(response, req, { extraFields: responseFields });
170
+ if (!result.ok) {
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
173
+
174
+ return [result, { status: "complete", request: req, response }];
175
+ }
@@ -0,0 +1,175 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompassApiSDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Construct Bundled Transaction
30
+ *
31
+ * @remarks
32
+ * Bundle arbitrary transactions together into a single multicall transaction using
33
+ * EIP-7702.
34
+ *
35
+ * This endpoint allows bundling multiple contract calls into a single atomic
36
+ * transaction, reducing gas costs and ensuring all operations succeed or fail
37
+ * together. The transaction must be authorized using the /authorization endpoint to
38
+ * prevent replay attacks.
39
+ */
40
+ export function transactionBatchingExecute(
41
+ client: CompassApiSDKCore,
42
+ request: components.MulticallExecuteRequest,
43
+ options?: RequestOptions,
44
+ ): APIPromise<
45
+ Result<
46
+ components.UnsignedMulticallTransaction,
47
+ | errors.HTTPValidationError
48
+ | CompassAPISDKError
49
+ | ResponseValidationError
50
+ | ConnectionError
51
+ | RequestAbortedError
52
+ | RequestTimeoutError
53
+ | InvalidRequestError
54
+ | UnexpectedClientError
55
+ | SDKValidationError
56
+ >
57
+ > {
58
+ return new APIPromise($do(
59
+ client,
60
+ request,
61
+ options,
62
+ ));
63
+ }
64
+
65
+ async function $do(
66
+ client: CompassApiSDKCore,
67
+ request: components.MulticallExecuteRequest,
68
+ options?: RequestOptions,
69
+ ): Promise<
70
+ [
71
+ Result<
72
+ components.UnsignedMulticallTransaction,
73
+ | errors.HTTPValidationError
74
+ | CompassAPISDKError
75
+ | ResponseValidationError
76
+ | ConnectionError
77
+ | RequestAbortedError
78
+ | RequestTimeoutError
79
+ | InvalidRequestError
80
+ | UnexpectedClientError
81
+ | SDKValidationError
82
+ >,
83
+ APICall,
84
+ ]
85
+ > {
86
+ const parsed = safeParse(
87
+ request,
88
+ (value) => components.MulticallExecuteRequest$outboundSchema.parse(value),
89
+ "Input validation failed",
90
+ );
91
+ if (!parsed.ok) {
92
+ return [parsed, { status: "invalid" }];
93
+ }
94
+ const payload = parsed.value;
95
+ const body = encodeJSON("body", payload, { explode: true });
96
+
97
+ const path = pathToFunc("/v0/multicall/execute")();
98
+
99
+ const headers = new Headers(compactMap({
100
+ "Content-Type": "application/json",
101
+ Accept: "application/json",
102
+ }));
103
+
104
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
105
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
106
+ const requestSecurity = resolveGlobalSecurity(securityInput);
107
+
108
+ const context = {
109
+ options: client._options,
110
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
111
+ operationID: "multicall_execute",
112
+ oAuth2Scopes: [],
113
+
114
+ resolvedSecurity: requestSecurity,
115
+
116
+ securitySource: client._options.apiKeyAuth,
117
+ retryConfig: options?.retries
118
+ || client._options.retryConfig
119
+ || { strategy: "none" },
120
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
121
+ };
122
+
123
+ const requestRes = client._createRequest(context, {
124
+ security: requestSecurity,
125
+ method: "POST",
126
+ baseURL: options?.serverURL,
127
+ path: path,
128
+ headers: headers,
129
+ body: body,
130
+ userAgent: client._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
132
+ }, options);
133
+ if (!requestRes.ok) {
134
+ return [requestRes, { status: "invalid" }];
135
+ }
136
+ const req = requestRes.value;
137
+
138
+ const doResult = await client._do(req, {
139
+ context,
140
+ errorCodes: ["422", "4XX", "5XX"],
141
+ retryConfig: context.retryConfig,
142
+ retryCodes: context.retryCodes,
143
+ });
144
+ if (!doResult.ok) {
145
+ return [doResult, { status: "request-error", request: req }];
146
+ }
147
+ const response = doResult.value;
148
+
149
+ const responseFields = {
150
+ HttpMeta: { Response: response, Request: req },
151
+ };
152
+
153
+ const [result] = await M.match<
154
+ components.UnsignedMulticallTransaction,
155
+ | errors.HTTPValidationError
156
+ | CompassAPISDKError
157
+ | ResponseValidationError
158
+ | ConnectionError
159
+ | RequestAbortedError
160
+ | RequestTimeoutError
161
+ | InvalidRequestError
162
+ | UnexpectedClientError
163
+ | SDKValidationError
164
+ >(
165
+ M.json(200, components.UnsignedMulticallTransaction$inboundSchema),
166
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
167
+ M.fail("4XX"),
168
+ M.fail("5XX"),
169
+ )(response, req, { extraFields: responseFields });
170
+ if (!result.ok) {
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
173
+
174
+ return [result, { status: "complete", request: req, response }];
175
+ }
package/src/lib/config.ts CHANGED
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
- sdkVersion: "0.5.13",
65
- genVersion: "2.623.2",
64
+ sdkVersion: "0.5.15",
65
+ genVersion: "2.628.0",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.5.13 2.623.2 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 0.5.15 2.628.0 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
package/src/lib/files.ts CHANGED
@@ -38,3 +38,45 @@ export async function readableStreamToArrayBuffer(
38
38
 
39
39
  return concatenatedChunks.buffer as ArrayBuffer;
40
40
  }
41
+
42
+ /**
43
+ * Determines the MIME content type based on a file's extension.
44
+ * Returns null if the extension is not recognized.
45
+ */
46
+ export function getContentTypeFromFileName(fileName: string): string | null {
47
+ if (!fileName) return null;
48
+
49
+ const ext = fileName.toLowerCase().split(".").pop();
50
+ if (!ext) return null;
51
+
52
+ const mimeTypes: Record<string, string> = {
53
+ json: "application/json",
54
+ xml: "application/xml",
55
+ html: "text/html",
56
+ htm: "text/html",
57
+ txt: "text/plain",
58
+ csv: "text/csv",
59
+ pdf: "application/pdf",
60
+ png: "image/png",
61
+ jpg: "image/jpeg",
62
+ jpeg: "image/jpeg",
63
+ gif: "image/gif",
64
+ svg: "image/svg+xml",
65
+ js: "application/javascript",
66
+ css: "text/css",
67
+ zip: "application/zip",
68
+ tar: "application/x-tar",
69
+ gz: "application/gzip",
70
+ mp4: "video/mp4",
71
+ mp3: "audio/mpeg",
72
+ wav: "audio/wav",
73
+ webp: "image/webp",
74
+ ico: "image/x-icon",
75
+ woff: "font/woff",
76
+ woff2: "font/woff2",
77
+ ttf: "font/ttf",
78
+ otf: "font/otf",
79
+ };
80
+
81
+ return mimeTypes[ext] || null;
82
+ }
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.5.13",
22
+ currentVersion: "0.5.15",
23
23
  },
24
24
  });
25
25
 
@@ -68,6 +68,9 @@ import { tool$tokenAddress } from "./tools/tokenAddress.js";
68
68
  import { tool$tokenBalance } from "./tools/tokenBalance.js";
69
69
  import { tool$tokenPrice } from "./tools/tokenPrice.js";
70
70
  import { tool$tokenTransfer } from "./tools/tokenTransfer.js";
71
+ import { tool$transactionBatchingAaveLoop } from "./tools/transactionBatchingAaveLoop.js";
72
+ import { tool$transactionBatchingAuthorization } from "./tools/transactionBatchingAuthorization.js";
73
+ import { tool$transactionBatchingExecute } from "./tools/transactionBatchingExecute.js";
71
74
  import { tool$uniswapV3LiquidityProvisionIncrease } from "./tools/uniswapV3LiquidityProvisionIncrease.js";
72
75
  import { tool$uniswapV3LiquidityProvisionInRange } from "./tools/uniswapV3LiquidityProvisionInRange.js";
73
76
  import { tool$uniswapV3LiquidityProvisionMint } from "./tools/uniswapV3LiquidityProvisionMint.js";
@@ -97,7 +100,7 @@ export function createMCPServer(deps: {
97
100
  }) {
98
101
  const server = new McpServer({
99
102
  name: "CompassApiSDK",
100
- version: "0.5.13",
103
+ version: "0.5.15",
101
104
  });
102
105
 
103
106
  const client = new CompassApiSDKCore({
@@ -199,6 +202,9 @@ export function createMCPServer(deps: {
199
202
  tool(tool$pendleRedeemYield);
200
203
  tool(tool$pendleAddLiquidity);
201
204
  tool(tool$pendleRemoveLiquidity);
205
+ tool(tool$transactionBatchingAuthorization);
206
+ tool(tool$transactionBatchingExecute);
207
+ tool(tool$transactionBatchingAaveLoop);
202
208
  tool(tool$smartAccountAccountBatchedUserOperations);
203
209
 
204
210
  return server;
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { transactionBatchingAaveLoop } from "../../funcs/transactionBatchingAaveLoop.js";
6
+ import * as components from "../../models/components/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: components.AaveLoopRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$transactionBatchingAaveLoop: ToolDefinition<typeof args> = {
14
+ name: "transaction-batching-aave-loop",
15
+ description: `AAVE leverage long/short
16
+
17
+ Execute an Aave looping strategy that involves repeated supply and borrow
18
+ operations.
19
+
20
+ This endpoint creates a multicall transaction that performs a series of operations:
21
+ 1. Approves and supplies initial token
22
+ 2. For each loop:
23
+ - Borrows another token
24
+ - Swaps borrowed token back to supply token
25
+ - Supplies the swapped tokens
26
+
27
+ The transaction must be authorized using the /authorization endpoint to prevent replay attacks.`,
28
+ args,
29
+ tool: async (client, args, ctx) => {
30
+ const [result, apiCall] = await transactionBatchingAaveLoop(
31
+ client,
32
+ args.request,
33
+ { fetchOptions: { signal: ctx.signal } },
34
+ ).$inspect();
35
+
36
+ if (!result.ok) {
37
+ return {
38
+ content: [{ type: "text", text: result.error.message }],
39
+ isError: true,
40
+ };
41
+ }
42
+
43
+ const value = result.value;
44
+
45
+ return formatResult(value, apiCall);
46
+ },
47
+ };
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { transactionBatchingAuthorization } from "../../funcs/transactionBatchingAuthorization.js";
6
+ import * as components from "../../models/components/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: components.MulticallAuthorizationRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$transactionBatchingAuthorization: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "transaction-batching-authorization",
17
+ description: `Enable transaction bundling.
18
+
19
+ Get authorization for bundling transactions.
20
+
21
+ Currently this is required for every transaction bundle to prevent replay attacks
22
+ and ensure transaction ordering when batching multiple actions into a single
23
+ transaction. The authorization includes a nonce and chain ID to guarantee
24
+ transaction uniqueness and proper network targeting.`,
25
+ args,
26
+ tool: async (client, args, ctx) => {
27
+ const [result, apiCall] = await transactionBatchingAuthorization(
28
+ client,
29
+ args.request,
30
+ { fetchOptions: { signal: ctx.signal } },
31
+ ).$inspect();
32
+
33
+ if (!result.ok) {
34
+ return {
35
+ content: [{ type: "text", text: result.error.message }],
36
+ isError: true,
37
+ };
38
+ }
39
+
40
+ const value = result.value;
41
+
42
+ return formatResult(value, apiCall);
43
+ },
44
+ };
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { transactionBatchingExecute } from "../../funcs/transactionBatchingExecute.js";
6
+ import * as components from "../../models/components/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: components.MulticallExecuteRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$transactionBatchingExecute: ToolDefinition<typeof args> = {
14
+ name: "transaction-batching-execute",
15
+ description: `Construct Bundled Transaction
16
+
17
+ Bundle arbitrary transactions together into a single multicall transaction using
18
+ EIP-7702.
19
+
20
+ This endpoint allows bundling multiple contract calls into a single atomic
21
+ transaction, reducing gas costs and ensuring all operations succeed or fail
22
+ together. The transaction must be authorized using the /authorization endpoint to
23
+ prevent replay attacks.`,
24
+ args,
25
+ tool: async (client, args, ctx) => {
26
+ const [result, apiCall] = await transactionBatchingExecute(
27
+ client,
28
+ args.request,
29
+ { fetchOptions: { signal: ctx.signal } },
30
+ ).$inspect();
31
+
32
+ if (!result.ok) {
33
+ return {
34
+ content: [{ type: "text", text: result.error.message }],
35
+ isError: true,
36
+ };
37
+ }
38
+
39
+ const value = result.value;
40
+
41
+ return formatResult(value, apiCall);
42
+ },
43
+ };