tapimo 0.5.3 → 0.7.0

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 (376) hide show
  1. package/dist/App.d.ts +15830 -7220
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/App.js +9 -1
  4. package/dist/App.js.map +1 -1
  5. package/dist/Scope.d.ts +4 -0
  6. package/dist/Scope.d.ts.map +1 -1
  7. package/dist/Scope.js +5 -0
  8. package/dist/Scope.js.map +1 -1
  9. package/dist/admin/App.d.ts +1011 -412
  10. package/dist/admin/App.d.ts.map +1 -1
  11. package/dist/admin/App.js +4 -0
  12. package/dist/admin/App.js.map +1 -1
  13. package/dist/admin/apps/api-keys.d.ts +2 -1
  14. package/dist/admin/apps/api-keys.d.ts.map +1 -1
  15. package/dist/admin/apps/early-access.d.ts +148 -0
  16. package/dist/admin/apps/early-access.d.ts.map +1 -0
  17. package/dist/admin/apps/early-access.js +133 -0
  18. package/dist/admin/apps/early-access.js.map +1 -0
  19. package/dist/admin/apps/organizations.d.ts +124 -1
  20. package/dist/admin/apps/organizations.d.ts.map +1 -1
  21. package/dist/admin/apps/organizations.js +97 -6
  22. package/dist/admin/apps/organizations.js.map +1 -1
  23. package/dist/admin/apps/verified-tokens.d.ts +526 -1
  24. package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
  25. package/dist/admin/apps/verified-tokens.js +214 -1
  26. package/dist/admin/apps/verified-tokens.js.map +1 -1
  27. package/dist/admin/ui.generated.d.ts +1 -1
  28. package/dist/admin/ui.generated.d.ts.map +1 -1
  29. package/dist/admin/ui.generated.js +95 -75
  30. package/dist/admin/ui.generated.js.map +1 -1
  31. package/dist/analytics/Analytics.d.ts.map +1 -1
  32. package/dist/analytics/Analytics.js +20 -0
  33. package/dist/analytics/Analytics.js.map +1 -1
  34. package/dist/analytics/tables/requestEvents.d.ts +18 -0
  35. package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
  36. package/dist/analytics/tables/requestEvents.js +36 -7
  37. package/dist/analytics/tables/requestEvents.js.map +1 -1
  38. package/dist/apps/data/App.d.ts +6260 -4924
  39. package/dist/apps/data/App.d.ts.map +1 -1
  40. package/dist/apps/data/App.js +11 -6
  41. package/dist/apps/data/App.js.map +1 -1
  42. package/dist/apps/data/FundingQuoteProviders.d.ts +34 -1
  43. package/dist/apps/data/FundingQuoteProviders.d.ts.map +1 -1
  44. package/dist/apps/data/FundingQuoteProviders.js +194 -16
  45. package/dist/apps/data/FundingQuoteProviders.js.map +1 -1
  46. package/dist/apps/data/FxOracle.d.ts +71 -0
  47. package/dist/apps/data/FxOracle.d.ts.map +1 -0
  48. package/dist/apps/data/FxOracle.js +97 -0
  49. package/dist/apps/data/FxOracle.js.map +1 -0
  50. package/dist/apps/data/index.d.ts +1 -0
  51. package/dist/apps/data/index.d.ts.map +1 -1
  52. package/dist/apps/data/index.js +1 -0
  53. package/dist/apps/data/index.js.map +1 -1
  54. package/dist/apps/data/routes/activities.d.ts +3599 -1382
  55. package/dist/apps/data/routes/activities.d.ts.map +1 -1
  56. package/dist/apps/data/routes/activities.js +250 -88
  57. package/dist/apps/data/routes/activities.js.map +1 -1
  58. package/dist/apps/data/routes/addresses.d.ts +872 -251
  59. package/dist/apps/data/routes/addresses.d.ts.map +1 -1
  60. package/dist/apps/data/routes/addresses.js +11 -9
  61. package/dist/apps/data/routes/addresses.js.map +1 -1
  62. package/dist/apps/data/routes/balances.d.ts +77 -26
  63. package/dist/apps/data/routes/balances.d.ts.map +1 -1
  64. package/dist/apps/data/routes/balances.js +88 -45
  65. package/dist/apps/data/routes/balances.js.map +1 -1
  66. package/dist/apps/data/routes/blocks.d.ts +39 -39
  67. package/dist/apps/data/routes/coingecko.d.ts +54 -54
  68. package/dist/apps/data/routes/exchanges.d.ts +856 -105
  69. package/dist/apps/data/routes/exchanges.d.ts.map +1 -1
  70. package/dist/apps/data/routes/exchanges.js +518 -76
  71. package/dist/apps/data/routes/exchanges.js.map +1 -1
  72. package/dist/apps/data/routes/fee-amm.d.ts +81 -67
  73. package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
  74. package/dist/apps/data/routes/fee-amm.js +76 -91
  75. package/dist/apps/data/routes/fee-amm.js.map +1 -1
  76. package/dist/apps/data/routes/funding.d.ts +80 -36
  77. package/dist/apps/data/routes/funding.d.ts.map +1 -1
  78. package/dist/apps/data/routes/funding.js +65 -31
  79. package/dist/apps/data/routes/funding.js.map +1 -1
  80. package/dist/apps/data/routes/receipts.d.ts +392 -315
  81. package/dist/apps/data/routes/receipts.d.ts.map +1 -1
  82. package/dist/apps/data/routes/receipts.js +152 -77
  83. package/dist/apps/data/routes/receipts.js.map +1 -1
  84. package/dist/apps/data/routes/tokens.d.ts +167 -174
  85. package/dist/apps/data/routes/tokens.d.ts.map +1 -1
  86. package/dist/apps/data/routes/tokens.js +15 -13
  87. package/dist/apps/data/routes/tokens.js.map +1 -1
  88. package/dist/apps/data/routes/transactions.d.ts +277 -536
  89. package/dist/apps/data/routes/transactions.d.ts.map +1 -1
  90. package/dist/apps/data/routes/transactions.js +96 -77
  91. package/dist/apps/data/routes/transactions.js.map +1 -1
  92. package/dist/apps/data/routes/transfers.d.ts +157 -81
  93. package/dist/apps/data/routes/transfers.d.ts.map +1 -1
  94. package/dist/apps/data/routes/transfers.js +272 -130
  95. package/dist/apps/data/routes/transfers.js.map +1 -1
  96. package/dist/apps/data/routes/valuation.d.ts +307 -0
  97. package/dist/apps/data/routes/valuation.d.ts.map +1 -0
  98. package/dist/apps/data/routes/valuation.js +292 -0
  99. package/dist/apps/data/routes/valuation.js.map +1 -0
  100. package/dist/apps/data/routes/verified-tokens.d.ts +36 -36
  101. package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
  102. package/dist/apps/data/routes/verified-tokens.js +7 -5
  103. package/dist/apps/data/routes/verified-tokens.js.map +1 -1
  104. package/dist/apps/data/routes/webhooks.d.ts +103 -123
  105. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  106. package/dist/apps/data/routes/webhooks.js +124 -25
  107. package/dist/apps/data/routes/webhooks.js.map +1 -1
  108. package/dist/apps/index.d.ts +2 -1
  109. package/dist/apps/index.d.ts.map +1 -1
  110. package/dist/apps/index.js +2 -1
  111. package/dist/apps/index.js.map +1 -1
  112. package/dist/apps/management/App.d.ts +8554 -1692
  113. package/dist/apps/management/App.d.ts.map +1 -1
  114. package/dist/apps/management/App.js +12 -1
  115. package/dist/apps/management/App.js.map +1 -1
  116. package/dist/apps/management/routes/api-keys.d.ts +7 -0
  117. package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
  118. package/dist/apps/management/routes/api-keys.js +17 -3
  119. package/dist/apps/management/routes/api-keys.js.map +1 -1
  120. package/dist/apps/management/routes/billing.d.ts +157 -162
  121. package/dist/apps/management/routes/billing.d.ts.map +1 -1
  122. package/dist/apps/management/routes/billing.js +31 -23
  123. package/dist/apps/management/routes/billing.js.map +1 -1
  124. package/dist/apps/management/routes/faucet.d.ts +232 -0
  125. package/dist/apps/management/routes/faucet.d.ts.map +1 -0
  126. package/dist/apps/management/routes/faucet.js +154 -0
  127. package/dist/apps/management/routes/faucet.js.map +1 -0
  128. package/dist/apps/management/routes/invitations.d.ts +60 -60
  129. package/dist/apps/management/routes/invite-links.d.ts +49 -20
  130. package/dist/apps/management/routes/invite-links.d.ts.map +1 -1
  131. package/dist/apps/management/routes/invite-links.js +26 -1
  132. package/dist/apps/management/routes/invite-links.js.map +1 -1
  133. package/dist/apps/management/routes/me.d.ts +6 -6
  134. package/dist/apps/management/routes/members.d.ts +6 -6
  135. package/dist/apps/management/routes/orgs.d.ts +42 -42
  136. package/dist/apps/management/routes/orgs.d.ts.map +1 -1
  137. package/dist/apps/management/routes/orgs.js +5 -0
  138. package/dist/apps/management/routes/orgs.js.map +1 -1
  139. package/dist/apps/management/routes/projects.d.ts +44 -44
  140. package/dist/apps/management/routes/usage.d.ts +3 -0
  141. package/dist/apps/management/routes/usage.d.ts.map +1 -1
  142. package/dist/apps/management/routes/usage.js +4 -0
  143. package/dist/apps/management/routes/usage.js.map +1 -1
  144. package/dist/apps/management/routes/verified-token-requests.d.ts +697 -0
  145. package/dist/apps/management/routes/verified-token-requests.d.ts.map +1 -0
  146. package/dist/apps/management/routes/verified-token-requests.js +271 -0
  147. package/dist/apps/management/routes/verified-token-requests.js.map +1 -0
  148. package/dist/apps/management/routes/webhooks.d.ts +6977 -0
  149. package/dist/apps/management/routes/webhooks.d.ts.map +1 -0
  150. package/dist/apps/management/routes/webhooks.js +573 -0
  151. package/dist/apps/management/routes/webhooks.js.map +1 -0
  152. package/dist/apps/mpp/App.d.ts +363 -0
  153. package/dist/apps/mpp/App.d.ts.map +1 -0
  154. package/dist/apps/mpp/App.js +72 -0
  155. package/dist/apps/mpp/App.js.map +1 -0
  156. package/dist/apps/mpp/Mpp.d.ts +178 -0
  157. package/dist/apps/mpp/Mpp.d.ts.map +1 -0
  158. package/dist/apps/mpp/Mpp.js +183 -0
  159. package/dist/apps/mpp/Mpp.js.map +1 -0
  160. package/dist/apps/mpp/index.d.ts +3 -0
  161. package/dist/apps/mpp/index.d.ts.map +1 -0
  162. package/dist/apps/mpp/index.js +3 -0
  163. package/dist/apps/mpp/index.js.map +1 -0
  164. package/dist/apps/relay/App.d.ts.map +1 -1
  165. package/dist/apps/relay/App.js +56 -9
  166. package/dist/apps/relay/App.js.map +1 -1
  167. package/dist/db/Db.d.ts +6 -0
  168. package/dist/db/Db.d.ts.map +1 -1
  169. package/dist/db/Db.js +110 -0
  170. package/dist/db/Db.js.map +1 -1
  171. package/dist/db/Schema.d.ts +53 -0
  172. package/dist/db/Schema.d.ts.map +1 -1
  173. package/dist/db/Schema.js +56 -0
  174. package/dist/db/Schema.js.map +1 -1
  175. package/dist/db/tables/earlyAccess.d.ts +50 -0
  176. package/dist/db/tables/earlyAccess.d.ts.map +1 -0
  177. package/dist/db/tables/earlyAccess.js +63 -0
  178. package/dist/db/tables/earlyAccess.js.map +1 -0
  179. package/dist/db/tables/enabledBillingSources.d.ts +73 -0
  180. package/dist/db/tables/enabledBillingSources.d.ts.map +1 -0
  181. package/dist/db/tables/enabledBillingSources.js +69 -0
  182. package/dist/db/tables/enabledBillingSources.js.map +1 -0
  183. package/dist/db/tables/invitations.d.ts.map +1 -1
  184. package/dist/db/tables/invitations.js +3 -0
  185. package/dist/db/tables/invitations.js.map +1 -1
  186. package/dist/db/tables/inviteLinks.d.ts +10 -2
  187. package/dist/db/tables/inviteLinks.d.ts.map +1 -1
  188. package/dist/db/tables/inviteLinks.js +10 -1
  189. package/dist/db/tables/inviteLinks.js.map +1 -1
  190. package/dist/db/tables/organizations.d.ts +5 -2
  191. package/dist/db/tables/organizations.d.ts.map +1 -1
  192. package/dist/db/tables/organizations.js +13 -2
  193. package/dist/db/tables/organizations.js.map +1 -1
  194. package/dist/db/tables/sponsoredTransactions.d.ts +2 -0
  195. package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
  196. package/dist/db/tables/sponsoredTransactions.js +2 -0
  197. package/dist/db/tables/sponsoredTransactions.js.map +1 -1
  198. package/dist/db/tables/verifiedTokenRequests.d.ts +94 -0
  199. package/dist/db/tables/verifiedTokenRequests.d.ts.map +1 -0
  200. package/dist/db/tables/verifiedTokenRequests.js +120 -0
  201. package/dist/db/tables/verifiedTokenRequests.js.map +1 -0
  202. package/dist/db/tables/webhookSubscriptions.d.ts +14 -0
  203. package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
  204. package/dist/db/tables/webhookSubscriptions.js +16 -0
  205. package/dist/db/tables/webhookSubscriptions.js.map +1 -1
  206. package/dist/handlers/internal/utils.d.ts +1 -16
  207. package/dist/handlers/internal/utils.d.ts.map +1 -1
  208. package/dist/handlers/internal/utils.js +17 -6
  209. package/dist/handlers/internal/utils.js.map +1 -1
  210. package/dist/handlers/relay.d.ts.map +1 -1
  211. package/dist/handlers/relay.js +37 -5
  212. package/dist/handlers/relay.js.map +1 -1
  213. package/dist/internal/Auth.d.ts +11 -2
  214. package/dist/internal/Auth.d.ts.map +1 -1
  215. package/dist/internal/Auth.js +14 -47
  216. package/dist/internal/Auth.js.map +1 -1
  217. package/dist/internal/FundingQuotes.d.ts +147 -47
  218. package/dist/internal/FundingQuotes.d.ts.map +1 -1
  219. package/dist/internal/FundingQuotes.js +119 -33
  220. package/dist/internal/FundingQuotes.js.map +1 -1
  221. package/dist/internal/Log.d.ts +37 -5
  222. package/dist/internal/Log.d.ts.map +1 -1
  223. package/dist/internal/Log.js +52 -3
  224. package/dist/internal/Log.js.map +1 -1
  225. package/dist/internal/MetricSink.d.ts.map +1 -1
  226. package/dist/internal/MetricSink.js +24 -0
  227. package/dist/internal/MetricSink.js.map +1 -1
  228. package/dist/internal/OpenApi.d.ts +2 -2
  229. package/dist/internal/OpenApi.d.ts.map +1 -1
  230. package/dist/internal/OpenApi.js +3 -0
  231. package/dist/internal/OpenApi.js.map +1 -1
  232. package/dist/internal/Response.d.ts +2 -2
  233. package/dist/internal/Response.d.ts.map +1 -1
  234. package/dist/internal/Response.js +12 -4
  235. package/dist/internal/Response.js.map +1 -1
  236. package/dist/internal/Schema.d.ts +14 -5
  237. package/dist/internal/Schema.d.ts.map +1 -1
  238. package/dist/internal/Schema.js +23 -5
  239. package/dist/internal/Schema.js.map +1 -1
  240. package/dist/internal/Value.d.ts +18 -0
  241. package/dist/internal/Value.d.ts.map +1 -1
  242. package/dist/internal/Value.js +11 -1
  243. package/dist/internal/Value.js.map +1 -1
  244. package/dist/internal/VerifiedTokens.d.ts.map +1 -1
  245. package/dist/internal/VerifiedTokens.js +10 -1
  246. package/dist/internal/VerifiedTokens.js.map +1 -1
  247. package/dist/internal/Webhooks.d.ts +24 -3
  248. package/dist/internal/Webhooks.d.ts.map +1 -1
  249. package/dist/internal/Webhooks.js +34 -8
  250. package/dist/internal/Webhooks.js.map +1 -1
  251. package/package.json +7 -2
  252. package/src/App.test.ts +9 -4
  253. package/src/App.ts +23 -3
  254. package/src/Client.test-d.ts +733 -20
  255. package/src/Scope.ts +5 -0
  256. package/src/admin/App.test.ts +4 -0
  257. package/src/admin/App.ts +4 -0
  258. package/src/admin/apps/early-access.test.ts +125 -0
  259. package/src/admin/apps/early-access.ts +176 -0
  260. package/src/admin/apps/organizations.test.ts +86 -2
  261. package/src/admin/apps/organizations.ts +155 -31
  262. package/src/admin/apps/scopes.test.ts +5 -0
  263. package/src/admin/apps/verified-tokens.test.ts +201 -0
  264. package/src/admin/apps/verified-tokens.ts +532 -286
  265. package/src/admin/ui/plugin.ts +2 -1
  266. package/src/admin/ui/src/lib/early-access.ts +63 -0
  267. package/src/admin/ui/src/lib/organizations.test.ts +81 -1
  268. package/src/admin/ui/src/lib/organizations.ts +92 -0
  269. package/src/admin/ui/src/lib/verified-tokens.ts +79 -0
  270. package/src/admin/ui/src/routeTree.gen.ts +33 -2
  271. package/src/admin/ui/src/routes/__root.tsx +2 -1
  272. package/src/admin/ui/src/routes/api-keys.tsx +1 -1
  273. package/src/admin/ui/src/routes/early-access.tsx +162 -0
  274. package/src/admin/ui/src/routes/organizations_.$orgId.tsx +103 -0
  275. package/src/admin/ui/src/routes/verified-tokens.tsx +230 -19
  276. package/src/admin/ui.generated.ts +95 -94
  277. package/src/analytics/Analytics.test.ts +83 -0
  278. package/src/analytics/Analytics.ts +20 -0
  279. package/src/analytics/tables/requestEvents.ts +60 -7
  280. package/src/apps/composition.test.ts +11 -2
  281. package/src/apps/data/App.test.ts +1 -1
  282. package/src/apps/data/App.ts +22 -14
  283. package/src/apps/data/FundingQuoteProviders.test.ts +297 -4
  284. package/src/apps/data/FundingQuoteProviders.ts +255 -29
  285. package/src/apps/data/FxOracle.test.ts +118 -0
  286. package/src/apps/data/FxOracle.ts +153 -0
  287. package/src/apps/data/index.ts +1 -0
  288. package/src/apps/data/routes/activities.test.ts +177 -3
  289. package/src/apps/data/routes/activities.ts +441 -132
  290. package/src/apps/data/routes/addresses.ts +19 -9
  291. package/src/apps/data/routes/balances.test.ts +148 -11
  292. package/src/apps/data/routes/balances.ts +140 -51
  293. package/src/apps/data/routes/exchanges.test.ts +544 -9
  294. package/src/apps/data/routes/exchanges.ts +690 -103
  295. package/src/apps/data/routes/fee-amm.test.ts +47 -23
  296. package/src/apps/data/routes/fee-amm.ts +98 -119
  297. package/src/apps/data/routes/funding.test.ts +113 -8
  298. package/src/apps/data/routes/funding.ts +77 -51
  299. package/src/apps/data/routes/receipts.test.ts +129 -23
  300. package/src/apps/data/routes/receipts.ts +205 -100
  301. package/src/apps/data/routes/tokens.test.ts +43 -0
  302. package/src/apps/data/routes/tokens.ts +28 -13
  303. package/src/apps/data/routes/transactions.test.ts +72 -19
  304. package/src/apps/data/routes/transactions.ts +162 -92
  305. package/src/apps/data/routes/transfers.test.ts +341 -31
  306. package/src/apps/data/routes/transfers.ts +358 -158
  307. package/src/apps/data/routes/valuation.test.ts +437 -0
  308. package/src/apps/data/routes/valuation.ts +423 -0
  309. package/src/apps/data/routes/verified-tokens.ts +14 -2
  310. package/src/apps/data/routes/webhooks.test.ts +56 -8
  311. package/src/apps/data/routes/webhooks.ts +144 -27
  312. package/src/apps/index.ts +2 -1
  313. package/src/apps/management/App.ts +13 -0
  314. package/src/apps/management/routes/api-keys.test.ts +14 -0
  315. package/src/apps/management/routes/api-keys.ts +27 -3
  316. package/src/apps/management/routes/billing.test.ts +152 -20
  317. package/src/apps/management/routes/billing.ts +34 -18
  318. package/src/apps/management/routes/faucet.test.ts +87 -0
  319. package/src/apps/management/routes/faucet.ts +201 -0
  320. package/src/apps/management/routes/invite-links.test.ts +117 -0
  321. package/src/apps/management/routes/invite-links.ts +43 -1
  322. package/src/apps/management/routes/me.test.ts +9 -99
  323. package/src/apps/management/routes/orgs.test.ts +45 -2
  324. package/src/apps/management/routes/orgs.ts +6 -0
  325. package/src/apps/management/routes/scopes.test.ts +1 -0
  326. package/src/apps/management/routes/usage.test.ts +6 -0
  327. package/src/apps/management/routes/usage.ts +7 -0
  328. package/src/apps/management/routes/verified-token-requests.test.ts +377 -0
  329. package/src/apps/management/routes/verified-token-requests.ts +397 -0
  330. package/src/apps/management/routes/webhooks.test.ts +426 -0
  331. package/src/apps/management/routes/webhooks.ts +672 -0
  332. package/src/apps/mpp/App.ts +86 -0
  333. package/src/apps/mpp/Mpp.test.ts +193 -0
  334. package/src/apps/mpp/Mpp.ts +353 -0
  335. package/src/apps/mpp/index.ts +2 -0
  336. package/src/apps/mpp/internal/Adapter.ts +11 -0
  337. package/src/apps/mpp/internal/Error.ts +9 -0
  338. package/src/apps/mpp/internal/Idempotency.ts +7 -0
  339. package/src/apps/mpp/internal/Screening.ts +10 -0
  340. package/src/apps/relay/App.test.ts +88 -6
  341. package/src/apps/relay/App.ts +61 -9
  342. package/src/db/Db.test.ts +19 -0
  343. package/src/db/Db.ts +125 -0
  344. package/src/db/Schema.ts +68 -0
  345. package/src/db/tables/earlyAccess.ts +86 -0
  346. package/src/db/tables/enabledBillingSources.test.ts +303 -0
  347. package/src/db/tables/enabledBillingSources.ts +118 -0
  348. package/src/db/tables/invitations.ts +3 -0
  349. package/src/db/tables/inviteLinks.ts +22 -3
  350. package/src/db/tables/organizations.test.ts +103 -0
  351. package/src/db/tables/organizations.ts +18 -2
  352. package/src/db/tables/sponsoredTransactions.ts +4 -0
  353. package/src/db/tables/verifiedTokenRequests.test.ts +200 -0
  354. package/src/db/tables/verifiedTokenRequests.ts +182 -0
  355. package/src/db/tables/webhookSubscriptions.ts +31 -0
  356. package/src/handlers/internal/utils.ts +22 -6
  357. package/src/handlers/relay.errors.test.ts +153 -0
  358. package/src/handlers/relay.ts +42 -7
  359. package/src/internal/Auth.test.ts +3 -3
  360. package/src/internal/Auth.ts +15 -47
  361. package/src/internal/FundingQuotes.test.ts +161 -6
  362. package/src/internal/FundingQuotes.ts +141 -39
  363. package/src/internal/Log.test-d.ts +21 -0
  364. package/src/internal/Log.test.ts +141 -0
  365. package/src/internal/Log.ts +93 -6
  366. package/src/internal/MetricSink.test.ts +215 -0
  367. package/src/internal/MetricSink.ts +24 -0
  368. package/src/internal/OpenApi.ts +3 -0
  369. package/src/internal/Response.test.ts +28 -0
  370. package/src/internal/Response.ts +12 -4
  371. package/src/internal/Schema.ts +50 -5
  372. package/src/internal/Value.test.ts +20 -0
  373. package/src/internal/Value.ts +24 -1
  374. package/src/internal/VerifiedTokens.ts +9 -1
  375. package/src/internal/Webhooks.test.ts +140 -0
  376. package/src/internal/Webhooks.ts +53 -9
