tapimo 0.10.2 → 0.12.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 (386) hide show
  1. package/dist/App.d.ts +4896 -2166
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/App.js +2 -2
  4. package/dist/App.js.map +1 -1
  5. package/dist/Assets.d.ts +15 -0
  6. package/dist/Assets.d.ts.map +1 -1
  7. package/dist/Assets.js +7 -0
  8. package/dist/Assets.js.map +1 -1
  9. package/dist/Webhooks.d.ts +0 -75
  10. package/dist/Webhooks.d.ts.map +1 -1
  11. package/dist/Webhooks.js +1 -143
  12. package/dist/Webhooks.js.map +1 -1
  13. package/dist/admin/App.d.ts +127 -78
  14. package/dist/admin/App.d.ts.map +1 -1
  15. package/dist/admin/apps/earn-vaults.d.ts +115 -1
  16. package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
  17. package/dist/admin/apps/earn-vaults.js +59 -6
  18. package/dist/admin/apps/earn-vaults.js.map +1 -1
  19. package/dist/admin/apps/organizations.d.ts +3 -3
  20. package/dist/admin/apps/organizations.d.ts.map +1 -1
  21. package/dist/admin/apps/organizations.js +4 -2
  22. package/dist/admin/apps/organizations.js.map +1 -1
  23. package/dist/admin/apps/verified-tokens.d.ts +83 -83
  24. package/dist/admin/ui.generated.d.ts +1 -1
  25. package/dist/admin/ui.generated.d.ts.map +1 -1
  26. package/dist/admin/ui.generated.js +151 -151
  27. package/dist/admin/ui.generated.js.map +1 -1
  28. package/dist/apps/data/App.d.ts +5924 -4310
  29. package/dist/apps/data/App.d.ts.map +1 -1
  30. package/dist/apps/data/App.js +61 -9
  31. package/dist/apps/data/App.js.map +1 -1
  32. package/dist/apps/data/ZoneSelection.d.ts +62 -0
  33. package/dist/apps/data/ZoneSelection.d.ts.map +1 -0
  34. package/dist/apps/data/ZoneSelection.js +44 -0
  35. package/dist/apps/data/ZoneSelection.js.map +1 -0
  36. package/dist/apps/data/routes/activities.d.ts +2368 -5
  37. package/dist/apps/data/routes/activities.d.ts.map +1 -1
  38. package/dist/apps/data/routes/activities.js +423 -114
  39. package/dist/apps/data/routes/activities.js.map +1 -1
  40. package/dist/apps/data/routes/addresses.d.ts +131 -0
  41. package/dist/apps/data/routes/addresses.d.ts.map +1 -1
  42. package/dist/apps/data/routes/balances.d.ts +25 -25
  43. package/dist/apps/data/routes/balances.js +1 -1
  44. package/dist/apps/data/routes/balances.js.map +1 -1
  45. package/dist/apps/data/routes/blocks.d.ts +1 -1
  46. package/dist/apps/data/routes/blocks.js +1 -1
  47. package/dist/apps/data/routes/blocks.js.map +1 -1
  48. package/dist/apps/data/routes/earn.d.ts +135 -10
  49. package/dist/apps/data/routes/earn.d.ts.map +1 -1
  50. package/dist/apps/data/routes/earn.js +157 -25
  51. package/dist/apps/data/routes/earn.js.map +1 -1
  52. package/dist/apps/data/routes/exchanges.d.ts +829 -123
  53. package/dist/apps/data/routes/exchanges.d.ts.map +1 -1
  54. package/dist/apps/data/routes/exchanges.js +16 -13
  55. package/dist/apps/data/routes/exchanges.js.map +1 -1
  56. package/dist/apps/data/routes/fee-amm.d.ts +26 -26
  57. package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
  58. package/dist/apps/data/routes/fee-amm.js +9 -11
  59. package/dist/apps/data/routes/fee-amm.js.map +1 -1
  60. package/dist/apps/data/routes/receipts.d.ts +54 -54
  61. package/dist/apps/data/routes/receipts.js +1 -1
  62. package/dist/apps/data/routes/receipts.js.map +1 -1
  63. package/dist/apps/data/routes/rpc.js +24 -10
  64. package/dist/apps/data/routes/rpc.js.map +1 -1
  65. package/dist/apps/data/routes/tokenlist.d.ts +12 -12
  66. package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
  67. package/dist/apps/data/routes/tokenlist.js +16 -15
  68. package/dist/apps/data/routes/tokenlist.js.map +1 -1
  69. package/dist/apps/data/routes/tokens.d.ts +17 -3
  70. package/dist/apps/data/routes/tokens.d.ts.map +1 -1
  71. package/dist/apps/data/routes/tokens.js +34 -15
  72. package/dist/apps/data/routes/tokens.js.map +1 -1
  73. package/dist/apps/data/routes/transactions.d.ts +1 -1
  74. package/dist/apps/data/routes/transactions.js +1 -1
  75. package/dist/apps/data/routes/transactions.js.map +1 -1
  76. package/dist/apps/data/routes/transfers.d.ts +13 -13
  77. package/dist/apps/data/routes/transfers.d.ts.map +1 -1
  78. package/dist/apps/data/routes/transfers.js +7 -9
  79. package/dist/apps/data/routes/transfers.js.map +1 -1
  80. package/dist/apps/data/routes/valuation.d.ts +21 -21
  81. package/dist/apps/data/routes/verified-tokens.d.ts +5 -5
  82. package/dist/apps/data/routes/webhooks.d.ts +1011 -151
  83. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  84. package/dist/apps/data/routes/webhooks.js +126 -739
  85. package/dist/apps/data/routes/webhooks.js.map +1 -1
  86. package/dist/apps/data/routes/zones.d.ts +15 -15
  87. package/dist/apps/funding/App.d.ts +27 -27
  88. package/dist/apps/funding/routes/chains.d.ts.map +1 -1
  89. package/dist/apps/funding/routes/chains.js +5 -4
  90. package/dist/apps/funding/routes/chains.js.map +1 -1
  91. package/dist/apps/funding/routes/deposit-addresses.d.ts +18 -18
  92. package/dist/apps/funding/routes/deposit-addresses.d.ts.map +1 -1
  93. package/dist/apps/funding/routes/deposit-addresses.js +8 -8
  94. package/dist/apps/funding/routes/deposit-addresses.js.map +1 -1
  95. package/dist/apps/funding/routes/providers.d.ts.map +1 -1
  96. package/dist/apps/funding/routes/providers.js +3 -2
  97. package/dist/apps/funding/routes/providers.js.map +1 -1
  98. package/dist/apps/funding/routes/quotes.d.ts.map +1 -1
  99. package/dist/apps/funding/routes/quotes.js +2 -2
  100. package/dist/apps/funding/routes/quotes.js.map +1 -1
  101. package/dist/apps/funding/routes/transfers.d.ts +33 -33
  102. package/dist/apps/management/App.d.ts +1433 -322
  103. package/dist/apps/management/App.d.ts.map +1 -1
  104. package/dist/apps/management/Billing.d.ts.map +1 -1
  105. package/dist/apps/management/Billing.js +19 -6
  106. package/dist/apps/management/Billing.js.map +1 -1
  107. package/dist/apps/management/routes/api-keys.d.ts +154 -94
  108. package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
  109. package/dist/apps/management/routes/api-keys.js +76 -30
  110. package/dist/apps/management/routes/api-keys.js.map +1 -1
  111. package/dist/apps/management/routes/billing.d.ts +103 -30
  112. package/dist/apps/management/routes/billing.d.ts.map +1 -1
  113. package/dist/apps/management/routes/billing.js +91 -32
  114. package/dist/apps/management/routes/billing.js.map +1 -1
  115. package/dist/apps/management/routes/faucet.d.ts +12 -12
  116. package/dist/apps/management/routes/faucet.d.ts.map +1 -1
  117. package/dist/apps/management/routes/faucet.js +23 -12
  118. package/dist/apps/management/routes/faucet.js.map +1 -1
  119. package/dist/apps/management/routes/invitations.d.ts +46 -13
  120. package/dist/apps/management/routes/invitations.d.ts.map +1 -1
  121. package/dist/apps/management/routes/invitations.js +79 -29
  122. package/dist/apps/management/routes/invitations.js.map +1 -1
  123. package/dist/apps/management/routes/invite-links.d.ts +128 -83
  124. package/dist/apps/management/routes/invite-links.d.ts.map +1 -1
  125. package/dist/apps/management/routes/invite-links.js +100 -41
  126. package/dist/apps/management/routes/invite-links.js.map +1 -1
  127. package/dist/apps/management/routes/me.d.ts +5 -5
  128. package/dist/apps/management/routes/me.d.ts.map +1 -1
  129. package/dist/apps/management/routes/me.js +14 -10
  130. package/dist/apps/management/routes/me.js.map +1 -1
  131. package/dist/apps/management/routes/members.d.ts +68 -47
  132. package/dist/apps/management/routes/members.d.ts.map +1 -1
  133. package/dist/apps/management/routes/members.js +37 -18
  134. package/dist/apps/management/routes/members.js.map +1 -1
  135. package/dist/apps/management/routes/orgs.d.ts +48 -8
  136. package/dist/apps/management/routes/orgs.d.ts.map +1 -1
  137. package/dist/apps/management/routes/orgs.js +48 -19
  138. package/dist/apps/management/routes/orgs.js.map +1 -1
  139. package/dist/apps/management/routes/projects.d.ts +130 -68
  140. package/dist/apps/management/routes/projects.d.ts.map +1 -1
  141. package/dist/apps/management/routes/projects.js +72 -21
  142. package/dist/apps/management/routes/projects.js.map +1 -1
  143. package/dist/apps/management/routes/scopes.d.ts.map +1 -1
  144. package/dist/apps/management/routes/scopes.js +8 -5
  145. package/dist/apps/management/routes/scopes.js.map +1 -1
  146. package/dist/apps/management/routes/usage.d.ts +38 -38
  147. package/dist/apps/management/routes/usage.d.ts.map +1 -1
  148. package/dist/apps/management/routes/usage.js +41 -31
  149. package/dist/apps/management/routes/usage.js.map +1 -1
  150. package/dist/apps/management/routes/verified-token-requests.d.ts +34 -6
  151. package/dist/apps/management/routes/verified-token-requests.d.ts.map +1 -1
  152. package/dist/apps/management/routes/verified-token-requests.js +36 -17
  153. package/dist/apps/management/routes/verified-token-requests.js.map +1 -1
  154. package/dist/apps/management/routes/webhooks.d.ts +1186 -197
  155. package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
  156. package/dist/apps/management/routes/webhooks.js +106 -38
  157. package/dist/apps/management/routes/webhooks.js.map +1 -1
  158. package/dist/apps/mpp/internal/Adapter.d.ts +1 -1
  159. package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
  160. package/dist/apps/mpp/internal/Adapter.js +12 -0
  161. package/dist/apps/mpp/internal/Adapter.js.map +1 -1
  162. package/dist/db/Db.d.ts +2 -0
  163. package/dist/db/Db.d.ts.map +1 -1
  164. package/dist/db/Db.js +61 -0
  165. package/dist/db/Db.js.map +1 -1
  166. package/dist/db/Schema.d.ts +30 -2
  167. package/dist/db/Schema.d.ts.map +1 -1
  168. package/dist/db/Schema.js +28 -3
  169. package/dist/db/Schema.js.map +1 -1
  170. package/dist/db/tables/earnVaults.d.ts +5 -1
  171. package/dist/db/tables/earnVaults.d.ts.map +1 -1
  172. package/dist/db/tables/earnVaults.js +5 -0
  173. package/dist/db/tables/earnVaults.js.map +1 -1
  174. package/dist/db/tables/webhookDeliveries.d.ts.map +1 -1
  175. package/dist/db/tables/webhookDeliveries.js +10 -0
  176. package/dist/db/tables/webhookDeliveries.js.map +1 -1
  177. package/dist/db/tables/webhookQueueCompletions.d.ts +15 -0
  178. package/dist/db/tables/webhookQueueCompletions.d.ts.map +1 -0
  179. package/dist/db/tables/webhookQueueCompletions.js +32 -0
  180. package/dist/db/tables/webhookQueueCompletions.js.map +1 -0
  181. package/dist/db/tables/webhookQueueEvents.d.ts +16 -20
  182. package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
  183. package/dist/db/tables/webhookQueueEvents.js +68 -43
  184. package/dist/db/tables/webhookQueueEvents.js.map +1 -1
  185. package/dist/db/tables/webhookSubscriptions.d.ts +47 -72
  186. package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
  187. package/dist/db/tables/webhookSubscriptions.js +92 -105
  188. package/dist/db/tables/webhookSubscriptions.js.map +1 -1
  189. package/dist/internal/Auth.d.ts +8 -1
  190. package/dist/internal/Auth.d.ts.map +1 -1
  191. package/dist/internal/Auth.js +13 -3
  192. package/dist/internal/Auth.js.map +1 -1
  193. package/dist/internal/Cache.d.ts.map +1 -1
  194. package/dist/internal/Cache.js +11 -7
  195. package/dist/internal/Cache.js.map +1 -1
  196. package/dist/internal/EarnVaults.d.ts +41 -2
  197. package/dist/internal/EarnVaults.d.ts.map +1 -1
  198. package/dist/internal/EarnVaults.js +167 -0
  199. package/dist/internal/EarnVaults.js.map +1 -1
  200. package/dist/internal/MetricSink.d.ts +35 -125
  201. package/dist/internal/MetricSink.d.ts.map +1 -1
  202. package/dist/internal/MetricSink.js +50 -121
  203. package/dist/internal/MetricSink.js.map +1 -1
  204. package/dist/internal/OpenApi.d.ts +26 -22
  205. package/dist/internal/OpenApi.d.ts.map +1 -1
  206. package/dist/internal/OpenApi.js +128 -39
  207. package/dist/internal/OpenApi.js.map +1 -1
  208. package/dist/internal/Response.d.ts +13 -8
  209. package/dist/internal/Response.d.ts.map +1 -1
  210. package/dist/internal/Response.js +16 -5
  211. package/dist/internal/Response.js.map +1 -1
  212. package/dist/internal/Schema.d.ts +8 -8
  213. package/dist/internal/Schema.d.ts.map +1 -1
  214. package/dist/internal/Schema.js +10 -9
  215. package/dist/internal/Schema.js.map +1 -1
  216. package/dist/internal/Store.d.ts +15 -6
  217. package/dist/internal/Store.d.ts.map +1 -1
  218. package/dist/internal/Store.js +45 -15
  219. package/dist/internal/Store.js.map +1 -1
  220. package/dist/internal/Tidx.d.ts +2 -0
  221. package/dist/internal/Tidx.d.ts.map +1 -1
  222. package/dist/internal/Tidx.js +16 -4
  223. package/dist/internal/Tidx.js.map +1 -1
  224. package/dist/internal/WebhookTransfer.d.ts +1 -55
  225. package/dist/internal/WebhookTransfer.d.ts.map +1 -1
  226. package/dist/internal/WebhookTransfer.js +1 -239
  227. package/dist/internal/WebhookTransfer.js.map +1 -1
  228. package/dist/internal/Webhooks.d.ts +112 -56
  229. package/dist/internal/Webhooks.d.ts.map +1 -1
  230. package/dist/internal/Webhooks.js +124 -93
  231. package/dist/internal/Webhooks.js.map +1 -1
  232. package/dist/internal/funding/Deposit.d.ts +2 -2
  233. package/dist/internal/funding/Deposit.d.ts.map +1 -1
  234. package/dist/internal/funding/Deposit.js +9 -8
  235. package/dist/internal/funding/Deposit.js.map +1 -1
  236. package/dist/internal/funding/DepositAddress.d.ts +4 -4
  237. package/dist/internal/funding/DepositAddress.d.ts.map +1 -1
  238. package/dist/internal/funding/DepositAddress.js +9 -8
  239. package/dist/internal/funding/DepositAddress.js.map +1 -1
  240. package/dist/internal/funding/DepositWebhook.d.ts +25 -0
  241. package/dist/internal/funding/DepositWebhook.d.ts.map +1 -0
  242. package/dist/internal/funding/DepositWebhook.js +74 -0
  243. package/dist/internal/funding/DepositWebhook.js.map +1 -0
  244. package/dist/internal/funding/Provider.d.ts.map +1 -1
  245. package/dist/internal/funding/Provider.js +13 -12
  246. package/dist/internal/funding/Provider.js.map +1 -1
  247. package/dist/internal/funding/Reconciliation.d.ts +6 -0
  248. package/dist/internal/funding/Reconciliation.d.ts.map +1 -1
  249. package/dist/internal/funding/Reconciliation.js +42 -10
  250. package/dist/internal/funding/Reconciliation.js.map +1 -1
  251. package/dist/internal/funding/index.d.ts +1 -0
  252. package/dist/internal/funding/index.d.ts.map +1 -1
  253. package/dist/internal/funding/index.js +1 -0
  254. package/dist/internal/funding/index.js.map +1 -1
  255. package/dist/internal/funding/providers/stargate.d.ts +19 -0
  256. package/dist/internal/funding/providers/stargate.d.ts.map +1 -0
  257. package/dist/internal/funding/providers/stargate.js +143 -0
  258. package/dist/internal/funding/providers/stargate.js.map +1 -0
  259. package/dist/internal/webhookDestinations/slack.d.ts.map +1 -1
  260. package/dist/internal/webhookDestinations/slack.js +16 -0
  261. package/dist/internal/webhookDestinations/slack.js.map +1 -1
  262. package/dist/providers/index.d.ts +7 -0
  263. package/dist/providers/index.d.ts.map +1 -1
  264. package/dist/providers/index.js +3 -0
  265. package/dist/providers/index.js.map +1 -1
  266. package/package.json +2 -2
  267. package/src/App.test.ts +48 -0
  268. package/src/App.ts +7 -2
  269. package/src/Assets.test.ts +18 -0
  270. package/src/Assets.ts +22 -0
  271. package/src/Client.test-d.ts +287 -17
  272. package/src/Webhooks.ts +1 -220
  273. package/src/admin/apps/earn-vaults.test.ts +143 -0
  274. package/src/admin/apps/earn-vaults.ts +83 -6
  275. package/src/admin/apps/organizations.ts +6 -2
  276. package/src/admin/ui/src/routes/api-keys.tsx +36 -0
  277. package/src/admin/ui.generated.ts +151 -189
  278. package/src/apps/data/App.test.ts +31 -0
  279. package/src/apps/data/App.ts +64 -10
  280. package/src/apps/data/ZoneSelection.test.ts +196 -0
  281. package/src/apps/data/ZoneSelection.ts +108 -0
  282. package/src/apps/data/routes/activities.test.ts +435 -12
  283. package/src/apps/data/routes/activities.ts +562 -125
  284. package/src/apps/data/routes/balances.ts +1 -1
  285. package/src/apps/data/routes/blocks.ts +1 -1
  286. package/src/apps/data/routes/earn.test.ts +183 -23
  287. package/src/apps/data/routes/earn.ts +225 -29
  288. package/src/apps/data/routes/earn.zone-access.test.ts +46 -0
  289. package/src/apps/data/routes/exchanges.test.ts +31 -1
  290. package/src/apps/data/routes/exchanges.ts +19 -15
  291. package/src/apps/data/routes/fee-amm.ts +18 -11
  292. package/src/apps/data/routes/receipts.ts +1 -1
  293. package/src/apps/data/routes/rpc.test.ts +75 -0
  294. package/src/apps/data/routes/rpc.ts +23 -9
  295. package/src/apps/data/routes/tokenlist.ts +21 -18
  296. package/src/apps/data/routes/tokens.test.ts +29 -0
  297. package/src/apps/data/routes/tokens.ts +38 -15
  298. package/src/apps/data/routes/transactions.ts +1 -1
  299. package/src/apps/data/routes/transfers.test.ts +3 -3
  300. package/src/apps/data/routes/transfers.ts +12 -9
  301. package/src/apps/data/routes/webhooks.test.ts +179 -1497
  302. package/src/apps/data/routes/webhooks.ts +156 -976
  303. package/src/apps/data/routes/zones.test.ts +19 -13
  304. package/src/apps/funding/routes/chains.test.ts +211 -7
  305. package/src/apps/funding/routes/chains.ts +19 -12
  306. package/src/apps/funding/routes/deposit-addresses.test.ts +394 -0
  307. package/src/apps/funding/routes/deposit-addresses.ts +84 -72
  308. package/src/apps/funding/routes/providers.ts +9 -5
  309. package/src/apps/funding/routes/quotes.test.ts +46 -0
  310. package/src/apps/funding/routes/quotes.ts +8 -5
  311. package/src/apps/funding/routes/transfers.test.ts +35 -32
  312. package/src/apps/management/Billing.test.ts +26 -0
  313. package/src/apps/management/Billing.ts +24 -7
  314. package/src/apps/management/routes/api-keys.test.ts +178 -0
  315. package/src/apps/management/routes/api-keys.ts +203 -144
  316. package/src/apps/management/routes/billing.test.ts +209 -0
  317. package/src/apps/management/routes/billing.ts +254 -177
  318. package/src/apps/management/routes/faucet.test.ts +39 -0
  319. package/src/apps/management/routes/faucet.ts +75 -41
  320. package/src/apps/management/routes/invitations.test.ts +216 -0
  321. package/src/apps/management/routes/invitations.ts +186 -109
  322. package/src/apps/management/routes/invite-links.test.ts +263 -1
  323. package/src/apps/management/routes/invite-links.ts +295 -214
  324. package/src/apps/management/routes/me.test.ts +49 -0
  325. package/src/apps/management/routes/me.ts +42 -32
  326. package/src/apps/management/routes/members.test.ts +124 -1
  327. package/src/apps/management/routes/members.ts +81 -51
  328. package/src/apps/management/routes/orgs.test.ts +176 -0
  329. package/src/apps/management/routes/orgs.ts +101 -59
  330. package/src/apps/management/routes/projects.test.ts +183 -0
  331. package/src/apps/management/routes/projects.ts +124 -60
  332. package/src/apps/management/routes/scopes.test.ts +44 -0
  333. package/src/apps/management/routes/scopes.ts +37 -28
  334. package/src/apps/management/routes/usage.test.ts +92 -0
  335. package/src/apps/management/routes/usage.ts +186 -151
  336. package/src/apps/management/routes/verified-token-requests.test.ts +114 -0
  337. package/src/apps/management/routes/verified-token-requests.ts +166 -133
  338. package/src/apps/management/routes/webhooks.test.ts +313 -1
  339. package/src/apps/management/routes/webhooks.ts +220 -71
  340. package/src/apps/mpp/internal/Adapter.ts +13 -1
  341. package/src/db/Db.test.ts +42 -5
  342. package/src/db/Db.ts +85 -0
  343. package/src/db/Schema.ts +41 -3
  344. package/src/db/tables/earnVaults.test.ts +22 -0
  345. package/src/db/tables/earnVaults.ts +11 -1
  346. package/src/db/tables/organizations.test.ts +5 -2
  347. package/src/db/tables/webhookDeliveries.ts +13 -0
  348. package/src/db/tables/webhookQueueCompletions.ts +55 -0
  349. package/src/db/tables/webhookQueueEvents.ts +97 -57
  350. package/src/db/tables/webhookSubscriptions.ts +134 -144
  351. package/src/internal/Auth.ts +23 -5
  352. package/src/internal/Cache.ts +14 -7
  353. package/src/internal/EarnVaults.capabilities.test.ts +33 -0
  354. package/src/internal/EarnVaults.test.ts +79 -0
  355. package/src/internal/EarnVaults.ts +277 -0
  356. package/src/internal/MetricSink.test.ts +41 -373
  357. package/src/internal/MetricSink.ts +92 -273
  358. package/src/internal/OpenApi.ts +165 -49
  359. package/src/internal/Response.test.ts +95 -0
  360. package/src/internal/Response.ts +40 -2
  361. package/src/internal/Schema.test.ts +34 -0
  362. package/src/internal/Schema.ts +20 -9
  363. package/src/internal/Store.test.ts +186 -0
  364. package/src/internal/Store.ts +57 -17
  365. package/src/internal/Tidx.test.ts +19 -0
  366. package/src/internal/Tidx.ts +16 -4
  367. package/src/internal/WebhookTransfer.ts +1 -351
  368. package/src/internal/Webhooks.test.ts +222 -145
  369. package/src/internal/Webhooks.ts +234 -135
  370. package/src/internal/funding/Deposit.ts +71 -64
  371. package/src/internal/funding/DepositAddress.ts +50 -43
  372. package/src/internal/funding/DepositWebhook.test.ts +131 -0
  373. package/src/internal/funding/DepositWebhook.ts +101 -0
  374. package/src/internal/funding/Provider.ts +164 -142
  375. package/src/internal/funding/Reconciliation.test.ts +14 -0
  376. package/src/internal/funding/Reconciliation.ts +161 -86
  377. package/src/internal/funding/index.test.ts +1 -0
  378. package/src/internal/funding/index.ts +1 -0
  379. package/src/internal/funding/providers/index.test.ts +185 -0
  380. package/src/internal/funding/providers/stargate.ts +184 -0
  381. package/src/internal/webhookDestinations/slack.ts +15 -0
  382. package/src/providers/index.test.ts +1 -0
  383. package/src/providers/index.ts +9 -0
  384. package/src/Webhooks.bench.ts +0 -714
  385. package/src/Webhooks.memory.bench.ts +0 -250
  386. package/src/Webhooks.test.ts +0 -146
