tapimo 0.0.0 → 0.0.2

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 (422) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/dist/ApiKey.d.ts +65 -0
  4. package/dist/ApiKey.d.ts.map +1 -0
  5. package/dist/ApiKey.js +105 -0
  6. package/dist/ApiKey.js.map +1 -0
  7. package/dist/ApiKeySource.d.ts +166 -0
  8. package/dist/ApiKeySource.d.ts.map +1 -0
  9. package/dist/ApiKeySource.js +234 -0
  10. package/dist/ApiKeySource.js.map +1 -0
  11. package/dist/App.d.ts +19317 -0
  12. package/dist/App.d.ts.map +1 -0
  13. package/dist/App.js +612 -0
  14. package/dist/App.js.map +1 -0
  15. package/dist/Assets.d.ts +44 -0
  16. package/dist/Assets.d.ts.map +1 -0
  17. package/dist/Assets.js +23 -0
  18. package/dist/Assets.js.map +1 -0
  19. package/dist/Auth.d.ts +2 -0
  20. package/dist/Auth.d.ts.map +1 -0
  21. package/dist/Auth.js +2 -0
  22. package/dist/Auth.js.map +1 -0
  23. package/dist/Cli.d.ts +21 -0
  24. package/dist/Cli.d.ts.map +1 -0
  25. package/dist/Cli.js +13 -0
  26. package/dist/Cli.js.map +1 -0
  27. package/dist/Client.d.ts +20 -0
  28. package/dist/Client.d.ts.map +1 -0
  29. package/dist/Client.js +24 -0
  30. package/dist/Client.js.map +1 -0
  31. package/dist/Metrics.d.ts +70 -0
  32. package/dist/Metrics.d.ts.map +1 -0
  33. package/dist/Metrics.js +91 -0
  34. package/dist/Metrics.js.map +1 -0
  35. package/dist/Scope.d.ts +35 -0
  36. package/dist/Scope.d.ts.map +1 -0
  37. package/dist/Scope.js +38 -0
  38. package/dist/Scope.js.map +1 -0
  39. package/dist/Webhooks.d.ts +79 -0
  40. package/dist/Webhooks.d.ts.map +1 -0
  41. package/dist/Webhooks.js +107 -0
  42. package/dist/Webhooks.js.map +1 -0
  43. package/dist/admin/Access.d.ts +41 -0
  44. package/dist/admin/Access.d.ts.map +1 -0
  45. package/dist/admin/Access.js +75 -0
  46. package/dist/admin/Access.js.map +1 -0
  47. package/dist/admin/App.d.ts +1221 -0
  48. package/dist/admin/App.d.ts.map +1 -0
  49. package/dist/admin/App.js +113 -0
  50. package/dist/admin/App.js.map +1 -0
  51. package/dist/admin/apps/api-keys.d.ts +209 -0
  52. package/dist/admin/apps/api-keys.d.ts.map +1 -0
  53. package/dist/admin/apps/api-keys.js +129 -0
  54. package/dist/admin/apps/api-keys.js.map +1 -0
  55. package/dist/admin/apps/scopes.d.ts +46 -0
  56. package/dist/admin/apps/scopes.d.ts.map +1 -0
  57. package/dist/admin/apps/scopes.js +41 -0
  58. package/dist/admin/apps/scopes.js.map +1 -0
  59. package/dist/admin/apps/verified-tokens.d.ts +1206 -0
  60. package/dist/admin/apps/verified-tokens.d.ts.map +1 -0
  61. package/dist/admin/apps/verified-tokens.js +485 -0
  62. package/dist/admin/apps/verified-tokens.js.map +1 -0
  63. package/dist/admin/index.d.ts +3 -0
  64. package/dist/admin/index.d.ts.map +1 -0
  65. package/dist/admin/index.js +3 -0
  66. package/dist/admin/index.js.map +1 -0
  67. package/dist/admin/ui.generated.d.ts +11 -0
  68. package/dist/admin/ui.generated.d.ts.map +1 -0
  69. package/dist/admin/ui.generated.js +43 -0
  70. package/dist/admin/ui.generated.js.map +1 -0
  71. package/dist/apps/activities.d.ts +18725 -0
  72. package/dist/apps/activities.d.ts.map +1 -0
  73. package/dist/apps/activities.js +3138 -0
  74. package/dist/apps/activities.js.map +1 -0
  75. package/dist/apps/addresses.d.ts +3662 -0
  76. package/dist/apps/addresses.d.ts.map +1 -0
  77. package/dist/apps/addresses.js +22 -0
  78. package/dist/apps/addresses.js.map +1 -0
  79. package/dist/apps/balances.d.ts +342 -0
  80. package/dist/apps/balances.d.ts.map +1 -0
  81. package/dist/apps/balances.js +393 -0
  82. package/dist/apps/balances.js.map +1 -0
  83. package/dist/apps/blocks.d.ts +931 -0
  84. package/dist/apps/blocks.d.ts.map +1 -0
  85. package/dist/apps/blocks.js +689 -0
  86. package/dist/apps/blocks.js.map +1 -0
  87. package/dist/apps/coingecko.d.ts +1053 -0
  88. package/dist/apps/coingecko.d.ts.map +1 -0
  89. package/dist/apps/coingecko.js +1015 -0
  90. package/dist/apps/coingecko.js.map +1 -0
  91. package/dist/apps/exchanges.d.ts +3000 -0
  92. package/dist/apps/exchanges.d.ts.map +1 -0
  93. package/dist/apps/exchanges.js +3570 -0
  94. package/dist/apps/exchanges.js.map +1 -0
  95. package/dist/apps/fee-amm.d.ts +640 -0
  96. package/dist/apps/fee-amm.d.ts.map +1 -0
  97. package/dist/apps/fee-amm.js +815 -0
  98. package/dist/apps/fee-amm.js.map +1 -0
  99. package/dist/apps/indexer.d.ts +116 -0
  100. package/dist/apps/indexer.d.ts.map +1 -0
  101. package/dist/apps/indexer.js +270 -0
  102. package/dist/apps/indexer.js.map +1 -0
  103. package/dist/apps/receipts.d.ts +1438 -0
  104. package/dist/apps/receipts.d.ts.map +1 -0
  105. package/dist/apps/receipts.js +874 -0
  106. package/dist/apps/receipts.js.map +1 -0
  107. package/dist/apps/rpc.d.ts +173 -0
  108. package/dist/apps/rpc.d.ts.map +1 -0
  109. package/dist/apps/rpc.js +191 -0
  110. package/dist/apps/rpc.js.map +1 -0
  111. package/dist/apps/tokenlist.d.ts +192 -0
  112. package/dist/apps/tokenlist.d.ts.map +1 -0
  113. package/dist/apps/tokenlist.js +153 -0
  114. package/dist/apps/tokenlist.js.map +1 -0
  115. package/dist/apps/tokens.d.ts +2246 -0
  116. package/dist/apps/tokens.d.ts.map +1 -0
  117. package/dist/apps/tokens.js +1789 -0
  118. package/dist/apps/tokens.js.map +1 -0
  119. package/dist/apps/transactions.d.ts +2327 -0
  120. package/dist/apps/transactions.d.ts.map +1 -0
  121. package/dist/apps/transactions.js +975 -0
  122. package/dist/apps/transactions.js.map +1 -0
  123. package/dist/apps/transfers.d.ts +589 -0
  124. package/dist/apps/transfers.d.ts.map +1 -0
  125. package/dist/apps/transfers.js +769 -0
  126. package/dist/apps/transfers.js.map +1 -0
  127. package/dist/apps/verified-tokens.d.ts +544 -0
  128. package/dist/apps/verified-tokens.d.ts.map +1 -0
  129. package/dist/apps/verified-tokens.js +234 -0
  130. package/dist/apps/verified-tokens.js.map +1 -0
  131. package/dist/apps/webhooks.d.ts +7684 -0
  132. package/dist/apps/webhooks.d.ts.map +1 -0
  133. package/dist/apps/webhooks.js +2112 -0
  134. package/dist/apps/webhooks.js.map +1 -0
  135. package/dist/cloudflare.d.ts +32 -0
  136. package/dist/cloudflare.d.ts.map +1 -0
  137. package/dist/cloudflare.js +45 -0
  138. package/dist/cloudflare.js.map +1 -0
  139. package/dist/index.d.ts +16 -0
  140. package/dist/index.d.ts.map +1 -0
  141. package/dist/index.js +16 -0
  142. package/dist/index.js.map +1 -0
  143. package/dist/internal/Auth.d.ts +298 -0
  144. package/dist/internal/Auth.d.ts.map +1 -0
  145. package/dist/internal/Auth.js +618 -0
  146. package/dist/internal/Auth.js.map +1 -0
  147. package/dist/internal/Cache.d.ts +74 -0
  148. package/dist/internal/Cache.d.ts.map +1 -0
  149. package/dist/internal/Cache.js +215 -0
  150. package/dist/internal/Cache.js.map +1 -0
  151. package/dist/internal/Cursor.d.ts +79 -0
  152. package/dist/internal/Cursor.d.ts.map +1 -0
  153. package/dist/internal/Cursor.js +116 -0
  154. package/dist/internal/Cursor.js.map +1 -0
  155. package/dist/internal/EdgeCache.d.ts +59 -0
  156. package/dist/internal/EdgeCache.d.ts.map +1 -0
  157. package/dist/internal/EdgeCache.js +174 -0
  158. package/dist/internal/EdgeCache.js.map +1 -0
  159. package/dist/internal/Log.d.ts +104 -0
  160. package/dist/internal/Log.d.ts.map +1 -0
  161. package/dist/internal/Log.js +118 -0
  162. package/dist/internal/Log.js.map +1 -0
  163. package/dist/internal/MetricSink.d.ts +65 -0
  164. package/dist/internal/MetricSink.d.ts.map +1 -0
  165. package/dist/internal/MetricSink.js +146 -0
  166. package/dist/internal/MetricSink.js.map +1 -0
  167. package/dist/internal/Mpp.d.ts +71 -0
  168. package/dist/internal/Mpp.d.ts.map +1 -0
  169. package/dist/internal/Mpp.js +105 -0
  170. package/dist/internal/Mpp.js.map +1 -0
  171. package/dist/internal/OpenApi.d.ts +313 -0
  172. package/dist/internal/OpenApi.d.ts.map +1 -0
  173. package/dist/internal/OpenApi.fonts.d.ts +2 -0
  174. package/dist/internal/OpenApi.fonts.d.ts.map +1 -0
  175. package/dist/internal/OpenApi.fonts.js +39 -0
  176. package/dist/internal/OpenApi.fonts.js.map +1 -0
  177. package/dist/internal/OpenApi.js +335 -0
  178. package/dist/internal/OpenApi.js.map +1 -0
  179. package/dist/internal/OpenApi.logo.d.ts +6 -0
  180. package/dist/internal/OpenApi.logo.d.ts.map +1 -0
  181. package/dist/internal/OpenApi.logo.js +19 -0
  182. package/dist/internal/OpenApi.logo.js.map +1 -0
  183. package/dist/internal/Path.d.ts +5 -0
  184. package/dist/internal/Path.d.ts.map +1 -0
  185. package/dist/internal/Path.js +16 -0
  186. package/dist/internal/Path.js.map +1 -0
  187. package/dist/internal/RateLimit.d.ts +60 -0
  188. package/dist/internal/RateLimit.d.ts.map +1 -0
  189. package/dist/internal/RateLimit.js +48 -0
  190. package/dist/internal/RateLimit.js.map +1 -0
  191. package/dist/internal/Response.d.ts +132 -0
  192. package/dist/internal/Response.d.ts.map +1 -0
  193. package/dist/internal/Response.js +72 -0
  194. package/dist/internal/Response.js.map +1 -0
  195. package/dist/internal/Schema.d.ts +257 -0
  196. package/dist/internal/Schema.d.ts.map +1 -0
  197. package/dist/internal/Schema.js +360 -0
  198. package/dist/internal/Schema.js.map +1 -0
  199. package/dist/internal/Store.d.ts +204 -0
  200. package/dist/internal/Store.d.ts.map +1 -0
  201. package/dist/internal/Store.js +291 -0
  202. package/dist/internal/Store.js.map +1 -0
  203. package/dist/internal/Tidx.d.ts +120 -0
  204. package/dist/internal/Tidx.d.ts.map +1 -0
  205. package/dist/internal/Tidx.js +156 -0
  206. package/dist/internal/Tidx.js.map +1 -0
  207. package/dist/internal/Timing.d.ts +22 -0
  208. package/dist/internal/Timing.d.ts.map +1 -0
  209. package/dist/internal/Timing.js +32 -0
  210. package/dist/internal/Timing.js.map +1 -0
  211. package/dist/internal/Ttl.d.ts +25 -0
  212. package/dist/internal/Ttl.d.ts.map +1 -0
  213. package/dist/internal/Ttl.js +49 -0
  214. package/dist/internal/Ttl.js.map +1 -0
  215. package/dist/internal/Value.d.ts +47 -0
  216. package/dist/internal/Value.d.ts.map +1 -0
  217. package/dist/internal/Value.js +122 -0
  218. package/dist/internal/Value.js.map +1 -0
  219. package/dist/internal/VerifiedTokens.d.ts +228 -0
  220. package/dist/internal/VerifiedTokens.d.ts.map +1 -0
  221. package/dist/internal/VerifiedTokens.js +450 -0
  222. package/dist/internal/VerifiedTokens.js.map +1 -0
  223. package/dist/internal/Viem.d.ts +2082 -0
  224. package/dist/internal/Viem.d.ts.map +1 -0
  225. package/dist/internal/Viem.js +63 -0
  226. package/dist/internal/Viem.js.map +1 -0
  227. package/dist/internal/WebhookDestination.d.ts +198 -0
  228. package/dist/internal/WebhookDestination.d.ts.map +1 -0
  229. package/dist/internal/WebhookDestination.js +170 -0
  230. package/dist/internal/WebhookDestination.js.map +1 -0
  231. package/dist/internal/Webhooks.d.ts +433 -0
  232. package/dist/internal/Webhooks.d.ts.map +1 -0
  233. package/dist/internal/Webhooks.js +489 -0
  234. package/dist/internal/Webhooks.js.map +1 -0
  235. package/dist/internal/webhookDestinations/betterStack.d.ts +26 -0
  236. package/dist/internal/webhookDestinations/betterStack.d.ts.map +1 -0
  237. package/dist/internal/webhookDestinations/betterStack.js +76 -0
  238. package/dist/internal/webhookDestinations/betterStack.js.map +1 -0
  239. package/dist/internal/webhookDestinations/slack.d.ts +59 -0
  240. package/dist/internal/webhookDestinations/slack.d.ts.map +1 -0
  241. package/dist/internal/webhookDestinations/slack.js +422 -0
  242. package/dist/internal/webhookDestinations/slack.js.map +1 -0
  243. package/dist/internal/webhookDestinations/url.d.ts +17 -0
  244. package/dist/internal/webhookDestinations/url.d.ts.map +1 -0
  245. package/dist/internal/webhookDestinations/url.js +130 -0
  246. package/dist/internal/webhookDestinations/url.js.map +1 -0
  247. package/dist/openrpc.json +5302 -0
  248. package/package.json +46 -4
  249. package/seeds/31318/icons/0x20c0000000000000000000000000000000000000.svg +1 -0
  250. package/seeds/31318/icons/0x20c0000000000000000000000000000000000001.svg +1 -0
  251. package/seeds/31318/icons/0x20c0000000000000000000000000000000000002.svg +1 -0
  252. package/seeds/31318/icons/0x20c0000000000000000000000000000000000003.svg +1 -0
  253. package/seeds/31318/verified-tokens.json +30 -0
  254. package/seeds/4217/icons/0x20c0000000000000000000000000000000000000.svg +25 -0
  255. package/seeds/4217/icons/0x20c000000000000000000000048c8f36df1c9a4a.svg +1 -0
  256. package/seeds/4217/icons/0x20c0000000000000000000000520792dcccccccc.svg +1 -0
  257. package/seeds/4217/icons/0x20c0000000000000000000000a6da882d075a4c3.svg +4 -0
  258. package/seeds/4217/icons/0x20c000000000000000000000111111111e910f0f.svg +30 -0
  259. package/seeds/4217/icons/0x20c00000000000000000000014f22ca97301eb73.svg +1 -0
  260. package/seeds/4217/icons/0x20c0000000000000000000001621e21f71cf12fb.svg +1 -0
  261. package/seeds/4217/icons/0x20c0000000000000000000002f52d5cc21a3207b.svg +1 -0
  262. package/seeds/4217/icons/0x20c0000000000000000000003158081efd85bfc2.svg +11 -0
  263. package/seeds/4217/icons/0x20c0000000000000000000003554d28269e0f3c2.svg +1 -0
  264. package/seeds/4217/icons/0x20c000000000000000000000383a23bacb546ab9.svg +1 -0
  265. package/seeds/4217/icons/0x20c00000000000000000000042109aef2f8b28e1.png +0 -0
  266. package/seeds/4217/icons/0x20c0000000000000000000005c0bac7cef389a11.svg +1 -0
  267. package/seeds/4217/icons/0x20c0000000000000000000006fd9a167923ba194.png +0 -0
  268. package/seeds/4217/icons/0x20c0000000000000000000007f7ba549dd0251b9.svg +1 -0
  269. package/seeds/4217/icons/0x20c0000000000000000000008191667423f70e67.svg +5 -0
  270. package/seeds/4217/icons/0x20c0000000000000000000008ee4fcff88888888.svg +1 -0
  271. package/seeds/4217/icons/0x20c0000000000000000000009a4a4b17e0dc6651.svg +1 -0
  272. package/seeds/4217/icons/0x20c000000000000000000000ab02d39df30bd17e.svg +1 -0
  273. package/seeds/4217/icons/0x20c000000000000000000000ae247a1130450f09.svg +1 -0
  274. package/seeds/4217/icons/0x20c000000000000000000000aeed2ec36a54d0e5.svg +1 -0
  275. package/seeds/4217/icons/0x20c000000000000000000000b9537d11c60e8b50.svg +1 -0
  276. package/seeds/4217/icons/0x20c000000000000000000000bd95bfb69fbe6ce3.svg +1 -0
  277. package/seeds/4217/icons/0x20c000000000000000000000c412ec89d0c08be5.svg +1 -0
  278. package/seeds/4217/icons/0x20c000000000000000000000f047dd7018e50367.png +0 -0
  279. package/seeds/4217/verified-tokens.json +177 -0
  280. package/seeds/42431/icons/0x20c0000000000000000000000000000000000000.svg +25 -0
  281. package/seeds/42431/icons/0x20c0000000000000000000000000000000000001.svg +1 -0
  282. package/seeds/42431/icons/0x20c0000000000000000000000000000000000002.svg +1 -0
  283. package/seeds/42431/icons/0x20c0000000000000000000000000000000000003.svg +1 -0
  284. package/seeds/42431/icons/0x20c0000000000000000000009e8d7eb59b783726.svg +1 -0
  285. package/seeds/42431/icons/0x20c000000000000000000000d72572838bbee59c.svg +1 -0
  286. package/seeds/42431/verified-tokens.json +44 -0
  287. package/seeds/openrpc/README.md +27 -0
  288. package/seeds/openrpc/execution-apis.json +8989 -0
  289. package/src/ApiKey.test.ts +91 -0
  290. package/src/ApiKey.ts +122 -0
  291. package/src/ApiKeySource.test-d.ts +11 -0
  292. package/src/ApiKeySource.test.ts +295 -0
  293. package/src/ApiKeySource.ts +303 -0
  294. package/src/App.test-d.ts +38 -0
  295. package/src/App.test.ts +65927 -0
  296. package/src/App.ts +855 -0
  297. package/src/Assets.ts +58 -0
  298. package/src/Auth.ts +1 -0
  299. package/src/Cli.test.ts +81 -0
  300. package/src/Cli.ts +38 -0
  301. package/src/Client.test-d.ts +1438 -0
  302. package/src/Client.test.ts +134 -0
  303. package/src/Client.ts +45 -0
  304. package/src/Metrics.ts +154 -0
  305. package/src/Scope.ts +50 -0
  306. package/src/Webhooks.test.ts +49 -0
  307. package/src/Webhooks.ts +172 -0
  308. package/src/admin/Access.test.ts +130 -0
  309. package/src/admin/Access.ts +87 -0
  310. package/src/admin/App.test.ts +225 -0
  311. package/src/admin/App.ts +216 -0
  312. package/src/admin/apps/api-keys.test.ts +156 -0
  313. package/src/admin/apps/api-keys.ts +157 -0
  314. package/src/admin/apps/scopes.test.ts +52 -0
  315. package/src/admin/apps/scopes.ts +47 -0
  316. package/src/admin/apps/verified-tokens.test.ts +415 -0
  317. package/src/admin/apps/verified-tokens.ts +566 -0
  318. package/src/admin/index.ts +2 -0
  319. package/src/admin/ui/plugin.ts +135 -0
  320. package/src/admin/ui/src/components/Checkbox.tsx +22 -0
  321. package/src/admin/ui/src/components/Dialog.tsx +32 -0
  322. package/src/admin/ui/src/components/MobileProfile.tsx +31 -0
  323. package/src/admin/ui/src/components/Page.tsx +53 -0
  324. package/src/admin/ui/src/components/TempoLogo.tsx +37 -0
  325. package/src/admin/ui/src/fonts/Pilat-Demi.woff2 +0 -0
  326. package/src/admin/ui/src/fonts/Pilat-Regular.woff2 +0 -0
  327. package/src/admin/ui/src/lib/api-keys.ts +63 -0
  328. package/src/admin/ui/src/lib/client.ts +15 -0
  329. package/src/admin/ui/src/lib/config.ts +57 -0
  330. package/src/admin/ui/src/lib/query-client.ts +26 -0
  331. package/src/admin/ui/src/lib/scopes.ts +25 -0
  332. package/src/admin/ui/src/lib/verified-tokens.ts +89 -0
  333. package/src/admin/ui/src/lib/wagmi.ts +18 -0
  334. package/src/admin/ui/src/routeTree.gen.ts +104 -0
  335. package/src/admin/ui/src/router.tsx +25 -0
  336. package/src/admin/ui/src/routes/__root.tsx +219 -0
  337. package/src/admin/ui/src/routes/api-keys.tsx +329 -0
  338. package/src/admin/ui/src/routes/index.tsx +7 -0
  339. package/src/admin/ui/src/routes/verified-tokens.tsx +331 -0
  340. package/src/admin/ui/src/styles.css +20 -0
  341. package/src/admin/ui/tsconfig.json +16 -0
  342. package/src/admin/ui/vite.config.ts +29 -0
  343. package/src/admin/ui.generated.ts +60 -0
  344. package/src/apps/activities.test.ts +1020 -0
  345. package/src/apps/activities.ts +3934 -0
  346. package/src/apps/addresses.ts +24 -0
  347. package/src/apps/balances.test.ts +274 -0
  348. package/src/apps/balances.ts +533 -0
  349. package/src/apps/blocks.test.ts +385 -0
  350. package/src/apps/blocks.ts +896 -0
  351. package/src/apps/coingecko.test.ts +218 -0
  352. package/src/apps/coingecko.ts +1383 -0
  353. package/src/apps/exchanges.test.ts +958 -0
  354. package/src/apps/exchanges.ts +4773 -0
  355. package/src/apps/fee-amm.test.ts +321 -0
  356. package/src/apps/fee-amm.ts +1121 -0
  357. package/src/apps/indexer.test.ts +153 -0
  358. package/src/apps/indexer.ts +330 -0
  359. package/src/apps/receipts.test.ts +285 -0
  360. package/src/apps/receipts.ts +1193 -0
  361. package/src/apps/rpc.test.ts +302 -0
  362. package/src/apps/rpc.ts +222 -0
  363. package/src/apps/tokenlist.test.ts +80 -0
  364. package/src/apps/tokenlist.ts +207 -0
  365. package/src/apps/tokens.test.ts +1062 -0
  366. package/src/apps/tokens.ts +2292 -0
  367. package/src/apps/transactions.test.ts +408 -0
  368. package/src/apps/transactions.ts +1363 -0
  369. package/src/apps/transfers.test.ts +371 -0
  370. package/src/apps/transfers.ts +1116 -0
  371. package/src/apps/verified-tokens.test.ts +114 -0
  372. package/src/apps/verified-tokens.ts +295 -0
  373. package/src/apps/webhooks.test.ts +1937 -0
  374. package/src/apps/webhooks.ts +2926 -0
  375. package/src/cloudflare.ts +55 -0
  376. package/src/index.ts +15 -0
  377. package/src/internal/Auth.test.ts +980 -0
  378. package/src/internal/Auth.ts +1012 -0
  379. package/src/internal/Cache.test.ts +240 -0
  380. package/src/internal/Cache.ts +262 -0
  381. package/src/internal/Cursor.test.ts +100 -0
  382. package/src/internal/Cursor.ts +149 -0
  383. package/src/internal/EdgeCache.test.ts +234 -0
  384. package/src/internal/EdgeCache.ts +224 -0
  385. package/src/internal/Errors.ts +14 -0
  386. package/src/internal/Log.test.ts +244 -0
  387. package/src/internal/Log.ts +216 -0
  388. package/src/internal/MetricSink.ts +220 -0
  389. package/src/internal/Mpp.test.ts +64 -0
  390. package/src/internal/Mpp.ts +141 -0
  391. package/src/internal/OpenApi.fonts.ts +38 -0
  392. package/src/internal/OpenApi.logo.ts +18 -0
  393. package/src/internal/OpenApi.ts +488 -0
  394. package/src/internal/Path.test.ts +14 -0
  395. package/src/internal/Path.ts +15 -0
  396. package/src/internal/RateLimit.test.ts +93 -0
  397. package/src/internal/RateLimit.ts +93 -0
  398. package/src/internal/Response.ts +131 -0
  399. package/src/internal/Schema.test.ts +34 -0
  400. package/src/internal/Schema.ts +523 -0
  401. package/src/internal/Store.test.ts +545 -0
  402. package/src/internal/Store.ts +526 -0
  403. package/src/internal/Tidx.local.test.ts +33 -0
  404. package/src/internal/Tidx.test.ts +294 -0
  405. package/src/internal/Tidx.ts +238 -0
  406. package/src/internal/Timing.test.ts +22 -0
  407. package/src/internal/Timing.ts +62 -0
  408. package/src/internal/Ttl.test.ts +18 -0
  409. package/src/internal/Ttl.ts +59 -0
  410. package/src/internal/Value.ts +114 -0
  411. package/src/internal/VerifiedTokens.test.ts +333 -0
  412. package/src/internal/VerifiedTokens.ts +645 -0
  413. package/src/internal/Viem.test.ts +115 -0
  414. package/src/internal/Viem.ts +165 -0
  415. package/src/internal/WebhookDestination.test.ts +648 -0
  416. package/src/internal/WebhookDestination.ts +331 -0
  417. package/src/internal/Webhooks.test.ts +668 -0
  418. package/src/internal/Webhooks.ts +940 -0
  419. package/src/internal/webhookDestinations/betterStack.ts +91 -0
  420. package/src/internal/webhookDestinations/slack.ts +496 -0
  421. package/src/internal/webhookDestinations/url.ts +128 -0
  422. package/src/openrpc.json +5302 -0