@@ -0,0 +1,697 @@
1
+ import * as z from 'zod/mini';
2
+ import * as Response from '../../../internal/Response.js';
3
+ import type { Environment } from '../App.js';
4
+ /** OpenAPI schemas owned by verified-token requests. */
5
+ export declare namespace schema {
6
+ /**
7
+ * An organization's verification request (response shape). `reviewedBy` is
8
+ * deliberately absent: reviewer identity stays on the admin surface.
9
+ */
10
+ const VerifiedTokenRequest: z.ZodMiniObject<{
11
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
12
+ currency: z.ZodMiniString<string>;
13
+ decimals: z.ZodMiniNumber<number>;
14
+ logoUri: z.ZodMiniOptional<z.ZodMiniURL>;
15
+ name: z.ZodMiniString<string>;
16
+ symbol: z.ZodMiniString<string>;
17
+ chainId: z.ZodMiniNumber<number>;
18
+ createdAt: z.ZodMiniString<string>;
19
+ id: z.ZodMiniString<string>;
20
+ logo: z.ZodMiniOptional<z.ZodMiniString<string>>;
21
+ note: z.ZodMiniNullable<z.ZodMiniString<string>>;
22
+ orgId: z.ZodMiniString<string>;
23
+ requestedBy: z.ZodMiniString<string>;
24
+ reviewNote: z.ZodMiniNullable<z.ZodMiniString<string>>;
25
+ reviewedAt: z.ZodMiniNullable<z.ZodMiniString<string>>;
26
+ status: z.ZodMiniEnum<{
27
+ approved: "approved";
28
+ denied: "denied";
29
+ pending: "pending";
30
+ }>;
31
+ updatedAt: z.ZodMiniString<string>;
32
+ }, z.core.$strip>;
33
+ /**
34
+ * Create body. The shared token fields trust admin curation, so the
35
+ * member-facing surface re-declares them with length caps.
36
+ */
37
+ const CreateBody: z.ZodMiniObject<{
38
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
39
+ decimals: z.ZodMiniNumber<number>;
40
+ chainId: z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
41
+ mainnet: "mainnet";
42
+ testnet: "testnet";
43
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>;
44
+ currency: z.ZodMiniString<string>;
45
+ logo: z.ZodMiniOptional<z.ZodMiniString<string>>;
46
+ logoUri: z.ZodMiniOptional<z.ZodMiniURL>;
47
+ name: z.ZodMiniString<string>;
48
+ note: z.ZodMiniOptional<z.ZodMiniString<string>>;
49
+ symbol: z.ZodMiniString<string>;
50
+ }, z.core.$strip>;
51
+ /** Non-paginated list of an organization's requests. */
52
+ const ListResponse: z.ZodMiniObject<{
53
+ data: z.ZodMiniArray<z.ZodMiniObject<{
54
+ address: z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>;
55
+ currency: z.ZodMiniString<string>;
56
+ decimals: z.ZodMiniNumber<number>;
57
+ logoUri: z.ZodMiniOptional<z.ZodMiniURL>;
58
+ name: z.ZodMiniString<string>;
59
+ symbol: z.ZodMiniString<string>;
60
+ chainId: z.ZodMiniNumber<number>;
61
+ createdAt: z.ZodMiniString<string>;
62
+ id: z.ZodMiniString<string>;
63
+ logo: z.ZodMiniOptional<z.ZodMiniString<string>>;
64
+ note: z.ZodMiniNullable<z.ZodMiniString<string>>;
65
+ orgId: z.ZodMiniString<string>;
66
+ requestedBy: z.ZodMiniString<string>;
67
+ reviewNote: z.ZodMiniNullable<z.ZodMiniString<string>>;
68
+ reviewedAt: z.ZodMiniNullable<z.ZodMiniString<string>>;
69
+ status: z.ZodMiniEnum<{
70
+ approved: "approved";
71
+ denied: "denied";
72
+ pending: "pending";
73
+ }>;
74
+ updatedAt: z.ZodMiniString<string>;
75
+ }, z.core.$strip>>;
76
+ }, z.core.$strip>;
77
+ /** Path parameters addressing an organization's requests. */
78
+ const Params: z.ZodMiniObject<{
79
+ orgId: z.ZodMiniString<string>;
80
+ }, z.core.$strip>;
81
+ /** Path parameters addressing one verification request. */
82
+ const RequestParams: z.ZodMiniObject<{
83
+ orgId: z.ZodMiniString<string>;
84
+ requestId: z.ZodMiniString<string>;
85
+ }, z.core.$strip>;
86
+ /** Cancel confirmation. */
87
+ const DeleteResponse: z.ZodMiniObject<{
88
+ id: z.ZodMiniString<string>;
89
+ }, z.core.$strip>;
90
+ }
91
+ /** Mounts organization verified-token request operations. */
92
+ export declare function verifiedTokenRequests(): import("hono/hono-base").HonoBase<Environment, {
93
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/verified-token-requests": {
94
+ $post: {
95
+ output: {
96
+ error: {
97
+ code: "api_key_malformed";
98
+ details?: readonly Response.error.Detail[] | undefined;
99
+ message: string;
100
+ };
101
+ requestId: string;
102
+ };
103
+ outputFormat: "json";
104
+ status: 400;
105
+ input: {
106
+ param: {
107
+ orgId: string;
108
+ };
109
+ } & {
110
+ json: {
111
+ address: `0x${string}`;
112
+ decimals: number;
113
+ chainId: unknown;
114
+ currency: string;
115
+ logo?: string | undefined;
116
+ logoUri?: string | undefined;
117
+ name: string;
118
+ note?: string | undefined;
119
+ symbol: string;
120
+ };
121
+ };
122
+ } | {
123
+ output: {
124
+ error: {
125
+ code: "api_key_invalid" | "api_key_missing";
126
+ details?: readonly Response.error.Detail[] | undefined;
127
+ message: string;
128
+ };
129
+ requestId: string;
130
+ };
131
+ outputFormat: "json";
132
+ status: 401;
133
+ input: {
134
+ param: {
135
+ orgId: string;
136
+ };
137
+ } & {
138
+ json: {
139
+ address: `0x${string}`;
140
+ decimals: number;
141
+ chainId: unknown;
142
+ currency: string;
143
+ logo?: string | undefined;
144
+ logoUri?: string | undefined;
145
+ name: string;
146
+ note?: string | undefined;
147
+ symbol: string;
148
+ };
149
+ };
150
+ } | {
151
+ output: {
152
+ error: {
153
+ code: "upstream_error";
154
+ details?: readonly Response.error.Detail[] | undefined;
155
+ message: string;
156
+ };
157
+ requestId: string;
158
+ };
159
+ outputFormat: "json";
160
+ status: 502;
161
+ input: {
162
+ param: {
163
+ orgId: string;
164
+ };
165
+ } & {
166
+ json: {
167
+ address: `0x${string}`;
168
+ decimals: number;
169
+ chainId: unknown;
170
+ currency: string;
171
+ logo?: string | undefined;
172
+ logoUri?: string | undefined;
173
+ name: string;
174
+ note?: string | undefined;
175
+ symbol: string;
176
+ };
177
+ };
178
+ } | {
179
+ output: {
180
+ error: {
181
+ code: "organization_not_found";
182
+ details?: readonly Response.error.Detail[] | undefined;
183
+ message: string;
184
+ };
185
+ requestId: string;
186
+ };
187
+ outputFormat: "json";
188
+ status: 404;
189
+ input: {
190
+ param: {
191
+ orgId: string;
192
+ };
193
+ } & {
194
+ json: {
195
+ address: `0x${string}`;
196
+ decimals: number;
197
+ chainId: unknown;
198
+ currency: string;
199
+ logo?: string | undefined;
200
+ logoUri?: string | undefined;
201
+ name: string;
202
+ note?: string | undefined;
203
+ symbol: string;
204
+ };
205
+ };
206
+ } | {
207
+ output: {
208
+ error: {
209
+ code: "body_invalid";
210
+ details?: readonly Response.error.Detail[] | undefined;
211
+ message: string;
212
+ };
213
+ requestId: string;
214
+ };
215
+ outputFormat: "json";
216
+ status: 400;
217
+ input: {
218
+ param: {
219
+ orgId: string;
220
+ };
221
+ } & {
222
+ json: {
223
+ address: `0x${string}`;
224
+ decimals: number;
225
+ chainId: unknown;
226
+ currency: string;
227
+ logo?: string | undefined;
228
+ logoUri?: string | undefined;
229
+ name: string;
230
+ note?: string | undefined;
231
+ symbol: string;
232
+ };
233
+ };
234
+ } | {
235
+ output: {
236
+ error: {
237
+ code: "forbidden";
238
+ details?: readonly Response.error.Detail[] | undefined;
239
+ message: string;
240
+ };
241
+ requestId: string;
242
+ };
243
+ outputFormat: "json";
244
+ status: 403;
245
+ input: {
246
+ param: {
247
+ orgId: string;
248
+ };
249
+ } & {
250
+ json: {
251
+ address: `0x${string}`;
252
+ decimals: number;
253
+ chainId: unknown;
254
+ currency: string;
255
+ logo?: string | undefined;
256
+ logoUri?: string | undefined;
257
+ name: string;
258
+ note?: string | undefined;
259
+ symbol: string;
260
+ };
261
+ };
262
+ } | {
263
+ output: {
264
+ error: {
265
+ code: "verified_token_exists";
266
+ details?: readonly Response.error.Detail[] | undefined;
267
+ message: string;
268
+ };
269
+ requestId: string;
270
+ };
271
+ outputFormat: "json";
272
+ status: 409;
273
+ input: {
274
+ param: {
275
+ orgId: string;
276
+ };
277
+ } & {
278
+ json: {
279
+ address: `0x${string}`;
280
+ decimals: number;
281
+ chainId: unknown;
282
+ currency: string;
283
+ logo?: string | undefined;
284
+ logoUri?: string | undefined;
285
+ name: string;
286
+ note?: string | undefined;
287
+ symbol: string;
288
+ };
289
+ };
290
+ } | {
291
+ output: {
292
+ error: {
293
+ code: "verified_symbol_exists";
294
+ details?: readonly Response.error.Detail[] | undefined;
295
+ message: string;
296
+ };
297
+ requestId: string;
298
+ };
299
+ outputFormat: "json";
300
+ status: 409;
301
+ input: {
302
+ param: {
303
+ orgId: string;
304
+ };
305
+ } & {
306
+ json: {
307
+ address: `0x${string}`;
308
+ decimals: number;
309
+ chainId: unknown;
310
+ currency: string;
311
+ logo?: string | undefined;
312
+ logoUri?: string | undefined;
313
+ name: string;
314
+ note?: string | undefined;
315
+ symbol: string;
316
+ };
317
+ };
318
+ } | {
319
+ output: {
320
+ error: {
321
+ code: "request_limit_reached";
322
+ details?: readonly Response.error.Detail[] | undefined;
323
+ message: string;
324
+ };
325
+ requestId: string;
326
+ };
327
+ outputFormat: "json";
328
+ status: 409;
329
+ input: {
330
+ param: {
331
+ orgId: string;
332
+ };
333
+ } & {
334
+ json: {
335
+ address: `0x${string}`;
336
+ decimals: number;
337
+ chainId: unknown;
338
+ currency: string;
339
+ logo?: string | undefined;
340
+ logoUri?: string | undefined;
341
+ name: string;
342
+ note?: string | undefined;
343
+ symbol: string;
344
+ };
345
+ };
346
+ } | {
347
+ output: {
348
+ error: {
349
+ code: "request_pending_exists";
350
+ details?: readonly Response.error.Detail[] | undefined;
351
+ message: string;
352
+ };
353
+ requestId: string;
354
+ };
355
+ outputFormat: "json";
356
+ status: 409;
357
+ input: {
358
+ param: {
359
+ orgId: string;
360
+ };
361
+ } & {
362
+ json: {
363
+ address: `0x${string}`;
364
+ decimals: number;
365
+ chainId: unknown;
366
+ currency: string;
367
+ logo?: string | undefined;
368
+ logoUri?: string | undefined;
369
+ name: string;
370
+ note?: string | undefined;
371
+ symbol: string;
372
+ };
373
+ };
374
+ } | {
375
+ output: {
376
+ address: `0x${string}`;
377
+ currency: string;
378
+ decimals: number;
379
+ logoUri?: string | undefined;
380
+ name: string;
381
+ symbol: string;
382
+ chainId: number;
383
+ createdAt: string;
384
+ id: string;
385
+ logo?: string | undefined;
386
+ note: string | null;
387
+ orgId: string;
388
+ requestedBy: string;
389
+ reviewNote: string | null;
390
+ reviewedAt: string | null;
391
+ status: "approved" | "denied" | "pending";
392
+ updatedAt: string;
393
+ };
394
+ outputFormat: "json";
395
+ status: 200;
396
+ input: {
397
+ param: {
398
+ orgId: string;
399
+ };
400
+ } & {
401
+ json: {
402
+ address: `0x${string}`;
403
+ decimals: number;
404
+ chainId: unknown;
405
+ currency: string;
406
+ logo?: string | undefined;
407
+ logoUri?: string | undefined;
408
+ name: string;
409
+ note?: string | undefined;
410
+ symbol: string;
411
+ };
412
+ };
413
+ };
414
+ };
415
+ } & {
416
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/verified-token-requests": {
417
+ $get: {
418
+ output: {
419
+ error: {
420
+ code: "api_key_malformed";
421
+ details?: readonly Response.error.Detail[] | undefined;
422
+ message: string;
423
+ };
424
+ requestId: string;
425
+ };
426
+ outputFormat: "json";
427
+ status: 400;
428
+ input: {
429
+ param: {
430
+ orgId: string;
431
+ };
432
+ };
433
+ } | {
434
+ output: {
435
+ error: {
436
+ code: "api_key_invalid" | "api_key_missing";
437
+ details?: readonly Response.error.Detail[] | undefined;
438
+ message: string;
439
+ };
440
+ requestId: string;
441
+ };
442
+ outputFormat: "json";
443
+ status: 401;
444
+ input: {
445
+ param: {
446
+ orgId: string;
447
+ };
448
+ };
449
+ } | {
450
+ output: {
451
+ error: {
452
+ code: "upstream_error";
453
+ details?: readonly Response.error.Detail[] | undefined;
454
+ message: string;
455
+ };
456
+ requestId: string;
457
+ };
458
+ outputFormat: "json";
459
+ status: 502;
460
+ input: {
461
+ param: {
462
+ orgId: string;
463
+ };
464
+ };
465
+ } | {
466
+ output: {
467
+ error: {
468
+ code: "organization_not_found";
469
+ details?: readonly Response.error.Detail[] | undefined;
470
+ message: string;
471
+ };
472
+ requestId: string;
473
+ };
474
+ outputFormat: "json";
475
+ status: 404;
476
+ input: {
477
+ param: {
478
+ orgId: string;
479
+ };
480
+ };
481
+ } | {
482
+ output: {
483
+ error: {
484
+ code: "param_invalid";
485
+ details?: readonly Response.error.Detail[] | undefined;
486
+ message: string;
487
+ };
488
+ requestId: string;
489
+ };
490
+ outputFormat: "json";
491
+ status: 400;
492
+ input: {
493
+ param: {
494
+ orgId: string;
495
+ };
496
+ };
497
+ } | {
498
+ output: {
499
+ error: {
500
+ code: "forbidden";
501
+ details?: readonly Response.error.Detail[] | undefined;
502
+ message: string;
503
+ };
504
+ requestId: string;
505
+ };
506
+ outputFormat: "json";
507
+ status: 403;
508
+ input: {
509
+ param: {
510
+ orgId: string;
511
+ };
512
+ };
513
+ } | {
514
+ output: {
515
+ data: {
516
+ address: `0x${string}`;
517
+ currency: string;
518
+ decimals: number;
519
+ logoUri?: string | undefined;
520
+ name: string;
521
+ symbol: string;
522
+ chainId: number;
523
+ createdAt: string;
524
+ id: string;
525
+ logo?: string | undefined;
526
+ note: string | null;
527
+ orgId: string;
528
+ requestedBy: string;
529
+ reviewNote: string | null;
530
+ reviewedAt: string | null;
531
+ status: "approved" | "denied" | "pending";
532
+ updatedAt: string;
533
+ }[];
534
+ };
535
+ outputFormat: "json";
536
+ status: 200;
537
+ input: {
538
+ param: {
539
+ orgId: string;
540
+ };
541
+ };
542
+ };
543
+ };
544
+ } & {
545
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/verified-token-requests/:requestId{vtr_[A-Za-z0-9_-]+}": {
546
+ $delete: {
547
+ output: {
548
+ error: {
549
+ code: "api_key_malformed";
550
+ details?: readonly Response.error.Detail[] | undefined;
551
+ message: string;
552
+ };
553
+ requestId: string;
554
+ };
555
+ outputFormat: "json";
556
+ status: 400;
557
+ input: {
558
+ param: {
559
+ orgId: string;
560
+ requestId: string;
561
+ };
562
+ };
563
+ } | {
564
+ output: {
565
+ error: {
566
+ code: "api_key_invalid" | "api_key_missing";
567
+ details?: readonly Response.error.Detail[] | undefined;
568
+ message: string;
569
+ };
570
+ requestId: string;
571
+ };
572
+ outputFormat: "json";
573
+ status: 401;
574
+ input: {
575
+ param: {
576
+ orgId: string;
577
+ requestId: string;
578
+ };
579
+ };
580
+ } | {
581
+ output: {
582
+ error: {
583
+ code: "upstream_error";
584
+ details?: readonly Response.error.Detail[] | undefined;
585
+ message: string;
586
+ };
587
+ requestId: string;
588
+ };
589
+ outputFormat: "json";
590
+ status: 502;
591
+ input: {
592
+ param: {
593
+ orgId: string;
594
+ requestId: string;
595
+ };
596
+ };
597
+ } | {
598
+ output: {
599
+ error: {
600
+ code: "organization_not_found";
601
+ details?: readonly Response.error.Detail[] | undefined;
602
+ message: string;
603
+ };
604
+ requestId: string;
605
+ };
606
+ outputFormat: "json";
607
+ status: 404;
608
+ input: {
609
+ param: {
610
+ orgId: string;
611
+ requestId: string;
612
+ };
613
+ };
614
+ } | {
615
+ output: {
616
+ error: {
617
+ code: "param_invalid";
618
+ details?: readonly Response.error.Detail[] | undefined;
619
+ message: string;
620
+ };
621
+ requestId: string;
622
+ };
623
+ outputFormat: "json";
624
+ status: 400;
625
+ input: {
626
+ param: {
627
+ orgId: string;
628
+ requestId: string;
629
+ };
630
+ };
631
+ } | {
632
+ output: {
633
+ error: {
634
+ code: "forbidden";
635
+ details?: readonly Response.error.Detail[] | undefined;
636
+ message: string;
637
+ };
638
+ requestId: string;
639
+ };
640
+ outputFormat: "json";
641
+ status: 403;
642
+ input: {
643
+ param: {
644
+ orgId: string;
645
+ requestId: string;
646
+ };
647
+ };
648
+ } | {
649
+ output: {
650
+ error: {
651
+ code: "request_not_pending";
652
+ details?: readonly Response.error.Detail[] | undefined;
653
+ message: string;
654
+ };
655
+ requestId: string;
656
+ };
657
+ outputFormat: "json";
658
+ status: 409;
659
+ input: {
660
+ param: {
661
+ orgId: string;
662
+ requestId: string;
663
+ };
664
+ };
665
+ } | {
666
+ output: {
667
+ error: {
668
+ code: "verified_token_request_not_found";
669
+ details?: readonly Response.error.Detail[] | undefined;
670
+ message: string;
671
+ };
672
+ requestId: string;
673
+ };
674
+ outputFormat: "json";
675
+ status: 404;
676
+ input: {
677
+ param: {
678
+ orgId: string;
679
+ requestId: string;
680
+ };
681
+ };
682
+ } | {
683
+ output: {
684
+ id: string;
685
+ };
686
+ outputFormat: "json";
687
+ status: 200;
688
+ input: {
689
+ param: {
690
+ orgId: string;
691
+ requestId: string;
692
+ };
693
+ };
694
+ };
695
+ };
696
+ }, "/", "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/verified-token-requests/:requestId{vtr_[A-Za-z0-9_-]+}">;
697
+ //# sourceMappingURL=verified-token-requests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified-token-requests.d.ts","sourceRoot":"","sources":["../../../../src/apps/management/routes/verified-token-requests.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAM7B,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAK5C,wDAAwD;AACxD,yBAAiB,MAAM,CAAC;IAStB;;;OAGG;IACI,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;qBAgEhC,CAAA;IAED;;;OAGG;IACI,MAAM,UAAU;;;;;;;;;;;;;qBA8DtB,CAAA;IAED,wDAAwD;IACjD,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;qBAOxB,CAAA;IAED,6DAA6D;IACtD,MAAM,MAAM;;qBASmE,CAAA;IAEtF,2DAA2D;IACpD,MAAM,aAAa;;;qBAe6C,CAAA;IAEvE,2BAA2B;IACpB,MAAM,cAAc;;qBASqD,CAAA;CACjF;AAcD,6DAA6D;AAC7D,wBAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sGA8JpC"}