@@ -1,8 +1,6 @@
1
1
  import { type RpcLog } from 'viem';
2
2
  import * as z from 'zod/mini';
3
3
  import type * as App from '../../../App.js';
4
- import * as Db from '../../../db/Db.js';
5
- import type * as MetricSink from '../../../internal/MetricSink.js';
6
4
  import * as Response from '../../../internal/Response.js';
7
5
  import * as Store from '../../../internal/Store.js';
8
6
  import type * as Viem from '../../../internal/Viem.js';
@@ -12,7 +10,7 @@ import * as Webhooks from '../../../internal/Webhooks.js';
12
10
  * truth for the event-type *set*: the {@link EventType} union and the route zod
13
11
  * enum ({@link schema.EventType}) both derive from this.
14
12
  */
15
- export declare const eventTypes: readonly ['block:created', 'log:emitted', 'token:transfer', 'transaction:included'];
13
+ export declare const eventTypes: readonly ['block:created', 'funding:deposit.updated', 'log:emitted', 'token:transfer', 'transaction:included'];
16
14
  /** Event types a subscription can listen to. Derived from {@link eventTypes}. */
17
15
  export type EventType = (typeof eventTypes)[number];
18
16
  /** Zod schemas owned by the webhooks resource. */
@@ -20,6 +18,7 @@ export declare namespace schema {
20
18
  /** Subscribable event type. */
21
19
  const EventType: z.ZodMiniEnum<{
22
20
  "block:created": "block:created";
21
+ "funding:deposit.updated": "funding:deposit.updated";
23
22
  "log:emitted": "log:emitted";
24
23
  "token:transfer": "token:transfer";
25
24
  "transaction:included": "transaction:included";
@@ -334,6 +333,20 @@ export declare namespace schema {
334
333
  lte: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
335
334
  }, z.core.$strict>]>>;
336
335
  }, z.core.$strict>;
