@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,368 @@
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 { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
+ import {
12
+ SignedAuthorization,
13
+ SignedAuthorization$inboundSchema,
14
+ SignedAuthorization$Outbound,
15
+ SignedAuthorization$outboundSchema,
16
+ } from "./signedauthorization.js";
17
+ import {
18
+ TokenEnum,
19
+ TokenEnum$inboundSchema,
20
+ TokenEnum$outboundSchema,
21
+ } from "./tokenenum.js";
22
+
23
+ /**
24
+ * Amount of collateral token to supply to Aave
25
+ */
26
+ export type InitialCollateralAmount = number | string;
27
+
28
+ /**
29
+ * Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
30
+ */
31
+ export type Multiplier = number | string;
32
+
33
+ /**
34
+ * Maximum allowed slippage for token swaps in percentage
35
+ */
36
+ export type MaxSlippagePercent = number | string;
37
+
38
+ /**
39
+ * Loan To Value percentage of the loop
40
+ */
41
+ export type LoanToValue = number | string;
42
+
43
+ /**
44
+ * Request model for executing an Aave loop strategy.
45
+ */
46
+ export type AaveLoopRequest = {
47
+ /**
48
+ * The chain to use.
49
+ */
50
+ chain: Chain;
51
+ /**
52
+ * The address of the transaction sender.
53
+ */
54
+ sender: string;
55
+ signedAuthorization: SignedAuthorization;
56
+ /**
57
+ * A class representing the token.
58
+ *
59
+ * @remarks
60
+ *
61
+ * This class is used to represent the token in the system. Notice individual
62
+ * endpoints' documentation where per chain tokens are presented.
63
+ */
64
+ collateralToken: TokenEnum;
65
+ /**
66
+ * A class representing the token.
67
+ *
68
+ * @remarks
69
+ *
70
+ * This class is used to represent the token in the system. Notice individual
71
+ * endpoints' documentation where per chain tokens are presented.
72
+ */
73
+ borrowToken: TokenEnum;
74
+ /**
75
+ * Amount of collateral token to supply to Aave
76
+ */
77
+ initialCollateralAmount: number | string;
78
+ /**
79
+ * Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
80
+ */
81
+ multiplier: number | string;
82
+ /**
83
+ * Maximum allowed slippage for token swaps in percentage
84
+ */
85
+ maxSlippagePercent: number | string;
86
+ /**
87
+ * Loan To Value percentage of the loop
88
+ */
89
+ loanToValue: number | string;
90
+ };
91
+
92
+ /** @internal */
93
+ export const InitialCollateralAmount$inboundSchema: z.ZodType<
94
+ InitialCollateralAmount,
95
+ z.ZodTypeDef,
96
+ unknown
97
+ > = z.union([z.number(), z.string()]);
98
+
99
+ /** @internal */
100
+ export type InitialCollateralAmount$Outbound = number | string;
101
+
102
+ /** @internal */
103
+ export const InitialCollateralAmount$outboundSchema: z.ZodType<
104
+ InitialCollateralAmount$Outbound,
105
+ z.ZodTypeDef,
106
+ InitialCollateralAmount
107
+ > = z.union([z.number(), z.string()]);
108
+
109
+ /**
110
+ * @internal
111
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
112
+ */
113
+ export namespace InitialCollateralAmount$ {
114
+ /** @deprecated use `InitialCollateralAmount$inboundSchema` instead. */
115
+ export const inboundSchema = InitialCollateralAmount$inboundSchema;
116
+ /** @deprecated use `InitialCollateralAmount$outboundSchema` instead. */
117
+ export const outboundSchema = InitialCollateralAmount$outboundSchema;
118
+ /** @deprecated use `InitialCollateralAmount$Outbound` instead. */
119
+ export type Outbound = InitialCollateralAmount$Outbound;
120
+ }
121
+
122
+ export function initialCollateralAmountToJSON(
123
+ initialCollateralAmount: InitialCollateralAmount,
124
+ ): string {
125
+ return JSON.stringify(
126
+ InitialCollateralAmount$outboundSchema.parse(initialCollateralAmount),
127
+ );
128
+ }
129
+
130
+ export function initialCollateralAmountFromJSON(
131
+ jsonString: string,
132
+ ): SafeParseResult<InitialCollateralAmount, SDKValidationError> {
133
+ return safeParse(
134
+ jsonString,
135
+ (x) => InitialCollateralAmount$inboundSchema.parse(JSON.parse(x)),
136
+ `Failed to parse 'InitialCollateralAmount' from JSON`,
137
+ );
138
+ }
139
+
140
+ /** @internal */
141
+ export const Multiplier$inboundSchema: z.ZodType<
142
+ Multiplier,
143
+ z.ZodTypeDef,
144
+ unknown
145
+ > = z.union([z.number(), z.string()]);
146
+
147
+ /** @internal */
148
+ export type Multiplier$Outbound = number | string;
149
+
150
+ /** @internal */
151
+ export const Multiplier$outboundSchema: z.ZodType<
152
+ Multiplier$Outbound,
153
+ z.ZodTypeDef,
154
+ Multiplier
155
+ > = z.union([z.number(), z.string()]);
156
+
157
+ /**
158
+ * @internal
159
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
160
+ */
161
+ export namespace Multiplier$ {
162
+ /** @deprecated use `Multiplier$inboundSchema` instead. */
163
+ export const inboundSchema = Multiplier$inboundSchema;
164
+ /** @deprecated use `Multiplier$outboundSchema` instead. */
165
+ export const outboundSchema = Multiplier$outboundSchema;
166
+ /** @deprecated use `Multiplier$Outbound` instead. */
167
+ export type Outbound = Multiplier$Outbound;
168
+ }
169
+
170
+ export function multiplierToJSON(multiplier: Multiplier): string {
171
+ return JSON.stringify(Multiplier$outboundSchema.parse(multiplier));
172
+ }
173
+
174
+ export function multiplierFromJSON(
175
+ jsonString: string,
176
+ ): SafeParseResult<Multiplier, SDKValidationError> {
177
+ return safeParse(
178
+ jsonString,
179
+ (x) => Multiplier$inboundSchema.parse(JSON.parse(x)),
180
+ `Failed to parse 'Multiplier' from JSON`,
181
+ );
182
+ }
183
+
184
+ /** @internal */
185
+ export const MaxSlippagePercent$inboundSchema: z.ZodType<
186
+ MaxSlippagePercent,
187
+ z.ZodTypeDef,
188
+ unknown
189
+ > = z.union([z.number(), z.string()]);
190
+
191
+ /** @internal */
192
+ export type MaxSlippagePercent$Outbound = number | string;
193
+
194
+ /** @internal */
195
+ export const MaxSlippagePercent$outboundSchema: z.ZodType<
196
+ MaxSlippagePercent$Outbound,
197
+ z.ZodTypeDef,
198
+ MaxSlippagePercent
199
+ > = z.union([z.number(), z.string()]);
200
+
201
+ /**
202
+ * @internal
203
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
204
+ */
205
+ export namespace MaxSlippagePercent$ {
206
+ /** @deprecated use `MaxSlippagePercent$inboundSchema` instead. */
207
+ export const inboundSchema = MaxSlippagePercent$inboundSchema;
208
+ /** @deprecated use `MaxSlippagePercent$outboundSchema` instead. */
209
+ export const outboundSchema = MaxSlippagePercent$outboundSchema;
210
+ /** @deprecated use `MaxSlippagePercent$Outbound` instead. */
211
+ export type Outbound = MaxSlippagePercent$Outbound;
212
+ }
213
+
214
+ export function maxSlippagePercentToJSON(
215
+ maxSlippagePercent: MaxSlippagePercent,
216
+ ): string {
217
+ return JSON.stringify(
218
+ MaxSlippagePercent$outboundSchema.parse(maxSlippagePercent),
219
+ );
220
+ }
221
+
222
+ export function maxSlippagePercentFromJSON(
223
+ jsonString: string,
224
+ ): SafeParseResult<MaxSlippagePercent, SDKValidationError> {
225
+ return safeParse(
226
+ jsonString,
227
+ (x) => MaxSlippagePercent$inboundSchema.parse(JSON.parse(x)),
228
+ `Failed to parse 'MaxSlippagePercent' from JSON`,
229
+ );
230
+ }
231
+
232
+ /** @internal */
233
+ export const LoanToValue$inboundSchema: z.ZodType<
234
+ LoanToValue,
235
+ z.ZodTypeDef,
236
+ unknown
237
+ > = z.union([z.number(), z.string()]);
238
+
239
+ /** @internal */
240
+ export type LoanToValue$Outbound = number | string;
241
+
242
+ /** @internal */
243
+ export const LoanToValue$outboundSchema: z.ZodType<
244
+ LoanToValue$Outbound,
245
+ z.ZodTypeDef,
246
+ LoanToValue
247
+ > = z.union([z.number(), z.string()]);
248
+
249
+ /**
250
+ * @internal
251
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
252
+ */
253
+ export namespace LoanToValue$ {
254
+ /** @deprecated use `LoanToValue$inboundSchema` instead. */
255
+ export const inboundSchema = LoanToValue$inboundSchema;
256
+ /** @deprecated use `LoanToValue$outboundSchema` instead. */
257
+ export const outboundSchema = LoanToValue$outboundSchema;
258
+ /** @deprecated use `LoanToValue$Outbound` instead. */
259
+ export type Outbound = LoanToValue$Outbound;
260
+ }
261
+
262
+ export function loanToValueToJSON(loanToValue: LoanToValue): string {
263
+ return JSON.stringify(LoanToValue$outboundSchema.parse(loanToValue));
264
+ }
265
+
266
+ export function loanToValueFromJSON(
267
+ jsonString: string,
268
+ ): SafeParseResult<LoanToValue, SDKValidationError> {
269
+ return safeParse(
270
+ jsonString,
271
+ (x) => LoanToValue$inboundSchema.parse(JSON.parse(x)),
272
+ `Failed to parse 'LoanToValue' from JSON`,
273
+ );
274
+ }
275
+
276
+ /** @internal */
277
+ export const AaveLoopRequest$inboundSchema: z.ZodType<
278
+ AaveLoopRequest,
279
+ z.ZodTypeDef,
280
+ unknown
281
+ > = z.object({
282
+ chain: Chain$inboundSchema,
283
+ sender: z.string(),
284
+ signed_authorization: SignedAuthorization$inboundSchema,
285
+ collateral_token: TokenEnum$inboundSchema,
286
+ borrow_token: TokenEnum$inboundSchema,
287
+ initial_collateral_amount: z.union([z.number(), z.string()]),
288
+ multiplier: z.union([z.number(), z.string()]),
289
+ max_slippage_percent: z.union([z.number(), z.string()]),
290
+ loan_to_value: z.union([z.number(), z.string()]),
291
+ }).transform((v) => {
292
+ return remap$(v, {
293
+ "signed_authorization": "signedAuthorization",
294
+ "collateral_token": "collateralToken",
295
+ "borrow_token": "borrowToken",
296
+ "initial_collateral_amount": "initialCollateralAmount",
297
+ "max_slippage_percent": "maxSlippagePercent",
298
+ "loan_to_value": "loanToValue",
299
+ });
300
+ });
301
+
302
+ /** @internal */
303
+ export type AaveLoopRequest$Outbound = {
304
+ chain: string;
305
+ sender: string;
306
+ signed_authorization: SignedAuthorization$Outbound;
307
+ collateral_token: string;
308
+ borrow_token: string;
309
+ initial_collateral_amount: number | string;
310
+ multiplier: number | string;
311
+ max_slippage_percent: number | string;
312
+ loan_to_value: number | string;
313
+ };
314
+
315
+ /** @internal */
316
+ export const AaveLoopRequest$outboundSchema: z.ZodType<
317
+ AaveLoopRequest$Outbound,
318
+ z.ZodTypeDef,
319
+ AaveLoopRequest
320
+ > = z.object({
321
+ chain: Chain$outboundSchema,
322
+ sender: z.string(),
323
+ signedAuthorization: SignedAuthorization$outboundSchema,
324
+ collateralToken: TokenEnum$outboundSchema,
325
+ borrowToken: TokenEnum$outboundSchema,
326
+ initialCollateralAmount: z.union([z.number(), z.string()]),
327
+ multiplier: z.union([z.number(), z.string()]),
328
+ maxSlippagePercent: z.union([z.number(), z.string()]),
329
+ loanToValue: z.union([z.number(), z.string()]),
330
+ }).transform((v) => {
331
+ return remap$(v, {
332
+ signedAuthorization: "signed_authorization",
333
+ collateralToken: "collateral_token",
334
+ borrowToken: "borrow_token",
335
+ initialCollateralAmount: "initial_collateral_amount",
336
+ maxSlippagePercent: "max_slippage_percent",
337
+ loanToValue: "loan_to_value",
338
+ });
339
+ });
340
+
341
+ /**
342
+ * @internal
343
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
344
+ */
345
+ export namespace AaveLoopRequest$ {
346
+ /** @deprecated use `AaveLoopRequest$inboundSchema` instead. */
347
+ export const inboundSchema = AaveLoopRequest$inboundSchema;
348
+ /** @deprecated use `AaveLoopRequest$outboundSchema` instead. */
349
+ export const outboundSchema = AaveLoopRequest$outboundSchema;
350
+ /** @deprecated use `AaveLoopRequest$Outbound` instead. */
351
+ export type Outbound = AaveLoopRequest$Outbound;
352
+ }
353
+
354
+ export function aaveLoopRequestToJSON(
355
+ aaveLoopRequest: AaveLoopRequest,
356
+ ): string {
357
+ return JSON.stringify(AaveLoopRequest$outboundSchema.parse(aaveLoopRequest));
358
+ }
359
+
360
+ export function aaveLoopRequestFromJSON(
361
+ jsonString: string,
362
+ ): SafeParseResult<AaveLoopRequest, SDKValidationError> {
363
+ return safeParse(
364
+ jsonString,
365
+ (x) => AaveLoopRequest$inboundSchema.parse(JSON.parse(x)),
366
+ `Failed to parse 'AaveLoopRequest' from JSON`,
367
+ );
368
+ }
@@ -9,14 +9,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type CompassApiBackendModelsMorphoReadResponseGetMarketMarketState = {
11
11
  utilization: string;
12
- collateralAssets: string;
12
+ collateralAssets?: string | null | undefined;
13
13
  collateralAssetsUsd?: string | null | undefined;
14
14
  borrowAssets: string;
15
- borrowAssetsUsd: string;
15
+ borrowAssetsUsd?: string | null | undefined;
16
16
  liquidityAssets: string;
17
- liquidityAssetsUsd: string;
17
+ liquidityAssetsUsd?: string | null | undefined;
18
18
  totalLiquidity: string;
19
- totalLiquidityUsd: string;
19
+ totalLiquidityUsd?: string | null | undefined;
20
20
  };
21
21
 
22
22
  /** @internal */
@@ -27,28 +27,28 @@ export const CompassApiBackendModelsMorphoReadResponseGetMarketMarketState$inbou
27
27
  unknown
28
28
  > = z.object({
29
29
  utilization: z.string(),
30
- collateralAssets: z.string(),
30
+ collateralAssets: z.nullable(z.string()).optional(),
31
31
  collateralAssetsUsd: z.nullable(z.string()).optional(),
32
32
  borrowAssets: z.string(),
33
- borrowAssetsUsd: z.string(),
33
+ borrowAssetsUsd: z.nullable(z.string()).optional(),
34
34
  liquidityAssets: z.string(),
35
- liquidityAssetsUsd: z.string(),
35
+ liquidityAssetsUsd: z.nullable(z.string()).optional(),
36
36
  totalLiquidity: z.string(),
37
- totalLiquidityUsd: z.string(),
37
+ totalLiquidityUsd: z.nullable(z.string()).optional(),
38
38
  });
39
39
 
40
40
  /** @internal */
41
41
  export type CompassApiBackendModelsMorphoReadResponseGetMarketMarketState$Outbound =
42
42
  {
43
43
  utilization: string;
44
- collateralAssets: string;
44
+ collateralAssets?: string | null | undefined;
45
45
  collateralAssetsUsd?: string | null | undefined;
46
46
  borrowAssets: string;
47
- borrowAssetsUsd: string;
47
+ borrowAssetsUsd?: string | null | undefined;
48
48
  liquidityAssets: string;
49
- liquidityAssetsUsd: string;
49
+ liquidityAssetsUsd?: string | null | undefined;
50
50
  totalLiquidity: string;
51
- totalLiquidityUsd: string;
51
+ totalLiquidityUsd?: string | null | undefined;
52
52
  };
53
53
 
54
54
  /** @internal */
@@ -59,14 +59,14 @@ export const CompassApiBackendModelsMorphoReadResponseGetMarketMarketState$outbo
59
59
  CompassApiBackendModelsMorphoReadResponseGetMarketMarketState
60
60
  > = z.object({
61
61
  utilization: z.string(),
62
- collateralAssets: z.string(),
62
+ collateralAssets: z.nullable(z.string()).optional(),
63
63
  collateralAssetsUsd: z.nullable(z.string()).optional(),
64
64
  borrowAssets: z.string(),
65
- borrowAssetsUsd: z.string(),
65
+ borrowAssetsUsd: z.nullable(z.string()).optional(),
66
66
  liquidityAssets: z.string(),
67
- liquidityAssetsUsd: z.string(),
67
+ liquidityAssetsUsd: z.nullable(z.string()).optional(),
68
68
  totalLiquidity: z.string(),
69
- totalLiquidityUsd: z.string(),
69
+ totalLiquidityUsd: z.nullable(z.string()).optional(),
70
70
  });
71
71
 
72
72
  /**
@@ -7,6 +7,7 @@ export * from "./aaveborrowparams.js";
7
7
  export * from "./aaveborrowrequest.js";
8
8
  export * from "./aavehistoricaltransactionsresponse.js";
9
9
  export * from "./aaveliquiditychangeresponse.js";
10
+ export * from "./aavelooprequest.js";
10
11
  export * from "./aaverateresponse.js";
11
12
  export * from "./aaverepayparams.js";
12
13
  export * from "./aaverepayrequest.js";
@@ -92,6 +93,9 @@ export * from "./morphowithdrawcollateralrequest.js";
92
93
  export * from "./morphowithdrawparams.js";
93
94
  export * from "./morphowithdrawrequest.js";
94
95
  export * from "./movement10percent.js";
96
+ export * from "./multicallauthorizationrequest.js";
97
+ export * from "./multicallauthorizationresponse.js";
98
+ export * from "./multicallexecuterequest.js";
95
99
  export * from "./openposition.js";
96
100
  export * from "./pendleaddliquidityparams.js";
97
101
  export * from "./pendleaddliquidityrequest.js";
@@ -14,8 +14,6 @@ import {
14
14
  } from "./curator.js";
15
15
 
16
16
  export type Metadata = {
17
- description: string | null;
18
- image: string | null;
19
17
  forumLink: string | null;
20
18
  curators: Array<Curator>;
21
19
  };
@@ -26,16 +24,12 @@ export const Metadata$inboundSchema: z.ZodType<
26
24
  z.ZodTypeDef,
27
25
  unknown
28
26
  > = z.object({
29
- description: z.nullable(z.string()),
30
- image: z.nullable(z.string()),
31
27
  forumLink: z.nullable(z.string()),
32
28
  curators: z.array(Curator$inboundSchema),
33
29
  });
34
30
 
35
31
  /** @internal */
36
32
  export type Metadata$Outbound = {
37
- description: string | null;
38
- image: string | null;
39
33
  forumLink: string | null;
40
34
  curators: Array<Curator$Outbound>;
41
35
  };
@@ -46,8 +40,6 @@ export const Metadata$outboundSchema: z.ZodType<
46
40
  z.ZodTypeDef,
47
41
  Metadata
48
42
  > = z.object({
49
- description: z.nullable(z.string()),
50
- image: z.nullable(z.string()),
51
43
  forumLink: z.nullable(z.string()),
52
44
  curators: z.array(Curator$outboundSchema),
53
45
  });
@@ -0,0 +1,90 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
10
+
11
+ /**
12
+ * Request model for getting a multicall authorization.
13
+ *
14
+ * @remarks
15
+ *
16
+ * This model is used to authorize a sender address to perform multicall operations,
17
+ * allowing it to call multiple functions on multiple contracts in a single
18
+ * transaction.
19
+ *
20
+ * Only needs to be done once per an EOA.
21
+ */
22
+ export type MulticallAuthorizationRequest = {
23
+ /**
24
+ * The chain to use.
25
+ */
26
+ chain: Chain;
27
+ /**
28
+ * The Ethereum address to use for authorization
29
+ */
30
+ sender: string;
31
+ };
32
+
33
+ /** @internal */
34
+ export const MulticallAuthorizationRequest$inboundSchema: z.ZodType<
35
+ MulticallAuthorizationRequest,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ chain: Chain$inboundSchema,
40
+ sender: z.string(),
41
+ });
42
+
43
+ /** @internal */
44
+ export type MulticallAuthorizationRequest$Outbound = {
45
+ chain: string;
46
+ sender: string;
47
+ };
48
+
49
+ /** @internal */
50
+ export const MulticallAuthorizationRequest$outboundSchema: z.ZodType<
51
+ MulticallAuthorizationRequest$Outbound,
52
+ z.ZodTypeDef,
53
+ MulticallAuthorizationRequest
54
+ > = z.object({
55
+ chain: Chain$outboundSchema,
56
+ sender: z.string(),
57
+ });
58
+
59
+ /**
60
+ * @internal
61
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
62
+ */
63
+ export namespace MulticallAuthorizationRequest$ {
64
+ /** @deprecated use `MulticallAuthorizationRequest$inboundSchema` instead. */
65
+ export const inboundSchema = MulticallAuthorizationRequest$inboundSchema;
66
+ /** @deprecated use `MulticallAuthorizationRequest$outboundSchema` instead. */
67
+ export const outboundSchema = MulticallAuthorizationRequest$outboundSchema;
68
+ /** @deprecated use `MulticallAuthorizationRequest$Outbound` instead. */
69
+ export type Outbound = MulticallAuthorizationRequest$Outbound;
70
+ }
71
+
72
+ export function multicallAuthorizationRequestToJSON(
73
+ multicallAuthorizationRequest: MulticallAuthorizationRequest,
74
+ ): string {
75
+ return JSON.stringify(
76
+ MulticallAuthorizationRequest$outboundSchema.parse(
77
+ multicallAuthorizationRequest,
78
+ ),
79
+ );
80
+ }
81
+
82
+ export function multicallAuthorizationRequestFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<MulticallAuthorizationRequest, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) => MulticallAuthorizationRequest$inboundSchema.parse(JSON.parse(x)),
88
+ `Failed to parse 'MulticallAuthorizationRequest' from JSON`,
89
+ );
90
+ }
@@ -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 { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * Response model for multicall authorization.
12
+ */
13
+ export type MulticallAuthorizationResponse = {
14
+ /**
15
+ * A unique nonce value for this authorization
16
+ */
17
+ nonce: number;
18
+ /**
19
+ * The Ethereum address authorized for multicall
20
+ */
21
+ address: string;
22
+ /**
23
+ * The chain ID for the blockchain network
24
+ */
25
+ chainId: number;
26
+ };
27
+
28
+ /** @internal */
29
+ export const MulticallAuthorizationResponse$inboundSchema: z.ZodType<
30
+ MulticallAuthorizationResponse,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ nonce: z.number().int(),
35
+ address: z.string(),
36
+ chainId: z.number().int(),
37
+ });
38
+
39
+ /** @internal */
40
+ export type MulticallAuthorizationResponse$Outbound = {
41
+ nonce: number;
42
+ address: string;
43
+ chainId: number;
44
+ };
45
+
46
+ /** @internal */
47
+ export const MulticallAuthorizationResponse$outboundSchema: z.ZodType<
48
+ MulticallAuthorizationResponse$Outbound,
49
+ z.ZodTypeDef,
50
+ MulticallAuthorizationResponse
51
+ > = z.object({
52
+ nonce: z.number().int(),
53
+ address: z.string(),
54
+ chainId: z.number().int(),
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 MulticallAuthorizationResponse$ {
62
+ /** @deprecated use `MulticallAuthorizationResponse$inboundSchema` instead. */
63
+ export const inboundSchema = MulticallAuthorizationResponse$inboundSchema;
64
+ /** @deprecated use `MulticallAuthorizationResponse$outboundSchema` instead. */
65
+ export const outboundSchema = MulticallAuthorizationResponse$outboundSchema;
66
+ /** @deprecated use `MulticallAuthorizationResponse$Outbound` instead. */
67
+ export type Outbound = MulticallAuthorizationResponse$Outbound;
68
+ }
69
+
70
+ export function multicallAuthorizationResponseToJSON(
71
+ multicallAuthorizationResponse: MulticallAuthorizationResponse,
72
+ ): string {
73
+ return JSON.stringify(
74
+ MulticallAuthorizationResponse$outboundSchema.parse(
75
+ multicallAuthorizationResponse,
76
+ ),
77
+ );
78
+ }
79
+
80
+ export function multicallAuthorizationResponseFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<MulticallAuthorizationResponse, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => MulticallAuthorizationResponse$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'MulticallAuthorizationResponse' from JSON`,
87
+ );
88
+ }