@@ -0,0 +1,3000 @@
1
+ import { type Context } from 'hono';
2
+ import * as z from 'zod/mini';
3
+ import type * as App from '../App.js';
4
+ import * as Response from '../internal/Response.js';
5
+ import * as Schema from '../internal/Schema.js';
6
+ /** Zod schemas owned by the exchange handlers. */
7
+ export declare namespace schema {
8
+ /**
9
+ * A token in a trading pair: its contract address, plus the trimmed token
10
+ * reference spread in when requested via `include=tokens`. Reference fields
11
+ * are absent on the base (no-`include`) response and best-effort when
12
+ * requested (a token whose metadata is unavailable keeps just `address`).
13
+ */
14
+ const PairToken: z.ZodMiniObject<{
15
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
16
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
17
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
18
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
19
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
20
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
21
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
22
+ }, z.core.$strip>;
23
+ /** Schemas for the getPairs operation. */
24
+ namespace getPairs {
25
+ /**
26
+ * Optional resources for the pair list: the per-row `tokens` embed plus the
27
+ * response-wide capped `totalCount`. The detail route keeps its own
28
+ * `tokens`-only {@link getPair.Include}.
29
+ */
30
+ const Include: z.ZodMiniEnum<{
31
+ tokens: "tokens";
32
+ totalCount: "totalCount";
33
+ }>;
34
+ /**
35
+ * Parses a comma-separated `include` query value into a list of optional
36
+ * resources to embed. Extra lookups (e.g. token metadata) only run when
37
+ * explicitly requested, keeping the base pair page fast.
38
+ */
39
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
40
+ tokens: "tokens";
41
+ totalCount: "totalCount";
42
+ }>>>;
43
+ /** Query parameters for trading pair list requests. */
44
+ const Query: z.ZodMiniObject<{
45
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
46
+ mainnet: "mainnet";
47
+ testnet: "testnet";
48
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
49
+ cursor: z.ZodMiniOptional<z.ZodMiniString<string>>;
50
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
51
+ tokens: "tokens";
52
+ totalCount: "totalCount";
53
+ }>>>;
54
+ limit: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
55
+ order: z.ZodMiniDefault<z.ZodMiniEnum<{
56
+ asc: "asc";
57
+ desc: "desc";
58
+ }>>;
59
+ page: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
60
+ sort: z.ZodMiniDefault<z.ZodMiniEnum<{
61
+ created: "created";
62
+ liquidity: "liquidity";
63
+ }>>;
64
+ }, z.core.$strict>;
65
+ /** A single trading pair on the stablecoin DEX. */
66
+ const Pair: z.ZodMiniObject<{
67
+ base: z.ZodMiniObject<{
68
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
69
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
70
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
71
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
72
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
73
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
74
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
75
+ }, z.core.$strip>;
76
+ blockNumber: z.ZodMiniNumber<number>;
77
+ id: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
78
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
79
+ liquidity: z.ZodMiniOptional<z.ZodMiniString<string>>;
80
+ quote: z.ZodMiniObject<{
81
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
82
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
83
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
84
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
85
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
86
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
87
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
88
+ }, z.core.$strip>;
89
+ timestamp: z.ZodMiniISODateTime;
90
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
91
+ }, z.core.$strip>;
92
+ /** Page of trading pairs on the stablecoin DEX, ordered by creation. */
93
+ const Response: z.ZodMiniObject<{
94
+ data: z.ZodMiniArray<z.ZodMiniObject<{
95
+ base: z.ZodMiniObject<{
96
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
97
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
98
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
99
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
100
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
101
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
102
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
103
+ }, z.core.$strip>;
104
+ blockNumber: z.ZodMiniNumber<number>;
105
+ id: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
106
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
107
+ liquidity: z.ZodMiniOptional<z.ZodMiniString<string>>;
108
+ quote: z.ZodMiniObject<{
109
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
110
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
111
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
112
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
113
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
114
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
115
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
116
+ }, z.core.$strip>;
117
+ timestamp: z.ZodMiniISODateTime;
118
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
119
+ }, z.core.$strip>>;
120
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
121
+ totalCountCapped: z.ZodMiniBoolean<boolean>;
122
+ totalCount: z.ZodMiniNumber<number>;
123
+ }, z.core.$strip>>;
124
+ nextCursor: z.ZodMiniNullable<z.ZodMiniString<string>>;
125
+ }, z.core.$strip>;
126
+ }
127
+ /** Schemas for the getPair operation (single trading pair detail). */
128
+ namespace getPair {
129
+ /**
130
+ * Path parameter for pair detail requests. On-chain, a pair's quote is
131
+ * intrinsic to its base token (the precompile resolves it from the TIP-20's
132
+ * `quote_token()`), so the base address alone identifies the pair.
133
+ */
134
+ const Params: z.ZodMiniObject<{
135
+ base: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
136
+ }, z.core.$strip>;
137
+ /** Optional related resource that callers opt into via `include`. */
138
+ const Include: z.ZodMiniEnum<{
139
+ tokens: "tokens";
140
+ }>;
141
+ /**
142
+ * Parses a comma-separated `include` query value into a list of optional
143
+ * resources to embed.
144
+ */
145
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
146
+ tokens: "tokens";
147
+ }>>>;
148
+ /** Query parameters for pair detail requests. */
149
+ const Query: z.ZodMiniObject<{
150
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
151
+ mainnet: "mainnet";
152
+ testnet: "testnet";
153
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
154
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
155
+ tokens: "tokens";
156
+ }>>>;
157
+ }, z.core.$strict>;
158
+ /** A single trading pair, identical in shape to `GET /exchange/pairs` rows. */
159
+ const Response: z.ZodMiniObject<{
160
+ base: z.ZodMiniObject<{
161
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
162
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
163
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
164
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
165
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
166
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
167
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
168
+ }, z.core.$strip>;
169
+ blockNumber: z.ZodMiniNumber<number>;
170
+ id: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
171
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
172
+ liquidity: z.ZodMiniOptional<z.ZodMiniString<string>>;
173
+ quote: z.ZodMiniObject<{
174
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
175
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
176
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
177
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
178
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
179
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
180
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
181
+ }, z.core.$strip>;
182
+ timestamp: z.ZodMiniISODateTime;
183
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
184
+ }, z.core.$strip>;
185
+ }
186
+ /** Schemas for the getSwaps operation (the swap feed, optionally pair-scoped). */
187
+ namespace getSwaps {
188
+ /**
189
+ * Optional related resource that callers opt into via `include`. Currently
190
+ * only `tokens` (embeds metadata for both pair tokens on each row's
191
+ * `sourceToken`/`destinationToken`).
192
+ */
193
+ const Include: z.ZodMiniEnum<{
194
+ tokens: "tokens";
195
+ }>;
196
+ /**
197
+ * Parses a comma-separated `include` query value into a list of optional
198
+ * resources to embed. Extra lookups (e.g. token metadata) only run when
199
+ * explicitly requested, keeping the base swap feed fast.
200
+ */
201
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
202
+ tokens: "tokens";
203
+ }>>>;
204
+ /** Query parameters for swap feed requests. */
205
+ const Query: z.ZodMiniObject<{
206
+ 'blockNumber.from': z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
207
+ 'blockNumber.to': z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
208
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
209
+ mainnet: "mainnet";
210
+ testnet: "testnet";
211
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
212
+ cursor: z.ZodMiniOptional<z.ZodMiniString<string>>;
213
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
214
+ tokens: "tokens";
215
+ }>>>;
216
+ limit: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
217
+ maker: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
218
+ order: z.ZodMiniDefault<z.ZodMiniEnum<{
219
+ asc: "asc";
220
+ desc: "desc";
221
+ }>>;
222
+ participant: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
223
+ taker: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
224
+ 'timestamp.from': z.ZodMiniOptional<z.ZodMiniISODateTime>;
225
+ 'timestamp.to': z.ZodMiniOptional<z.ZodMiniISODateTime>;
226
+ transactionHash: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
227
+ }, z.core.$strict>;
228
+ /**
229
+ * One side of a swap: a `PairToken` (address plus optional metadata when
230
+ * requested via `include=tokens`) annotated with the `amount` that moved
231
+ * on this side, as a decimal integer string in base units.
232
+ */
233
+ const SwapSide: z.ZodMiniObject<{
234
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
235
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
236
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
237
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
238
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
239
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
240
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
241
+ amount: z.ZodMiniString<string>;
242
+ }, z.core.$strip>;
243
+ /** A single maker-order fill within a swap, framed from the taker's perspective. */
244
+ const Fill: z.ZodMiniObject<{
245
+ destinationToken: z.ZodMiniObject<{
246
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
247
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
248
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
249
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
250
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
251
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
252
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
253
+ amount: z.ZodMiniString<string>;
254
+ }, z.core.$strip>;
255
+ logIndex: z.ZodMiniNumber<number>;
256
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
257
+ orderId: z.ZodMiniString<string>;
258
+ partialFill: z.ZodMiniBoolean<boolean>;
259
+ price: z.ZodMiniString<string>;
260
+ sourceToken: z.ZodMiniObject<{
261
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
262
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
263
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
264
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
265
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
266
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
267
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
268
+ amount: z.ZodMiniString<string>;
269
+ }, z.core.$strip>;
270
+ }, z.core.$strip>;
271
+ /**
272
+ * A single logical taker swap on the stablecoin DEX: every maker-order
273
+ * fill one taker's swap produced in one transaction, assembled into a
274
+ * source → destination row. Multi-hop swaps (routed through an
275
+ * intermediate token, e.g. pathUSD) are one row; the intermediate hops
276
+ * are visible via `route` and `fills`.
277
+ */
278
+ const Swap: z.ZodMiniObject<{
279
+ blockNumber: z.ZodMiniNumber<number>;
280
+ destinationToken: z.ZodMiniObject<{
281
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
282
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
283
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
284
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
285
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
286
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
287
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
288
+ amount: z.ZodMiniString<string>;
289
+ }, z.core.$strip>;
290
+ filledAt: z.ZodMiniISODateTime;
291
+ fills: z.ZodMiniArray<z.ZodMiniObject<{
292
+ destinationToken: z.ZodMiniObject<{
293
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
294
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
295
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
296
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
297
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
298
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
299
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
300
+ amount: z.ZodMiniString<string>;
301
+ }, z.core.$strip>;
302
+ logIndex: z.ZodMiniNumber<number>;
303
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
304
+ orderId: z.ZodMiniString<string>;
305
+ partialFill: z.ZodMiniBoolean<boolean>;
306
+ price: z.ZodMiniString<string>;
307
+ sourceToken: z.ZodMiniObject<{
308
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
309
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
310
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
311
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
312
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
313
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
314
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
315
+ amount: z.ZodMiniString<string>;
316
+ }, z.core.$strip>;
317
+ }, z.core.$strip>>;
318
+ id: z.ZodMiniString<string>;
319
+ logIndex: z.ZodMiniNumber<number>;
320
+ mode: z.ZodMiniNullable<z.ZodMiniEnum<{
321
+ exactDestination: "exactDestination";
322
+ exactSource: "exactSource";
323
+ }>>;
324
+ rate: z.ZodMiniString<string>;
325
+ route: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
326
+ sourceToken: z.ZodMiniObject<{
327
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
328
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
329
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
330
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
331
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
332
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
333
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
334
+ amount: z.ZodMiniString<string>;
335
+ }, z.core.$strip>;
336
+ taker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
337
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
338
+ }, z.core.$strip>;
339
+ /**
340
+ * Page of swaps. A row is one logical taker swap — the fills of one
341
+ * `(transaction, taker)` group chained source → destination — so the
342
+ * unscoped and token-filtered feeds share one shape. `limit` caps the
343
+ * rows per page; a transaction batching several unrelated swaps by one
344
+ * taker may have its rows split across consecutive pages.
345
+ */
346
+ const Response: z.ZodMiniObject<{
347
+ data: z.ZodMiniArray<z.ZodMiniObject<{
348
+ blockNumber: z.ZodMiniNumber<number>;
349
+ destinationToken: z.ZodMiniObject<{
350
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
351
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
352
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
353
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
354
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
355
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
356
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
357
+ amount: z.ZodMiniString<string>;
358
+ }, z.core.$strip>;
359
+ filledAt: z.ZodMiniISODateTime;
360
+ fills: z.ZodMiniArray<z.ZodMiniObject<{
361
+ destinationToken: z.ZodMiniObject<{
362
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
363
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
364
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
365
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
366
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
367
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
368
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
369
+ amount: z.ZodMiniString<string>;
370
+ }, z.core.$strip>;
371
+ logIndex: z.ZodMiniNumber<number>;
372
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
373
+ orderId: z.ZodMiniString<string>;
374
+ partialFill: z.ZodMiniBoolean<boolean>;
375
+ price: z.ZodMiniString<string>;
376
+ sourceToken: z.ZodMiniObject<{
377
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
378
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
379
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
380
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
381
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
382
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
383
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
384
+ amount: z.ZodMiniString<string>;
385
+ }, z.core.$strip>;
386
+ }, z.core.$strip>>;
387
+ id: z.ZodMiniString<string>;
388
+ logIndex: z.ZodMiniNumber<number>;
389
+ mode: z.ZodMiniNullable<z.ZodMiniEnum<{
390
+ exactDestination: "exactDestination";
391
+ exactSource: "exactSource";
392
+ }>>;
393
+ rate: z.ZodMiniString<string>;
394
+ route: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
395
+ sourceToken: z.ZodMiniObject<{
396
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
397
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
398
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
399
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
400
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
401
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
402
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
403
+ amount: z.ZodMiniString<string>;
404
+ }, z.core.$strip>;
405
+ taker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
406
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
407
+ }, z.core.$strip>>;
408
+ nextCursor: z.ZodMiniNullable<z.ZodMiniString<string>>;
409
+ }, z.core.$strip>;
410
+ }
411
+ /** Schemas for the getPairOhlc operation (candlestick aggregations). */
412
+ namespace getPairOhlc {
413
+ /**
414
+ * Path parameter mirrors `getPair.Params`: the base address alone
415
+ * identifies the pair (its quote is intrinsic to the base token on-chain).
416
+ */
417
+ const Params: z.ZodMiniObject<{
418
+ base: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
419
+ }, z.core.$strip>;
420
+ /** Bucket size for the candlestick aggregation. */
421
+ const Interval: z.ZodMiniEnum<{
422
+ "15m": "15m";
423
+ "1d": "1d";
424
+ "1h": "1h";
425
+ "1m": "1m";
426
+ "4h": "4h";
427
+ "5m": "5m";
428
+ }>;
429
+ /** Rolling lookback window for the candlestick aggregation. */
430
+ const Window: z.ZodMiniEnum<{
431
+ "1h": "1h";
432
+ "24h": "24h";
433
+ "30d": "30d";
434
+ "7d": "7d";
435
+ }>;
436
+ /**
437
+ * Optional related resource that callers opt into via `include`. Currently
438
+ * only `tokens` (embeds metadata onto `base`/`quote` instead of returning
439
+ * just the addresses).
440
+ */
441
+ const Include: z.ZodMiniEnum<{
442
+ tokens: "tokens";
443
+ }>;
444
+ /**
445
+ * Parses a comma-separated `include` query value into a list of optional
446
+ * resources to embed.
447
+ */
448
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
449
+ tokens: "tokens";
450
+ }>>>;
451
+ /** Query parameters for pair OHLC requests. */
452
+ const Query: z.ZodMiniObject<{
453
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
454
+ mainnet: "mainnet";
455
+ testnet: "testnet";
456
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
457
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
458
+ tokens: "tokens";
459
+ }>>>;
460
+ interval: z.ZodMiniDefault<z.ZodMiniEnum<{
461
+ "15m": "15m";
462
+ "1d": "1d";
463
+ "1h": "1h";
464
+ "1m": "1m";
465
+ "4h": "4h";
466
+ "5m": "5m";
467
+ }>>;
468
+ window: z.ZodMiniDefault<z.ZodMiniEnum<{
469
+ "1h": "1h";
470
+ "24h": "24h";
471
+ "30d": "30d";
472
+ "7d": "7d";
473
+ }>>;
474
+ }, z.core.$strict>;
475
+ /**
476
+ * A single candlestick bucket. Open/close are picked from the earliest
477
+ * and latest fill in the bucket (ordered by `(block_num, log_idx)`); high
478
+ * and low are the extrema across all fills in the bucket. Volumes are
479
+ * the sum of per-fill base- and quote-side amounts in base units.
480
+ */
481
+ const Bucket: z.ZodMiniObject<{
482
+ close: z.ZodMiniString<string>;
483
+ fillCount: z.ZodMiniNumber<number>;
484
+ high: z.ZodMiniString<string>;
485
+ id: z.ZodMiniString<string>;
486
+ low: z.ZodMiniString<string>;
487
+ open: z.ZodMiniString<string>;
488
+ timestamp: z.ZodMiniISODateTime;
489
+ volume: z.ZodMiniObject<{
490
+ base: z.ZodMiniString<string>;
491
+ quote: z.ZodMiniString<string>;
492
+ }, z.core.$strip>;
493
+ }, z.core.$strip>;
494
+ /** Page of candlestick buckets for a single trading pair. */
495
+ const Response: z.ZodMiniObject<{
496
+ base: z.ZodMiniObject<{
497
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
498
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
499
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
500
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
501
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
502
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
503
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
504
+ }, z.core.$strip>;
505
+ data: z.ZodMiniArray<z.ZodMiniObject<{
506
+ close: z.ZodMiniString<string>;
507
+ fillCount: z.ZodMiniNumber<number>;
508
+ high: z.ZodMiniString<string>;
509
+ id: z.ZodMiniString<string>;
510
+ low: z.ZodMiniString<string>;
511
+ open: z.ZodMiniString<string>;
512
+ timestamp: z.ZodMiniISODateTime;
513
+ volume: z.ZodMiniObject<{
514
+ base: z.ZodMiniString<string>;
515
+ quote: z.ZodMiniString<string>;
516
+ }, z.core.$strip>;
517
+ }, z.core.$strip>>;
518
+ interval: z.ZodMiniEnum<{
519
+ "15m": "15m";
520
+ "1d": "1d";
521
+ "1h": "1h";
522
+ "1m": "1m";
523
+ "4h": "4h";
524
+ "5m": "5m";
525
+ }>;
526
+ quote: z.ZodMiniObject<{
527
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
528
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
529
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
530
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
531
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
532
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
533
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
534
+ }, z.core.$strip>;
535
+ truncated: z.ZodMiniBoolean<boolean>;
536
+ window: z.ZodMiniEnum<{
537
+ "1h": "1h";
538
+ "24h": "24h";
539
+ "30d": "30d";
540
+ "7d": "7d";
541
+ }>;
542
+ }, z.core.$strip>;
543
+ }
544
+ /** Schemas shared by the order detail and order fills handlers. */
545
+ namespace order {
546
+ /** Path parameters for any single-order route (`/orders/:orderId`). */
547
+ const Params: z.ZodMiniObject<{
548
+ orderId: z.ZodMiniString<string>;
549
+ }, z.core.$strip>;
550
+ /** The pair the order is placed against. */
551
+ const Pair: z.ZodMiniObject<{
552
+ base: z.ZodMiniObject<{
553
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
554
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
555
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
556
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
557
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
558
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
559
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
560
+ }, z.core.$strip>;
561
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
562
+ quote: z.ZodMiniObject<{
563
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
564
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
565
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
566
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
567
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
568
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
569
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
570
+ }, z.core.$strip>;
571
+ }, z.core.$strip>;
572
+ }
573
+ /** Schemas for the getOrder operation. */
574
+ namespace getOrder {
575
+ /** Path parameters for single-order requests. */
576
+ const Params: z.ZodMiniObject<{
577
+ orderId: z.ZodMiniString<string>;
578
+ }, z.core.$strip>;
579
+ /**
580
+ * Optional related resource that callers opt into via `include`. Currently
581
+ * only `tokens` (embeds metadata for both pair tokens on `pair.base` and
582
+ * `pair.quote`).
583
+ */
584
+ const Include: z.ZodMiniEnum<{
585
+ tokens: "tokens";
586
+ }>;
587
+ /**
588
+ * Parses a comma-separated `include` query value into a list of optional
589
+ * resources to embed. Extra lookups (e.g. pair-token metadata) only run
590
+ * when explicitly requested, keeping the base order response fast.
591
+ */
592
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
593
+ tokens: "tokens";
594
+ }>>>;
595
+ /** Query parameters for single-order requests. */
596
+ const Query: z.ZodMiniObject<{
597
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
598
+ mainnet: "mainnet";
599
+ testnet: "testnet";
600
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
601
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
602
+ tokens: "tokens";
603
+ }>>>;
604
+ }, z.core.$strict>;
605
+ /**
606
+ * A single DEX order. Placement parameters and current state are sourced
607
+ * directly from the on-chain `dex.getOrder` view, so `remaining` reflects
608
+ * live state (not indexer lag) and the response is a single fast RPC.
609
+ *
610
+ * Fills are paginated separately under
611
+ * `GET /exchange/orders/{orderId}/fills`; the per-order fills feed grows
612
+ * over time and would otherwise force this resource to revalidate on
613
+ * every new fill.
614
+ */
615
+ const Response: z.ZodMiniObject<{
616
+ amount: z.ZodMiniString<string>;
617
+ flipTick: z.ZodMiniNumber<number>;
618
+ id: z.ZodMiniString<string>;
619
+ isBid: z.ZodMiniBoolean<boolean>;
620
+ isFlipOrder: z.ZodMiniBoolean<boolean>;
621
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
622
+ mode: z.ZodMiniEnum<{
623
+ exactDestination: "exactDestination";
624
+ exactSource: "exactSource";
625
+ }>;
626
+ orderId: z.ZodMiniString<string>;
627
+ pair: z.ZodMiniObject<{
628
+ base: z.ZodMiniObject<{
629
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
630
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
631
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
632
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
633
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
634
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
635
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
636
+ }, z.core.$strip>;
637
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
638
+ quote: z.ZodMiniObject<{
639
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
640
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
641
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
642
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
643
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
644
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
645
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
646
+ }, z.core.$strip>;
647
+ }, z.core.$strip>;
648
+ price: z.ZodMiniString<string>;
649
+ rate: z.ZodMiniString<string>;
650
+ remaining: z.ZodMiniString<string>;
651
+ tick: z.ZodMiniNumber<number>;
652
+ }, z.core.$strip>;
653
+ }
654
+ /** Schemas for the getOrders operation (the resting-order feed, optionally pair-scoped). */
655
+ namespace getOrders {
656
+ /**
657
+ * Optional resources for the order feed: the per-row `tokens` embed plus
658
+ * the response-wide capped `totalCount` (the number of matching resting
659
+ * orders, a lower bound when `truncated`).
660
+ */
661
+ const Include: z.ZodMiniEnum<{
662
+ tokens: "tokens";
663
+ totalCount: "totalCount";
664
+ }>;
665
+ /**
666
+ * Parses a comma-separated `include` query value into a list of optional
667
+ * resources to embed.
668
+ */
669
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
670
+ tokens: "tokens";
671
+ totalCount: "totalCount";
672
+ }>>>;
673
+ /** Query parameters for resting-order feed requests. */
674
+ const Query: z.ZodMiniObject<{
675
+ base: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
676
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
677
+ mainnet: "mainnet";
678
+ testnet: "testnet";
679
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
680
+ cursor: z.ZodMiniOptional<z.ZodMiniString<string>>;
681
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
682
+ tokens: "tokens";
683
+ totalCount: "totalCount";
684
+ }>>>;
685
+ limit: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
686
+ maker: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
687
+ order: z.ZodMiniDefault<z.ZodMiniEnum<{
688
+ asc: "asc";
689
+ desc: "desc";
690
+ }>>;
691
+ page: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
692
+ side: z.ZodMiniOptional<z.ZodMiniEnum<{
693
+ ask: "ask";
694
+ bid: "bid";
695
+ }>>;
696
+ sort: z.ZodMiniDefault<z.ZodMiniEnum<{
697
+ tick: "tick";
698
+ time: "time";
699
+ }>>;
700
+ }, z.core.$strict>;
701
+ /**
702
+ * A single resting maker order, sans its pair (rows are shaped here and
703
+ * then annotated with their pair). `amount` is the originally-placed base
704
+ * amount and `remaining` is what's still on the book (`amount` minus the
705
+ * sum of `OrderFilled.amountFilled` over all fills for this order).
706
+ * Orders for which `remaining <= 0` or that have an `OrderCancelled`
707
+ * event are excluded from the response.
708
+ */
709
+ const RestingOrder: z.ZodMiniObject<{
710
+ amount: z.ZodMiniString<string>;
711
+ blockNumber: z.ZodMiniNumber<number>;
712
+ id: z.ZodMiniString<string>;
713
+ logIndex: z.ZodMiniNumber<number>;
714
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
715
+ orderId: z.ZodMiniString<string>;
716
+ placedAt: z.ZodMiniISODateTime;
717
+ price: z.ZodMiniString<string>;
718
+ rate: z.ZodMiniString<string>;
719
+ remaining: z.ZodMiniString<string>;
720
+ side: z.ZodMiniEnum<{
721
+ ask: "ask";
722
+ bid: "bid";
723
+ }>;
724
+ tick: z.ZodMiniNumber<number>;
725
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
726
+ }, z.core.$strip>;
727
+ /** A resting maker order annotated with the trading pair it belongs to. */
728
+ const Order: z.ZodMiniObject<{
729
+ amount: z.ZodMiniString<string>;
730
+ blockNumber: z.ZodMiniNumber<number>;
731
+ id: z.ZodMiniString<string>;
732
+ logIndex: z.ZodMiniNumber<number>;
733
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
734
+ orderId: z.ZodMiniString<string>;
735
+ placedAt: z.ZodMiniISODateTime;
736
+ price: z.ZodMiniString<string>;
737
+ rate: z.ZodMiniString<string>;
738
+ remaining: z.ZodMiniString<string>;
739
+ side: z.ZodMiniEnum<{
740
+ ask: "ask";
741
+ bid: "bid";
742
+ }>;
743
+ tick: z.ZodMiniNumber<number>;
744
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
745
+ pair: z.ZodMiniObject<{
746
+ base: z.ZodMiniObject<{
747
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
748
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
749
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
750
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
751
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
752
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
753
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
754
+ }, z.core.$strip>;
755
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
756
+ quote: z.ZodMiniObject<{
757
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
758
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
759
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
760
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
761
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
762
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
763
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
764
+ }, z.core.$strip>;
765
+ }, z.core.$strip>;
766
+ }, z.core.$strip>;
767
+ /** Page of resting maker orders, each annotated with its trading pair. */
768
+ const Response: z.ZodMiniObject<{
769
+ data: z.ZodMiniArray<z.ZodMiniObject<{
770
+ amount: z.ZodMiniString<string>;
771
+ blockNumber: z.ZodMiniNumber<number>;
772
+ id: z.ZodMiniString<string>;
773
+ logIndex: z.ZodMiniNumber<number>;
774
+ maker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
775
+ orderId: z.ZodMiniString<string>;
776
+ placedAt: z.ZodMiniISODateTime;
777
+ price: z.ZodMiniString<string>;
778
+ rate: z.ZodMiniString<string>;
779
+ remaining: z.ZodMiniString<string>;
780
+ side: z.ZodMiniEnum<{
781
+ ask: "ask";
782
+ bid: "bid";
783
+ }>;
784
+ tick: z.ZodMiniNumber<number>;
785
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
786
+ pair: z.ZodMiniObject<{
787
+ base: z.ZodMiniObject<{
788
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
789
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
790
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
791
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
792
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
793
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
794
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
795
+ }, z.core.$strip>;
796
+ key: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
797
+ quote: z.ZodMiniObject<{
798
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
799
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
800
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
801
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
802
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
803
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
804
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
805
+ }, z.core.$strip>;
806
+ }, z.core.$strip>;
807
+ }, z.core.$strip>>;
808
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
809
+ totalCountCapped: z.ZodMiniBoolean<boolean>;
810
+ totalCount: z.ZodMiniNumber<number>;
811
+ }, z.core.$strip>>;
812
+ nextCursor: z.ZodMiniNullable<z.ZodMiniString<string>>;
813
+ truncated: z.ZodMiniBoolean<boolean>;
814
+ }, z.core.$strip>;
815
+ }
816
+ /** Schemas for the getOrderFills operation. */
817
+ namespace getOrderFills {
818
+ /** Path parameters: inherits the canonical `/orders/:orderId` shape. */
819
+ const Params: z.ZodMiniObject<{
820
+ orderId: z.ZodMiniString<string>;
821
+ }, z.core.$strip>;
822
+ /** Query parameters for paginated order-fill requests. */
823
+ const Query: z.ZodMiniObject<{
824
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
825
+ mainnet: "mainnet";
826
+ testnet: "testnet";
827
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
828
+ cursor: z.ZodMiniOptional<z.ZodMiniString<string>>;
829
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
830
+ totalCount: "totalCount";
831
+ }>>>;
832
+ limit: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
833
+ order: z.ZodMiniDefault<z.ZodMiniEnum<{
834
+ asc: "asc";
835
+ desc: "desc";
836
+ }>>;
837
+ page: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
838
+ }, z.core.$strict>;
839
+ /**
840
+ * A single fill against the order. The order's pair, maker, side, and
841
+ * rate are constant across all fills, so they live on the `Order`
842
+ * resource rather than being repeated per row.
843
+ */
844
+ const Fill: z.ZodMiniObject<{
845
+ amountFilled: z.ZodMiniString<string>;
846
+ blockNumber: z.ZodMiniNumber<number>;
847
+ filledAt: z.ZodMiniISODateTime;
848
+ id: z.ZodMiniString<string>;
849
+ logIndex: z.ZodMiniNumber<number>;
850
+ orderId: z.ZodMiniString<string>;
851
+ partialFill: z.ZodMiniBoolean<boolean>;
852
+ taker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
853
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
854
+ }, z.core.$strip>;
855
+ /** Paginated page of fills for one order. */
856
+ const Response: z.ZodMiniObject<{
857
+ data: z.ZodMiniArray<z.ZodMiniObject<{
858
+ amountFilled: z.ZodMiniString<string>;
859
+ blockNumber: z.ZodMiniNumber<number>;
860
+ filledAt: z.ZodMiniISODateTime;
861
+ id: z.ZodMiniString<string>;
862
+ logIndex: z.ZodMiniNumber<number>;
863
+ orderId: z.ZodMiniString<string>;
864
+ partialFill: z.ZodMiniBoolean<boolean>;
865
+ taker: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
866
+ transactionHash: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
867
+ }, z.core.$strip>>;
868
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
869
+ totalCountCapped: z.ZodMiniBoolean<boolean>;
870
+ totalCount: z.ZodMiniNumber<number>;
871
+ }, z.core.$strip>>;
872
+ nextCursor: z.ZodMiniNullable<z.ZodMiniString<string>>;
873
+ }, z.core.$strip>;
874
+ }
875
+ /** Schemas for the getPairDepth operation (orderbook depth aggregation). */
876
+ namespace getPairDepth {
877
+ /**
878
+ * Path parameter mirrors `getPair.Params`: the base address alone
879
+ * identifies the pair (its quote is intrinsic to the base token on-chain).
880
+ */
881
+ const Params: z.ZodMiniObject<{
882
+ base: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
883
+ }, z.core.$strip>;
884
+ /**
885
+ * Optional related resource that callers opt into via `include`. Currently
886
+ * only `tokens` (embeds metadata onto `base`/`quote` instead of returning
887
+ * just the addresses).
888
+ */
889
+ const Include: z.ZodMiniEnum<{
890
+ tokens: "tokens";
891
+ }>;
892
+ /**
893
+ * Parses a comma-separated `include` query value into a list of optional
894
+ * resources to embed.
895
+ */
896
+ const includeQuery: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
897
+ tokens: "tokens";
898
+ }>>>;
899
+ /** Query parameters for pair depth requests. */
900
+ const Query: z.ZodMiniObject<{
901
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
902
+ mainnet: "mainnet";
903
+ testnet: "testnet";
904
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
905
+ include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
906
+ tokens: "tokens";
907
+ }>>>;
908
+ levels: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
909
+ }, z.core.$strict>;
910
+ /**
911
+ * A single price-level entry in the orderbook depth. `size` is the raw
912
+ * `totalLiquidity` reported by the DEX precompile for the level (resting
913
+ * base-token amount); `cumulativeSize` is the running sum across the same
914
+ * side, starting from the best (peg-adjacent) populated tick and walking
915
+ * outward.
916
+ */
917
+ const Level: z.ZodMiniObject<{
918
+ cumulativeSize: z.ZodMiniString<string>;
919
+ id: z.ZodMiniString<string>;
920
+ price: z.ZodMiniString<string>;
921
+ size: z.ZodMiniString<string>;
922
+ tick: z.ZodMiniNumber<number>;
923
+ }, z.core.$strip>;
924
+ /** Orderbook depth (cumulative size per tick) for a single trading pair. */
925
+ const Response: z.ZodMiniObject<{
926
+ asks: z.ZodMiniArray<z.ZodMiniObject<{
927
+ cumulativeSize: z.ZodMiniString<string>;
928
+ id: z.ZodMiniString<string>;
929
+ price: z.ZodMiniString<string>;
930
+ size: z.ZodMiniString<string>;
931
+ tick: z.ZodMiniNumber<number>;
932
+ }, z.core.$strip>>;
933
+ base: z.ZodMiniObject<{
934
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
935
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
936
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
937
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
938
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
939
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
940
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
941
+ }, z.core.$strip>;
942
+ bids: z.ZodMiniArray<z.ZodMiniObject<{
943
+ cumulativeSize: z.ZodMiniString<string>;
944
+ id: z.ZodMiniString<string>;
945
+ price: z.ZodMiniString<string>;
946
+ size: z.ZodMiniString<string>;
947
+ tick: z.ZodMiniNumber<number>;
948
+ }, z.core.$strip>>;
949
+ quote: z.ZodMiniObject<{
950
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
951
+ currency: z.ZodMiniOptional<z.ZodMiniString<string>>;
952
+ decimals: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
953
+ logoUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
954
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
955
+ symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
956
+ verified: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
957
+ }, z.core.$strip>;
958
+ }, z.core.$strip>;
959
+ }
960
+ }
961
+ /**
962
+ * Creates exchange handlers. The first endpoint is `GET /pairs`, which lists
963
+ * trading pairs on the stablecoin DEX precompile by replaying its `PairCreated`
964
+ * events through the indexer.
965
+ *
966
+ * Two sort orders are supported:
967
+ * - `sort=created` (default): order by pair creation `(block_num, log_idx)`.
968
+ * - `sort=liquidity`: rank by the DEX precompile's escrow balance of the pair's
969
+ * base token, a per-pair liquidity proxy. Each base address participates in
970
+ * exactly one pair (the on-chain DEX keys orderbooks by base, so the same
971
+ * base never appears in two pairs), which lets a single
972
+ * `token_balances_snapshot` row attribute cleanly to one pair. Pairs whose
973
+ * DEX-escrow balance is zero are excluded from the liquidity ranking.
974
+ */
975
+ export declare function exchanges(): import("hono/hono-base").HonoBase<App.Environment, {
976
+ "/swaps": {
977
+ $get: {
978
+ output: null;
979
+ outputFormat: "body";
980
+ status: 402;
981
+ input: {
982
+ query?: {
983
+ 'blockNumber.from'?: string | string[];
984
+ 'blockNumber.to'?: string | string[];
985
+ chainId?: string | string[];
986
+ cursor?: string | string[];
987
+ include?: string | string[];
988
+ limit?: string | string[];
989
+ maker?: string | string[];
990
+ order?: string | string[];
991
+ participant?: string | string[];
992
+ taker?: string | string[];
993
+ 'timestamp.from'?: string | string[];
994
+ 'timestamp.to'?: string | string[];
995
+ transactionHash?: string | string[];
996
+ } | undefined;
997
+ };
998
+ } | {
999
+ output: {
1000
+ error: {
1001
+ code: "upstream_error";
1002
+ details?: readonly Response.error.Detail[] | undefined;
1003
+ message: string;
1004
+ };
1005
+ requestId: string;
1006
+ };
1007
+ outputFormat: "json";
1008
+ status: 502;
1009
+ input: {
1010
+ query?: {
1011
+ 'blockNumber.from'?: string | string[];
1012
+ 'blockNumber.to'?: string | string[];
1013
+ chainId?: string | string[];
1014
+ cursor?: string | string[];
1015
+ include?: string | string[];
1016
+ limit?: string | string[];
1017
+ maker?: string | string[];
1018
+ order?: string | string[];
1019
+ participant?: string | string[];
1020
+ taker?: string | string[];
1021
+ 'timestamp.from'?: string | string[];
1022
+ 'timestamp.to'?: string | string[];
1023
+ transactionHash?: string | string[];
1024
+ } | undefined;
1025
+ };
1026
+ } | {
1027
+ output: {
1028
+ error: {
1029
+ code: "api_key_malformed";
1030
+ details?: readonly Response.error.Detail[] | undefined;
1031
+ message: string;
1032
+ };
1033
+ requestId: string;
1034
+ };
1035
+ outputFormat: "json";
1036
+ status: 400;
1037
+ input: {
1038
+ query?: {
1039
+ 'blockNumber.from'?: string | string[];
1040
+ 'blockNumber.to'?: string | string[];
1041
+ chainId?: string | string[];
1042
+ cursor?: string | string[];
1043
+ include?: string | string[];
1044
+ limit?: string | string[];
1045
+ maker?: string | string[];
1046
+ order?: string | string[];
1047
+ participant?: string | string[];
1048
+ taker?: string | string[];
1049
+ 'timestamp.from'?: string | string[];
1050
+ 'timestamp.to'?: string | string[];
1051
+ transactionHash?: string | string[];
1052
+ } | undefined;
1053
+ };
1054
+ } | {
1055
+ output: {
1056
+ error: {
1057
+ code: "api_key_invalid" | "api_key_missing";
1058
+ details?: readonly Response.error.Detail[] | undefined;
1059
+ message: string;
1060
+ };
1061
+ requestId: string;
1062
+ };
1063
+ outputFormat: "json";
1064
+ status: 401;
1065
+ input: {
1066
+ query?: {
1067
+ 'blockNumber.from'?: string | string[];
1068
+ 'blockNumber.to'?: string | string[];
1069
+ chainId?: string | string[];
1070
+ cursor?: string | string[];
1071
+ include?: string | string[];
1072
+ limit?: string | string[];
1073
+ maker?: string | string[];
1074
+ order?: string | string[];
1075
+ participant?: string | string[];
1076
+ taker?: string | string[];
1077
+ 'timestamp.from'?: string | string[];
1078
+ 'timestamp.to'?: string | string[];
1079
+ transactionHash?: string | string[];
1080
+ } | undefined;
1081
+ };
1082
+ } | {
1083
+ output: {
1084
+ error: {
1085
+ code: "api_key_forbidden";
1086
+ details?: readonly Response.error.Detail[] | undefined;
1087
+ message: string;
1088
+ };
1089
+ requestId: string;
1090
+ };
1091
+ outputFormat: "json";
1092
+ status: 403;
1093
+ input: {
1094
+ query?: {
1095
+ 'blockNumber.from'?: string | string[];
1096
+ 'blockNumber.to'?: string | string[];
1097
+ chainId?: string | string[];
1098
+ cursor?: string | string[];
1099
+ include?: string | string[];
1100
+ limit?: string | string[];
1101
+ maker?: string | string[];
1102
+ order?: string | string[];
1103
+ participant?: string | string[];
1104
+ taker?: string | string[];
1105
+ 'timestamp.from'?: string | string[];
1106
+ 'timestamp.to'?: string | string[];
1107
+ transactionHash?: string | string[];
1108
+ } | undefined;
1109
+ };
1110
+ } | {
1111
+ output: {
1112
+ error: {
1113
+ code: "payment_required" | "rate_limit_exceeded";
1114
+ details?: readonly Response.error.Detail[] | undefined;
1115
+ message: string;
1116
+ };
1117
+ requestId: string;
1118
+ };
1119
+ outputFormat: "json";
1120
+ status: 429;
1121
+ input: {
1122
+ query?: {
1123
+ 'blockNumber.from'?: string | string[];
1124
+ 'blockNumber.to'?: string | string[];
1125
+ chainId?: string | string[];
1126
+ cursor?: string | string[];
1127
+ include?: string | string[];
1128
+ limit?: string | string[];
1129
+ maker?: string | string[];
1130
+ order?: string | string[];
1131
+ participant?: string | string[];
1132
+ taker?: string | string[];
1133
+ 'timestamp.from'?: string | string[];
1134
+ 'timestamp.to'?: string | string[];
1135
+ transactionHash?: string | string[];
1136
+ } | undefined;
1137
+ };
1138
+ } | {
1139
+ output: {
1140
+ error: {
1141
+ code: "query_invalid";
1142
+ details?: readonly Response.error.Detail[] | undefined;
1143
+ message: string;
1144
+ };
1145
+ requestId: string;
1146
+ };
1147
+ outputFormat: "json";
1148
+ status: 400;
1149
+ input: {
1150
+ query?: {
1151
+ 'blockNumber.from'?: string | string[];
1152
+ 'blockNumber.to'?: string | string[];
1153
+ chainId?: string | string[];
1154
+ cursor?: string | string[];
1155
+ include?: string | string[];
1156
+ limit?: string | string[];
1157
+ maker?: string | string[];
1158
+ order?: string | string[];
1159
+ participant?: string | string[];
1160
+ taker?: string | string[];
1161
+ 'timestamp.from'?: string | string[];
1162
+ 'timestamp.to'?: string | string[];
1163
+ transactionHash?: string | string[];
1164
+ } | undefined;
1165
+ };
1166
+ } | {
1167
+ output: {
1168
+ data: {
1169
+ blockNumber: number;
1170
+ destinationToken: {
1171
+ address: `0x${string}`;
1172
+ currency?: string | undefined;
1173
+ decimals?: number | undefined;
1174
+ logoUri?: string | undefined;
1175
+ name?: string | undefined;
1176
+ symbol?: string | undefined;
1177
+ verified?: boolean | undefined;
1178
+ amount: string;
1179
+ };
1180
+ filledAt: string;
1181
+ fills: {
1182
+ destinationToken: {
1183
+ address: `0x${string}`;
1184
+ currency?: string | undefined;
1185
+ decimals?: number | undefined;
1186
+ logoUri?: string | undefined;
1187
+ name?: string | undefined;
1188
+ symbol?: string | undefined;
1189
+ verified?: boolean | undefined;
1190
+ amount: string;
1191
+ };
1192
+ logIndex: number;
1193
+ maker: `0x${string}`;
1194
+ orderId: string;
1195
+ partialFill: boolean;
1196
+ price: string;
1197
+ sourceToken: {
1198
+ address: `0x${string}`;
1199
+ currency?: string | undefined;
1200
+ decimals?: number | undefined;
1201
+ logoUri?: string | undefined;
1202
+ name?: string | undefined;
1203
+ symbol?: string | undefined;
1204
+ verified?: boolean | undefined;
1205
+ amount: string;
1206
+ };
1207
+ }[];
1208
+ id: string;
1209
+ logIndex: number;
1210
+ mode: "exactDestination" | "exactSource" | null;
1211
+ rate: string;
1212
+ route: `0x${string}`[];
1213
+ sourceToken: {
1214
+ address: `0x${string}`;
1215
+ currency?: string | undefined;
1216
+ decimals?: number | undefined;
1217
+ logoUri?: string | undefined;
1218
+ name?: string | undefined;
1219
+ symbol?: string | undefined;
1220
+ verified?: boolean | undefined;
1221
+ amount: string;
1222
+ };
1223
+ taker: `0x${string}`;
1224
+ transactionHash: `0x${string}`;
1225
+ }[];
1226
+ nextCursor: string | null;
1227
+ };
1228
+ outputFormat: "json";
1229
+ status: 200;
1230
+ input: {
1231
+ query?: {
1232
+ 'blockNumber.from'?: string | string[];
1233
+ 'blockNumber.to'?: string | string[];
1234
+ chainId?: string | string[];
1235
+ cursor?: string | string[];
1236
+ include?: string | string[];
1237
+ limit?: string | string[];
1238
+ maker?: string | string[];
1239
+ order?: string | string[];
1240
+ participant?: string | string[];
1241
+ taker?: string | string[];
1242
+ 'timestamp.from'?: string | string[];
1243
+ 'timestamp.to'?: string | string[];
1244
+ transactionHash?: string | string[];
1245
+ } | undefined;
1246
+ };
1247
+ };
1248
+ };
1249
+ } & {
1250
+ "/pairs": {
1251
+ $get: {
1252
+ output: null;
1253
+ outputFormat: "body";
1254
+ status: 402;
1255
+ input: {
1256
+ query?: {
1257
+ chainId?: string | string[];
1258
+ cursor?: string | string[];
1259
+ include?: string | string[];
1260
+ limit?: string | string[];
1261
+ order?: string | string[];
1262
+ page?: string | string[];
1263
+ sort?: string | string[];
1264
+ } | undefined;
1265
+ };
1266
+ } | {
1267
+ output: {
1268
+ error: {
1269
+ code: "upstream_error";
1270
+ details?: readonly Response.error.Detail[] | undefined;
1271
+ message: string;
1272
+ };
1273
+ requestId: string;
1274
+ };
1275
+ outputFormat: "json";
1276
+ status: 502;
1277
+ input: {
1278
+ query?: {
1279
+ chainId?: string | string[];
1280
+ cursor?: string | string[];
1281
+ include?: string | string[];
1282
+ limit?: string | string[];
1283
+ order?: string | string[];
1284
+ page?: string | string[];
1285
+ sort?: string | string[];
1286
+ } | undefined;
1287
+ };
1288
+ } | {
1289
+ output: {
1290
+ error: {
1291
+ code: "api_key_malformed";
1292
+ details?: readonly Response.error.Detail[] | undefined;
1293
+ message: string;
1294
+ };
1295
+ requestId: string;
1296
+ };
1297
+ outputFormat: "json";
1298
+ status: 400;
1299
+ input: {
1300
+ query?: {
1301
+ chainId?: string | string[];
1302
+ cursor?: string | string[];
1303
+ include?: string | string[];
1304
+ limit?: string | string[];
1305
+ order?: string | string[];
1306
+ page?: string | string[];
1307
+ sort?: string | string[];
1308
+ } | undefined;
1309
+ };
1310
+ } | {
1311
+ output: {
1312
+ error: {
1313
+ code: "api_key_invalid" | "api_key_missing";
1314
+ details?: readonly Response.error.Detail[] | undefined;
1315
+ message: string;
1316
+ };
1317
+ requestId: string;
1318
+ };
1319
+ outputFormat: "json";
1320
+ status: 401;
1321
+ input: {
1322
+ query?: {
1323
+ chainId?: string | string[];
1324
+ cursor?: string | string[];
1325
+ include?: string | string[];
1326
+ limit?: string | string[];
1327
+ order?: string | string[];
1328
+ page?: string | string[];
1329
+ sort?: string | string[];
1330
+ } | undefined;
1331
+ };
1332
+ } | {
1333
+ output: {
1334
+ error: {
1335
+ code: "api_key_forbidden";
1336
+ details?: readonly Response.error.Detail[] | undefined;
1337
+ message: string;
1338
+ };
1339
+ requestId: string;
1340
+ };
1341
+ outputFormat: "json";
1342
+ status: 403;
1343
+ input: {
1344
+ query?: {
1345
+ chainId?: string | string[];
1346
+ cursor?: string | string[];
1347
+ include?: string | string[];
1348
+ limit?: string | string[];
1349
+ order?: string | string[];
1350
+ page?: string | string[];
1351
+ sort?: string | string[];
1352
+ } | undefined;
1353
+ };
1354
+ } | {
1355
+ output: {
1356
+ error: {
1357
+ code: "payment_required" | "rate_limit_exceeded";
1358
+ details?: readonly Response.error.Detail[] | undefined;
1359
+ message: string;
1360
+ };
1361
+ requestId: string;
1362
+ };
1363
+ outputFormat: "json";
1364
+ status: 429;
1365
+ input: {
1366
+ query?: {
1367
+ chainId?: string | string[];
1368
+ cursor?: string | string[];
1369
+ include?: string | string[];
1370
+ limit?: string | string[];
1371
+ order?: string | string[];
1372
+ page?: string | string[];
1373
+ sort?: string | string[];
1374
+ } | undefined;
1375
+ };
1376
+ } | {
1377
+ output: {
1378
+ error: {
1379
+ code: "query_invalid";
1380
+ details?: readonly Response.error.Detail[] | undefined;
1381
+ message: string;
1382
+ };
1383
+ requestId: string;
1384
+ };
1385
+ outputFormat: "json";
1386
+ status: 400;
1387
+ input: {
1388
+ query?: {
1389
+ chainId?: string | string[];
1390
+ cursor?: string | string[];
1391
+ include?: string | string[];
1392
+ limit?: string | string[];
1393
+ order?: string | string[];
1394
+ page?: string | string[];
1395
+ sort?: string | string[];
1396
+ } | undefined;
1397
+ };
1398
+ } | {
1399
+ output: {
1400
+ data: {
1401
+ base: {
1402
+ address: `0x${string}`;
1403
+ currency?: string | undefined;
1404
+ decimals?: number | undefined;
1405
+ logoUri?: string | undefined;
1406
+ name?: string | undefined;
1407
+ symbol?: string | undefined;
1408
+ verified?: boolean | undefined;
1409
+ };
1410
+ blockNumber: number;
1411
+ id: `0x${string}`;
1412
+ key: `0x${string}`;
1413
+ liquidity?: string | undefined;
1414
+ quote: {
1415
+ address: `0x${string}`;
1416
+ currency?: string | undefined;
1417
+ decimals?: number | undefined;
1418
+ logoUri?: string | undefined;
1419
+ name?: string | undefined;
1420
+ symbol?: string | undefined;
1421
+ verified?: boolean | undefined;
1422
+ };
1423
+ timestamp: string;
1424
+ transactionHash: `0x${string}`;
1425
+ }[];
1426
+ meta?: {
1427
+ totalCountCapped: boolean;
1428
+ totalCount: number;
1429
+ } | undefined;
1430
+ nextCursor: string | null;
1431
+ };
1432
+ outputFormat: "json";
1433
+ status: 200;
1434
+ input: {
1435
+ query?: {
1436
+ chainId?: string | string[];
1437
+ cursor?: string | string[];
1438
+ include?: string | string[];
1439
+ limit?: string | string[];
1440
+ order?: string | string[];
1441
+ page?: string | string[];
1442
+ sort?: string | string[];
1443
+ } | undefined;
1444
+ };
1445
+ };
1446
+ };
1447
+ } & {
1448
+ "/pairs/:base": {
1449
+ $get: {
1450
+ output: null;
1451
+ outputFormat: "body";
1452
+ status: 402;
1453
+ input: {
1454
+ param: {
1455
+ base: `0x${string}`;
1456
+ };
1457
+ } & {
1458
+ query?: {
1459
+ chainId?: string | string[];
1460
+ include?: string | string[];
1461
+ } | undefined;
1462
+ };
1463
+ } | {
1464
+ output: {
1465
+ error: {
1466
+ code: "upstream_error";
1467
+ details?: readonly Response.error.Detail[] | undefined;
1468
+ message: string;
1469
+ };
1470
+ requestId: string;
1471
+ };
1472
+ outputFormat: "json";
1473
+ status: 502;
1474
+ input: {
1475
+ param: {
1476
+ base: `0x${string}`;
1477
+ };
1478
+ } & {
1479
+ query?: {
1480
+ chainId?: string | string[];
1481
+ include?: string | string[];
1482
+ } | undefined;
1483
+ };
1484
+ } | {
1485
+ output: {
1486
+ error: {
1487
+ code: "api_key_malformed";
1488
+ details?: readonly Response.error.Detail[] | undefined;
1489
+ message: string;
1490
+ };
1491
+ requestId: string;
1492
+ };
1493
+ outputFormat: "json";
1494
+ status: 400;
1495
+ input: {
1496
+ param: {
1497
+ base: `0x${string}`;
1498
+ };
1499
+ } & {
1500
+ query?: {
1501
+ chainId?: string | string[];
1502
+ include?: string | string[];
1503
+ } | undefined;
1504
+ };
1505
+ } | {
1506
+ output: {
1507
+ error: {
1508
+ code: "api_key_invalid" | "api_key_missing";
1509
+ details?: readonly Response.error.Detail[] | undefined;
1510
+ message: string;
1511
+ };
1512
+ requestId: string;
1513
+ };
1514
+ outputFormat: "json";
1515
+ status: 401;
1516
+ input: {
1517
+ param: {
1518
+ base: `0x${string}`;
1519
+ };
1520
+ } & {
1521
+ query?: {
1522
+ chainId?: string | string[];
1523
+ include?: string | string[];
1524
+ } | undefined;
1525
+ };
1526
+ } | {
1527
+ output: {
1528
+ error: {
1529
+ code: "api_key_forbidden";
1530
+ details?: readonly Response.error.Detail[] | undefined;
1531
+ message: string;
1532
+ };
1533
+ requestId: string;
1534
+ };
1535
+ outputFormat: "json";
1536
+ status: 403;
1537
+ input: {
1538
+ param: {
1539
+ base: `0x${string}`;
1540
+ };
1541
+ } & {
1542
+ query?: {
1543
+ chainId?: string | string[];
1544
+ include?: string | string[];
1545
+ } | undefined;
1546
+ };
1547
+ } | {
1548
+ output: {
1549
+ error: {
1550
+ code: "payment_required" | "rate_limit_exceeded";
1551
+ details?: readonly Response.error.Detail[] | undefined;
1552
+ message: string;
1553
+ };
1554
+ requestId: string;
1555
+ };
1556
+ outputFormat: "json";
1557
+ status: 429;
1558
+ input: {
1559
+ param: {
1560
+ base: `0x${string}`;
1561
+ };
1562
+ } & {
1563
+ query?: {
1564
+ chainId?: string | string[];
1565
+ include?: string | string[];
1566
+ } | undefined;
1567
+ };
1568
+ } | {
1569
+ output: {
1570
+ error: {
1571
+ code: "query_invalid";
1572
+ details?: readonly Response.error.Detail[] | undefined;
1573
+ message: string;
1574
+ };
1575
+ requestId: string;
1576
+ };
1577
+ outputFormat: "json";
1578
+ status: 400;
1579
+ input: {
1580
+ param: {
1581
+ base: `0x${string}`;
1582
+ };
1583
+ } & {
1584
+ query?: {
1585
+ chainId?: string | string[];
1586
+ include?: string | string[];
1587
+ } | undefined;
1588
+ };
1589
+ } | {
1590
+ output: {
1591
+ error: {
1592
+ code: "pair_invalid";
1593
+ details?: readonly Response.error.Detail[] | undefined;
1594
+ message: string;
1595
+ };
1596
+ requestId: string;
1597
+ };
1598
+ outputFormat: "json";
1599
+ status: 400;
1600
+ input: {
1601
+ param: {
1602
+ base: `0x${string}`;
1603
+ };
1604
+ } & {
1605
+ query?: {
1606
+ chainId?: string | string[];
1607
+ include?: string | string[];
1608
+ } | undefined;
1609
+ };
1610
+ } | {
1611
+ output: {
1612
+ error: {
1613
+ code: "pair_not_found";
1614
+ details?: readonly Response.error.Detail[] | undefined;
1615
+ message: string;
1616
+ };
1617
+ requestId: string;
1618
+ };
1619
+ outputFormat: "json";
1620
+ status: 404;
1621
+ input: {
1622
+ param: {
1623
+ base: `0x${string}`;
1624
+ };
1625
+ } & {
1626
+ query?: {
1627
+ chainId?: string | string[];
1628
+ include?: string | string[];
1629
+ } | undefined;
1630
+ };
1631
+ } | {
1632
+ output: {
1633
+ base: {
1634
+ address: `0x${string}`;
1635
+ currency?: string | undefined;
1636
+ decimals?: number | undefined;
1637
+ logoUri?: string | undefined;
1638
+ name?: string | undefined;
1639
+ symbol?: string | undefined;
1640
+ verified?: boolean | undefined;
1641
+ };
1642
+ blockNumber: number;
1643
+ id: `0x${string}`;
1644
+ key: `0x${string}`;
1645
+ liquidity?: string | undefined;
1646
+ quote: {
1647
+ address: `0x${string}`;
1648
+ currency?: string | undefined;
1649
+ decimals?: number | undefined;
1650
+ logoUri?: string | undefined;
1651
+ name?: string | undefined;
1652
+ symbol?: string | undefined;
1653
+ verified?: boolean | undefined;
1654
+ };
1655
+ timestamp: string;
1656
+ transactionHash: `0x${string}`;
1657
+ };
1658
+ outputFormat: "json";
1659
+ status: 200;
1660
+ input: {
1661
+ param: {
1662
+ base: `0x${string}`;
1663
+ };
1664
+ } & {
1665
+ query?: {
1666
+ chainId?: string | string[];
1667
+ include?: string | string[];
1668
+ } | undefined;
1669
+ };
1670
+ };
1671
+ };
1672
+ } & {
1673
+ "/orders": {
1674
+ $get: {
1675
+ output: null;
1676
+ outputFormat: "body";
1677
+ status: 402;
1678
+ input: {
1679
+ query?: {
1680
+ base?: string | string[];
1681
+ chainId?: string | string[];
1682
+ cursor?: string | string[];
1683
+ include?: string | string[];
1684
+ limit?: string | string[];
1685
+ maker?: string | string[];
1686
+ order?: string | string[];
1687
+ page?: string | string[];
1688
+ side?: string | string[];
1689
+ sort?: string | string[];
1690
+ } | undefined;
1691
+ };
1692
+ } | {
1693
+ output: {
1694
+ error: {
1695
+ code: "upstream_error";
1696
+ details?: readonly Response.error.Detail[] | undefined;
1697
+ message: string;
1698
+ };
1699
+ requestId: string;
1700
+ };
1701
+ outputFormat: "json";
1702
+ status: 502;
1703
+ input: {
1704
+ query?: {
1705
+ base?: string | string[];
1706
+ chainId?: string | string[];
1707
+ cursor?: string | string[];
1708
+ include?: string | string[];
1709
+ limit?: string | string[];
1710
+ maker?: string | string[];
1711
+ order?: string | string[];
1712
+ page?: string | string[];
1713
+ side?: string | string[];
1714
+ sort?: string | string[];
1715
+ } | undefined;
1716
+ };
1717
+ } | {
1718
+ output: {
1719
+ error: {
1720
+ code: "api_key_malformed";
1721
+ details?: readonly Response.error.Detail[] | undefined;
1722
+ message: string;
1723
+ };
1724
+ requestId: string;
1725
+ };
1726
+ outputFormat: "json";
1727
+ status: 400;
1728
+ input: {
1729
+ query?: {
1730
+ base?: string | string[];
1731
+ chainId?: string | string[];
1732
+ cursor?: string | string[];
1733
+ include?: string | string[];
1734
+ limit?: string | string[];
1735
+ maker?: string | string[];
1736
+ order?: string | string[];
1737
+ page?: string | string[];
1738
+ side?: string | string[];
1739
+ sort?: string | string[];
1740
+ } | undefined;
1741
+ };
1742
+ } | {
1743
+ output: {
1744
+ error: {
1745
+ code: "api_key_invalid" | "api_key_missing";
1746
+ details?: readonly Response.error.Detail[] | undefined;
1747
+ message: string;
1748
+ };
1749
+ requestId: string;
1750
+ };
1751
+ outputFormat: "json";
1752
+ status: 401;
1753
+ input: {
1754
+ query?: {
1755
+ base?: string | string[];
1756
+ chainId?: string | string[];
1757
+ cursor?: string | string[];
1758
+ include?: string | string[];
1759
+ limit?: string | string[];
1760
+ maker?: string | string[];
1761
+ order?: string | string[];
1762
+ page?: string | string[];
1763
+ side?: string | string[];
1764
+ sort?: string | string[];
1765
+ } | undefined;
1766
+ };
1767
+ } | {
1768
+ output: {
1769
+ error: {
1770
+ code: "api_key_forbidden";
1771
+ details?: readonly Response.error.Detail[] | undefined;
1772
+ message: string;
1773
+ };
1774
+ requestId: string;
1775
+ };
1776
+ outputFormat: "json";
1777
+ status: 403;
1778
+ input: {
1779
+ query?: {
1780
+ base?: string | string[];
1781
+ chainId?: string | string[];
1782
+ cursor?: string | string[];
1783
+ include?: string | string[];
1784
+ limit?: string | string[];
1785
+ maker?: string | string[];
1786
+ order?: string | string[];
1787
+ page?: string | string[];
1788
+ side?: string | string[];
1789
+ sort?: string | string[];
1790
+ } | undefined;
1791
+ };
1792
+ } | {
1793
+ output: {
1794
+ error: {
1795
+ code: "payment_required" | "rate_limit_exceeded";
1796
+ details?: readonly Response.error.Detail[] | undefined;
1797
+ message: string;
1798
+ };
1799
+ requestId: string;
1800
+ };
1801
+ outputFormat: "json";
1802
+ status: 429;
1803
+ input: {
1804
+ query?: {
1805
+ base?: string | string[];
1806
+ chainId?: string | string[];
1807
+ cursor?: string | string[];
1808
+ include?: string | string[];
1809
+ limit?: string | string[];
1810
+ maker?: string | string[];
1811
+ order?: string | string[];
1812
+ page?: string | string[];
1813
+ side?: string | string[];
1814
+ sort?: string | string[];
1815
+ } | undefined;
1816
+ };
1817
+ } | {
1818
+ output: {
1819
+ error: {
1820
+ code: "query_invalid";
1821
+ details?: readonly Response.error.Detail[] | undefined;
1822
+ message: string;
1823
+ };
1824
+ requestId: string;
1825
+ };
1826
+ outputFormat: "json";
1827
+ status: 400;
1828
+ input: {
1829
+ query?: {
1830
+ base?: string | string[];
1831
+ chainId?: string | string[];
1832
+ cursor?: string | string[];
1833
+ include?: string | string[];
1834
+ limit?: string | string[];
1835
+ maker?: string | string[];
1836
+ order?: string | string[];
1837
+ page?: string | string[];
1838
+ side?: string | string[];
1839
+ sort?: string | string[];
1840
+ } | undefined;
1841
+ };
1842
+ } | {
1843
+ output: {
1844
+ error: {
1845
+ code: "pair_not_found";
1846
+ details?: readonly Response.error.Detail[] | undefined;
1847
+ message: string;
1848
+ };
1849
+ requestId: string;
1850
+ };
1851
+ outputFormat: "json";
1852
+ status: 404;
1853
+ input: {
1854
+ query?: {
1855
+ base?: string | string[];
1856
+ chainId?: string | string[];
1857
+ cursor?: string | string[];
1858
+ include?: string | string[];
1859
+ limit?: string | string[];
1860
+ maker?: string | string[];
1861
+ order?: string | string[];
1862
+ page?: string | string[];
1863
+ side?: string | string[];
1864
+ sort?: string | string[];
1865
+ } | undefined;
1866
+ };
1867
+ } | {
1868
+ output: {
1869
+ data: {
1870
+ amount: string;
1871
+ blockNumber: number;
1872
+ id: string;
1873
+ logIndex: number;
1874
+ maker: `0x${string}`;
1875
+ orderId: string;
1876
+ placedAt: string;
1877
+ price: string;
1878
+ rate: string;
1879
+ remaining: string;
1880
+ side: "ask" | "bid";
1881
+ tick: number;
1882
+ transactionHash: `0x${string}`;
1883
+ pair: {
1884
+ base: {
1885
+ address: `0x${string}`;
1886
+ currency?: string | undefined;
1887
+ decimals?: number | undefined;
1888
+ logoUri?: string | undefined;
1889
+ name?: string | undefined;
1890
+ symbol?: string | undefined;
1891
+ verified?: boolean | undefined;
1892
+ };
1893
+ key: `0x${string}`;
1894
+ quote: {
1895
+ address: `0x${string}`;
1896
+ currency?: string | undefined;
1897
+ decimals?: number | undefined;
1898
+ logoUri?: string | undefined;
1899
+ name?: string | undefined;
1900
+ symbol?: string | undefined;
1901
+ verified?: boolean | undefined;
1902
+ };
1903
+ };
1904
+ }[];
1905
+ meta?: {
1906
+ totalCountCapped: boolean;
1907
+ totalCount: number;
1908
+ } | undefined;
1909
+ nextCursor: string | null;
1910
+ truncated: boolean;
1911
+ };
1912
+ outputFormat: "json";
1913
+ status: 200;
1914
+ input: {
1915
+ query?: {
1916
+ base?: string | string[];
1917
+ chainId?: string | string[];
1918
+ cursor?: string | string[];
1919
+ include?: string | string[];
1920
+ limit?: string | string[];
1921
+ maker?: string | string[];
1922
+ order?: string | string[];
1923
+ page?: string | string[];
1924
+ side?: string | string[];
1925
+ sort?: string | string[];
1926
+ } | undefined;
1927
+ };
1928
+ };
1929
+ };
1930
+ } & {
1931
+ "/orders/:orderId": {
1932
+ $get: {
1933
+ output: null;
1934
+ outputFormat: "body";
1935
+ status: 402;
1936
+ input: {
1937
+ param: {
1938
+ orderId: string;
1939
+ };
1940
+ } & {
1941
+ query?: {
1942
+ chainId?: string | string[];
1943
+ include?: string | string[];
1944
+ } | undefined;
1945
+ };
1946
+ } | {
1947
+ output: {
1948
+ error: {
1949
+ code: "upstream_error";
1950
+ details?: readonly Response.error.Detail[] | undefined;
1951
+ message: string;
1952
+ };
1953
+ requestId: string;
1954
+ };
1955
+ outputFormat: "json";
1956
+ status: 502;
1957
+ input: {
1958
+ param: {
1959
+ orderId: string;
1960
+ };
1961
+ } & {
1962
+ query?: {
1963
+ chainId?: string | string[];
1964
+ include?: string | string[];
1965
+ } | undefined;
1966
+ };
1967
+ } | {
1968
+ output: {
1969
+ error: {
1970
+ code: "api_key_malformed";
1971
+ details?: readonly Response.error.Detail[] | undefined;
1972
+ message: string;
1973
+ };
1974
+ requestId: string;
1975
+ };
1976
+ outputFormat: "json";
1977
+ status: 400;
1978
+ input: {
1979
+ param: {
1980
+ orderId: string;
1981
+ };
1982
+ } & {
1983
+ query?: {
1984
+ chainId?: string | string[];
1985
+ include?: string | string[];
1986
+ } | undefined;
1987
+ };
1988
+ } | {
1989
+ output: {
1990
+ error: {
1991
+ code: "api_key_invalid" | "api_key_missing";
1992
+ details?: readonly Response.error.Detail[] | undefined;
1993
+ message: string;
1994
+ };
1995
+ requestId: string;
1996
+ };
1997
+ outputFormat: "json";
1998
+ status: 401;
1999
+ input: {
2000
+ param: {
2001
+ orderId: string;
2002
+ };
2003
+ } & {
2004
+ query?: {
2005
+ chainId?: string | string[];
2006
+ include?: string | string[];
2007
+ } | undefined;
2008
+ };
2009
+ } | {
2010
+ output: {
2011
+ error: {
2012
+ code: "api_key_forbidden";
2013
+ details?: readonly Response.error.Detail[] | undefined;
2014
+ message: string;
2015
+ };
2016
+ requestId: string;
2017
+ };
2018
+ outputFormat: "json";
2019
+ status: 403;
2020
+ input: {
2021
+ param: {
2022
+ orderId: string;
2023
+ };
2024
+ } & {
2025
+ query?: {
2026
+ chainId?: string | string[];
2027
+ include?: string | string[];
2028
+ } | undefined;
2029
+ };
2030
+ } | {
2031
+ output: {
2032
+ error: {
2033
+ code: "payment_required" | "rate_limit_exceeded";
2034
+ details?: readonly Response.error.Detail[] | undefined;
2035
+ message: string;
2036
+ };
2037
+ requestId: string;
2038
+ };
2039
+ outputFormat: "json";
2040
+ status: 429;
2041
+ input: {
2042
+ param: {
2043
+ orderId: string;
2044
+ };
2045
+ } & {
2046
+ query?: {
2047
+ chainId?: string | string[];
2048
+ include?: string | string[];
2049
+ } | undefined;
2050
+ };
2051
+ } | {
2052
+ output: {
2053
+ error: {
2054
+ code: "query_invalid";
2055
+ details?: readonly Response.error.Detail[] | undefined;
2056
+ message: string;
2057
+ };
2058
+ requestId: string;
2059
+ };
2060
+ outputFormat: "json";
2061
+ status: 400;
2062
+ input: {
2063
+ param: {
2064
+ orderId: string;
2065
+ };
2066
+ } & {
2067
+ query?: {
2068
+ chainId?: string | string[];
2069
+ include?: string | string[];
2070
+ } | undefined;
2071
+ };
2072
+ } | {
2073
+ output: {
2074
+ error: {
2075
+ code: "order_invalid";
2076
+ details?: readonly Response.error.Detail[] | undefined;
2077
+ message: string;
2078
+ };
2079
+ requestId: string;
2080
+ };
2081
+ outputFormat: "json";
2082
+ status: 400;
2083
+ input: {
2084
+ param: {
2085
+ orderId: string;
2086
+ };
2087
+ } & {
2088
+ query?: {
2089
+ chainId?: string | string[];
2090
+ include?: string | string[];
2091
+ } | undefined;
2092
+ };
2093
+ } | {
2094
+ output: {
2095
+ error: {
2096
+ code: "order_not_found";
2097
+ details?: readonly Response.error.Detail[] | undefined;
2098
+ message: string;
2099
+ };
2100
+ requestId: string;
2101
+ };
2102
+ outputFormat: "json";
2103
+ status: 404;
2104
+ input: {
2105
+ param: {
2106
+ orderId: string;
2107
+ };
2108
+ } & {
2109
+ query?: {
2110
+ chainId?: string | string[];
2111
+ include?: string | string[];
2112
+ } | undefined;
2113
+ };
2114
+ } | {
2115
+ output: {
2116
+ amount: string;
2117
+ flipTick: number;
2118
+ id: string;
2119
+ isBid: boolean;
2120
+ isFlipOrder: boolean;
2121
+ maker: `0x${string}`;
2122
+ mode: "exactDestination" | "exactSource";
2123
+ orderId: string;
2124
+ pair: {
2125
+ base: {
2126
+ address: `0x${string}`;
2127
+ currency?: string | undefined;
2128
+ decimals?: number | undefined;
2129
+ logoUri?: string | undefined;
2130
+ name?: string | undefined;
2131
+ symbol?: string | undefined;
2132
+ verified?: boolean | undefined;
2133
+ };
2134
+ key: `0x${string}`;
2135
+ quote: {
2136
+ address: `0x${string}`;
2137
+ currency?: string | undefined;
2138
+ decimals?: number | undefined;
2139
+ logoUri?: string | undefined;
2140
+ name?: string | undefined;
2141
+ symbol?: string | undefined;
2142
+ verified?: boolean | undefined;
2143
+ };
2144
+ };
2145
+ price: string;
2146
+ rate: string;
2147
+ remaining: string;
2148
+ tick: number;
2149
+ };
2150
+ outputFormat: "json";
2151
+ status: 200;
2152
+ input: {
2153
+ param: {
2154
+ orderId: string;
2155
+ };
2156
+ } & {
2157
+ query?: {
2158
+ chainId?: string | string[];
2159
+ include?: string | string[];
2160
+ } | undefined;
2161
+ };
2162
+ };
2163
+ };
2164
+ } & {
2165
+ "/orders/:orderId/fills": {
2166
+ $get: {
2167
+ output: null;
2168
+ outputFormat: "body";
2169
+ status: 402;
2170
+ input: {
2171
+ param: {
2172
+ orderId: string;
2173
+ };
2174
+ } & {
2175
+ query?: {
2176
+ chainId?: string | string[];
2177
+ cursor?: string | string[];
2178
+ include?: string | string[];
2179
+ limit?: string | string[];
2180
+ order?: string | string[];
2181
+ page?: string | string[];
2182
+ } | undefined;
2183
+ };
2184
+ } | {
2185
+ output: {
2186
+ error: {
2187
+ code: "upstream_error";
2188
+ details?: readonly Response.error.Detail[] | undefined;
2189
+ message: string;
2190
+ };
2191
+ requestId: string;
2192
+ };
2193
+ outputFormat: "json";
2194
+ status: 502;
2195
+ input: {
2196
+ param: {
2197
+ orderId: string;
2198
+ };
2199
+ } & {
2200
+ query?: {
2201
+ chainId?: string | string[];
2202
+ cursor?: string | string[];
2203
+ include?: string | string[];
2204
+ limit?: string | string[];
2205
+ order?: string | string[];
2206
+ page?: string | string[];
2207
+ } | undefined;
2208
+ };
2209
+ } | {
2210
+ output: {
2211
+ error: {
2212
+ code: "api_key_malformed";
2213
+ details?: readonly Response.error.Detail[] | undefined;
2214
+ message: string;
2215
+ };
2216
+ requestId: string;
2217
+ };
2218
+ outputFormat: "json";
2219
+ status: 400;
2220
+ input: {
2221
+ param: {
2222
+ orderId: string;
2223
+ };
2224
+ } & {
2225
+ query?: {
2226
+ chainId?: string | string[];
2227
+ cursor?: string | string[];
2228
+ include?: string | string[];
2229
+ limit?: string | string[];
2230
+ order?: string | string[];
2231
+ page?: string | string[];
2232
+ } | undefined;
2233
+ };
2234
+ } | {
2235
+ output: {
2236
+ error: {
2237
+ code: "api_key_invalid" | "api_key_missing";
2238
+ details?: readonly Response.error.Detail[] | undefined;
2239
+ message: string;
2240
+ };
2241
+ requestId: string;
2242
+ };
2243
+ outputFormat: "json";
2244
+ status: 401;
2245
+ input: {
2246
+ param: {
2247
+ orderId: string;
2248
+ };
2249
+ } & {
2250
+ query?: {
2251
+ chainId?: string | string[];
2252
+ cursor?: string | string[];
2253
+ include?: string | string[];
2254
+ limit?: string | string[];
2255
+ order?: string | string[];
2256
+ page?: string | string[];
2257
+ } | undefined;
2258
+ };
2259
+ } | {
2260
+ output: {
2261
+ error: {
2262
+ code: "api_key_forbidden";
2263
+ details?: readonly Response.error.Detail[] | undefined;
2264
+ message: string;
2265
+ };
2266
+ requestId: string;
2267
+ };
2268
+ outputFormat: "json";
2269
+ status: 403;
2270
+ input: {
2271
+ param: {
2272
+ orderId: string;
2273
+ };
2274
+ } & {
2275
+ query?: {
2276
+ chainId?: string | string[];
2277
+ cursor?: string | string[];
2278
+ include?: string | string[];
2279
+ limit?: string | string[];
2280
+ order?: string | string[];
2281
+ page?: string | string[];
2282
+ } | undefined;
2283
+ };
2284
+ } | {
2285
+ output: {
2286
+ error: {
2287
+ code: "payment_required" | "rate_limit_exceeded";
2288
+ details?: readonly Response.error.Detail[] | undefined;
2289
+ message: string;
2290
+ };
2291
+ requestId: string;
2292
+ };
2293
+ outputFormat: "json";
2294
+ status: 429;
2295
+ input: {
2296
+ param: {
2297
+ orderId: string;
2298
+ };
2299
+ } & {
2300
+ query?: {
2301
+ chainId?: string | string[];
2302
+ cursor?: string | string[];
2303
+ include?: string | string[];
2304
+ limit?: string | string[];
2305
+ order?: string | string[];
2306
+ page?: string | string[];
2307
+ } | undefined;
2308
+ };
2309
+ } | {
2310
+ output: {
2311
+ error: {
2312
+ code: "query_invalid";
2313
+ details?: readonly Response.error.Detail[] | undefined;
2314
+ message: string;
2315
+ };
2316
+ requestId: string;
2317
+ };
2318
+ outputFormat: "json";
2319
+ status: 400;
2320
+ input: {
2321
+ param: {
2322
+ orderId: string;
2323
+ };
2324
+ } & {
2325
+ query?: {
2326
+ chainId?: string | string[];
2327
+ cursor?: string | string[];
2328
+ include?: string | string[];
2329
+ limit?: string | string[];
2330
+ order?: string | string[];
2331
+ page?: string | string[];
2332
+ } | undefined;
2333
+ };
2334
+ } | {
2335
+ output: {
2336
+ error: {
2337
+ code: "order_invalid";
2338
+ details?: readonly Response.error.Detail[] | undefined;
2339
+ message: string;
2340
+ };
2341
+ requestId: string;
2342
+ };
2343
+ outputFormat: "json";
2344
+ status: 400;
2345
+ input: {
2346
+ param: {
2347
+ orderId: string;
2348
+ };
2349
+ } & {
2350
+ query?: {
2351
+ chainId?: string | string[];
2352
+ cursor?: string | string[];
2353
+ include?: string | string[];
2354
+ limit?: string | string[];
2355
+ order?: string | string[];
2356
+ page?: string | string[];
2357
+ } | undefined;
2358
+ };
2359
+ } | {
2360
+ output: {
2361
+ data: {
2362
+ amountFilled: string;
2363
+ blockNumber: number;
2364
+ filledAt: string;
2365
+ id: string;
2366
+ logIndex: number;
2367
+ orderId: string;
2368
+ partialFill: boolean;
2369
+ taker: `0x${string}`;
2370
+ transactionHash: `0x${string}`;
2371
+ }[];
2372
+ meta?: {
2373
+ totalCountCapped: boolean;
2374
+ totalCount: number;
2375
+ } | undefined;
2376
+ nextCursor: string | null;
2377
+ };
2378
+ outputFormat: "json";
2379
+ status: 200;
2380
+ input: {
2381
+ param: {
2382
+ orderId: string;
2383
+ };
2384
+ } & {
2385
+ query?: {
2386
+ chainId?: string | string[];
2387
+ cursor?: string | string[];
2388
+ include?: string | string[];
2389
+ limit?: string | string[];
2390
+ order?: string | string[];
2391
+ page?: string | string[];
2392
+ } | undefined;
2393
+ };
2394
+ };
2395
+ };
2396
+ } & {
2397
+ "/pairs/:base/ohlc": {
2398
+ $get: {
2399
+ output: null;
2400
+ outputFormat: "body";
2401
+ status: 402;
2402
+ input: {
2403
+ param: {
2404
+ base: `0x${string}`;
2405
+ };
2406
+ } & {
2407
+ query?: {
2408
+ chainId?: string | string[];
2409
+ include?: string | string[];
2410
+ interval?: string | string[];
2411
+ window?: string | string[];
2412
+ } | undefined;
2413
+ };
2414
+ } | {
2415
+ output: {
2416
+ error: {
2417
+ code: "upstream_error";
2418
+ details?: readonly Response.error.Detail[] | undefined;
2419
+ message: string;
2420
+ };
2421
+ requestId: string;
2422
+ };
2423
+ outputFormat: "json";
2424
+ status: 502;
2425
+ input: {
2426
+ param: {
2427
+ base: `0x${string}`;
2428
+ };
2429
+ } & {
2430
+ query?: {
2431
+ chainId?: string | string[];
2432
+ include?: string | string[];
2433
+ interval?: string | string[];
2434
+ window?: string | string[];
2435
+ } | undefined;
2436
+ };
2437
+ } | {
2438
+ output: {
2439
+ error: {
2440
+ code: "api_key_malformed";
2441
+ details?: readonly Response.error.Detail[] | undefined;
2442
+ message: string;
2443
+ };
2444
+ requestId: string;
2445
+ };
2446
+ outputFormat: "json";
2447
+ status: 400;
2448
+ input: {
2449
+ param: {
2450
+ base: `0x${string}`;
2451
+ };
2452
+ } & {
2453
+ query?: {
2454
+ chainId?: string | string[];
2455
+ include?: string | string[];
2456
+ interval?: string | string[];
2457
+ window?: string | string[];
2458
+ } | undefined;
2459
+ };
2460
+ } | {
2461
+ output: {
2462
+ error: {
2463
+ code: "api_key_invalid" | "api_key_missing";
2464
+ details?: readonly Response.error.Detail[] | undefined;
2465
+ message: string;
2466
+ };
2467
+ requestId: string;
2468
+ };
2469
+ outputFormat: "json";
2470
+ status: 401;
2471
+ input: {
2472
+ param: {
2473
+ base: `0x${string}`;
2474
+ };
2475
+ } & {
2476
+ query?: {
2477
+ chainId?: string | string[];
2478
+ include?: string | string[];
2479
+ interval?: string | string[];
2480
+ window?: string | string[];
2481
+ } | undefined;
2482
+ };
2483
+ } | {
2484
+ output: {
2485
+ error: {
2486
+ code: "api_key_forbidden";
2487
+ details?: readonly Response.error.Detail[] | undefined;
2488
+ message: string;
2489
+ };
2490
+ requestId: string;
2491
+ };
2492
+ outputFormat: "json";
2493
+ status: 403;
2494
+ input: {
2495
+ param: {
2496
+ base: `0x${string}`;
2497
+ };
2498
+ } & {
2499
+ query?: {
2500
+ chainId?: string | string[];
2501
+ include?: string | string[];
2502
+ interval?: string | string[];
2503
+ window?: string | string[];
2504
+ } | undefined;
2505
+ };
2506
+ } | {
2507
+ output: {
2508
+ error: {
2509
+ code: "payment_required" | "rate_limit_exceeded";
2510
+ details?: readonly Response.error.Detail[] | undefined;
2511
+ message: string;
2512
+ };
2513
+ requestId: string;
2514
+ };
2515
+ outputFormat: "json";
2516
+ status: 429;
2517
+ input: {
2518
+ param: {
2519
+ base: `0x${string}`;
2520
+ };
2521
+ } & {
2522
+ query?: {
2523
+ chainId?: string | string[];
2524
+ include?: string | string[];
2525
+ interval?: string | string[];
2526
+ window?: string | string[];
2527
+ } | undefined;
2528
+ };
2529
+ } | {
2530
+ output: {
2531
+ error: {
2532
+ code: "query_invalid";
2533
+ details?: readonly Response.error.Detail[] | undefined;
2534
+ message: string;
2535
+ };
2536
+ requestId: string;
2537
+ };
2538
+ outputFormat: "json";
2539
+ status: 400;
2540
+ input: {
2541
+ param: {
2542
+ base: `0x${string}`;
2543
+ };
2544
+ } & {
2545
+ query?: {
2546
+ chainId?: string | string[];
2547
+ include?: string | string[];
2548
+ interval?: string | string[];
2549
+ window?: string | string[];
2550
+ } | undefined;
2551
+ };
2552
+ } | {
2553
+ output: {
2554
+ error: {
2555
+ code: "pair_invalid";
2556
+ details?: readonly Response.error.Detail[] | undefined;
2557
+ message: string;
2558
+ };
2559
+ requestId: string;
2560
+ };
2561
+ outputFormat: "json";
2562
+ status: 400;
2563
+ input: {
2564
+ param: {
2565
+ base: `0x${string}`;
2566
+ };
2567
+ } & {
2568
+ query?: {
2569
+ chainId?: string | string[];
2570
+ include?: string | string[];
2571
+ interval?: string | string[];
2572
+ window?: string | string[];
2573
+ } | undefined;
2574
+ };
2575
+ } | {
2576
+ output: {
2577
+ error: {
2578
+ code: "pair_not_found";
2579
+ details?: readonly Response.error.Detail[] | undefined;
2580
+ message: string;
2581
+ };
2582
+ requestId: string;
2583
+ };
2584
+ outputFormat: "json";
2585
+ status: 404;
2586
+ input: {
2587
+ param: {
2588
+ base: `0x${string}`;
2589
+ };
2590
+ } & {
2591
+ query?: {
2592
+ chainId?: string | string[];
2593
+ include?: string | string[];
2594
+ interval?: string | string[];
2595
+ window?: string | string[];
2596
+ } | undefined;
2597
+ };
2598
+ } | {
2599
+ output: {
2600
+ base: {
2601
+ address: `0x${string}`;
2602
+ currency?: string | undefined;
2603
+ decimals?: number | undefined;
2604
+ logoUri?: string | undefined;
2605
+ name?: string | undefined;
2606
+ symbol?: string | undefined;
2607
+ verified?: boolean | undefined;
2608
+ };
2609
+ data: {
2610
+ close: string;
2611
+ fillCount: number;
2612
+ high: string;
2613
+ id: string;
2614
+ low: string;
2615
+ open: string;
2616
+ timestamp: string;
2617
+ volume: {
2618
+ base: string;
2619
+ quote: string;
2620
+ };
2621
+ }[];
2622
+ interval: "15m" | "1d" | "1h" | "1m" | "4h" | "5m";
2623
+ quote: {
2624
+ address: `0x${string}`;
2625
+ currency?: string | undefined;
2626
+ decimals?: number | undefined;
2627
+ logoUri?: string | undefined;
2628
+ name?: string | undefined;
2629
+ symbol?: string | undefined;
2630
+ verified?: boolean | undefined;
2631
+ };
2632
+ truncated: boolean;
2633
+ window: "1h" | "24h" | "30d" | "7d";
2634
+ };
2635
+ outputFormat: "json";
2636
+ status: 200;
2637
+ input: {
2638
+ param: {
2639
+ base: `0x${string}`;
2640
+ };
2641
+ } & {
2642
+ query?: {
2643
+ chainId?: string | string[];
2644
+ include?: string | string[];
2645
+ interval?: string | string[];
2646
+ window?: string | string[];
2647
+ } | undefined;
2648
+ };
2649
+ };
2650
+ };
2651
+ } & {
2652
+ "/pairs/:base/depth": {
2653
+ $get: {
2654
+ output: null;
2655
+ outputFormat: "body";
2656
+ status: 402;
2657
+ input: {
2658
+ param: {
2659
+ base: `0x${string}`;
2660
+ };
2661
+ } & {
2662
+ query?: {
2663
+ chainId?: string | string[];
2664
+ include?: string | string[];
2665
+ levels?: string | string[];
2666
+ } | undefined;
2667
+ };
2668
+ } | {
2669
+ output: {
2670
+ error: {
2671
+ code: "upstream_error";
2672
+ details?: readonly Response.error.Detail[] | undefined;
2673
+ message: string;
2674
+ };
2675
+ requestId: string;
2676
+ };
2677
+ outputFormat: "json";
2678
+ status: 502;
2679
+ input: {
2680
+ param: {
2681
+ base: `0x${string}`;
2682
+ };
2683
+ } & {
2684
+ query?: {
2685
+ chainId?: string | string[];
2686
+ include?: string | string[];
2687
+ levels?: string | string[];
2688
+ } | undefined;
2689
+ };
2690
+ } | {
2691
+ output: {
2692
+ error: {
2693
+ code: "api_key_malformed";
2694
+ details?: readonly Response.error.Detail[] | undefined;
2695
+ message: string;
2696
+ };
2697
+ requestId: string;
2698
+ };
2699
+ outputFormat: "json";
2700
+ status: 400;
2701
+ input: {
2702
+ param: {
2703
+ base: `0x${string}`;
2704
+ };
2705
+ } & {
2706
+ query?: {
2707
+ chainId?: string | string[];
2708
+ include?: string | string[];
2709
+ levels?: string | string[];
2710
+ } | undefined;
2711
+ };
2712
+ } | {
2713
+ output: {
2714
+ error: {
2715
+ code: "api_key_invalid" | "api_key_missing";
2716
+ details?: readonly Response.error.Detail[] | undefined;
2717
+ message: string;
2718
+ };
2719
+ requestId: string;
2720
+ };
2721
+ outputFormat: "json";
2722
+ status: 401;
2723
+ input: {
2724
+ param: {
2725
+ base: `0x${string}`;
2726
+ };
2727
+ } & {
2728
+ query?: {
2729
+ chainId?: string | string[];
2730
+ include?: string | string[];
2731
+ levels?: string | string[];
2732
+ } | undefined;
2733
+ };
2734
+ } | {
2735
+ output: {
2736
+ error: {
2737
+ code: "api_key_forbidden";
2738
+ details?: readonly Response.error.Detail[] | undefined;
2739
+ message: string;
2740
+ };
2741
+ requestId: string;
2742
+ };
2743
+ outputFormat: "json";
2744
+ status: 403;
2745
+ input: {
2746
+ param: {
2747
+ base: `0x${string}`;
2748
+ };
2749
+ } & {
2750
+ query?: {
2751
+ chainId?: string | string[];
2752
+ include?: string | string[];
2753
+ levels?: string | string[];
2754
+ } | undefined;
2755
+ };
2756
+ } | {
2757
+ output: {
2758
+ error: {
2759
+ code: "payment_required" | "rate_limit_exceeded";
2760
+ details?: readonly Response.error.Detail[] | undefined;
2761
+ message: string;
2762
+ };
2763
+ requestId: string;
2764
+ };
2765
+ outputFormat: "json";
2766
+ status: 429;
2767
+ input: {
2768
+ param: {
2769
+ base: `0x${string}`;
2770
+ };
2771
+ } & {
2772
+ query?: {
2773
+ chainId?: string | string[];
2774
+ include?: string | string[];
2775
+ levels?: string | string[];
2776
+ } | undefined;
2777
+ };
2778
+ } | {
2779
+ output: {
2780
+ error: {
2781
+ code: "query_invalid";
2782
+ details?: readonly Response.error.Detail[] | undefined;
2783
+ message: string;
2784
+ };
2785
+ requestId: string;
2786
+ };
2787
+ outputFormat: "json";
2788
+ status: 400;
2789
+ input: {
2790
+ param: {
2791
+ base: `0x${string}`;
2792
+ };
2793
+ } & {
2794
+ query?: {
2795
+ chainId?: string | string[];
2796
+ include?: string | string[];
2797
+ levels?: string | string[];
2798
+ } | undefined;
2799
+ };
2800
+ } | {
2801
+ output: {
2802
+ error: {
2803
+ code: "pair_invalid";
2804
+ details?: readonly Response.error.Detail[] | undefined;
2805
+ message: string;
2806
+ };
2807
+ requestId: string;
2808
+ };
2809
+ outputFormat: "json";
2810
+ status: 400;
2811
+ input: {
2812
+ param: {
2813
+ base: `0x${string}`;
2814
+ };
2815
+ } & {
2816
+ query?: {
2817
+ chainId?: string | string[];
2818
+ include?: string | string[];
2819
+ levels?: string | string[];
2820
+ } | undefined;
2821
+ };
2822
+ } | {
2823
+ output: {
2824
+ error: {
2825
+ code: "pair_not_found";
2826
+ details?: readonly Response.error.Detail[] | undefined;
2827
+ message: string;
2828
+ };
2829
+ requestId: string;
2830
+ };
2831
+ outputFormat: "json";
2832
+ status: 404;
2833
+ input: {
2834
+ param: {
2835
+ base: `0x${string}`;
2836
+ };
2837
+ } & {
2838
+ query?: {
2839
+ chainId?: string | string[];
2840
+ include?: string | string[];
2841
+ levels?: string | string[];
2842
+ } | undefined;
2843
+ };
2844
+ } | {
2845
+ output: {
2846
+ asks: {
2847
+ cumulativeSize: string;
2848
+ id: string;
2849
+ price: string;
2850
+ size: string;
2851
+ tick: number;
2852
+ }[];
2853
+ base: {
2854
+ address: `0x${string}`;
2855
+ currency?: string | undefined;
2856
+ decimals?: number | undefined;
2857
+ logoUri?: string | undefined;
2858
+ name?: string | undefined;
2859
+ symbol?: string | undefined;
2860
+ verified?: boolean | undefined;
2861
+ };
2862
+ bids: {
2863
+ cumulativeSize: string;
2864
+ id: string;
2865
+ price: string;
2866
+ size: string;
2867
+ tick: number;
2868
+ }[];
2869
+ quote: {
2870
+ address: `0x${string}`;
2871
+ currency?: string | undefined;
2872
+ decimals?: number | undefined;
2873
+ logoUri?: string | undefined;
2874
+ name?: string | undefined;
2875
+ symbol?: string | undefined;
2876
+ verified?: boolean | undefined;
2877
+ };
2878
+ };
2879
+ outputFormat: "json";
2880
+ status: 200;
2881
+ input: {
2882
+ param: {
2883
+ base: `0x${string}`;
2884
+ };
2885
+ } & {
2886
+ query?: {
2887
+ chainId?: string | string[];
2888
+ include?: string | string[];
2889
+ levels?: string | string[];
2890
+ } | undefined;
2891
+ };
2892
+ };
2893
+ };
2894
+ }, "/", "/pairs/:base/depth">;
2895
+ /**
2896
+ * Resolves the point-in-time order-state streams for a set of `orderId`s
2897
+ * from the raw `OrderPlaced`/`OrderFlipped` logs.
2898
+ *
2899
+ * A T5+ flip order keeps its `orderId` while `(isBid, tick)` swap sides on
2900
+ * every flip, so a fill's state is the latest event *before* the fill — not
2901
+ * the original `OrderPlaced`. One query returns, per order, its pre-page
2902
+ * history compressed to the latest event (`argMax`, sentinel position
2903
+ * `(-1, -1)` so it sorts first) plus every raw in-page event, so an order
2904
+ * that flips between two of its page fills resolves each fill correctly.
2905
+ * `logs` is sorted by `(address, selector, block_num, log_idx)` with a
2906
+ * `topic1` bloom index, so both halves are pruned range reads. Returned
2907
+ * per-order event lists are position-sorted.
2908
+ */
2909
+ export declare function resolveOrderStates(c: Context<App.Environment>, options: resolveOrderStates.Options): Promise<Map<string, resolveOrderStates.State[]>>;
2910
+ declare namespace resolveOrderStates {
2911
+ /** Options for the order-state stream query. */
2912
+ type Options = {
2913
+ chainId: z.output<typeof Schema.ChainId>;
2914
+ /** Highest block of the page (inclusive in-span bound). */
2915
+ maxBlock: number;
2916
+ /** Lowest block of the page (baseline/in-span split point). */
2917
+ minBlock: number;
2918
+ /** Decimal order ids to resolve. */
2919
+ orderIds: readonly string[];
2920
+ };
2921
+ /** Order state effective from `(blockNumber, logIndex)` onward. */
2922
+ type State = {
2923
+ /** Event block, or `-1` for the compressed pre-page baseline. */
2924
+ blockNumber: number;
2925
+ /** Maker side at this state: `true` = bid (taker sells base into it). */
2926
+ isBid: boolean;
2927
+ /** Event log index, or `-1` for the baseline. */
2928
+ logIndex: number;
2929
+ /** Signed price tick at this state. */
2930
+ tick: number;
2931
+ /** Book base token (lowercase address). */
2932
+ token: string;
2933
+ };
2934
+ }
2935
+ /**
2936
+ * Resolves the quote token of order books missing from the `dex_pairs` index
2937
+ * (books created without a `PairCreated` event, e.g. genesis system books)
2938
+ * by reading the base token's on-chain `quoteToken()` — the quote is
2939
+ * intrinsic and immutable for a TIP-20, so results memoize long. `undefined`
2940
+ * from the RPC means the default quote (pathUSD). Best-effort: a base whose
2941
+ * quote cannot be resolved is absent from the returned map, and its fills
2942
+ * are dropped downstream.
2943
+ */
2944
+ export declare function resolveBookQuotes(c: Context<App.Environment>, options: resolveBookQuotes.Options): Promise<Map<string, z.output<typeof Schema.TokenAddress>>>;
2945
+ declare namespace resolveBookQuotes {
2946
+ /** Options for the book-quote fallback resolution. */
2947
+ type Options = {
2948
+ /** Book base addresses missing from the pair index (lowercase). */
2949
+ bases: readonly string[];
2950
+ chainId: z.output<typeof Schema.ChainId>;
2951
+ };
2952
+ }
2953
+ /**
2954
+ * Computes per-book resting-order reserves for a set of base tokens, mirroring
2955
+ * the legacy `/gecko` adapter's pool-liquidity semantics: scan `OrderPlaced`
2956
+ * scoped to the given bases, subtract fills, drop cancelled orders, then
2957
+ * aggregate each order's `remaining` by side — asks into the base reserve, bids
2958
+ * into the quote reserve.
2959
+ *
2960
+ * The bid leg is added in its placed (base-denominated) units **without** tick
2961
+ * conversion, matching the legacy adapter exactly so GeckoTerminal's per-pool
2962
+ * `reserve_in_usd` stays consistent with the figures it has indexed historically.
2963
+ * (The on-chain `balanceOf` of the DEX settlement account — what the adapter
2964
+ * used previously — is a single shared pool across every book sharing a quote
2965
+ * token, so it cannot express per-book liquidity.)
2966
+ *
2967
+ * Reserves are keyed by **base** token (a book's identity), so two books sharing
2968
+ * a quote token report distinct reserves. The `OrderPlaced` scan uses a fair
2969
+ * per-token cap (`LIMIT ... BY token`) so one active book can't starve the
2970
+ * others' newest placements under a shared budget; `truncated` is set when any
2971
+ * book hits the cap. Like {@link loadRestingOrders}, this reads only
2972
+ * `OrderPlaced` (`dex_orders`), so flip orders (which mutate side/tick via
2973
+ * `OrderFlipped` without a new placement) are not reflected — acceptable for
2974
+ * legacy parity, but not an exact economic TVL.
2975
+ */
2976
+ export declare function resolveBookReserves(c: Context<App.Environment>, options: resolveBookReserves.Options): Promise<resolveBookReserves.Result>;
2977
+ export declare namespace resolveBookReserves {
2978
+ type Options = {
2979
+ /** Book base tokens to compute reserves for (case-insensitive). */
2980
+ bases: readonly string[];
2981
+ chainId: z.output<typeof Schema.ChainId>;
2982
+ /** Newest-placement scan window per base; defaults to {@link orderScanCap}. */
2983
+ scanCap?: number | undefined;
2984
+ };
2985
+ /** Per-book resting liquidity, in each token's smallest unit. */
2986
+ type Reserve = {
2987
+ /** Ask-side resting liquidity (base token units). */
2988
+ base: bigint;
2989
+ /** Bid-side resting liquidity (base-denominated, legacy-compatible). */
2990
+ quote: bigint;
2991
+ };
2992
+ type Result = {
2993
+ /** Reserves keyed by lowercase base token. */
2994
+ reserves: Map<string, Reserve>;
2995
+ /** Set when any book hit `scanCap` (older placements may be missing). */
2996
+ truncated: boolean;
2997
+ };
2998
+ }
2999
+ export {};
3000
+ //# sourceMappingURL=exchanges.d.ts.map