336
+ /** `funding:deposit.updated` subscription filters. All are optional and AND-combined. */
337
+ const FundingDepositFilters: z.ZodMiniObject<{
338
+ depositAddressId: z.ZodMiniOptional<z.ZodMiniString<string>>;
339
+ recipient: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
340
+ status: z.ZodMiniOptional<z.ZodMiniEnum<{
341
+ "action-required": "action-required";
342
+ bridging: "bridging";
343
+ completed: "completed";
344
+ detected: "detected";
345
+ refunded: "refunded";
346
+ refunding: "refunding";
347
+ settling: "settling";
348
+ }>>;
349
+ }, z.core.$strict>;
337
350
  /**
338
351
  * Optional human context describing what a subscription is for. Surfaced by
339
352
  * destinations (Slack header + description, Better Stack log fields) and echoed
@@ -367,8 +380,13 @@ export declare namespace schema {
367
380
  type: z.ZodMiniLiteral<"betterstack">;
368
381
  url: z.ZodMiniURL;
369
382
  }, z.core.$strip>], "type">;
383
+ environment: z.ZodMiniOptional<z.ZodMiniEnum<{
384
+ production: "production";
385
+ sandbox: "sandbox";
386
+ }>>;
370
387
  eventType: z.ZodMiniEnum<{
371
388
  "block:created": "block:created";
389
+ "funding:deposit.updated": "funding:deposit.updated";
372
390
  "log:emitted": "log:emitted";
373
391
  "token:transfer": "token:transfer";
374
392
  "transaction:included": "transaction:included";
@@ -558,6 +576,124 @@ export declare namespace schema {
558
576
  transactionCount: z.ZodMiniNumber<number>;
559
577
  timestamp: z.ZodMiniISODateTime;
560
578
  }, z.core.$strip>;
579
+ /** Public funding deposit after a committed material change. */
580
+ const FundingDepositEvent: z.ZodMiniObject<{
581
+ createdAt: z.ZodMiniISODateTime;
582
+ depositAddressId: z.ZodMiniString<string>;
583
+ detectionTrigger: z.ZodMiniOptional<z.ZodMiniEnum<{
584
+ chain: "chain";
585
+ manual: "manual";
586
+ poll: "poll";
587
+ webhook: "webhook";
588
+ }>>;
589
+ destinationAmount: z.ZodMiniOptional<z.ZodMiniObject<{
590
+ baseUnits: z.ZodMiniString<string>;
591
+ currency: z.ZodMiniString<string>;
592
+ decimals: z.ZodMiniNumber<number>;
593
+ formatted: z.ZodMiniString<string>;
594
+ }, z.core.$strip>>;
595
+ destinationAmountRequired: z.ZodMiniOptional<z.ZodMiniObject<{
596
+ baseUnits: z.ZodMiniString<string>;
597
+ currency: z.ZodMiniString<string>;
598
+ decimals: z.ZodMiniNumber<number>;
599
+ formatted: z.ZodMiniString<string>;
600
+ }, z.core.$strip>>;
601
+ destinationChain: z.ZodMiniObject<{
602
+ addressFormat: z.ZodMiniEnum<{
603
+ base58: "base58";
604
+ base58check: "base58check";
605
+ hex: "hex";
606
+ }>;
607
+ id: z.ZodMiniString<string>;
608
+ kind: z.ZodMiniEnum<{
609
+ evm: "evm";
610
+ solana: "solana";
611
+ tron: "tron";
612
+ }>;
613
+ name: z.ZodMiniString<string>;
614
+ }, z.core.$strip>;
615
+ destinationToken: z.ZodMiniObject<{
616
+ address: z.ZodMiniString<string>;
617
+ currency: z.ZodMiniString<string>;
618
+ decimals: z.ZodMiniNumber<number>;
619
+ name: z.ZodMiniString<string>;
620
+ standard: z.ZodMiniString<string>;
621
+ symbol: z.ZodMiniString<string>;
622
+ tokenKey: z.ZodMiniString<string>;
623
+ verified: z.ZodMiniBoolean<boolean>;
624
+ }, z.core.$strip>;
625
+ destinationTransactionHashes: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniString<string>>>>;
626
+ id: z.ZodMiniString<string>;
627
+ provider: z.ZodMiniObject<{
628
+ id: z.ZodMiniString<string>;
629
+ name: z.ZodMiniString<string>;
630
+ }, z.core.$strip>;
631
+ recipient: z.ZodMiniString<string>;
632
+ refundAddress: z.ZodMiniString<string>;
633
+ refundAmount: z.ZodMiniOptional<z.ZodMiniObject<{
634
+ baseUnits: z.ZodMiniString<string>;
635
+ currency: z.ZodMiniString<string>;
636
+ decimals: z.ZodMiniNumber<number>;
637
+ formatted: z.ZodMiniString<string>;
638
+ }, z.core.$strip>>;
639
+ refundTransactionHashes: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniString<string>>>>;
640
+ sender: z.ZodMiniOptional<z.ZodMiniString<string>>;
641
+ sourceAmount: z.ZodMiniOptional<z.ZodMiniObject<{
642
+ baseUnits: z.ZodMiniString<string>;
643
+ currency: z.ZodMiniString<string>;
644
+ decimals: z.ZodMiniNumber<number>;
645
+ formatted: z.ZodMiniString<string>;
646
+ }, z.core.$strip>>;
647
+ sourceChain: z.ZodMiniObject<{
648
+ addressFormat: z.ZodMiniEnum<{
649
+ base58: "base58";
650
+ base58check: "base58check";
651
+ hex: "hex";
652
+ }>;
653
+ id: z.ZodMiniString<string>;
654
+ kind: z.ZodMiniEnum<{
655
+ evm: "evm";
656
+ solana: "solana";
657
+ tron: "tron";
658
+ }>;
659
+ name: z.ZodMiniString<string>;
660
+ }, z.core.$strip>;
661
+ sourceToken: z.ZodMiniObject<{
662
+ address: z.ZodMiniString<string>;
663
+ currency: z.ZodMiniString<string>;
664
+ decimals: z.ZodMiniNumber<number>;
665
+ name: z.ZodMiniString<string>;
666
+ standard: z.ZodMiniString<string>;
667
+ symbol: z.ZodMiniString<string>;
668
+ tokenKey: z.ZodMiniString<string>;
669
+ verified: z.ZodMiniBoolean<boolean>;
670
+ }, z.core.$strip>;
671
+ sourceTransactionHashes: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniString<string>>>;
672
+ sourceTransferIndex: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
673
+ status: z.ZodMiniEnum<{
674
+ "action-required": "action-required";
675
+ bridging: "bridging";
676
+ completed: "completed";
677
+ detected: "detected";
678
+ refunded: "refunded";
679
+ refunding: "refunding";
680
+ settling: "settling";
681
+ }>;
682
+ statusReason: z.ZodMiniOptional<z.ZodMiniObject<{
683
+ code: z.ZodMiniEnum<{
684
+ delivery_failed: "delivery_failed";
685
+ delivery_liquidity_unavailable: "delivery_liquidity_unavailable";
686
+ manual_recovery_required: "manual_recovery_required";
687
+ refund_failed: "refund_failed";
688
+ source_amount_not_supported: "source_amount_not_supported";
689
+ source_token_mismatch: "source_token_mismatch";
690
+ subsidy_balance_unavailable: "subsidy_balance_unavailable";
691
+ subsidy_failed: "subsidy_failed";
692
+ }>;
693
+ message: z.ZodMiniString<string>;
694
+ }, z.core.$strip>>;
695
+ updatedAt: z.ZodMiniISODateTime;
696
+ }, z.core.$strip>;
561
697
  /** A `ping` (synthetic test-delivery) payload, sent by `POST /webhooks/:id/ping`. */
