@compass-labs/api-sdk 0.2.1 → 0.2.3

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 (310) hide show
  1. package/README.md +6 -2
  2. package/bin/mcp-server.js +893 -413
  3. package/bin/mcp-server.js.map +36 -21
  4. package/dist/commonjs/funcs/pendleMarkets.d.ts +18 -0
  5. package/dist/commonjs/funcs/pendleMarkets.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/pendleMarkets.js +121 -0
  7. package/dist/commonjs/funcs/pendleMarkets.js.map +1 -0
  8. package/dist/commonjs/funcs/pendlePositions.d.ts +18 -0
  9. package/dist/commonjs/funcs/pendlePositions.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/pendlePositions.js +122 -0
  11. package/dist/commonjs/funcs/pendlePositions.js.map +1 -0
  12. package/dist/commonjs/funcs/universalAllowanceSet.d.ts +1 -1
  13. package/dist/commonjs/funcs/universalAllowanceSet.js +1 -1
  14. package/dist/commonjs/lib/config.d.ts +2 -2
  15. package/dist/commonjs/lib/config.js +2 -2
  16. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  17. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  18. package/dist/commonjs/mcp-server/server.js +5 -1
  19. package/dist/commonjs/mcp-server/server.js.map +1 -1
  20. package/dist/commonjs/mcp-server/tools/pendleMarkets.d.ts +8 -0
  21. package/dist/commonjs/mcp-server/tools/pendleMarkets.d.ts.map +1 -0
  22. package/dist/commonjs/mcp-server/tools/pendleMarkets.js +64 -0
  23. package/dist/commonjs/mcp-server/tools/pendleMarkets.js.map +1 -0
  24. package/dist/commonjs/mcp-server/tools/pendlePositions.d.ts +8 -0
  25. package/dist/commonjs/mcp-server/tools/pendlePositions.d.ts.map +1 -0
  26. package/dist/commonjs/mcp-server/tools/pendlePositions.js +64 -0
  27. package/dist/commonjs/mcp-server/tools/pendlePositions.js.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/universalAllowanceSet.js +1 -1
  29. package/dist/commonjs/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.d.ts +63 -0
  30. package/dist/commonjs/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.d.ts.map +1 -0
  31. package/dist/commonjs/models/components/{tokenbalance.js → compassapibackendmodelsgenericreadresponseportfoliotokenbalance.js} +19 -17
  32. package/dist/commonjs/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.js.map +1 -0
  33. package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.d.ts +31 -0
  34. package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.d.ts.map +1 -0
  35. package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.js +73 -0
  36. package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.js.map +1 -0
  37. package/dist/commonjs/models/components/details.d.ts +45 -0
  38. package/dist/commonjs/models/components/details.d.ts.map +1 -0
  39. package/dist/commonjs/models/components/details.js +85 -0
  40. package/dist/commonjs/models/components/details.js.map +1 -0
  41. package/dist/commonjs/models/components/increaseallowanceparams.d.ts +29 -10
  42. package/dist/commonjs/models/components/increaseallowanceparams.d.ts.map +1 -1
  43. package/dist/commonjs/models/components/increaseallowanceparams.js +26 -3
  44. package/dist/commonjs/models/components/increaseallowanceparams.js.map +1 -1
  45. package/dist/commonjs/models/components/increaseallowancerequest.d.ts +29 -10
  46. package/dist/commonjs/models/components/increaseallowancerequest.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/increaseallowancerequest.js +26 -3
  48. package/dist/commonjs/models/components/increaseallowancerequest.js.map +1 -1
  49. package/dist/commonjs/models/components/index.d.ts +12 -3
  50. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/index.js +12 -3
  52. package/dist/commonjs/models/components/index.js.map +1 -1
  53. package/dist/commonjs/models/components/lpbalance.d.ts +33 -0
  54. package/dist/commonjs/models/components/lpbalance.d.ts.map +1 -0
  55. package/dist/commonjs/models/components/lpbalance.js +73 -0
  56. package/dist/commonjs/models/components/lpbalance.js.map +1 -0
  57. package/dist/commonjs/models/components/movement10percent.d.ts +35 -0
  58. package/dist/commonjs/models/components/movement10percent.d.ts.map +1 -0
  59. package/dist/commonjs/models/components/movement10percent.js +75 -0
  60. package/dist/commonjs/models/components/movement10percent.js.map +1 -0
  61. package/dist/commonjs/models/components/multicallactiontype.d.ts +0 -3
  62. package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
  63. package/dist/commonjs/models/components/multicallactiontype.js +0 -1
  64. package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
  65. package/dist/commonjs/models/components/openposition.d.ts +37 -0
  66. package/dist/commonjs/models/components/openposition.d.ts.map +1 -0
  67. package/dist/commonjs/models/components/openposition.js +77 -0
  68. package/dist/commonjs/models/components/openposition.js.map +1 -0
  69. package/dist/commonjs/models/components/pendlelistmarketsresponse.d.ts +33 -0
  70. package/dist/commonjs/models/components/pendlelistmarketsresponse.d.ts.map +1 -0
  71. package/dist/commonjs/models/components/pendlelistmarketsresponse.js +70 -0
  72. package/dist/commonjs/models/components/pendlelistmarketsresponse.js.map +1 -0
  73. package/dist/commonjs/models/components/pendlelistuserpositionsresponse.d.ts +33 -0
  74. package/dist/commonjs/models/components/pendlelistuserpositionsresponse.d.ts.map +1 -0
  75. package/dist/commonjs/models/components/pendlelistuserpositionsresponse.js +70 -0
  76. package/dist/commonjs/models/components/pendlelistuserpositionsresponse.js.map +1 -0
  77. package/dist/commonjs/models/components/pendlemarket.d.ts +50 -0
  78. package/dist/commonjs/models/components/pendlemarket.d.ts.map +1 -0
  79. package/dist/commonjs/models/components/pendlemarket.js +90 -0
  80. package/dist/commonjs/models/components/pendlemarket.js.map +1 -0
  81. package/dist/commonjs/models/components/portfolio.d.ts +3 -3
  82. package/dist/commonjs/models/components/portfolio.d.ts.map +1 -1
  83. package/dist/commonjs/models/components/portfolio.js +3 -3
  84. package/dist/commonjs/models/components/portfolio.js.map +1 -1
  85. package/dist/commonjs/models/components/position.d.ts +45 -0
  86. package/dist/commonjs/models/components/position.d.ts.map +1 -0
  87. package/dist/commonjs/models/components/position.js +85 -0
  88. package/dist/commonjs/models/components/position.js.map +1 -0
  89. package/dist/commonjs/models/components/syposition.d.ts +31 -0
  90. package/dist/commonjs/models/components/syposition.d.ts.map +1 -0
  91. package/dist/commonjs/models/components/syposition.js +71 -0
  92. package/dist/commonjs/models/components/syposition.js.map +1 -0
  93. package/dist/commonjs/models/components/tokentransferrequest.d.ts +11 -11
  94. package/dist/commonjs/models/components/tokentransferrequest.d.ts.map +1 -1
  95. package/dist/commonjs/models/components/tokentransferrequest.js +16 -17
  96. package/dist/commonjs/models/components/tokentransferrequest.js.map +1 -1
  97. package/dist/commonjs/models/components/useroperation.d.ts +4 -5
  98. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  99. package/dist/commonjs/models/components/useroperation.js +0 -5
  100. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  101. package/dist/commonjs/models/components/yieldrange.d.ts +31 -0
  102. package/dist/commonjs/models/components/yieldrange.d.ts.map +1 -0
  103. package/dist/commonjs/models/components/yieldrange.js +71 -0
  104. package/dist/commonjs/models/components/yieldrange.js.map +1 -0
  105. package/dist/commonjs/models/operations/index.d.ts +2 -0
  106. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  107. package/dist/commonjs/models/operations/index.js +2 -0
  108. package/dist/commonjs/models/operations/index.js.map +1 -1
  109. package/dist/commonjs/models/operations/pendlemarket.js +2 -2
  110. package/dist/commonjs/models/operations/pendlemarkets.d.ts +72 -0
  111. package/dist/commonjs/models/operations/pendlemarkets.d.ts.map +1 -0
  112. package/dist/commonjs/models/operations/pendlemarkets.js +94 -0
  113. package/dist/commonjs/models/operations/pendlemarkets.js.map +1 -0
  114. package/dist/commonjs/models/operations/pendleposition.js +2 -2
  115. package/dist/commonjs/models/operations/pendlepositions.d.ts +77 -0
  116. package/dist/commonjs/models/operations/pendlepositions.d.ts.map +1 -0
  117. package/dist/commonjs/models/operations/pendlepositions.js +105 -0
  118. package/dist/commonjs/models/operations/pendlepositions.js.map +1 -0
  119. package/dist/commonjs/sdk/pendle.d.ts +14 -0
  120. package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
  121. package/dist/commonjs/sdk/pendle.js +20 -0
  122. package/dist/commonjs/sdk/pendle.js.map +1 -1
  123. package/dist/commonjs/sdk/universal.d.ts +1 -1
  124. package/dist/commonjs/sdk/universal.js +1 -1
  125. package/dist/esm/funcs/pendleMarkets.d.ts +18 -0
  126. package/dist/esm/funcs/pendleMarkets.d.ts.map +1 -0
  127. package/dist/esm/funcs/pendleMarkets.js +85 -0
  128. package/dist/esm/funcs/pendleMarkets.js.map +1 -0
  129. package/dist/esm/funcs/pendlePositions.d.ts +18 -0
  130. package/dist/esm/funcs/pendlePositions.d.ts.map +1 -0
  131. package/dist/esm/funcs/pendlePositions.js +86 -0
  132. package/dist/esm/funcs/pendlePositions.js.map +1 -0
  133. package/dist/esm/funcs/universalAllowanceSet.d.ts +1 -1
  134. package/dist/esm/funcs/universalAllowanceSet.js +1 -1
  135. package/dist/esm/lib/config.d.ts +2 -2
  136. package/dist/esm/lib/config.js +2 -2
  137. package/dist/esm/mcp-server/mcp-server.js +1 -1
  138. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  139. package/dist/esm/mcp-server/server.js +5 -1
  140. package/dist/esm/mcp-server/server.js.map +1 -1
  141. package/dist/esm/mcp-server/tools/pendleMarkets.d.ts +8 -0
  142. package/dist/esm/mcp-server/tools/pendleMarkets.d.ts.map +1 -0
  143. package/dist/esm/mcp-server/tools/pendleMarkets.js +28 -0
  144. package/dist/esm/mcp-server/tools/pendleMarkets.js.map +1 -0
  145. package/dist/esm/mcp-server/tools/pendlePositions.d.ts +8 -0
  146. package/dist/esm/mcp-server/tools/pendlePositions.d.ts.map +1 -0
  147. package/dist/esm/mcp-server/tools/pendlePositions.js +28 -0
  148. package/dist/esm/mcp-server/tools/pendlePositions.js.map +1 -0
  149. package/dist/esm/mcp-server/tools/universalAllowanceSet.js +1 -1
  150. package/dist/esm/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.d.ts +63 -0
  151. package/dist/esm/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.d.ts.map +1 -0
  152. package/dist/esm/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.js +57 -0
  153. package/dist/esm/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.js.map +1 -0
  154. package/dist/esm/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.d.ts +31 -0
  155. package/dist/esm/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.d.ts.map +1 -0
  156. package/dist/esm/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.js +35 -0
  157. package/dist/esm/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.js.map +1 -0
  158. package/dist/esm/models/components/details.d.ts +45 -0
  159. package/dist/esm/models/components/details.d.ts.map +1 -0
  160. package/dist/esm/models/components/details.js +47 -0
  161. package/dist/esm/models/components/details.js.map +1 -0
  162. package/dist/esm/models/components/increaseallowanceparams.d.ts +29 -10
  163. package/dist/esm/models/components/increaseallowanceparams.d.ts.map +1 -1
  164. package/dist/esm/models/components/increaseallowanceparams.js +23 -2
  165. package/dist/esm/models/components/increaseallowanceparams.js.map +1 -1
  166. package/dist/esm/models/components/increaseallowancerequest.d.ts +29 -10
  167. package/dist/esm/models/components/increaseallowancerequest.d.ts.map +1 -1
  168. package/dist/esm/models/components/increaseallowancerequest.js +23 -2
  169. package/dist/esm/models/components/increaseallowancerequest.js.map +1 -1
  170. package/dist/esm/models/components/index.d.ts +12 -3
  171. package/dist/esm/models/components/index.d.ts.map +1 -1
  172. package/dist/esm/models/components/index.js +12 -3
  173. package/dist/esm/models/components/index.js.map +1 -1
  174. package/dist/esm/models/components/lpbalance.d.ts +33 -0
  175. package/dist/esm/models/components/lpbalance.d.ts.map +1 -0
  176. package/dist/esm/models/components/lpbalance.js +35 -0
  177. package/dist/esm/models/components/lpbalance.js.map +1 -0
  178. package/dist/esm/models/components/movement10percent.d.ts +35 -0
  179. package/dist/esm/models/components/movement10percent.d.ts.map +1 -0
  180. package/dist/esm/models/components/movement10percent.js +37 -0
  181. package/dist/esm/models/components/movement10percent.js.map +1 -0
  182. package/dist/esm/models/components/multicallactiontype.d.ts +0 -3
  183. package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
  184. package/dist/esm/models/components/multicallactiontype.js +0 -1
  185. package/dist/esm/models/components/multicallactiontype.js.map +1 -1
  186. package/dist/esm/models/components/openposition.d.ts +37 -0
  187. package/dist/esm/models/components/openposition.d.ts.map +1 -0
  188. package/dist/esm/models/components/openposition.js +39 -0
  189. package/dist/esm/models/components/openposition.js.map +1 -0
  190. package/dist/esm/models/components/pendlelistmarketsresponse.d.ts +33 -0
  191. package/dist/esm/models/components/pendlelistmarketsresponse.d.ts.map +1 -0
  192. package/dist/esm/models/components/pendlelistmarketsresponse.js +32 -0
  193. package/dist/esm/models/components/pendlelistmarketsresponse.js.map +1 -0
  194. package/dist/esm/models/components/pendlelistuserpositionsresponse.d.ts +33 -0
  195. package/dist/esm/models/components/pendlelistuserpositionsresponse.d.ts.map +1 -0
  196. package/dist/esm/models/components/pendlelistuserpositionsresponse.js +32 -0
  197. package/dist/esm/models/components/pendlelistuserpositionsresponse.js.map +1 -0
  198. package/dist/esm/models/components/pendlemarket.d.ts +50 -0
  199. package/dist/esm/models/components/pendlemarket.d.ts.map +1 -0
  200. package/dist/esm/models/components/pendlemarket.js +52 -0
  201. package/dist/esm/models/components/pendlemarket.js.map +1 -0
  202. package/dist/esm/models/components/portfolio.d.ts +3 -3
  203. package/dist/esm/models/components/portfolio.d.ts.map +1 -1
  204. package/dist/esm/models/components/portfolio.js +3 -3
  205. package/dist/esm/models/components/portfolio.js.map +1 -1
  206. package/dist/esm/models/components/position.d.ts +45 -0
  207. package/dist/esm/models/components/position.d.ts.map +1 -0
  208. package/dist/esm/models/components/position.js +47 -0
  209. package/dist/esm/models/components/position.js.map +1 -0
  210. package/dist/esm/models/components/syposition.d.ts +31 -0
  211. package/dist/esm/models/components/syposition.d.ts.map +1 -0
  212. package/dist/esm/models/components/syposition.js +33 -0
  213. package/dist/esm/models/components/syposition.js.map +1 -0
  214. package/dist/esm/models/components/tokentransferrequest.d.ts +11 -11
  215. package/dist/esm/models/components/tokentransferrequest.d.ts.map +1 -1
  216. package/dist/esm/models/components/tokentransferrequest.js +13 -14
  217. package/dist/esm/models/components/tokentransferrequest.js.map +1 -1
  218. package/dist/esm/models/components/useroperation.d.ts +4 -5
  219. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  220. package/dist/esm/models/components/useroperation.js +0 -5
  221. package/dist/esm/models/components/useroperation.js.map +1 -1
  222. package/dist/esm/models/components/yieldrange.d.ts +31 -0
  223. package/dist/esm/models/components/yieldrange.d.ts.map +1 -0
  224. package/dist/esm/models/components/yieldrange.js +33 -0
  225. package/dist/esm/models/components/yieldrange.js.map +1 -0
  226. package/dist/esm/models/operations/index.d.ts +2 -0
  227. package/dist/esm/models/operations/index.d.ts.map +1 -1
  228. package/dist/esm/models/operations/index.js +2 -0
  229. package/dist/esm/models/operations/index.js.map +1 -1
  230. package/dist/esm/models/operations/pendlemarket.js +2 -2
  231. package/dist/esm/models/operations/pendlemarkets.d.ts +72 -0
  232. package/dist/esm/models/operations/pendlemarkets.d.ts.map +1 -0
  233. package/dist/esm/models/operations/pendlemarkets.js +56 -0
  234. package/dist/esm/models/operations/pendlemarkets.js.map +1 -0
  235. package/dist/esm/models/operations/pendleposition.js +2 -2
  236. package/dist/esm/models/operations/pendlepositions.d.ts +77 -0
  237. package/dist/esm/models/operations/pendlepositions.d.ts.map +1 -0
  238. package/dist/esm/models/operations/pendlepositions.js +67 -0
  239. package/dist/esm/models/operations/pendlepositions.js.map +1 -0
  240. package/dist/esm/sdk/pendle.d.ts +14 -0
  241. package/dist/esm/sdk/pendle.d.ts.map +1 -1
  242. package/dist/esm/sdk/pendle.js +20 -0
  243. package/dist/esm/sdk/pendle.js.map +1 -1
  244. package/dist/esm/sdk/universal.d.ts +1 -1
  245. package/dist/esm/sdk/universal.js +1 -1
  246. package/docs/sdks/pendle/README.md +162 -4
  247. package/docs/sdks/universal/README.md +3 -3
  248. package/jsr.json +1 -1
  249. package/package.json +1 -1
  250. package/src/funcs/pendleMarkets.ts +169 -0
  251. package/src/funcs/pendlePositions.ts +170 -0
  252. package/src/funcs/universalAllowanceSet.ts +1 -1
  253. package/src/lib/config.ts +2 -2
  254. package/src/mcp-server/mcp-server.ts +1 -1
  255. package/src/mcp-server/server.ts +5 -1
  256. package/src/mcp-server/tools/pendleMarkets.ts +37 -0
  257. package/src/mcp-server/tools/pendlePositions.ts +37 -0
  258. package/src/mcp-server/tools/universalAllowanceSet.ts +1 -1
  259. package/src/models/components/compassapibackendmodelsgenericreadresponseportfoliotokenbalance.ts +140 -0
  260. package/src/models/components/compassapibackendmodelspendlereadresponsepositionstokenbalance.ts +83 -0
  261. package/src/models/components/details.ts +99 -0
  262. package/src/models/components/increaseallowanceparams.ts +62 -12
  263. package/src/models/components/increaseallowancerequest.ts +62 -12
  264. package/src/models/components/index.ts +12 -3
  265. package/src/models/components/lpbalance.ts +70 -0
  266. package/src/models/components/movement10percent.ts +78 -0
  267. package/src/models/components/multicallactiontype.ts +0 -1
  268. package/src/models/components/openposition.ts +90 -0
  269. package/src/models/components/pendlelistmarketsresponse.ts +75 -0
  270. package/src/models/components/pendlelistuserpositionsresponse.ts +77 -0
  271. package/src/models/components/pendlemarket.ts +108 -0
  272. package/src/models/components/portfolio.ts +17 -9
  273. package/src/models/components/position.ts +102 -0
  274. package/src/models/components/syposition.ts +66 -0
  275. package/src/models/components/tokentransferrequest.ts +27 -20
  276. package/src/models/components/useroperation.ts +0 -14
  277. package/src/models/components/yieldrange.ts +66 -0
  278. package/src/models/operations/index.ts +2 -0
  279. package/src/models/operations/pendlemarket.ts +2 -2
  280. package/src/models/operations/pendlemarkets.ts +111 -0
  281. package/src/models/operations/pendleposition.ts +2 -2
  282. package/src/models/operations/pendlepositions.ts +129 -0
  283. package/src/sdk/pendle.ts +36 -0
  284. package/src/sdk/universal.ts +1 -1
  285. package/dist/commonjs/models/components/contractname.d.ts +0 -117
  286. package/dist/commonjs/models/components/contractname.d.ts.map +0 -1
  287. package/dist/commonjs/models/components/contractname.js +0 -92
  288. package/dist/commonjs/models/components/contractname.js.map +0 -1
  289. package/dist/commonjs/models/components/increaseallowanceanyparams.d.ts +0 -80
  290. package/dist/commonjs/models/components/increaseallowanceanyparams.d.ts.map +0 -1
  291. package/dist/commonjs/models/components/increaseallowanceanyparams.js +0 -107
  292. package/dist/commonjs/models/components/increaseallowanceanyparams.js.map +0 -1
  293. package/dist/commonjs/models/components/tokenbalance.d.ts +0 -63
  294. package/dist/commonjs/models/components/tokenbalance.d.ts.map +0 -1
  295. package/dist/commonjs/models/components/tokenbalance.js.map +0 -1
  296. package/dist/esm/models/components/contractname.d.ts +0 -117
  297. package/dist/esm/models/components/contractname.d.ts.map +0 -1
  298. package/dist/esm/models/components/contractname.js +0 -56
  299. package/dist/esm/models/components/contractname.js.map +0 -1
  300. package/dist/esm/models/components/increaseallowanceanyparams.d.ts +0 -80
  301. package/dist/esm/models/components/increaseallowanceanyparams.d.ts.map +0 -1
  302. package/dist/esm/models/components/increaseallowanceanyparams.js +0 -67
  303. package/dist/esm/models/components/increaseallowanceanyparams.js.map +0 -1
  304. package/dist/esm/models/components/tokenbalance.d.ts +0 -63
  305. package/dist/esm/models/components/tokenbalance.d.ts.map +0 -1
  306. package/dist/esm/models/components/tokenbalance.js +0 -55
  307. package/dist/esm/models/components/tokenbalance.js.map +0 -1
  308. package/src/models/components/contractname.ts +0 -71
  309. package/src/models/components/increaseallowanceanyparams.ts +0 -169
  310. package/src/models/components/tokenbalance.ts +0 -123