562
698
  const PingEvent: z.ZodMiniObject<{
563
699
  ping: z.ZodMiniLiteral<true>;
@@ -760,6 +896,137 @@ export declare namespace schema {
760
896
  timestamp: z.ZodMiniISODateTime;
761
897
  }, z.core.$strip>;
762
898
  type: z.ZodMiniLiteral<"block:created">;
899
+ }, z.core.$strip>, z.ZodMiniObject<{
900
+ chainId: z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
901
+ mainnet: "mainnet";
902
+ testnet: "testnet";
903
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>;
904
+ context: z.ZodMiniOptional<z.ZodMiniObject<{
905
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
906
+ metadata: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
907
+ title: z.ZodMiniOptional<z.ZodMiniString<string>>;
908
+ }, z.core.$strip>>;
909
+ createdAt: z.ZodMiniISODateTime;
910
+ id: z.ZodMiniString<string>;
911
+ subscriptionId: z.ZodMiniString<string>;
912
+ data: z.ZodMiniObject<{
913
+ createdAt: z.ZodMiniISODateTime;
914
+ depositAddressId: z.ZodMiniString<string>;
915
+ detectionTrigger: z.ZodMiniOptional<z.ZodMiniEnum<{
916
+ chain: "chain";
917
+ manual: "manual";
918
+ poll: "poll";
919
+ webhook: "webhook";
920
+ }>>;
921
+ destinationAmount: z.ZodMiniOptional<z.ZodMiniObject<{
922
+ baseUnits: z.ZodMiniString<string>;
923
+ currency: z.ZodMiniString<string>;
924
+ decimals: z.ZodMiniNumber<number>;
925
+ formatted: z.ZodMiniString<string>;
926
+ }, z.core.$strip>>;
927
+ destinationAmountRequired: z.ZodMiniOptional<z.ZodMiniObject<{
928
+ baseUnits: z.ZodMiniString<string>;
929
+ currency: z.ZodMiniString<string>;
930
+ decimals: z.ZodMiniNumber<number>;
931
+ formatted: z.ZodMiniString<string>;
932
+ }, z.core.$strip>>;
933
+ destinationChain: z.ZodMiniObject<{
934
+ addressFormat: z.ZodMiniEnum<{
935
+ base58: "base58";
936
+ base58check: "base58check";
937
+ hex: "hex";
938
+ }>;
939
+ id: z.ZodMiniString<string>;
940
+ kind: z.ZodMiniEnum<{
941
+ evm: "evm";
942
+ solana: "solana";
943
+ tron: "tron";
944
+ }>;
945
+ name: z.ZodMiniString<string>;
946
+ }, z.core.$strip>;
947
+ destinationToken: z.ZodMiniObject<{
948
+ address: z.ZodMiniString<string>;
949
+ currency: z.ZodMiniString<string>;
950
+ decimals: z.ZodMiniNumber<number>;
951
+ name: z.ZodMiniString<string>;
952
+ standard: z.ZodMiniString<string>;
953
+ symbol: z.ZodMiniString<string>;
954
+ tokenKey: z.ZodMiniString<string>;
955
+ verified: z.ZodMiniBoolean<boolean>;
956
+ }, z.core.$strip>;
957
+ destinationTransactionHashes: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniString<string>>>>;
958
+ id: z.ZodMiniString<string>;
959
+ provider: z.ZodMiniObject<{
960
+ id: z.ZodMiniString<string>;
961
+ name: z.ZodMiniString<string>;
962
+ }, z.core.$strip>;
963
+ recipient: z.ZodMiniString<string>;
964
+ refundAddress: z.ZodMiniString<string>;
965
+ refundAmount: z.ZodMiniOptional<z.ZodMiniObject<{
966
+ baseUnits: z.ZodMiniString<string>;
967
+ currency: z.ZodMiniString<string>;
968
+ decimals: z.ZodMiniNumber<number>;
969
+ formatted: z.ZodMiniString<string>;
970
+ }, z.core.$strip>>;
971
+ refundTransactionHashes: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniString<string>>>>;
972
+ sender: z.ZodMiniOptional<z.ZodMiniString<string>>;
973
+ sourceAmount: z.ZodMiniOptional<z.ZodMiniObject<{
974
+ baseUnits: z.ZodMiniString<string>;
975
+ currency: z.ZodMiniString<string>;
976
+ decimals: z.ZodMiniNumber<number>;
977
+ formatted: z.ZodMiniString<string>;
978
+ }, z.core.$strip>>;
979
+ sourceChain: z.ZodMiniObject<{
980
+ addressFormat: z.ZodMiniEnum<{
981
+ base58: "base58";
982
+ base58check: "base58check";
983
+ hex: "hex";
984
+ }>;
985
+ id: z.ZodMiniString<string>;
986
+ kind: z.ZodMiniEnum<{
987
+ evm: "evm";
988
+ solana: "solana";
989
+ tron: "tron";
990
+ }>;
991
+ name: z.ZodMiniString<string>;
992
+ }, z.core.$strip>;
993
+ sourceToken: z.ZodMiniObject<{
994
+ address: z.ZodMiniString<string>;
995
+ currency: z.ZodMiniString<string>;
996
+ decimals: z.ZodMiniNumber<number>;
997
+ name: z.ZodMiniString<string>;
998
+ standard: z.ZodMiniString<string>;
999
+ symbol: z.ZodMiniString<string>;
1000
+ tokenKey: z.ZodMiniString<string>;
1001
+ verified: z.ZodMiniBoolean<boolean>;
1002
+ }, z.core.$strip>;
1003
+ sourceTransactionHashes: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniString<string>>>;
1004
+ sourceTransferIndex: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
1005
+ status: z.ZodMiniEnum<{
1006
+ "action-required": "action-required";
1007
+ bridging: "bridging";
1008
+ completed: "completed";
1009
+ detected: "detected";
1010
+ refunded: "refunded";
1011
+ refunding: "refunding";
1012
+ settling: "settling";
1013
+ }>;
1014
+ statusReason: z.ZodMiniOptional<z.ZodMiniObject<{
1015
+ code: z.ZodMiniEnum<{
1016
+ delivery_failed: "delivery_failed";
1017
+ delivery_liquidity_unavailable: "delivery_liquidity_unavailable";
1018
+ manual_recovery_required: "manual_recovery_required";
1019
+ refund_failed: "refund_failed";
1020
+ source_amount_not_supported: "source_amount_not_supported";
1021
+ source_token_mismatch: "source_token_mismatch";
1022
+ subsidy_balance_unavailable: "subsidy_balance_unavailable";
1023
+ subsidy_failed: "subsidy_failed";
1024
+ }>;
1025
+ message: z.ZodMiniString<string>;
1026
+ }, z.core.$strip>>;
1027
+ updatedAt: z.ZodMiniISODateTime;
1028
+ }, z.core.$strip>;
1029
+ type: z.ZodMiniLiteral<"funding:deposit.updated">;
763
1030
  }, z.core.$strip>, z.ZodMiniObject<{
764
1031
  chainId: z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
765
1032
  mainnet: "mainnet";
@@ -785,6 +1052,7 @@ export declare namespace schema {
785
1052
  description: z.ZodMiniString<string>;
786
1053
  type: z.ZodMiniEnum<{
787
1054
  "block:created": "block:created";
1055
+ "funding:deposit.updated": "funding:deposit.updated";
788
1056
  "log:emitted": "log:emitted";
789
1057
  "token:transfer": "token:transfer";
790
1058
  "transaction:included": "transaction:included";
@@ -1122,6 +1390,41 @@ export declare namespace schema {
1122
1390
  lte: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
1123
1391
  }, z.core.$strict>]>>;
1124
1392
  }, z.core.$strict>>;
1393
+ }, z.core.$strip>, z.ZodMiniObject<{
1394
+ chainId: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniEnum<{
1395
+ mainnet: "mainnet";
1396
+ testnet: "testnet";
1397
+ }>, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniNumber<unknown>]>, z.ZodMiniNumber<number>>>;
1398
+ context: z.ZodMiniOptional<z.ZodMiniObject<{
1399
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
1400
+ metadata: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
1401
+ title: z.ZodMiniOptional<z.ZodMiniString<string>>;
1402
+ }, z.core.$strip>>;
1403
+ destination: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
1404
+ type: z.ZodMiniLiteral<"url">;
1405
+ url: z.ZodMiniURL;
1406
+ }, z.core.$strip>, z.ZodMiniObject<{
1407
+ type: z.ZodMiniLiteral<"slack">;
1408
+ url: z.ZodMiniURL;
1409
+ }, z.core.$strip>, z.ZodMiniObject<{
1410
+ token: z.ZodMiniString<string>;
1411
+ type: z.ZodMiniLiteral<"betterstack">;
1412
+ url: z.ZodMiniURL;
1413
+ }, z.core.$strip>], "type">;
1414
+ eventType: z.ZodMiniLiteral<"funding:deposit.updated">;
1415
+ filters: z.ZodMiniOptional<z.ZodMiniObject<{
1416
+ depositAddressId: z.ZodMiniOptional<z.ZodMiniString<string>>;
1417
+ recipient: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>;
1418
+ status: z.ZodMiniOptional<z.ZodMiniEnum<{
1419
+ "action-required": "action-required";
1420
+ bridging: "bridging";
1421
+ completed: "completed";
1422
+ detected: "detected";
1423
+ refunded: "refunded";
1424
+ refunding: "refunding";
1425
+ settling: "settling";
1426
+ }>>;
1427
+ }, z.core.$strict>>;
1125
1428
  }, z.core.$strip>], "eventType">;
1126
1429
  const Response: z.ZodMiniObject<{
1127
1430
  chainId: z.ZodMiniNumber<number>;
@@ -1131,8 +1434,13 @@ export declare namespace schema {
1131
1434
  title: z.ZodMiniOptional<z.ZodMiniString<string>>;
1132
1435
  }, z.core.$strip>>;
1133
1436
  createdAt: z.ZodMiniISODateTime;
1437
+ environment: z.ZodMiniOptional<z.ZodMiniEnum<{
1438
+ production: "production";
1439
+ sandbox: "sandbox";
1440
+ }>>;
1134
1441
  eventType: z.ZodMiniEnum<{
1135
1442
  "block:created": "block:created";
1443
+ "funding:deposit.updated": "funding:deposit.updated";
1136
1444
  "log:emitted": "log:emitted";
1137
1445
  "token:transfer": "token:transfer";
1138
1446
  "transaction:included": "transaction:included";
@@ -1169,7 +1477,7 @@ export declare namespace schema {
1169
1477
  include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
1170
1478
  totalCount: "totalCount";
1171
1479
  }>>>;
1172
- limit: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
1480
+ limit: z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniNumber<unknown>, z.ZodMiniTransform<number, number>>>;
1173
1481
  page: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
1174
1482
  }, z.core.$strip>;
1175
1483
  const Response: z.ZodMiniObject<{
@@ -1192,8 +1500,13 @@ export declare namespace schema {
1192
1500
  type: z.ZodMiniLiteral<"betterstack">;
1193
1501
  url: z.ZodMiniURL;
1194
1502
  }, z.core.$strip>], "type">;
1503
+ environment: z.ZodMiniOptional<z.ZodMiniEnum<{
1504
+ production: "production";
1505
+ sandbox: "sandbox";
1506
+ }>>;
1195
1507
  eventType: z.ZodMiniEnum<{
1196
1508
  "block:created": "block:created";
1509
+ "funding:deposit.updated": "funding:deposit.updated";
1197
1510
  "log:emitted": "log:emitted";
1198
1511
  "token:transfer": "token:transfer";
1199
1512
  "transaction:included": "transaction:included";
@@ -1241,8 +1554,13 @@ export declare namespace schema {
1241
1554
  type: z.ZodMiniLiteral<"betterstack">;
1242
1555
  url: z.ZodMiniURL;
1243
1556
  }, z.core.$strip>], "type">;
1557
+ environment: z.ZodMiniOptional<z.ZodMiniEnum<{
1558
+ production: "production";
1559
+ sandbox: "sandbox";
1560
+ }>>;
1244
1561
  eventType: z.ZodMiniEnum<{
1245
1562
  "block:created": "block:created";
1563
+ "funding:deposit.updated": "funding:deposit.updated";
1246
1564
  "log:emitted": "log:emitted";
1247
1565
  "token:transfer": "token:transfer";
1248
1566
  "transaction:included": "transaction:included";
@@ -1270,7 +1588,7 @@ export declare namespace schema {
1270
1588
  include: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string[], unknown>>, z.ZodMiniArray<z.ZodMiniEnum<{
1271
1589
  totalCount: "totalCount";
1272
1590
  }>>>;
1273
- limit: z.ZodMiniDefault<z.ZodMiniNumber<unknown>>;
1591
+ limit: z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniNumber<unknown>, z.ZodMiniTransform<number, number>>>;
1274
1592
  page: z.ZodMiniOptional<z.ZodMiniNumber<unknown>>;
1275
1593
  }, z.core.$strip>;
1276
1594
  const Response: z.ZodMiniObject<{
@@ -1372,8 +1690,13 @@ export declare namespace schema {
1372
1690
  type: z.ZodMiniLiteral<"betterstack">;
1373
1691
  url: z.ZodMiniURL;
1374
1692
  }, z.core.$strip>], "type">;
1693
+ environment: z.ZodMiniOptional<z.ZodMiniEnum<{
1694
+ production: "production";
1695
+ sandbox: "sandbox";
1696
+ }>>;
1375
1697
  eventType: z.ZodMiniEnum<{
1376
1698
  "block:created": "block:created";
1699
+ "funding:deposit.updated": "funding:deposit.updated";
1377
1700
  "log:emitted": "log:emitted";
1378
1701
  "token:transfer": "token:transfer";
1379
1702
  "transaction:included": "transaction:included";
@@ -1479,7 +1802,7 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
1479
1802
  output: {
1480
1803
  data: {
1481
1804
  description: string;
1482
- type: "block:created" | "log:emitted" | "token:transfer" | "transaction:included";
1805
+ type: "block:created" | "funding:deposit.updated" | "log:emitted" | "token:transfer" | "transaction:included";
1483
1806
  }[];
1484
1807
  };
1485
1808
  outputFormat: "json";
@@ -1811,6 +2134,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
1811
2134
  lte?: `0x${string}` | undefined;
1812
2135
  } | `0x${string}` | undefined;
1813
2136
  } | undefined;
2137
+ } | {
2138
+ chainId?: unknown;
2139
+ context?: {
2140
+ description?: string | undefined;
2141
+ metadata?: Record<string, string> | undefined;
2142
+ title?: string | undefined;
2143
+ } | undefined;
2144
+ destination: {
2145
+ type: "url";
2146
+ url: string;
2147
+ } | {
2148
+ type: "slack";
2149
+ url: string;
2150
+ } | {
2151
+ token: string;
2152
+ type: "betterstack";
2153
+ url: string;
2154
+ };
2155
+ eventType: "funding:deposit.updated";
2156
+ filters?: {
2157
+ depositAddressId?: string | undefined;
2158
+ recipient?: `0x${string}` | undefined;
2159
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
2160
+ } | undefined;
1814
2161
  };
1815
2162
  };
1816
2163
  } | {
@@ -2135,6 +2482,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
2135
2482
  lte?: `0x${string}` | undefined;
2136
2483
  } | `0x${string}` | undefined;
2137
2484
  } | undefined;
2485
+ } | {
2486
+ chainId?: unknown;
2487
+ context?: {
2488
+ description?: string | undefined;
2489
+ metadata?: Record<string, string> | undefined;
2490
+ title?: string | undefined;
2491
+ } | undefined;
2492
+ destination: {
2493
+ type: "url";
2494
+ url: string;
2495
+ } | {
2496
+ type: "slack";
2497
+ url: string;
2498
+ } | {
2499
+ token: string;
2500
+ type: "betterstack";
2501
+ url: string;
2502
+ };
2503
+ eventType: "funding:deposit.updated";
2504
+ filters?: {
2505
+ depositAddressId?: string | undefined;
2506
+ recipient?: `0x${string}` | undefined;
2507
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
2508
+ } | undefined;
2138
2509
  };
2139
2510
  };
2140
2511
  } | {
@@ -2459,19 +2830,391 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
2459
2830
  lte?: `0x${string}` | undefined;
2460
2831
  } | `0x${string}` | undefined;
2461
2832
  } | undefined;