@@ -1,67 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { ContractName$inboundSchema, ContractName$outboundSchema, } from "./contractname.js";
8
- import { TokenEnum$inboundSchema, TokenEnum$outboundSchema, } from "./tokenenum.js";
9
- /** @internal */
10
- export const IncreaseAllowanceAnyParamsAmount$inboundSchema = z.union([z.number(), z.string()]);
11
- /** @internal */
12
- export const IncreaseAllowanceAnyParamsAmount$outboundSchema = z.union([z.number(), z.string()]);
13
- /**
14
- * @internal
15
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
16
- */
17
- export var IncreaseAllowanceAnyParamsAmount$;
18
- (function (IncreaseAllowanceAnyParamsAmount$) {
19
- /** @deprecated use `IncreaseAllowanceAnyParamsAmount$inboundSchema` instead. */
20
- IncreaseAllowanceAnyParamsAmount$.inboundSchema = IncreaseAllowanceAnyParamsAmount$inboundSchema;
21
- /** @deprecated use `IncreaseAllowanceAnyParamsAmount$outboundSchema` instead. */
22
- IncreaseAllowanceAnyParamsAmount$.outboundSchema = IncreaseAllowanceAnyParamsAmount$outboundSchema;
23
- })(IncreaseAllowanceAnyParamsAmount$ || (IncreaseAllowanceAnyParamsAmount$ = {}));
24
- export function increaseAllowanceAnyParamsAmountToJSON(increaseAllowanceAnyParamsAmount) {
25
- return JSON.stringify(IncreaseAllowanceAnyParamsAmount$outboundSchema.parse(increaseAllowanceAnyParamsAmount));
26
- }
27
- export function increaseAllowanceAnyParamsAmountFromJSON(jsonString) {
28
- return safeParse(jsonString, (x) => IncreaseAllowanceAnyParamsAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IncreaseAllowanceAnyParamsAmount' from JSON`);
29
- }
30
- /** @internal */
31
- export const IncreaseAllowanceAnyParams$inboundSchema = z.object({
32
- token: TokenEnum$inboundSchema,
33
- contract_name: ContractName$inboundSchema,
34
- amount: z.union([z.number(), z.string()]),
35
- }).transform((v) => {
36
- return remap$(v, {
37
- "contract_name": "contractName",
38
- });
39
- });
40
- /** @internal */
41
- export const IncreaseAllowanceAnyParams$outboundSchema = z.object({
42
- token: TokenEnum$outboundSchema,
43
- contractName: ContractName$outboundSchema,
44
- amount: z.union([z.number(), z.string()]),
45
- }).transform((v) => {
46
- return remap$(v, {
47
- contractName: "contract_name",
48
- });
49
- });
50
- /**
51
- * @internal
52
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
53
- */
54
- export var IncreaseAllowanceAnyParams$;
55
- (function (IncreaseAllowanceAnyParams$) {
56
- /** @deprecated use `IncreaseAllowanceAnyParams$inboundSchema` instead. */
57
- IncreaseAllowanceAnyParams$.inboundSchema = IncreaseAllowanceAnyParams$inboundSchema;
58
- /** @deprecated use `IncreaseAllowanceAnyParams$outboundSchema` instead. */
59
- IncreaseAllowanceAnyParams$.outboundSchema = IncreaseAllowanceAnyParams$outboundSchema;
60
- })(IncreaseAllowanceAnyParams$ || (IncreaseAllowanceAnyParams$ = {}));
61
- export function increaseAllowanceAnyParamsToJSON(increaseAllowanceAnyParams) {
62
- return JSON.stringify(IncreaseAllowanceAnyParams$outboundSchema.parse(increaseAllowanceAnyParams));
63
- }
64
- export function increaseAllowanceAnyParamsFromJSON(jsonString) {
65
- return safeParse(jsonString, (x) => IncreaseAllowanceAnyParams$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IncreaseAllowanceAnyParams' from JSON`);
66
- }
67
- //# sourceMappingURL=increaseallowanceanyparams.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"increaseallowanceanyparams.js","sourceRoot":"","sources":["../../../../src/models/components/increaseallowanceanyparams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAkCxB,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAIvD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAKtC,gBAAgB;AAChB,MAAM,CAAC,MAAM,+CAA+C,GAIxD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC;;;GAGG;AACH,MAAM,KAAW,iCAAiC,CAOjD;AAPD,WAAiB,iCAAiC;IAChD,gFAAgF;IACnE,+CAAa,GAAG,8CAA8C,CAAC;IAC5E,iFAAiF;IACpE,gDAAc,GAAG,+CAA+C,CAAC;AAGhF,CAAC,EAPgB,iCAAiC,KAAjC,iCAAiC,QAOjD;AAED,MAAM,UAAU,sCAAsC,CACpD,gCAAkE;IAElE,OAAO,IAAI,CAAC,SAAS,CACnB,+CAA+C,CAAC,KAAK,CACnD,gCAAgC,CACjC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wCAAwC,CACtD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAA8C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,8DAA8D,CAC/D,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,uBAAuB;IAC9B,aAAa,EAAE,0BAA0B;IACzC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,cAAc;KAChC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AASH,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,wBAAwB;IAC/B,YAAY,EAAE,2BAA2B;IACzC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,2BAA2B,CAO3C;AAPD,WAAiB,2BAA2B;IAC1C,0EAA0E;IAC7D,yCAAa,GAAG,wCAAwC,CAAC;IACtE,2EAA2E;IAC9D,0CAAc,GAAG,yCAAyC,CAAC;AAG1E,CAAC,EAPgB,2BAA2B,KAA3B,2BAA2B,QAO3C;AAED,MAAM,UAAU,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wCAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
@@ -1,63 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { TokenEnum } from "./tokenenum.js";
5
- export type TokenBalance = {
6
- /**
7
- * Amount of tokens a particular address holds
8
- */
9
- amount: string;
10
- /**
11
- * Number of decimals of the token
12
- */
13
- decimals: number;
14
- /**
15
- * A class representing the token.
16
- *
17
- * @remarks
18
- *
19
- * This class is used to represent the token in the system. Notice individual
20
- * endpoints' documentation where per chain tokens are presented.
21
- */
22
- tokenSymbol: TokenEnum;
23
- /**
24
- * Address of the token
25
- */
26
- tokenAddress: string;
27
- /**
28
- * Price of the token in USD
29
- */
30
- price: string;
31
- /**
32
- * Value of the token balance in USD
33
- */
34
- tokenValueInUsd: string;
35
- };
36
- /** @internal */
37
- export declare const TokenBalance$inboundSchema: z.ZodType<TokenBalance, z.ZodTypeDef, unknown>;
38
- /** @internal */
39
- export type TokenBalance$Outbound = {
40
- amount: string;
41
- decimals: number;
42
- token_symbol: string;
43
- token_address: string;
44
- price: string;
45
- token_value_in_usd: string;
46
- };
47
- /** @internal */
48
- export declare const TokenBalance$outboundSchema: z.ZodType<TokenBalance$Outbound, z.ZodTypeDef, TokenBalance>;
49
- /**
50
- * @internal
51
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
- */
53
- export declare namespace TokenBalance$ {
54
- /** @deprecated use `TokenBalance$inboundSchema` instead. */
55
- const inboundSchema: z.ZodType<TokenBalance, z.ZodTypeDef, unknown>;
56
- /** @deprecated use `TokenBalance$outboundSchema` instead. */
57
- const outboundSchema: z.ZodType<TokenBalance$Outbound, z.ZodTypeDef, TokenBalance>;
58
- /** @deprecated use `TokenBalance$Outbound` instead. */
59
- type Outbound = TokenBalance$Outbound;
60
- }
61
- export declare function tokenBalanceToJSON(tokenBalance: TokenBalance): string;
62
- export declare function tokenBalanceFromJSON(jsonString: string): SafeParseResult<TokenBalance, SDKValidationError>;
63
- //# sourceMappingURL=tokenbalance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenbalance.d.ts","sourceRoot":"","sources":["../../../../src/models/components/tokenbalance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,SAAS,EAGV,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,WAAW,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAcP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,YAAY,CAcZ,CAAC;AAEH;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,8DAA8B,CAAC;IAC1D,uDAAuD;IACvD,KAAY,QAAQ,GAAG,qBAAqB,CAAC;CAC9C;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
@@ -1,55 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { TokenEnum$inboundSchema, TokenEnum$outboundSchema, } from "./tokenenum.js";
8
- /** @internal */
9
- export const TokenBalance$inboundSchema = z.object({
10
- amount: z.string(),
11
- decimals: z.number().int(),
12
- token_symbol: TokenEnum$inboundSchema,
13
- token_address: z.string(),
14
- price: z.string(),
15
- token_value_in_usd: z.string(),
16
- }).transform((v) => {
17
- return remap$(v, {
18
- "token_symbol": "tokenSymbol",
19
- "token_address": "tokenAddress",
20
- "token_value_in_usd": "tokenValueInUsd",
21
- });
22
- });
23
- /** @internal */
24
- export const TokenBalance$outboundSchema = z.object({
25
- amount: z.string(),
26
- decimals: z.number().int(),
27
- tokenSymbol: TokenEnum$outboundSchema,
28
- tokenAddress: z.string(),
29
- price: z.string(),
30
- tokenValueInUsd: z.string(),
31
- }).transform((v) => {
32
- return remap$(v, {
33
- tokenSymbol: "token_symbol",
34
- tokenAddress: "token_address",
35
- tokenValueInUsd: "token_value_in_usd",
36
- });
37
- });
38
- /**
39
- * @internal
40
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
41
- */
42
- export var TokenBalance$;
43
- (function (TokenBalance$) {
44
- /** @deprecated use `TokenBalance$inboundSchema` instead. */
45
- TokenBalance$.inboundSchema = TokenBalance$inboundSchema;
46
- /** @deprecated use `TokenBalance$outboundSchema` instead. */
47
- TokenBalance$.outboundSchema = TokenBalance$outboundSchema;
48
- })(TokenBalance$ || (TokenBalance$ = {}));
49
- export function tokenBalanceToJSON(tokenBalance) {
50
- return JSON.stringify(TokenBalance$outboundSchema.parse(tokenBalance));
51
- }
52
- export function tokenBalanceFromJSON(jsonString) {
53
- return safeParse(jsonString, (x) => TokenBalance$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TokenBalance' from JSON`);
54
- }
55
- //# sourceMappingURL=tokenbalance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenbalance.js","sourceRoot":"","sources":["../../../../src/models/components/tokenbalance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAkCxB,gBAAgB;AAChB,MAAM,CAAC,MAAM,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1B,YAAY,EAAE,uBAAuB;IACrC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,eAAe,EAAE,cAAc;QAC/B,oBAAoB,EAAE,iBAAiB;KACxC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAYH,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAIpC,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1B,WAAW,EAAE,wBAAwB;IACrC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,eAAe;QAC7B,eAAe,EAAE,oBAAoB;KACtC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,aAAa,CAO7B;AAPD,WAAiB,aAAa;IAC5B,4DAA4D;IAC/C,2BAAa,GAAG,0BAA0B,CAAC;IACxD,6DAA6D;IAChD,4BAAc,GAAG,2BAA2B,CAAC;AAG5D,CAAC,EAPgB,aAAa,KAAb,aAAa,QAO7B;AAED,MAAM,UAAU,kBAAkB,CAAC,YAA0B;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
@@ -1,71 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { ClosedEnum } from "../../types/enums.js";
7
-
8
- /**
9
- * Select the protocol.
10
- *
11
- * @remarks
12
- *
13
- * E.g. for increasing ERC-20 allowance.
14
- */
15
- export const ContractName = {
16
- AaveV3Pool: "AaveV3Pool",
17
- AaveV3Oracle: "AaveV3Oracle",
18
- AaveV3ProtocolDataProvider: "AaveV3ProtocolDataProvider",
19
- AerodromeBasicFactory: "AerodromeBasicFactory",
20
- AerodromeSlipstreamFactory: "AerodromeSlipstreamFactory",
21
- AerodromeBasicRouter: "AerodromeBasicRouter",
22
- AerodromeSlipstreamRouter: "AerodromeSlipstreamRouter",
23
- AerodromeBasicPool: "AerodromeBasicPool",
24
- AerodromeSlipstreamPool: "AerodromeSlipstreamPool",
25
- AerodromeSlipstreamNonfungiblePositionManager:
26
- "AerodromeSlipstreamNonfungiblePositionManager",
27
- UniswapV3Pool: "UniswapV3Pool",
28
- UniswapV3Router: "UniswapV3Router",
29
- UniswapV3Factory: "UniswapV3Factory",
30
- UniswapV3NFTPositionManager: "UniswapV3NFTPositionManager",
31
- UniswapV3Quoter: "UniswapV3Quoter",
32
- ChainlinkEACAggregatorProxy: "ChainlinkEACAggregatorProxy",
33
- Morpho: "Morpho",
34
- MorphoVault: "MorphoVault",
35
- MorphoOracle: "MorphoOracle",
36
- SkyDaiUsdsConverter: "SkyDaiUsdsConverter",
37
- SkyUsdcUsdsConverter: "SkyUsdcUsdsConverter",
38
- SkyUsdsVault: "SkyUsdsVault",
39
- PendleRouter: "PendleRouter",
40
- PendleMarket: "PendleMarket",
41
- PendleSy: "PendleSy",
42
- PendleYt: "PendleYt",
43
- Multicall: "Multicall",
44
- } as const;
45
- /**
46
- * Select the protocol.
47
- *
48
- * @remarks
49
- *
50
- * E.g. for increasing ERC-20 allowance.
51
- */
52
- export type ContractName = ClosedEnum<typeof ContractName>;
53
-
54
- /** @internal */
55
- export const ContractName$inboundSchema: z.ZodNativeEnum<typeof ContractName> =
56
- z.nativeEnum(ContractName);
57
-
58
- /** @internal */
59
- export const ContractName$outboundSchema: z.ZodNativeEnum<typeof ContractName> =
60
- ContractName$inboundSchema;
61
-
62
- /**
63
- * @internal
64
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
- */
66
- export namespace ContractName$ {
67
- /** @deprecated use `ContractName$inboundSchema` instead. */
68
- export const inboundSchema = ContractName$inboundSchema;
69
- /** @deprecated use `ContractName$outboundSchema` instead. */
70
- export const outboundSchema = ContractName$outboundSchema;
71
- }
@@ -1,169 +0,0 @@
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
- ContractName,
12
- ContractName$inboundSchema,
13
- ContractName$outboundSchema,
14
- } from "./contractname.js";
15
- import {
16
- TokenEnum,
17
- TokenEnum$inboundSchema,
18
- TokenEnum$outboundSchema,
19
- } from "./tokenenum.js";
20
-
21
- /**
22
- * The amount of tokens to increase the allowance by.
23
- */
24
- export type IncreaseAllowanceAnyParamsAmount = number | string;
25
-
26
- /**
27
- * Parameters model for increasing allowance for any arbitrary ERC20 address.
28
- */
29
- export type IncreaseAllowanceAnyParams = {
30
- /**
31
- * A class representing the token.
32
- *
33
- * @remarks
34
- *
35
- * This class is used to represent the token in the system. Notice individual
36
- * endpoints' documentation where per chain tokens are presented.
37
- */
38
- token: TokenEnum;
39
- /**
40
- * Select the protocol.
41
- *
42
- * @remarks
43
- *
44
- * E.g. for increasing ERC-20 allowance.
45
- */
46
- contractName: ContractName;
47
- /**
48
- * The amount of tokens to increase the allowance by.
49
- */
50
- amount: number | string;
51
- };
52
-
53
- /** @internal */
54
- export const IncreaseAllowanceAnyParamsAmount$inboundSchema: z.ZodType<
55
- IncreaseAllowanceAnyParamsAmount,
56
- z.ZodTypeDef,
57
- unknown
58
- > = z.union([z.number(), z.string()]);
59
-
60
- /** @internal */
61
- export type IncreaseAllowanceAnyParamsAmount$Outbound = number | string;
62
-
63
- /** @internal */
64
- export const IncreaseAllowanceAnyParamsAmount$outboundSchema: z.ZodType<
65
- IncreaseAllowanceAnyParamsAmount$Outbound,
66
- z.ZodTypeDef,
67
- IncreaseAllowanceAnyParamsAmount
68
- > = z.union([z.number(), z.string()]);
69
-
70
- /**
71
- * @internal
72
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
- */
74
- export namespace IncreaseAllowanceAnyParamsAmount$ {
75
- /** @deprecated use `IncreaseAllowanceAnyParamsAmount$inboundSchema` instead. */
76
- export const inboundSchema = IncreaseAllowanceAnyParamsAmount$inboundSchema;
77
- /** @deprecated use `IncreaseAllowanceAnyParamsAmount$outboundSchema` instead. */
78
- export const outboundSchema = IncreaseAllowanceAnyParamsAmount$outboundSchema;
79
- /** @deprecated use `IncreaseAllowanceAnyParamsAmount$Outbound` instead. */
80
- export type Outbound = IncreaseAllowanceAnyParamsAmount$Outbound;
81
- }
82
-
83
- export function increaseAllowanceAnyParamsAmountToJSON(
84
- increaseAllowanceAnyParamsAmount: IncreaseAllowanceAnyParamsAmount,
85
- ): string {
86
- return JSON.stringify(
87
- IncreaseAllowanceAnyParamsAmount$outboundSchema.parse(
88
- increaseAllowanceAnyParamsAmount,
89
- ),
90
- );
91
- }
92
-
93
- export function increaseAllowanceAnyParamsAmountFromJSON(
94
- jsonString: string,
95
- ): SafeParseResult<IncreaseAllowanceAnyParamsAmount, SDKValidationError> {
96
- return safeParse(
97
- jsonString,
98
- (x) => IncreaseAllowanceAnyParamsAmount$inboundSchema.parse(JSON.parse(x)),
99
- `Failed to parse 'IncreaseAllowanceAnyParamsAmount' from JSON`,
100
- );
101
- }
102
-
103
- /** @internal */
104
- export const IncreaseAllowanceAnyParams$inboundSchema: z.ZodType<
105
- IncreaseAllowanceAnyParams,
106
- z.ZodTypeDef,
107
- unknown
108
- > = z.object({
109
- token: TokenEnum$inboundSchema,
110
- contract_name: ContractName$inboundSchema,
111
- amount: z.union([z.number(), z.string()]),
112
- }).transform((v) => {
113
- return remap$(v, {
114
- "contract_name": "contractName",
115
- });
116
- });
117
-
118
- /** @internal */
119
- export type IncreaseAllowanceAnyParams$Outbound = {
120
- token: string;
121
- contract_name: string;
122
- amount: number | string;
123
- };
124
-
125
- /** @internal */
126
- export const IncreaseAllowanceAnyParams$outboundSchema: z.ZodType<
127
- IncreaseAllowanceAnyParams$Outbound,
128
- z.ZodTypeDef,
129
- IncreaseAllowanceAnyParams
130
- > = z.object({
131
- token: TokenEnum$outboundSchema,
132
- contractName: ContractName$outboundSchema,
133
- amount: z.union([z.number(), z.string()]),
134
- }).transform((v) => {
135
- return remap$(v, {
136
- contractName: "contract_name",
137
- });
138
- });
139
-
140
- /**
141
- * @internal
142
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
143
- */
144
- export namespace IncreaseAllowanceAnyParams$ {
145
- /** @deprecated use `IncreaseAllowanceAnyParams$inboundSchema` instead. */
146
- export const inboundSchema = IncreaseAllowanceAnyParams$inboundSchema;
147
- /** @deprecated use `IncreaseAllowanceAnyParams$outboundSchema` instead. */
148
- export const outboundSchema = IncreaseAllowanceAnyParams$outboundSchema;
149
- /** @deprecated use `IncreaseAllowanceAnyParams$Outbound` instead. */
150
- export type Outbound = IncreaseAllowanceAnyParams$Outbound;
151
- }
152
-
153
- export function increaseAllowanceAnyParamsToJSON(
154
- increaseAllowanceAnyParams: IncreaseAllowanceAnyParams,
155
- ): string {
156
- return JSON.stringify(
157
- IncreaseAllowanceAnyParams$outboundSchema.parse(increaseAllowanceAnyParams),
158
- );
159
- }
160
-
161
- export function increaseAllowanceAnyParamsFromJSON(
162
- jsonString: string,
163
- ): SafeParseResult<IncreaseAllowanceAnyParams, SDKValidationError> {
164
- return safeParse(
165
- jsonString,
166
- (x) => IncreaseAllowanceAnyParams$inboundSchema.parse(JSON.parse(x)),
167
- `Failed to parse 'IncreaseAllowanceAnyParams' from JSON`,
168
- );
169
- }
@@ -1,123 +0,0 @@
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
- TokenEnum,
12
- TokenEnum$inboundSchema,
13
- TokenEnum$outboundSchema,
14
- } from "./tokenenum.js";
15
-
16
- export type TokenBalance = {
17
- /**
18
- * Amount of tokens a particular address holds
19
- */
20
- amount: string;
21
- /**
22
- * Number of decimals of the token
23
- */
24
- decimals: number;
25
- /**
26
- * A class representing the token.
27
- *
28
- * @remarks
29
- *
30
- * This class is used to represent the token in the system. Notice individual
31
- * endpoints' documentation where per chain tokens are presented.
32
- */
33
- tokenSymbol: TokenEnum;
34
- /**
35
- * Address of the token
36
- */
37
- tokenAddress: string;
38
- /**
39
- * Price of the token in USD
40
- */
41
- price: string;
42
- /**
43
- * Value of the token balance in USD
44
- */
45
- tokenValueInUsd: string;
46
- };
47
-
48
- /** @internal */
49
- export const TokenBalance$inboundSchema: z.ZodType<
50
- TokenBalance,
51
- z.ZodTypeDef,
52
- unknown
53
- > = z.object({
54
- amount: z.string(),
55
- decimals: z.number().int(),
56
- token_symbol: TokenEnum$inboundSchema,
57
- token_address: z.string(),
58
- price: z.string(),
59
- token_value_in_usd: z.string(),
60
- }).transform((v) => {
61
- return remap$(v, {
62
- "token_symbol": "tokenSymbol",
63
- "token_address": "tokenAddress",
64
- "token_value_in_usd": "tokenValueInUsd",
65
- });
66
- });
67
-
68
- /** @internal */
69
- export type TokenBalance$Outbound = {
70
- amount: string;
71
- decimals: number;
72
- token_symbol: string;
73
- token_address: string;
74
- price: string;
75
- token_value_in_usd: string;
76
- };
77
-
78
- /** @internal */
79
- export const TokenBalance$outboundSchema: z.ZodType<
80
- TokenBalance$Outbound,
81
- z.ZodTypeDef,
82
- TokenBalance
83
- > = z.object({
84
- amount: z.string(),
85
- decimals: z.number().int(),
86
- tokenSymbol: TokenEnum$outboundSchema,
87
- tokenAddress: z.string(),
88
- price: z.string(),
89
- tokenValueInUsd: z.string(),
90
- }).transform((v) => {
91
- return remap$(v, {
92
- tokenSymbol: "token_symbol",
93
- tokenAddress: "token_address",
94
- tokenValueInUsd: "token_value_in_usd",
95
- });
96
- });
97
-
98
- /**
99
- * @internal
100
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
- */
102
- export namespace TokenBalance$ {
103
- /** @deprecated use `TokenBalance$inboundSchema` instead. */
104
- export const inboundSchema = TokenBalance$inboundSchema;
105
- /** @deprecated use `TokenBalance$outboundSchema` instead. */
106
- export const outboundSchema = TokenBalance$outboundSchema;
107
- /** @deprecated use `TokenBalance$Outbound` instead. */
108
- export type Outbound = TokenBalance$Outbound;
109
- }
110
-
111
- export function tokenBalanceToJSON(tokenBalance: TokenBalance): string {
112
- return JSON.stringify(TokenBalance$outboundSchema.parse(tokenBalance));
113
- }
114
-
115
- export function tokenBalanceFromJSON(
116
- jsonString: string,
117
- ): SafeParseResult<TokenBalance, SDKValidationError> {
118
- return safeParse(
119
- jsonString,
120
- (x) => TokenBalance$inboundSchema.parse(JSON.parse(x)),
121
- `Failed to parse 'TokenBalance' from JSON`,
122
- );
123
- }