2833
+ } | {
2834
+ chainId?: unknown;
2835
+ context?: {
2836
+ description?: string | undefined;
2837
+ metadata?: Record<string, string> | undefined;
2838
+ title?: string | undefined;
2839
+ } | undefined;
2840
+ destination: {
2841
+ type: "url";
2842
+ url: string;
2843
+ } | {
2844
+ type: "slack";
2845
+ url: string;
2846
+ } | {
2847
+ token: string;
2848
+ type: "betterstack";
2849
+ url: string;
2850
+ };
2851
+ eventType: "funding:deposit.updated";
2852
+ filters?: {
2853
+ depositAddressId?: string | undefined;
2854
+ recipient?: `0x${string}` | undefined;
2855
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
2856
+ } | undefined;
2857
+ };
2858
+ };
2859
+ } | {
2860
+ output: {
2861
+ error: {
2862
+ code: "payment_required" | "rate_limit_exceeded";
2863
+ details?: readonly Response.error.Detail[] | undefined;
2864
+ message: string;
2865
+ };
2866
+ requestId: string;
2867
+ };
2868
+ outputFormat: "json";
2869
+ status: 429;
2870
+ input: {
2871
+ json: {
2872
+ chainId?: unknown;
2873
+ context?: {
2874
+ description?: string | undefined;
2875
+ metadata?: Record<string, string> | undefined;
2876
+ title?: string | undefined;
2877
+ } | undefined;
2878
+ destination: {
2879
+ type: "url";
2880
+ url: string;
2881
+ } | {
2882
+ type: "slack";
2883
+ url: string;
2884
+ } | {
2885
+ token: string;
2886
+ type: "betterstack";
2887
+ url: string;
2888
+ };
2889
+ eventType: "token:transfer";
2890
+ filters?: {
2891
+ address?: `0x${string}` | undefined;
2892
+ recipient?: `0x${string}` | undefined;
2893
+ sender?: `0x${string}` | undefined;
2894
+ token?: `0x${string}` | undefined;
2895
+ } | undefined;
2896
+ } | {
2897
+ chainId?: unknown;
2898
+ context?: {
2899
+ description?: string | undefined;
2900
+ metadata?: Record<string, string> | undefined;
2901
+ title?: string | undefined;
2902
+ } | undefined;
2903
+ destination: {
2904
+ type: "url";
2905
+ url: string;
2906
+ } | {
2907
+ type: "slack";
2908
+ url: string;
2909
+ } | {
2910
+ token: string;
2911
+ type: "betterstack";
2912
+ url: string;
2913
+ };
2914
+ eventType: "transaction:included";
2915
+ filters?: {
2916
+ hash?: {
2917
+ eq: `0x${string}`;
2918
+ } | {
2919
+ in: `0x${string}`[];
2920
+ } | {
2921
+ not: `0x${string}`;
2922
+ } | `0x${string}` | undefined;
2923
+ address?: {
2924
+ eq: `0x${string}`;
2925
+ } | {
2926
+ in: `0x${string}`[];
2927
+ } | {
2928
+ not: `0x${string}`;
2929
+ } | `0x${string}` | undefined;
2930
+ from?: {
2931
+ eq: `0x${string}`;
2932
+ } | {
2933
+ in: `0x${string}`[];
2934
+ } | {
2935
+ not: `0x${string}`;
2936
+ } | `0x${string}` | undefined;
2937
+ to?: {
2938
+ eq: `0x${string}`;
2939
+ } | {
2940
+ in: `0x${string}`[];
2941
+ } | {
2942
+ not: `0x${string}`;
2943
+ } | `0x${string}` | undefined;
2944
+ includeCalls?: boolean | undefined;
2945
+ value?: {
2946
+ eq?: `0x${string}` | undefined;
2947
+ gt?: `0x${string}` | undefined;
2948
+ gte?: `0x${string}` | undefined;
2949
+ lt?: `0x${string}` | undefined;
2950
+ lte?: `0x${string}` | undefined;
2951
+ } | `0x${string}` | undefined;
2952
+ input?: {
2953
+ selector: string;
2954
+ } | {
2955
+ startsWith: string;
2956
+ } | {
2957
+ eq: string;
2958
+ } | undefined;
2959
+ calls?: {
2960
+ to: {
2961
+ eq: `0x${string}`;
2962
+ } | {
2963
+ in: `0x${string}`[];
2964
+ } | {
2965
+ not: `0x${string}`;
2966
+ } | `0x${string}`;
2967
+ } | undefined;
2968
+ callCount?: {
2969
+ eq?: `0x${string}` | undefined;
2970
+ gt?: `0x${string}` | undefined;
2971
+ gte?: `0x${string}` | undefined;
2972
+ lt?: `0x${string}` | undefined;
2973
+ lte?: `0x${string}` | undefined;
2974
+ } | `0x${string}` | undefined;
2975
+ txType?: string | {
2976
+ eq: string;
2977
+ } | {
2978
+ in: string[];
2979
+ } | {
2980
+ not: string;
2981
+ } | undefined;
2982
+ feeToken?: {
2983
+ eq: `0x${string}`;
2984
+ } | {
2985
+ in: `0x${string}`[];
2986
+ } | {
2987
+ not: `0x${string}`;
2988
+ } | `0x${string}` | undefined;
2989
+ gasLimit?: {
2990
+ eq?: `0x${string}` | undefined;
2991
+ gt?: `0x${string}` | undefined;
2992
+ gte?: `0x${string}` | undefined;
2993
+ lt?: `0x${string}` | undefined;
2994
+ lte?: `0x${string}` | undefined;
2995
+ } | `0x${string}` | undefined;
2996
+ maxFeePerGas?: {
2997
+ eq?: `0x${string}` | undefined;
2998
+ gt?: `0x${string}` | undefined;
2999
+ gte?: `0x${string}` | undefined;
3000
+ lt?: `0x${string}` | undefined;
3001
+ lte?: `0x${string}` | undefined;
3002
+ } | `0x${string}` | undefined;
3003
+ maxPriorityFeePerGas?: {
3004
+ eq?: `0x${string}` | undefined;
3005
+ gt?: `0x${string}` | undefined;
3006
+ gte?: `0x${string}` | undefined;
3007
+ lt?: `0x${string}` | undefined;
3008
+ lte?: `0x${string}` | undefined;
3009
+ } | `0x${string}` | undefined;
3010
+ nonce?: {
3011
+ eq?: `0x${string}` | undefined;
3012
+ gt?: `0x${string}` | undefined;
3013
+ gte?: `0x${string}` | undefined;
3014
+ lt?: `0x${string}` | undefined;
3015
+ lte?: `0x${string}` | undefined;
3016
+ } | `0x${string}` | undefined;
3017
+ nonceKey?: string | {
3018
+ eq: string;
3019
+ } | {
3020
+ in: string[];
3021
+ } | {
3022
+ not: string;
3023
+ } | undefined;
3024
+ validBefore?: {
3025
+ eq?: `0x${string}` | undefined;
3026
+ gt?: `0x${string}` | undefined;
3027
+ gte?: `0x${string}` | undefined;
3028
+ lt?: `0x${string}` | undefined;
3029
+ lte?: `0x${string}` | undefined;
3030
+ } | `0x${string}` | undefined;
3031
+ validAfter?: {
3032
+ eq?: `0x${string}` | undefined;
3033
+ gt?: `0x${string}` | undefined;
3034
+ gte?: `0x${string}` | undefined;
3035
+ lt?: `0x${string}` | undefined;
3036
+ lte?: `0x${string}` | undefined;
3037
+ } | `0x${string}` | undefined;
3038
+ blockNumber?: {
3039
+ eq?: `0x${string}` | undefined;
3040
+ gt?: `0x${string}` | undefined;
3041
+ gte?: `0x${string}` | undefined;
3042
+ lt?: `0x${string}` | undefined;
3043
+ lte?: `0x${string}` | undefined;
3044
+ } | `0x${string}` | undefined;
3045
+ timestamp?: {
3046
+ eq?: `0x${string}` | undefined;
3047
+ gt?: `0x${string}` | undefined;
3048
+ gte?: `0x${string}` | undefined;
3049
+ lt?: `0x${string}` | undefined;
3050
+ lte?: `0x${string}` | undefined;
3051
+ } | `0x${string}` | undefined;
3052
+ } | undefined;
3053
+ } | {
3054
+ chainId?: unknown;
3055
+ context?: {
3056
+ description?: string | undefined;
3057
+ metadata?: Record<string, string> | undefined;
3058
+ title?: string | undefined;
3059
+ } | undefined;
3060
+ destination: {
3061
+ type: "url";
3062
+ url: string;
3063
+ } | {
3064
+ type: "slack";
3065
+ url: string;
3066
+ } | {
3067
+ token: string;
3068
+ type: "betterstack";
3069
+ url: string;
3070
+ };
3071
+ eventType: "log:emitted";
3072
+ filters: {
3073
+ address?: {
3074
+ eq: `0x${string}`;
3075
+ } | {
3076
+ in: `0x${string}`[];
3077
+ } | {
3078
+ not: `0x${string}`;
3079
+ } | `0x${string}` | undefined;
3080
+ signature?: string | undefined;
3081
+ topic0?: {
3082
+ eq: `0x${string}`;
3083
+ } | {
3084
+ in: `0x${string}`[];
3085
+ } | {
3086
+ not: `0x${string}`;
3087
+ } | `0x${string}` | undefined;
3088
+ topic1?: {
3089
+ eq: `0x${string}`;
3090
+ } | {
3091
+ in: `0x${string}`[];
3092
+ } | {
3093
+ not: `0x${string}`;
3094
+ } | `0x${string}` | undefined;
3095
+ topic2?: {
3096
+ eq: `0x${string}`;
3097
+ } | {
3098
+ in: `0x${string}`[];
3099
+ } | {
3100
+ not: `0x${string}`;
3101
+ } | `0x${string}` | undefined;
3102
+ topic3?: {
3103
+ eq: `0x${string}`;
3104
+ } | {
3105
+ in: `0x${string}`[];
3106
+ } | {
3107
+ not: `0x${string}`;
3108
+ } | `0x${string}` | undefined;
3109
+ args?: Record<string, unknown> | undefined;
3110
+ blockNumber?: {
3111
+ eq?: `0x${string}` | undefined;
3112
+ gt?: `0x${string}` | undefined;
3113
+ gte?: `0x${string}` | undefined;
3114
+ lt?: `0x${string}` | undefined;
3115
+ lte?: `0x${string}` | undefined;
3116
+ } | `0x${string}` | undefined;
3117
+ };
3118
+ } | {
3119
+ chainId?: unknown;
3120
+ context?: {
3121
+ description?: string | undefined;
3122
+ metadata?: Record<string, string> | undefined;
3123
+ title?: string | undefined;
3124
+ } | undefined;
3125
+ destination: {
3126
+ type: "url";
3127
+ url: string;
3128
+ } | {
3129
+ type: "slack";
3130
+ url: string;
3131
+ } | {
3132
+ token: string;
3133
+ type: "betterstack";
3134
+ url: string;
3135
+ };
3136
+ eventType: "block:created";
3137
+ filters?: {
3138
+ number?: {
3139
+ eq?: `0x${string}` | undefined;
3140
+ gt?: `0x${string}` | undefined;
3141
+ gte?: `0x${string}` | undefined;
3142
+ lt?: `0x${string}` | undefined;
3143
+ lte?: `0x${string}` | undefined;
3144
+ } | `0x${string}` | undefined;
3145
+ miner?: {
3146
+ eq: `0x${string}`;
3147
+ } | {
3148
+ in: `0x${string}`[];
3149
+ } | {
3150
+ not: `0x${string}`;
3151
+ } | `0x${string}` | undefined;
3152
+ proposer?: {
3153
+ eq: `0x${string}`;
3154
+ } | {
3155
+ in: `0x${string}`[];
3156
+ } | {
3157
+ not: `0x${string}`;
3158
+ } | `0x${string}` | undefined;
3159
+ gasUsed?: {
3160
+ eq?: `0x${string}` | undefined;
3161
+ gt?: `0x${string}` | undefined;
3162
+ gte?: `0x${string}` | undefined;
3163
+ lt?: `0x${string}` | undefined;
3164
+ lte?: `0x${string}` | undefined;
3165
+ } | `0x${string}` | undefined;
3166
+ gasLimit?: {
3167
+ eq?: `0x${string}` | undefined;
3168
+ gt?: `0x${string}` | undefined;
3169
+ gte?: `0x${string}` | undefined;
3170
+ lt?: `0x${string}` | undefined;
3171
+ lte?: `0x${string}` | undefined;
3172
+ } | `0x${string}` | undefined;
3173
+ timestamp?: {
3174
+ eq?: `0x${string}` | undefined;
3175
+ gt?: `0x${string}` | undefined;
3176
+ gte?: `0x${string}` | undefined;
3177
+ lt?: `0x${string}` | undefined;
3178
+ lte?: `0x${string}` | undefined;
3179
+ } | `0x${string}` | undefined;
3180
+ } | undefined;
3181
+ } | {
3182
+ chainId?: unknown;
3183
+ context?: {
3184
+ description?: string | undefined;
3185
+ metadata?: Record<string, string> | undefined;
3186
+ title?: string | undefined;
3187
+ } | undefined;
3188
+ destination: {
3189
+ type: "url";
3190
+ url: string;
3191
+ } | {
3192
+ type: "slack";
3193
+ url: string;
3194
+ } | {
3195
+ token: string;
3196
+ type: "betterstack";
3197
+ url: string;
3198
+ };
3199
+ eventType: "funding:deposit.updated";
3200
+ filters?: {
3201
+ depositAddressId?: string | undefined;
3202
+ recipient?: `0x${string}` | undefined;
3203
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
3204
+ } | undefined;
2462
3205
  };
2463
3206
  };
2464
3207
  } | {
2465
3208
  output: {
2466
3209
  error: {
2467
- code: "payment_required" | "rate_limit_exceeded";
3210
+ code: "upstream_error";
2468
3211
  details?: readonly Response.error.Detail[] | undefined;
2469
3212
  message: string;
2470
3213
  };
2471
3214
  requestId: string;
2472
3215
  };
2473
3216
  outputFormat: "json";
2474
- status: 429;
3217
+ status: 502;
2475
3218
  input: {
2476
3219
  json: {
2477
3220
  chainId?: unknown;
@@ -2783,19 +3526,43 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
2783
3526
  lte?: `0x${string}` | undefined;
2784
3527
  } | `0x${string}` | undefined;
2785
3528
  } | undefined;
3529
+ } | {
3530
+ chainId?: unknown;
3531
+ context?: {
3532
+ description?: string | undefined;
3533
+ metadata?: Record<string, string> | undefined;
3534
+ title?: string | undefined;
3535
+ } | undefined;
3536
+ destination: {
3537
+ type: "url";
3538
+ url: string;
3539
+ } | {
3540
+ type: "slack";
3541
+ url: string;
3542
+ } | {
3543
+ token: string;
3544
+ type: "betterstack";
3545
+ url: string;
3546
+ };
3547
+ eventType: "funding:deposit.updated";
3548
+ filters?: {
3549
+ depositAddressId?: string | undefined;
3550
+ recipient?: `0x${string}` | undefined;
3551
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
3552
+ } | undefined;
2786
3553
  };
2787
3554
  };
2788
3555
  } | {
2789
3556
  output: {
2790
3557
  error: {
2791
- code: "upstream_error";
3558
+ code: "webhooks_not_enabled";
2792
3559
  details?: readonly Response.error.Detail[] | undefined;
2793
3560
  message: string;
2794
3561
  };
2795
3562
  requestId: string;
2796
3563
  };
2797
3564
  outputFormat: "json";
2798
- status: 502;
3565
+ status: 404;
2799
3566
  input: {
2800
3567
  json: {
2801
3568
  chainId?: unknown;
@@ -3107,19 +3874,43 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
3107
3874
  lte?: `0x${string}` | undefined;
3108
3875
  } | `0x${string}` | undefined;
3109
3876
  } | undefined;
3877
+ } | {
3878
+ chainId?: unknown;
3879
+ context?: {
3880
+ description?: string | undefined;
3881
+ metadata?: Record<string, string> | undefined;
3882
+ title?: string | undefined;
3883
+ } | undefined;
3884
+ destination: {
3885
+ type: "url";
3886
+ url: string;
3887
+ } | {
3888
+ type: "slack";
3889
+ url: string;
3890
+ } | {
3891
+ token: string;
3892
+ type: "betterstack";
3893
+ url: string;
3894
+ };
3895
+ eventType: "funding:deposit.updated";
3896
+ filters?: {
3897
+ depositAddressId?: string | undefined;
3898
+ recipient?: `0x${string}` | undefined;
3899
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
3900
+ } | undefined;
3110
3901
  };
3111
3902
  };
3112
3903
  } | {
3113
3904
  output: {
3114
3905
  error: {
3115
- code: "webhooks_not_enabled";
3906
+ code: "body_invalid";
3116
3907
  details?: readonly Response.error.Detail[] | undefined;
3117
3908
  message: string;
3118
3909
  };
3119
3910
  requestId: string;
3120
3911
  };
3121
3912
  outputFormat: "json";
3122
- status: 404;
3913
+ status: 400;
3123
3914
  input: {
3124
3915
  json: {
3125
3916
  chainId?: unknown;
@@ -3431,19 +4222,43 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
3431
4222
  lte?: `0x${string}` | undefined;
3432
4223
  } | `0x${string}` | undefined;
3433
4224
  } | undefined;
4225
+ } | {
4226
+ chainId?: unknown;
4227
+ context?: {
4228
+ description?: string | undefined;
4229
+ metadata?: Record<string, string> | undefined;
4230
+ title?: string | undefined;
4231
+ } | undefined;
4232
+ destination: {
4233
+ type: "url";
4234
+ url: string;
4235
+ } | {
4236
+ type: "slack";
4237
+ url: string;
4238
+ } | {
4239
+ token: string;
4240
+ type: "betterstack";
4241
+ url: string;
4242
+ };
4243
+ eventType: "funding:deposit.updated";
4244
+ filters?: {
4245
+ depositAddressId?: string | undefined;
4246
+ recipient?: `0x${string}` | undefined;
4247
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
4248
+ } | undefined;
3434
4249
  };
3435
4250
  };
3436
4251
  } | {
3437
4252
  output: {
3438
4253
  error: {
3439
- code: "body_invalid";
4254
+ code: "unauthorized";
3440
4255
  details?: readonly Response.error.Detail[] | undefined;
3441
4256
  message: string;
3442
4257
  };
3443
4258
  requestId: string;
3444
4259
  };
3445
4260
  outputFormat: "json";
3446
- status: 400;
4261
+ status: 401;
3447
4262
  input: {
3448
4263
  json: {
3449
4264
  chainId?: unknown;
@@ -3755,19 +4570,43 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
3755
4570
  lte?: `0x${string}` | undefined;
3756
4571
  } | `0x${string}` | undefined;
3757
4572
  } | undefined;
4573
+ } | {
4574
+ chainId?: unknown;
4575
+ context?: {
4576
+ description?: string | undefined;
4577
+ metadata?: Record<string, string> | undefined;
4578
+ title?: string | undefined;
4579
+ } | undefined;
4580
+ destination: {
4581
+ type: "url";
4582
+ url: string;
4583
+ } | {
4584
+ type: "slack";
4585
+ url: string;
4586
+ } | {
4587
+ token: string;
4588
+ type: "betterstack";
4589
+ url: string;
4590
+ };
4591
+ eventType: "funding:deposit.updated";
4592
+ filters?: {
4593
+ depositAddressId?: string | undefined;
4594
+ recipient?: `0x${string}` | undefined;
4595
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
4596
+ } | undefined;
3758
4597
  };
3759
4598
  };
3760
4599
  } | {
3761
4600
  output: {
3762
4601
  error: {
3763
- code: "unauthorized";
4602
+ code: "event_type_unsupported";
3764
4603
  details?: readonly Response.error.Detail[] | undefined;
3765
4604
  message: string;
3766
4605
  };
3767
4606
  requestId: string;
3768
4607
  };
3769
4608
  outputFormat: "json";
3770
- status: 401;
4609
+ status: 400;
3771
4610
  input: {
3772
4611
  json: {
3773
4612
  chainId?: unknown;
@@ -4079,6 +4918,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
4079
4918
  lte?: `0x${string}` | undefined;
4080
4919
  } | `0x${string}` | undefined;
4081
4920
  } | undefined;
4921
+ } | {
4922
+ chainId?: unknown;
4923
+ context?: {
4924
+ description?: string | undefined;
4925
+ metadata?: Record<string, string> | undefined;
4926
+ title?: string | undefined;
4927
+ } | undefined;
4928
+ destination: {
4929
+ type: "url";
4930
+ url: string;
4931
+ } | {
4932
+ type: "slack";
4933
+ url: string;
4934
+ } | {
4935
+ token: string;
4936
+ type: "betterstack";
4937
+ url: string;
4938
+ };
4939
+ eventType: "funding:deposit.updated";
4940
+ filters?: {
4941
+ depositAddressId?: string | undefined;
4942
+ recipient?: `0x${string}` | undefined;
4943
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
4944
+ } | undefined;
4082
4945
  };
4083
4946
  };
4084
4947
  } | {
@@ -4403,6 +5266,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
4403
5266
  lte?: `0x${string}` | undefined;
4404
5267
  } | `0x${string}` | undefined;
4405
5268
  } | undefined;
5269
+ } | {
5270
+ chainId?: unknown;
5271
+ context?: {
5272
+ description?: string | undefined;
5273
+ metadata?: Record<string, string> | undefined;
5274
+ title?: string | undefined;
5275
+ } | undefined;
5276
+ destination: {
5277
+ type: "url";
5278
+ url: string;
5279
+ } | {
5280
+ type: "slack";
5281
+ url: string;
5282
+ } | {
5283
+ token: string;
5284
+ type: "betterstack";
5285
+ url: string;
5286
+ };
5287
+ eventType: "funding:deposit.updated";
5288
+ filters?: {
5289
+ depositAddressId?: string | undefined;
5290
+ recipient?: `0x${string}` | undefined;
5291
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
5292
+ } | undefined;
4406
5293
  };
4407
5294
  };
4408
5295
  } | {
@@ -4416,7 +5303,8 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
4416
5303
  title?: string | undefined;
4417
5304
  } | undefined;
4418
5305
  createdAt: string;
4419
- eventType: "block:created" | "log:emitted" | "token:transfer" | "transaction:included";
5306
+ environment?: "production" | "sandbox" | undefined;
5307
+ eventType: "block:created" | "funding:deposit.updated" | "log:emitted" | "token:transfer" | "transaction:included";
4420
5308
  expiresAt?: string | undefined;
4421
5309
  failureCount: number;
4422
5310
  filters: {
@@ -4752,6 +5640,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
4752
5640
  lte?: `0x${string}` | undefined;
4753
5641
  } | `0x${string}` | undefined;
4754
5642
  } | undefined;
5643
+ } | {
5644
+ chainId?: unknown;
5645
+ context?: {
5646
+ description?: string | undefined;
5647
+ metadata?: Record<string, string> | undefined;
5648
+ title?: string | undefined;
5649
+ } | undefined;
5650
+ destination: {
5651
+ type: "url";
5652
+ url: string;
5653
+ } | {
5654
+ type: "slack";
5655
+ url: string;
5656
+ } | {
5657
+ token: string;
5658
+ type: "betterstack";
5659
+ url: string;
5660
+ };
5661
+ eventType: "funding:deposit.updated";
5662
+ filters?: {
5663
+ depositAddressId?: string | undefined;
5664
+ recipient?: `0x${string}` | undefined;
5665
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
5666
+ } | undefined;
4755
5667
  };
4756
5668
  };
4757
5669
  } | {
@@ -5076,6 +5988,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
5076
5988
  lte?: `0x${string}` | undefined;
5077
5989
  } | `0x${string}` | undefined;
5078
5990
  } | undefined;
5991
+ } | {
5992
+ chainId?: unknown;
5993
+ context?: {
5994
+ description?: string | undefined;
5995
+ metadata?: Record<string, string> | undefined;
5996
+ title?: string | undefined;
5997
+ } | undefined;
5998
+ destination: {
5999
+ type: "url";
6000
+ url: string;
6001
+ } | {
6002
+ type: "slack";
6003
+ url: string;
6004
+ } | {
6005
+ token: string;
6006
+ type: "betterstack";
6007
+ url: string;
6008
+ };
6009
+ eventType: "funding:deposit.updated";
6010
+ filters?: {
6011
+ depositAddressId?: string | undefined;
6012
+ recipient?: `0x${string}` | undefined;
6013
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
6014
+ } | undefined;
5079
6015
  };
5080
6016
  };
5081
6017
  } | {
@@ -5400,6 +6336,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
5400
6336
  lte?: `0x${string}` | undefined;
5401
6337
  } | `0x${string}` | undefined;
5402
6338
  } | undefined;
6339
+ } | {
6340
+ chainId?: unknown;
6341
+ context?: {
6342
+ description?: string | undefined;
6343
+ metadata?: Record<string, string> | undefined;
6344
+ title?: string | undefined;
6345
+ } | undefined;
6346
+ destination: {
6347
+ type: "url";
6348
+ url: string;
6349
+ } | {
6350
+ type: "slack";
6351
+ url: string;
6352
+ } | {
6353
+ token: string;
6354
+ type: "betterstack";
6355
+ url: string;
6356
+ };
6357
+ eventType: "funding:deposit.updated";
6358
+ filters?: {
6359
+ depositAddressId?: string | undefined;
6360
+ recipient?: `0x${string}` | undefined;
6361
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
6362
+ } | undefined;
5403
6363
  };
5404
6364
  };
5405
6365
  } | {
@@ -5724,6 +6684,30 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
5724
6684
  lte?: `0x${string}` | undefined;
5725
6685
  } | `0x${string}` | undefined;
5726
6686
  } | undefined;
6687
+ } | {
6688
+ chainId?: unknown;
6689
+ context?: {
6690
+ description?: string | undefined;
6691
+ metadata?: Record<string, string> | undefined;
6692
+ title?: string | undefined;
6693
+ } | undefined;
6694
+ destination: {
6695
+ type: "url";
6696
+ url: string;
6697
+ } | {
6698
+ type: "slack";
6699
+ url: string;
6700
+ } | {
6701
+ token: string;
6702
+ type: "betterstack";
6703
+ url: string;
6704
+ };
6705
+ eventType: "funding:deposit.updated";
6706
+ filters?: {
6707
+ depositAddressId?: string | undefined;
6708
+ recipient?: `0x${string}` | undefined;
6709
+ status?: "action-required" | "bridging" | "completed" | "detected" | "refunded" | "refunding" | "settling" | undefined;
6710
+ } | undefined;
5727
6711
  };
5728
6712
  };
5729
6713
  };
@@ -5905,7 +6889,8 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
5905
6889
  type: "betterstack";
5906
6890
  url: string;
5907
6891
  };
5908
- eventType: "block:created" | "log:emitted" | "token:transfer" | "transaction:included";
6892
+ environment?: "production" | "sandbox" | undefined;
6893
+ eventType: "block:created" | "funding:deposit.updated" | "log:emitted" | "token:transfer" | "transaction:included";
5909
6894
  expiresAt?: string | undefined;
5910
6895
  failureCount: number;
5911
6896
  filters: {
@@ -6102,7 +7087,8 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
6102
7087
  type: "betterstack";
6103
7088
  url: string;
6104
7089
  };
6105
- eventType: "block:created" | "log:emitted" | "token:transfer" | "transaction:included";
7090
+ environment?: "production" | "sandbox" | undefined;
7091
+ eventType: "block:created" | "funding:deposit.updated" | "log:emitted" | "token:transfer" | "transaction:included";
6106
7092
  expiresAt?: string | undefined;
6107
7093
  failureCount: number;
6108
7094
  filters: {
@@ -7211,7 +8197,8 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
7211
8197
  type: "betterstack";
7212
8198
  url: string;
7213
8199
  };
7214
- eventType: "block:created" | "log:emitted" | "token:transfer" | "transaction:included";
8200
+ environment?: "production" | "sandbox" | undefined;
8201
+ eventType: "block:created" | "funding:deposit.updated" | "log:emitted" | "token:transfer" | "transaction:included";
7215
8202
  expiresAt?: string | undefined;
7216
8203
  failureCount: number;
7217
8204
  filters: {
@@ -7452,145 +8439,18 @@ export declare function webhooks(options?: webhooks.Options): import("hono/hono-
7452
8439
  export declare namespace webhooks {
7453
8440
  /** Options for creating webhook routes. */
7454
8441
  type Options = {
8442
+ /** Application events produced by this deployment outside the per-block chain scan. */
8443
+ applicationEventTypes?: readonly Webhooks.EventType[] | undefined;
7455
8444
  /** Whether webhook state is configured and routes should appear in OpenAPI. */
7456
8445
  enabled?: boolean | undefined;
7457
8446
  };
7458
8447
  }
7459
- /**
7460
- * Polls the chain over RPC for new events and dispatches a signed envelope per
7461
- * matching row, advancing each active subscription's `(block, index)` keyset
7462
- * cursor.
7463
- *
7464
- * Every event type scans a **narrow confirmed window** `[cursor, head -
7465
- * confirmations]` directly over JSON-RPC (`eth_getLogs`,
7466
- * `eth_getBlockByNumber`) so webhook delivery does not wait for an indexer.
7467
- *
7468
- * The chain head is injectable (tests pin a fixed historical window); only
7469
- * blocks at least `confirmations` behind head are emitted, giving at-least-once,
7470
- * finalized-ish semantics (re-delivery overlap is harmless because the receiver
7471
- * dedupes on the stable `event.id`).
7472
- *
7473
- * Cursor advances only past successfully dispatched rows, so a dispatch failure
7474
- * pauses that subscription at the last good position and the next tick resumes.
7475
- * Scan failures leave that subscription unchanged; the first error is rethrown
7476
- * after the remaining subscriptions run.
7477
- */
7478
- export declare function poll(options: poll.Options): Promise<poll.Result>;
7479
- export declare namespace poll {
7480
- /** A row to dispatch, paired with its owning subscription. */
7481
- type Dispatchable = {
7482
- /** The signed-on-dispatch delivery envelope. */
7483
- envelope: Webhooks.Envelope;
7484
- /** The subscription the event matched. */
7485
- subscription: Webhooks.Subscription;
7486
- };
7487
- /** Options for {@link poll}. */
7488
- type Options = {
7489
- /** Max matching rows scanned per subscription per tick (default 200). */
7490
- batchSize?: number | undefined;
7491
- /** Cache store for the token-metadata memoize (defaults to a fresh in-memory store; pass a persistent one to share lookups across ticks). */
7492
- cache?: Store.Store | undefined;
7493
- /** Chain to poll. Callers loop over chains. */
7494
- chainId: number;
7495
- /** viem RPC client for the chain. */
7496
- client: Viem.getClient.ReturnType;
7497
- /** Reorg-safety window: only emit blocks this far behind head (default 1). */
7498
- confirmations?: number | undefined;
7499
- /** Database holding subscriptions + cursors. */
7500
- db: Db.Db;
7501
- /**
7502
- * Delivery transport. Defaults to inline {@link Webhooks.deliverAndRecord} (self-host);
7503
- * on Cloudflare pass a Queue producer so retry/backoff/DLQ are native.
7504
- */
7505
- dispatch?: ((input: Dispatchable) => Promise<Webhooks.Result>) | undefined;
7506
- /** Batch delivery transport. A successful result confirms every row in the input. */
7507
- dispatchBatch?: ((input: readonly Dispatchable[], context: DispatchContext) => Promise<Webhooks.Result>) | undefined;
7508
- /** Event types to poll (default all). */
7509
- eventTypes?: readonly EventType[] | undefined;
7510
- /** Current chain head; the poller emits up to `head - confirmations`. */
7511
- headBlockNumber?: bigint | number | undefined;
7512
- /** Backfill cap: most blocks an RPC scanner inspects per tick (default 1000). */
7513
- maxBlocks?: number | undefined;
7514
- /** Records the worst confirmed-head distance without changing the poll result. */
7515
- onCursorLag?: ((blocks: number) => void) | undefined;
7516
- /** Records bounded scan inputs before allocation and outcomes after completion. */
7517
- onScanCheckpoint?: ((checkpoint: ScanCheckpoint) => void) | undefined;
7518
- /** Records bounded, per-tick poll-stage timings without subscription identities. */
7519
- onStage?: ((stage: Stage) => void) | undefined;
7520
- /** Records subscriptions eligible for this poll before any scan runs. */
7521
- onSubscriptions?: ((count: number) => void) | undefined;
7522
- /** Clock for envelope timestamps; injectable for tests. */
7523
- now?: (() => Date) | undefined;
7524
- /** Stops scanning and dispatch when the caller loses its execution lease. */
7525
- signal?: AbortSignal | undefined;
7526
- };
7527
- /** Runtime context shared with a batch delivery transport. */
7528
- type DispatchContext = {
7529
- /** Database instance already resolved for this poll. */
7530
- db: Db.Db;
7531
- };
7532
- /** Summary counters for one poll tick. */
7533
- type Result = {
7534
- /** Chain that was polled. */
7535
- chainId: number;
7536
- /** Rows successfully dispatched. */
7537
- dispatched: number;
7538
- /** Rows whose dispatch failed (pausing that subscription). */
7539
- failed: number;
7540
- /** True when a bounded scan left committed work behind the same head. */
7541
- hasMore?: boolean | undefined;
7542
- /** Highest confirmed block emitted this tick (`head - confirmations`). */
7543
- safeBlock: number;
7544
- /** Total rows scanned across all subscriptions. */
7545
- scanned: number;
7546
- /** Active subscriptions visited. */
7547
- subscriptions: number;
7548
- };
7549
- /** One scan boundary used to correlate production memory failures with workload shape. */
7550
- type ScanCheckpoint = {
7551
- /** Shared upper bound for concurrent upstream scans across event types. */
7552
- concurrency: number;
7553
- /** Scan duration, present only after completion. */
7554
- durationMs?: number | undefined;
7555
- /** Subscription event type scanned by this batch. */
7556
- eventType: EventType;
7557
- /** Subscriptions whose scan rejected, present only after completion. */
7558
- failedSubscriptions?: number | undefined;
7559
- /** Matching rows retained by completed pages, present only after completion. */
7560
- matchedItems?: number | undefined;
7561
- /** Largest block window requested by one subscription. */
7562
- maxWindowBlocks: number;
7563
- /** Whether the checkpoint precedes allocation or follows scan completion. */
7564
- phase: 'complete' | 'start';
7565
- /** Outcome of the completed RPC-backed scan. */
7566
- outcome?: 'empty' | 'error' | 'missing' | 'ok' | undefined;
7567
- /** JSON-RPC method used by this event type's scanner. */
7568
- rpcMethod: 'eth_getBlockByNumber' | 'eth_getLogs';
7569
- /** Subscriptions retained in this scan batch. */
7570
- subscriptionCount: number;
7571
- /** Maximum subscriptions retained by this event-type batch. */
7572
- subscriptionLimit: number;
7573
- /** Sum of subscription block windows in this scan batch. */
7574
- totalWindowBlocks: number;
7575
- };
7576
- /** One bounded poll-stage timing observation. */
7577
- type Stage = {
7578
- /** Stage duration in milliseconds. */
7579
- durationMs: number;
7580
- /** Event type being processed, omitted for the shared RPC-head stage. */
7581
- eventType?: EventType | undefined;
7582
- /** Whether the stage completed. */
7583
- outcome: 'error' | 'ok';
7584
- /** Bounded stage name. */
7585
- stage: MetricSink.PollStage;
7586
- };
7587
- }
7588
8448
  /** Returns the live RPC head block number for the chain. */
7589
8449
  export declare function getRpcHead(client: Viem.getClient.ReturnType): Promise<number>;
7590
8450
  /**
7591
8451
  * Validates `filters` against the schema for `eventType`, **failing closed**: an
7592
8452
  * invalid filter throws {@link Webhooks.InvalidFilterError} instead of degrading
7593
- * to `{}` (a firehose). Used at create/patch time and by the scanners so a stored
8453
+ * to `{}` (a firehose). Used at create/patch time and by {@link scanBlock} so a stored
7594
8454
  * bad filter can never silently widen the match set.
7595
8455
  */
7596
8456
  export declare function parseFilters(eventType: EventType, filters: Record<string, unknown> | undefined): Record<string, unknown>;
@@ -7598,7 +8458,7 @@ export declare function parseFilters(eventType: EventType, filters: Record<strin
7598
8458
  * The JS counterpart of the old SQL `applyOperator`: evaluates one parsed filter
7599
8459
  * operator (from {@link schema.eq}/{@link schema.compare}/{@link schema.bytes})
7600
8460
  * against a single `0x`-hex field value pulled from an RPC object. The one place
7601
- * operator semantics live, shared by every RPC scanner. Returns `false` for a
8461
+ * operator semantics live, shared by every event matcher. Returns `false` for a
7602
8462
  * missing field so an absent value never matches (fail-closed).
7603
8463
  *
7604
8464
  * - bare value / `{ eq }` → equality