tapimo 0.14.0 → 0.15.1

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 (1160) hide show
  1. package/README.md +7 -4
  2. package/dist/ApiKey.js +1 -1
  3. package/dist/ApiKey.js.map +1 -1
  4. package/dist/ApiKeys.d.ts +95 -14
  5. package/dist/ApiKeys.d.ts.map +1 -1
  6. package/dist/ApiKeys.js +360 -49
  7. package/dist/ApiKeys.js.map +1 -1
  8. package/dist/App.d.ts +12466 -10374
  9. package/dist/App.d.ts.map +1 -1
  10. package/dist/App.js +300 -22
  11. package/dist/App.js.map +1 -1
  12. package/dist/Assets.d.ts.map +1 -1
  13. package/dist/Assets.js +2 -1
  14. package/dist/Assets.js.map +1 -1
  15. package/dist/Handler.d.ts +0 -1
  16. package/dist/Handler.d.ts.map +1 -1
  17. package/dist/Handler.js +0 -1
  18. package/dist/Handler.js.map +1 -1
  19. package/dist/Scope.d.ts +13 -5
  20. package/dist/Scope.d.ts.map +1 -1
  21. package/dist/Scope.js +16 -5
  22. package/dist/Scope.js.map +1 -1
  23. package/dist/Webhooks.js +1 -1
  24. package/dist/Webhooks.js.map +1 -1
  25. package/dist/admin/App.d.ts +3057 -546
  26. package/dist/admin/App.d.ts.map +1 -1
  27. package/dist/admin/App.js +26 -5
  28. package/dist/admin/App.js.map +1 -1
  29. package/dist/admin/apps/api-keys.d.ts +179 -27
  30. package/dist/admin/apps/api-keys.d.ts.map +1 -1
  31. package/dist/admin/apps/api-keys.js +95 -43
  32. package/dist/admin/apps/api-keys.js.map +1 -1
  33. package/dist/admin/apps/earn-vaults.d.ts +1398 -0
  34. package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
  35. package/dist/admin/apps/earn-vaults.js +463 -7
  36. package/dist/admin/apps/earn-vaults.js.map +1 -1
  37. package/dist/admin/apps/organizations.d.ts +267 -15
  38. package/dist/admin/apps/organizations.d.ts.map +1 -1
  39. package/dist/admin/apps/organizations.js +241 -25
  40. package/dist/admin/apps/organizations.js.map +1 -1
  41. package/dist/admin/apps/routes-support.d.ts +95 -0
  42. package/dist/admin/apps/routes-support.d.ts.map +1 -0
  43. package/dist/admin/apps/routes-support.js +151 -0
  44. package/dist/admin/apps/routes-support.js.map +1 -0
  45. package/dist/admin/apps/routes.d.ts +2764 -0
  46. package/dist/admin/apps/routes.d.ts.map +1 -0
  47. package/dist/admin/apps/routes.js +728 -0
  48. package/dist/admin/apps/routes.js.map +1 -0
  49. package/dist/admin/apps/subsidies.d.ts +501 -0
  50. package/dist/admin/apps/subsidies.d.ts.map +1 -0
  51. package/dist/admin/apps/subsidies.js +384 -0
  52. package/dist/admin/apps/subsidies.js.map +1 -0
  53. package/dist/admin/apps/verified-tokens.d.ts +166 -160
  54. package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
  55. package/dist/admin/apps/verified-tokens.js +27 -7
  56. package/dist/admin/apps/verified-tokens.js.map +1 -1
  57. package/dist/admin/ui.generated.d.ts +1 -1
  58. package/dist/admin/ui.generated.d.ts.map +1 -1
  59. package/dist/admin/ui.generated.js +201 -149
  60. package/dist/admin/ui.generated.js.map +1 -1
  61. package/dist/analytics/Analytics.d.ts +5 -2
  62. package/dist/analytics/Analytics.d.ts.map +1 -1
  63. package/dist/analytics/Analytics.js +31 -1
  64. package/dist/analytics/Analytics.js.map +1 -1
  65. package/dist/analytics/tables/requestEvents.d.ts +2 -1
  66. package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
  67. package/dist/analytics/tables/requestEvents.js +10 -1
  68. package/dist/analytics/tables/requestEvents.js.map +1 -1
  69. package/dist/analytics/tables/routesLifecycleIntervals.d.ts +72 -0
  70. package/dist/analytics/tables/routesLifecycleIntervals.d.ts.map +1 -0
  71. package/dist/analytics/tables/routesLifecycleIntervals.js +56 -0
  72. package/dist/analytics/tables/routesLifecycleIntervals.js.map +1 -0
  73. package/dist/apps/Zones.d.ts +21 -12526
  74. package/dist/apps/Zones.d.ts.map +1 -1
  75. package/dist/apps/Zones.js +37 -5
  76. package/dist/apps/Zones.js.map +1 -1
  77. package/dist/apps/data/App.d.ts +3971 -2595
  78. package/dist/apps/data/App.d.ts.map +1 -1
  79. package/dist/apps/data/App.js +76 -21
  80. package/dist/apps/data/App.js.map +1 -1
  81. package/dist/apps/data/routes/activities.d.ts +629 -299
  82. package/dist/apps/data/routes/activities.d.ts.map +1 -1
  83. package/dist/apps/data/routes/activities.js +495 -190
  84. package/dist/apps/data/routes/activities.js.map +1 -1
  85. package/dist/apps/data/routes/addresses.d.ts +72 -0
  86. package/dist/apps/data/routes/addresses.d.ts.map +1 -1
  87. package/dist/apps/data/routes/blocks.d.ts +116 -116
  88. package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
  89. package/dist/apps/data/routes/coingecko.js +47 -21
  90. package/dist/apps/data/routes/coingecko.js.map +1 -1
  91. package/dist/apps/data/routes/earn.d.ts +1450 -337
  92. package/dist/apps/data/routes/earn.d.ts.map +1 -1
  93. package/dist/apps/data/routes/earn.js +1226 -144
  94. package/dist/apps/data/routes/earn.js.map +1 -1
  95. package/dist/apps/data/routes/fee-amm.d.ts +113 -108
  96. package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
  97. package/dist/apps/data/routes/fee-amm.js +41 -21
  98. package/dist/apps/data/routes/fee-amm.js.map +1 -1
  99. package/dist/apps/data/routes/indexer.d.ts +142 -17
  100. package/dist/apps/data/routes/indexer.d.ts.map +1 -1
  101. package/dist/apps/data/routes/indexer.js +83 -27
  102. package/dist/apps/data/routes/indexer.js.map +1 -1
  103. package/dist/apps/data/routes/receipts.d.ts +235 -235
  104. package/dist/apps/data/routes/rpc.d.ts +507 -33
  105. package/dist/apps/data/routes/rpc.d.ts.map +1 -1
  106. package/dist/apps/data/routes/rpc.js +309 -165
  107. package/dist/apps/data/routes/rpc.js.map +1 -1
  108. package/dist/apps/data/routes/tokenlist.d.ts +47 -15
  109. package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
  110. package/dist/apps/data/routes/tokenlist.js +68 -11
  111. package/dist/apps/data/routes/tokenlist.js.map +1 -1
  112. package/dist/apps/data/routes/tokens.d.ts +2 -0
  113. package/dist/apps/data/routes/tokens.d.ts.map +1 -1
  114. package/dist/apps/data/routes/tokens.js +26 -14
  115. package/dist/apps/data/routes/tokens.js.map +1 -1
  116. package/dist/apps/data/routes/transfers.d.ts +93 -77
  117. package/dist/apps/data/routes/transfers.d.ts.map +1 -1
  118. package/dist/apps/data/routes/transfers.js +9 -7
  119. package/dist/apps/data/routes/transfers.js.map +1 -1
  120. package/dist/apps/data/routes/valuation.d.ts +32 -32
  121. package/dist/apps/data/routes/verified-tokens.d.ts +88 -88
  122. package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
  123. package/dist/apps/data/routes/verified-tokens.js +64 -20
  124. package/dist/apps/data/routes/verified-tokens.js.map +1 -1
  125. package/dist/apps/data/routes/webhooks.d.ts +614 -177
  126. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  127. package/dist/apps/data/routes/webhooks.js +308 -205
  128. package/dist/apps/data/routes/webhooks.js.map +1 -1
  129. package/dist/apps/data/routes/zones.d.ts +31 -31
  130. package/dist/apps/data/routes/zones.d.ts.map +1 -1
  131. package/dist/apps/data/routes/zones.js +20 -12
  132. package/dist/apps/data/routes/zones.js.map +1 -1
  133. package/dist/apps/docs/reference.js +2 -2
  134. package/dist/apps/docs/reference.js.map +1 -1
  135. package/dist/apps/index.d.ts +1 -1
  136. package/dist/apps/index.d.ts.map +1 -1
  137. package/dist/apps/index.js +1 -1
  138. package/dist/apps/index.js.map +1 -1
  139. package/dist/apps/management/App.d.ts +3780 -3402
  140. package/dist/apps/management/App.d.ts.map +1 -1
  141. package/dist/apps/management/App.js +5 -14
  142. package/dist/apps/management/App.js.map +1 -1
  143. package/dist/apps/management/Billing.d.ts +48 -7
  144. package/dist/apps/management/Billing.d.ts.map +1 -1
  145. package/dist/apps/management/Billing.js +204 -25
  146. package/dist/apps/management/Billing.js.map +1 -1
  147. package/dist/apps/management/routes/api-keys.d.ts +317 -215
  148. package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
  149. package/dist/apps/management/routes/api-keys.js +43 -15
  150. package/dist/apps/management/routes/api-keys.js.map +1 -1
  151. package/dist/apps/management/routes/billing.d.ts +290 -4
  152. package/dist/apps/management/routes/billing.d.ts.map +1 -1
  153. package/dist/apps/management/routes/billing.js +274 -49
  154. package/dist/apps/management/routes/billing.js.map +1 -1
  155. package/dist/apps/management/routes/faucet.d.ts +6 -6
  156. package/dist/apps/management/routes/faucet.js +1 -1
  157. package/dist/apps/management/routes/faucet.js.map +1 -1
  158. package/dist/apps/management/routes/invitations.d.ts +213 -138
  159. package/dist/apps/management/routes/invitations.d.ts.map +1 -1
  160. package/dist/apps/management/routes/invitations.js +117 -13
  161. package/dist/apps/management/routes/invitations.js.map +1 -1
  162. package/dist/apps/management/routes/invite-links.d.ts +166 -166
  163. package/dist/apps/management/routes/me.d.ts.map +1 -1
  164. package/dist/apps/management/routes/me.js +6 -2
  165. package/dist/apps/management/routes/me.js.map +1 -1
  166. package/dist/apps/management/routes/members.d.ts +30 -30
  167. package/dist/apps/management/routes/orgs.d.ts +103 -87
  168. package/dist/apps/management/routes/orgs.d.ts.map +1 -1
  169. package/dist/apps/management/routes/orgs.js +52 -12
  170. package/dist/apps/management/routes/orgs.js.map +1 -1
  171. package/dist/apps/management/routes/projects.d.ts +125 -125
  172. package/dist/apps/management/routes/projects.d.ts.map +1 -1
  173. package/dist/apps/management/routes/projects.js +6 -1
  174. package/dist/apps/management/routes/projects.js.map +1 -1
  175. package/dist/apps/management/routes/scopes.d.ts.map +1 -1
  176. package/dist/apps/management/routes/scopes.js +4 -1
  177. package/dist/apps/management/routes/scopes.js.map +1 -1
  178. package/dist/apps/management/routes/usage.d.ts +24 -24
  179. package/dist/apps/management/routes/usage.js +21 -4
  180. package/dist/apps/management/routes/usage.js.map +1 -1
  181. package/dist/apps/management/routes/verified-token-requests.d.ts +95 -95
  182. package/dist/apps/management/routes/verified-token-requests.d.ts.map +1 -1
  183. package/dist/apps/management/routes/verified-token-requests.js +7 -9
  184. package/dist/apps/management/routes/verified-token-requests.js.map +1 -1
  185. package/dist/apps/management/routes/webhooks.d.ts +682 -616
  186. package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
  187. package/dist/apps/management/routes/webhooks.js +58 -12
  188. package/dist/apps/management/routes/webhooks.js.map +1 -1
  189. package/dist/apps/mcp.d.ts +1 -1
  190. package/dist/apps/mcp.d.ts.map +1 -1
  191. package/dist/apps/mcp.js +23 -10
  192. package/dist/apps/mcp.js.map +1 -1
  193. package/dist/apps/mpp/App.d.ts +44 -44
  194. package/dist/apps/mpp/App.d.ts.map +1 -1
  195. package/dist/apps/mpp/App.js +35 -7
  196. package/dist/apps/mpp/App.js.map +1 -1
  197. package/dist/apps/mpp/internal/Adapter.d.ts +2 -0
  198. package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
  199. package/dist/apps/mpp/internal/Adapter.js +30 -1
  200. package/dist/apps/mpp/internal/Adapter.js.map +1 -1
  201. package/dist/apps/mpp/internal/Policy.d.ts +22 -4
  202. package/dist/apps/mpp/internal/Policy.d.ts.map +1 -1
  203. package/dist/apps/mpp/internal/Policy.js +24 -6
  204. package/dist/apps/mpp/internal/Policy.js.map +1 -1
  205. package/dist/apps/mpp/internal/Sponsorship.d.ts +3 -0
  206. package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -1
  207. package/dist/apps/mpp/internal/Sponsorship.js +6 -3
  208. package/dist/apps/mpp/internal/Sponsorship.js.map +1 -1
  209. package/dist/apps/relay/App.d.ts +2 -0
  210. package/dist/apps/relay/App.d.ts.map +1 -1
  211. package/dist/apps/relay/App.js +134 -75
  212. package/dist/apps/relay/App.js.map +1 -1
  213. package/dist/apps/relay/Sponsorships.d.ts +5 -3
  214. package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
  215. package/dist/apps/relay/Sponsorships.js +209 -28
  216. package/dist/apps/relay/Sponsorships.js.map +1 -1
  217. package/dist/apps/{funding → routes}/Access.d.ts +4 -4
  218. package/dist/apps/routes/Access.d.ts.map +1 -0
  219. package/dist/apps/{funding → routes}/Access.js +4 -4
  220. package/dist/apps/routes/Access.js.map +1 -0
  221. package/dist/apps/{funding → routes}/App.d.ts +418 -124
  222. package/dist/apps/{funding → routes}/App.d.ts.map +1 -1
  223. package/dist/apps/{funding → routes}/App.js +16 -16
  224. package/dist/apps/routes/App.js.map +1 -0
  225. package/dist/apps/routes/Inventory.d.ts.map +1 -0
  226. package/dist/apps/{funding → routes}/Inventory.js +2 -2
  227. package/dist/apps/routes/Inventory.js.map +1 -0
  228. package/dist/apps/routes/index.d.ts +2 -0
  229. package/dist/apps/routes/index.d.ts.map +1 -0
  230. package/dist/apps/routes/index.js +2 -0
  231. package/dist/apps/routes/index.js.map +1 -0
  232. package/dist/apps/{funding → routes}/routes/chains.d.ts +32 -32
  233. package/dist/apps/routes/routes/chains.d.ts.map +1 -0
  234. package/dist/apps/{funding → routes}/routes/chains.js +25 -25
  235. package/dist/apps/routes/routes/chains.js.map +1 -0
  236. package/dist/apps/{funding → routes}/routes/deposit-addresses.d.ts +107 -43
  237. package/dist/apps/routes/routes/deposit-addresses.d.ts.map +1 -0
  238. package/dist/apps/{funding → routes}/routes/deposit-addresses.js +497 -222
  239. package/dist/apps/routes/routes/deposit-addresses.js.map +1 -0
  240. package/dist/apps/{funding → routes}/routes/providers.d.ts +8 -8
  241. package/dist/apps/routes/routes/providers.d.ts.map +1 -0
  242. package/dist/apps/routes/routes/providers.js +57 -0
  243. package/dist/apps/routes/routes/providers.js.map +1 -0
  244. package/dist/apps/{funding → routes}/routes/quotes.d.ts +106 -103
  245. package/dist/apps/routes/routes/quotes.d.ts.map +1 -0
  246. package/dist/apps/{funding → routes}/routes/quotes.js +55 -38
  247. package/dist/apps/routes/routes/quotes.js.map +1 -0
  248. package/dist/apps/{funding → routes}/routes/transfers.d.ts +733 -428
  249. package/dist/apps/routes/routes/transfers.d.ts.map +1 -0
  250. package/dist/apps/routes/routes/transfers.js +1140 -0
  251. package/dist/apps/routes/routes/transfers.js.map +1 -0
  252. package/dist/cli/Cli.d.ts +30 -0
  253. package/dist/cli/Cli.d.ts.map +1 -1
  254. package/dist/cli/commands/admin.d.ts +36 -0
  255. package/dist/cli/commands/admin.d.ts.map +1 -1
  256. package/dist/cli/commands/admin.js +273 -0
  257. package/dist/cli/commands/admin.js.map +1 -1
  258. package/dist/cloudflare.d.ts +16 -14
  259. package/dist/cloudflare.d.ts.map +1 -1
  260. package/dist/cloudflare.js +26 -21
  261. package/dist/cloudflare.js.map +1 -1
  262. package/dist/db/Db.d.ts +63 -21
  263. package/dist/db/Db.d.ts.map +1 -1
  264. package/dist/db/Db.js +1035 -15
  265. package/dist/db/Db.js.map +1 -1
  266. package/dist/db/Schema.d.ts +780 -133
  267. package/dist/db/Schema.d.ts.map +1 -1
  268. package/dist/db/Schema.js +575 -162
  269. package/dist/db/Schema.js.map +1 -1
  270. package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts +4 -0
  271. package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts.map +1 -0
  272. package/dist/db/tables/apiKeyAdmissionBootstraps.js +2 -0
  273. package/dist/db/tables/apiKeyAdmissionBootstraps.js.map +1 -0
  274. package/dist/db/tables/apiKeyAdmissions.d.ts +73 -0
  275. package/dist/db/tables/apiKeyAdmissions.d.ts.map +1 -0
  276. package/dist/db/tables/apiKeyAdmissions.js +142 -0
  277. package/dist/db/tables/apiKeyAdmissions.js.map +1 -0
  278. package/dist/db/tables/apiKeyOwnerAdmissions.d.ts +4 -0
  279. package/dist/db/tables/apiKeyOwnerAdmissions.d.ts.map +1 -0
  280. package/dist/db/tables/apiKeyOwnerAdmissions.js +2 -0
  281. package/dist/db/tables/apiKeyOwnerAdmissions.js.map +1 -0
  282. package/dist/db/tables/apiKeyOwnerTombstones.d.ts +20 -0
  283. package/dist/db/tables/apiKeyOwnerTombstones.d.ts.map +1 -0
  284. package/dist/db/tables/apiKeyOwnerTombstones.js +57 -0
  285. package/dist/db/tables/apiKeyOwnerTombstones.js.map +1 -0
  286. package/dist/db/tables/apiKeyRevocations.d.ts +21 -0
  287. package/dist/db/tables/apiKeyRevocations.d.ts.map +1 -0
  288. package/dist/db/tables/apiKeyRevocations.js +98 -0
  289. package/dist/db/tables/apiKeyRevocations.js.map +1 -0
  290. package/dist/db/tables/authAccounts.d.ts +47 -0
  291. package/dist/db/tables/authAccounts.d.ts.map +1 -0
  292. package/dist/db/tables/authAccounts.js +72 -0
  293. package/dist/db/tables/authAccounts.js.map +1 -0
  294. package/dist/db/tables/authSessions.d.ts +12 -0
  295. package/dist/db/tables/authSessions.d.ts.map +1 -0
  296. package/dist/db/tables/authSessions.js +2 -0
  297. package/dist/db/tables/authSessions.js.map +1 -0
  298. package/dist/db/tables/authVerifications.d.ts +12 -0
  299. package/dist/db/tables/authVerifications.d.ts.map +1 -0
  300. package/dist/db/tables/authVerifications.js +2 -0
  301. package/dist/db/tables/authVerifications.js.map +1 -0
  302. package/dist/db/tables/invitations.d.ts +17 -1
  303. package/dist/db/tables/invitations.d.ts.map +1 -1
  304. package/dist/db/tables/invitations.js +123 -43
  305. package/dist/db/tables/invitations.js.map +1 -1
  306. package/dist/db/tables/memberships.d.ts +8 -0
  307. package/dist/db/tables/memberships.d.ts.map +1 -1
  308. package/dist/db/tables/memberships.js +51 -2
  309. package/dist/db/tables/memberships.js.map +1 -1
  310. package/dist/db/tables/organizations.d.ts +32 -10
  311. package/dist/db/tables/organizations.d.ts.map +1 -1
  312. package/dist/db/tables/organizations.js +110 -49
  313. package/dist/db/tables/organizations.js.map +1 -1
  314. package/dist/db/tables/projects.d.ts +2 -0
  315. package/dist/db/tables/projects.d.ts.map +1 -1
  316. package/dist/db/tables/projects.js +12 -3
  317. package/dist/db/tables/projects.js.map +1 -1
  318. package/dist/db/tables/requestUsage.d.ts.map +1 -1
  319. package/dist/db/tables/requestUsage.js.map +1 -1
  320. package/dist/db/tables/rewardAccounts.d.ts +86 -0
  321. package/dist/db/tables/rewardAccounts.d.ts.map +1 -0
  322. package/dist/db/tables/rewardAccounts.js +88 -0
  323. package/dist/db/tables/rewardAccounts.js.map +1 -0
  324. package/dist/db/tables/rewardCampaignDistributors.d.ts +36 -0
  325. package/dist/db/tables/rewardCampaignDistributors.d.ts.map +1 -0
  326. package/dist/db/tables/rewardCampaignDistributors.js +30 -0
  327. package/dist/db/tables/rewardCampaignDistributors.js.map +1 -0
  328. package/dist/db/tables/rewardCampaigns.d.ts +171 -0
  329. package/dist/db/tables/rewardCampaigns.d.ts.map +1 -0
  330. package/dist/db/tables/rewardCampaigns.js +392 -0
  331. package/dist/db/tables/rewardCampaigns.js.map +1 -0
  332. package/dist/db/tables/rewardCredits.d.ts +53 -0
  333. package/dist/db/tables/rewardCredits.d.ts.map +1 -0
  334. package/dist/db/tables/rewardCredits.js +63 -0
  335. package/dist/db/tables/rewardCredits.js.map +1 -0
  336. package/dist/db/tables/rewardEligibilityAssociations.d.ts +61 -0
  337. package/dist/db/tables/rewardEligibilityAssociations.d.ts.map +1 -0
  338. package/dist/db/tables/rewardEligibilityAssociations.js +103 -0
  339. package/dist/db/tables/rewardEligibilityAssociations.js.map +1 -0
  340. package/dist/db/tables/rewardRuns.d.ts +188 -0
  341. package/dist/db/tables/rewardRuns.d.ts.map +1 -0
  342. package/dist/db/tables/rewardRuns.js +278 -0
  343. package/dist/db/tables/rewardRuns.js.map +1 -0
  344. package/dist/db/tables/rewardTransactionAttempts.d.ts +100 -0
  345. package/dist/db/tables/rewardTransactionAttempts.d.ts.map +1 -0
  346. package/dist/db/tables/rewardTransactionAttempts.js +163 -0
  347. package/dist/db/tables/rewardTransactionAttempts.js.map +1 -0
  348. package/dist/db/tables/routesCatalog.d.ts +58 -0
  349. package/dist/db/tables/routesCatalog.d.ts.map +1 -0
  350. package/dist/db/tables/{fundingCatalog.js → routesCatalog.js} +19 -19
  351. package/dist/db/tables/routesCatalog.js.map +1 -0
  352. package/dist/db/tables/routesDepositAddresses.d.ts +476 -0
  353. package/dist/db/tables/routesDepositAddresses.d.ts.map +1 -0
  354. package/dist/db/tables/routesDepositAddresses.js +587 -0
  355. package/dist/db/tables/routesDepositAddresses.js.map +1 -0
  356. package/dist/db/tables/{fundingDepositRequestObservations.d.ts → routesDepositRequestObservations.d.ts} +6 -6
  357. package/dist/db/tables/routesDepositRequestObservations.d.ts.map +1 -0
  358. package/dist/db/tables/{fundingDepositRequestObservations.js → routesDepositRequestObservations.js} +6 -6
  359. package/dist/db/tables/routesDepositRequestObservations.js.map +1 -0
  360. package/dist/db/tables/{fundingDeposits.d.ts → routesDeposits.d.ts} +210 -22
  361. package/dist/db/tables/routesDeposits.d.ts.map +1 -0
  362. package/dist/db/tables/routesDeposits.js +576 -0
  363. package/dist/db/tables/routesDeposits.js.map +1 -0
  364. package/dist/db/tables/routesIdempotency.d.ts +166 -0
  365. package/dist/db/tables/routesIdempotency.d.ts.map +1 -0
  366. package/dist/db/tables/routesIdempotency.js +330 -0
  367. package/dist/db/tables/routesIdempotency.js.map +1 -0
  368. package/dist/db/tables/routesSubsidies.d.ts +27 -0
  369. package/dist/db/tables/routesSubsidies.d.ts.map +1 -0
  370. package/dist/db/tables/routesSubsidies.js +45 -0
  371. package/dist/db/tables/routesSubsidies.js.map +1 -0
  372. package/dist/db/tables/{fundingTransferEvents.d.ts → routesTransferEvents.d.ts} +3 -3
  373. package/dist/db/tables/routesTransferEvents.d.ts.map +1 -0
  374. package/dist/db/tables/{fundingTransferEvents.js → routesTransferEvents.js} +3 -3
  375. package/dist/db/tables/routesTransferEvents.js.map +1 -0
  376. package/dist/db/tables/routesTransferSubsidies.d.ts +19 -0
  377. package/dist/db/tables/routesTransferSubsidies.d.ts.map +1 -0
  378. package/dist/db/tables/routesTransferSubsidies.js +17 -0
  379. package/dist/db/tables/routesTransferSubsidies.js.map +1 -0
  380. package/dist/db/tables/routesTransferSubsidyNonces.d.ts +51 -0
  381. package/dist/db/tables/routesTransferSubsidyNonces.d.ts.map +1 -0
  382. package/dist/db/tables/routesTransferSubsidyNonces.js +82 -0
  383. package/dist/db/tables/routesTransferSubsidyNonces.js.map +1 -0
  384. package/dist/db/tables/routesTransferTransactions.d.ts +77 -0
  385. package/dist/db/tables/routesTransferTransactions.d.ts.map +1 -0
  386. package/dist/db/tables/{fundingTransferTransactions.js → routesTransferTransactions.js} +31 -13
  387. package/dist/db/tables/routesTransferTransactions.js.map +1 -0
  388. package/dist/db/tables/routesTransfers.d.ts +319 -0
  389. package/dist/db/tables/routesTransfers.d.ts.map +1 -0
  390. package/dist/db/tables/routesTransfers.js +372 -0
  391. package/dist/db/tables/routesTransfers.js.map +1 -0
  392. package/dist/db/tables/sponsoredTransactions.d.ts +75 -20
  393. package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
  394. package/dist/db/tables/sponsoredTransactions.js +124 -54
  395. package/dist/db/tables/sponsoredTransactions.js.map +1 -1
  396. package/dist/db/tables/sponsorshipAttributions.d.ts +69 -0
  397. package/dist/db/tables/sponsorshipAttributions.d.ts.map +1 -0
  398. package/dist/db/tables/sponsorshipAttributions.js +77 -0
  399. package/dist/db/tables/sponsorshipAttributions.js.map +1 -0
  400. package/dist/db/tables/sponsorshipReconciliationCursors.d.ts +22 -0
  401. package/dist/db/tables/sponsorshipReconciliationCursors.d.ts.map +1 -0
  402. package/dist/db/tables/sponsorshipReconciliationCursors.js +45 -0
  403. package/dist/db/tables/sponsorshipReconciliationCursors.js.map +1 -0
  404. package/dist/db/tables/stripeCustomers.d.ts +11 -0
  405. package/dist/db/tables/stripeCustomers.d.ts.map +1 -1
  406. package/dist/db/tables/stripeCustomers.js +13 -0
  407. package/dist/db/tables/stripeCustomers.js.map +1 -1
  408. package/dist/db/tables/users.d.ts +17 -1
  409. package/dist/db/tables/users.d.ts.map +1 -1
  410. package/dist/db/tables/users.js +47 -2
  411. package/dist/db/tables/users.js.map +1 -1
  412. package/dist/db/tables/verifiedTokenRequests.d.ts +21 -4
  413. package/dist/db/tables/verifiedTokenRequests.d.ts.map +1 -1
  414. package/dist/db/tables/verifiedTokenRequests.js +65 -44
  415. package/dist/db/tables/verifiedTokenRequests.js.map +1 -1
  416. package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
  417. package/dist/db/tables/webhookQueueEvents.js +5 -1
  418. package/dist/db/tables/webhookQueueEvents.js.map +1 -1
  419. package/dist/db/tables/webhookSubscriptions.d.ts +19 -11
  420. package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
  421. package/dist/db/tables/webhookSubscriptions.js +45 -13
  422. package/dist/db/tables/webhookSubscriptions.js.map +1 -1
  423. package/dist/handlers/internal/executionError.d.ts +2 -2
  424. package/dist/handlers/internal/executionError.d.ts.map +1 -1
  425. package/dist/handlers/internal/executionError.js +1 -2
  426. package/dist/handlers/internal/executionError.js.map +1 -1
  427. package/dist/handlers/internal/multisig.d.ts +4 -232
  428. package/dist/handlers/internal/multisig.d.ts.map +1 -1
  429. package/dist/handlers/internal/multisig.js +11 -537
  430. package/dist/handlers/internal/multisig.js.map +1 -1
  431. package/dist/handlers/internal/sponsorship.d.ts +19 -8
  432. package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
  433. package/dist/handlers/internal/sponsorship.js +13 -9
  434. package/dist/handlers/internal/sponsorship.js.map +1 -1
  435. package/dist/handlers/relay.d.ts +9 -12
  436. package/dist/handlers/relay.d.ts.map +1 -1
  437. package/dist/handlers/relay.js +81 -85
  438. package/dist/handlers/relay.js.map +1 -1
  439. package/dist/index.d.ts +0 -17
  440. package/dist/index.d.ts.map +1 -1
  441. package/dist/index.js +0 -17
  442. package/dist/index.js.map +1 -1
  443. package/dist/internal/AssetResponse.d.ts +12 -0
  444. package/dist/internal/AssetResponse.d.ts.map +1 -0
  445. package/dist/internal/AssetResponse.js +21 -0
  446. package/dist/internal/AssetResponse.js.map +1 -0
  447. package/dist/internal/Auth.d.ts +64 -12
  448. package/dist/internal/Auth.d.ts.map +1 -1
  449. package/dist/internal/Auth.js +631 -180
  450. package/dist/internal/Auth.js.map +1 -1
  451. package/dist/internal/BetterAuth.d.ts +1488 -0
  452. package/dist/internal/BetterAuth.d.ts.map +1 -0
  453. package/dist/internal/BetterAuth.js +253 -0
  454. package/dist/internal/BetterAuth.js.map +1 -0
  455. package/dist/internal/Cache.d.ts +2 -0
  456. package/dist/internal/Cache.d.ts.map +1 -1
  457. package/dist/internal/Cache.js +2 -0
  458. package/dist/internal/Cache.js.map +1 -1
  459. package/dist/internal/EarnRates.d.ts +26 -3
  460. package/dist/internal/EarnRates.d.ts.map +1 -1
  461. package/dist/internal/EarnRates.js +84 -19
  462. package/dist/internal/EarnRates.js.map +1 -1
  463. package/dist/internal/EarnSharePrices.d.ts +120 -0
  464. package/dist/internal/EarnSharePrices.d.ts.map +1 -0
  465. package/dist/internal/EarnSharePrices.js +179 -0
  466. package/dist/internal/EarnSharePrices.js.map +1 -0
  467. package/dist/internal/EarnVaults.d.ts +4 -0
  468. package/dist/internal/EarnVaults.d.ts.map +1 -1
  469. package/dist/internal/EarnVaults.js +27 -10
  470. package/dist/internal/EarnVaults.js.map +1 -1
  471. package/dist/internal/Email.d.ts +37 -0
  472. package/dist/internal/Email.d.ts.map +1 -0
  473. package/dist/internal/Email.js +16 -0
  474. package/dist/internal/Email.js.map +1 -0
  475. package/dist/internal/Log.d.ts +32 -28
  476. package/dist/internal/Log.d.ts.map +1 -1
  477. package/dist/internal/Log.js +18 -11
  478. package/dist/internal/Log.js.map +1 -1
  479. package/dist/internal/MetricSink.d.ts +3 -0
  480. package/dist/internal/MetricSink.d.ts.map +1 -1
  481. package/dist/internal/MetricSink.js +67 -8
  482. package/dist/internal/MetricSink.js.map +1 -1
  483. package/dist/internal/Mpp.d.ts.map +1 -1
  484. package/dist/internal/Mpp.js +20 -25
  485. package/dist/internal/Mpp.js.map +1 -1
  486. package/dist/internal/OpenApi.d.ts +26 -3
  487. package/dist/internal/OpenApi.d.ts.map +1 -1
  488. package/dist/internal/OpenApi.js +25 -10
  489. package/dist/internal/OpenApi.js.map +1 -1
  490. package/dist/internal/Provider.d.ts +1 -1
  491. package/dist/internal/Provider.d.ts.map +1 -1
  492. package/dist/internal/RateLimit.d.ts.map +1 -1
  493. package/dist/internal/RateLimit.js +13 -1
  494. package/dist/internal/RateLimit.js.map +1 -1
  495. package/dist/internal/Store.d.ts +16 -0
  496. package/dist/internal/Store.d.ts.map +1 -1
  497. package/dist/internal/Store.js +59 -8
  498. package/dist/internal/Store.js.map +1 -1
  499. package/dist/internal/Tidx.d.ts +9 -2
  500. package/dist/internal/Tidx.d.ts.map +1 -1
  501. package/dist/internal/Tidx.js +78 -11
  502. package/dist/internal/Tidx.js.map +1 -1
  503. package/dist/internal/Timing.d.ts +26 -0
  504. package/dist/internal/Timing.d.ts.map +1 -1
  505. package/dist/internal/Timing.js +63 -5
  506. package/dist/internal/Timing.js.map +1 -1
  507. package/dist/internal/VercelOidc.d.ts +94 -0
  508. package/dist/internal/VercelOidc.d.ts.map +1 -0
  509. package/dist/internal/VercelOidc.js +128 -0
  510. package/dist/internal/VercelOidc.js.map +1 -0
  511. package/dist/internal/VerifiedTokens.d.ts +2 -8
  512. package/dist/internal/VerifiedTokens.d.ts.map +1 -1
  513. package/dist/internal/VerifiedTokens.js +24 -24
  514. package/dist/internal/VerifiedTokens.js.map +1 -1
  515. package/dist/internal/Viem.d.ts +30 -2067
  516. package/dist/internal/Viem.d.ts.map +1 -1
  517. package/dist/internal/Viem.js +167 -17
  518. package/dist/internal/Viem.js.map +1 -1
  519. package/dist/internal/Webhooks.d.ts +12 -4
  520. package/dist/internal/Webhooks.d.ts.map +1 -1
  521. package/dist/internal/Webhooks.js +9 -3
  522. package/dist/internal/Webhooks.js.map +1 -1
  523. package/dist/internal/ZoneRpc.d.ts +7 -0
  524. package/dist/internal/ZoneRpc.d.ts.map +1 -0
  525. package/dist/internal/ZoneRpc.js +49 -0
  526. package/dist/internal/ZoneRpc.js.map +1 -0
  527. package/dist/internal/index.d.ts +3 -1
  528. package/dist/internal/index.d.ts.map +1 -1
  529. package/dist/internal/index.js +3 -1
  530. package/dist/internal/index.js.map +1 -1
  531. package/dist/internal/rewards/Audit.d.ts +88 -0
  532. package/dist/internal/rewards/Audit.d.ts.map +1 -0
  533. package/dist/internal/rewards/Audit.js +134 -0
  534. package/dist/internal/rewards/Audit.js.map +1 -0
  535. package/dist/internal/rewards/Campaigns.d.ts +572 -0
  536. package/dist/internal/rewards/Campaigns.d.ts.map +1 -0
  537. package/dist/internal/rewards/Campaigns.js +531 -0
  538. package/dist/internal/rewards/Campaigns.js.map +1 -0
  539. package/dist/internal/rewards/Credits.d.ts +76 -0
  540. package/dist/internal/rewards/Credits.d.ts.map +1 -0
  541. package/dist/internal/rewards/Credits.js +95 -0
  542. package/dist/internal/rewards/Credits.js.map +1 -0
  543. package/dist/internal/rewards/Events.d.ts +100 -0
  544. package/dist/internal/rewards/Events.d.ts.map +1 -0
  545. package/dist/internal/rewards/Events.js +340 -0
  546. package/dist/internal/rewards/Events.js.map +1 -0
  547. package/dist/internal/rewards/Projection.d.ts +237 -0
  548. package/dist/internal/rewards/Projection.d.ts.map +1 -0
  549. package/dist/internal/rewards/Projection.js +616 -0
  550. package/dist/internal/rewards/Projection.js.map +1 -0
  551. package/dist/internal/rewards/Rates.d.ts +44 -0
  552. package/dist/internal/rewards/Rates.d.ts.map +1 -0
  553. package/dist/internal/rewards/Rates.js +60 -0
  554. package/dist/internal/rewards/Rates.js.map +1 -0
  555. package/dist/internal/rewards/Read.d.ts +158 -0
  556. package/dist/internal/rewards/Read.d.ts.map +1 -0
  557. package/dist/internal/rewards/Read.js +292 -0
  558. package/dist/internal/rewards/Read.js.map +1 -0
  559. package/dist/internal/rewards/Runner.d.ts +164 -0
  560. package/dist/internal/rewards/Runner.d.ts.map +1 -0
  561. package/dist/internal/rewards/Runner.js +1778 -0
  562. package/dist/internal/rewards/Runner.js.map +1 -0
  563. package/dist/internal/rewards/Signer.d.ts +224 -0
  564. package/dist/internal/rewards/Signer.d.ts.map +1 -0
  565. package/dist/internal/rewards/Signer.js +135 -0
  566. package/dist/internal/rewards/Signer.js.map +1 -0
  567. package/dist/internal/rewards/index.d.ts +15 -0
  568. package/dist/internal/rewards/index.d.ts.map +1 -0
  569. package/dist/internal/rewards/index.js +15 -0
  570. package/dist/internal/rewards/index.js.map +1 -0
  571. package/dist/internal/{funding → routes}/Action.d.ts +12 -1
  572. package/dist/internal/routes/Action.d.ts.map +1 -0
  573. package/dist/internal/{funding → routes}/Action.js +17 -9
  574. package/dist/internal/routes/Action.js.map +1 -0
  575. package/dist/internal/{funding → routes}/Catalog.d.ts +20 -20
  576. package/dist/internal/routes/Catalog.d.ts.map +1 -0
  577. package/dist/internal/{funding → routes}/Catalog.js +29 -29
  578. package/dist/internal/routes/Catalog.js.map +1 -0
  579. package/dist/internal/{funding → routes}/Chain.d.ts +10 -10
  580. package/dist/internal/routes/Chain.d.ts.map +1 -0
  581. package/dist/internal/{funding → routes}/Chain.js +3 -3
  582. package/dist/internal/routes/Chain.js.map +1 -0
  583. package/dist/internal/{funding → routes}/Deposit.d.ts +45 -23
  584. package/dist/internal/routes/Deposit.d.ts.map +1 -0
  585. package/dist/internal/{funding → routes}/Deposit.js +60 -27
  586. package/dist/internal/routes/Deposit.js.map +1 -0
  587. package/dist/internal/{funding → routes}/DepositAddress.d.ts +56 -27
  588. package/dist/internal/routes/DepositAddress.d.ts.map +1 -0
  589. package/dist/internal/{funding → routes}/DepositAddress.js +95 -33
  590. package/dist/internal/routes/DepositAddress.js.map +1 -0
  591. package/dist/internal/{funding → routes}/DepositWebhook.d.ts +4 -4
  592. package/dist/internal/routes/DepositWebhook.d.ts.map +1 -0
  593. package/dist/internal/{funding → routes}/DepositWebhook.js +4 -4
  594. package/dist/internal/routes/DepositWebhook.js.map +1 -0
  595. package/dist/internal/routes/Economics.d.ts +25 -0
  596. package/dist/internal/routes/Economics.d.ts.map +1 -0
  597. package/dist/internal/routes/Economics.js +28 -0
  598. package/dist/internal/routes/Economics.js.map +1 -0
  599. package/dist/internal/{funding → routes}/Evidence.d.ts +3 -3
  600. package/dist/internal/routes/Evidence.d.ts.map +1 -0
  601. package/dist/internal/{funding → routes}/Evidence.js +7 -7
  602. package/dist/internal/routes/Evidence.js.map +1 -0
  603. package/dist/internal/routes/Observability.d.ts +154 -0
  604. package/dist/internal/routes/Observability.d.ts.map +1 -0
  605. package/dist/internal/routes/Observability.js +389 -0
  606. package/dist/internal/routes/Observability.js.map +1 -0
  607. package/dist/internal/{funding → routes}/Provider.d.ts +311 -105
  608. package/dist/internal/routes/Provider.d.ts.map +1 -0
  609. package/dist/internal/{funding → routes}/Provider.js +229 -98
  610. package/dist/internal/routes/Provider.js.map +1 -0
  611. package/dist/internal/{funding → routes}/Reconciliation.d.ts +11 -6
  612. package/dist/internal/routes/Reconciliation.d.ts.map +1 -0
  613. package/dist/internal/{funding → routes}/Reconciliation.js +408 -158
  614. package/dist/internal/routes/Reconciliation.js.map +1 -0
  615. package/dist/internal/routes/Route.d.ts +21 -0
  616. package/dist/internal/routes/Route.d.ts.map +1 -0
  617. package/dist/internal/{funding → routes}/Route.js +1 -1
  618. package/dist/internal/routes/Route.js.map +1 -0
  619. package/dist/internal/{funding → routes}/SourceObservation.d.ts +6 -6
  620. package/dist/internal/routes/SourceObservation.d.ts.map +1 -0
  621. package/dist/internal/{funding → routes}/SourceObservation.js +8 -8
  622. package/dist/internal/routes/SourceObservation.js.map +1 -0
  623. package/dist/internal/{funding → routes}/Subsidy.d.ts +48 -3
  624. package/dist/internal/routes/Subsidy.d.ts.map +1 -0
  625. package/dist/internal/{funding → routes}/Subsidy.js +43 -3
  626. package/dist/internal/routes/Subsidy.js.map +1 -0
  627. package/dist/internal/{funding → routes}/Token.d.ts +4 -4
  628. package/dist/internal/routes/Token.d.ts.map +1 -0
  629. package/dist/internal/{funding → routes}/Token.js +3 -3
  630. package/dist/internal/routes/Token.js.map +1 -0
  631. package/dist/internal/{funding → routes}/Transfer.d.ts +241 -46
  632. package/dist/internal/routes/Transfer.d.ts.map +1 -0
  633. package/dist/internal/routes/Transfer.js +728 -0
  634. package/dist/internal/routes/Transfer.js.map +1 -0
  635. package/dist/internal/{funding → routes}/TransferReconciliation.d.ts +13 -10
  636. package/dist/internal/routes/TransferReconciliation.d.ts.map +1 -0
  637. package/dist/internal/routes/TransferReconciliation.js +422 -0
  638. package/dist/internal/routes/TransferReconciliation.js.map +1 -0
  639. package/dist/internal/routes/TransferSubsidy.d.ts +201 -0
  640. package/dist/internal/routes/TransferSubsidy.d.ts.map +1 -0
  641. package/dist/internal/routes/TransferSubsidy.js +256 -0
  642. package/dist/internal/routes/TransferSubsidy.js.map +1 -0
  643. package/dist/internal/{funding → routes}/TransferWebhook.d.ts +5 -5
  644. package/dist/internal/routes/TransferWebhook.d.ts.map +1 -0
  645. package/dist/internal/{funding → routes}/TransferWebhook.js +3 -3
  646. package/dist/internal/routes/TransferWebhook.js.map +1 -0
  647. package/dist/internal/{funding → routes}/index.d.ts +2 -0
  648. package/dist/internal/routes/index.d.ts.map +1 -0
  649. package/dist/internal/{funding → routes}/index.js +2 -0
  650. package/dist/internal/routes/index.js.map +1 -0
  651. package/dist/internal/{funding → routes}/providers/across.d.ts +4 -4
  652. package/dist/internal/routes/providers/across.d.ts.map +1 -0
  653. package/dist/internal/{funding → routes}/providers/across.js +13 -13
  654. package/dist/internal/routes/providers/across.js.map +1 -0
  655. package/dist/internal/{funding → routes}/providers/relay.d.ts +21 -12
  656. package/dist/internal/routes/providers/relay.d.ts.map +1 -0
  657. package/dist/internal/{funding → routes}/providers/relay.js +194 -110
  658. package/dist/internal/routes/providers/relay.js.map +1 -0
  659. package/dist/internal/{funding → routes}/providers/rhino.d.ts +4 -4
  660. package/dist/internal/routes/providers/rhino.d.ts.map +1 -0
  661. package/dist/internal/{funding → routes}/providers/rhino.js +10 -10
  662. package/dist/internal/routes/providers/rhino.js.map +1 -0
  663. package/dist/internal/{funding → routes}/providers/squid.d.ts +4 -4
  664. package/dist/internal/routes/providers/squid.d.ts.map +1 -0
  665. package/dist/internal/{funding → routes}/providers/squid.js +14 -14
  666. package/dist/internal/routes/providers/squid.js.map +1 -0
  667. package/dist/internal/{funding → routes}/providers/stargate.d.ts +46 -18
  668. package/dist/internal/routes/providers/stargate.d.ts.map +1 -0
  669. package/dist/internal/routes/providers/stargate.js +898 -0
  670. package/dist/internal/routes/providers/stargate.js.map +1 -0
  671. package/dist/internal/{funding → routes}/providers/symbiosis.d.ts +4 -4
  672. package/dist/internal/routes/providers/symbiosis.d.ts.map +1 -0
  673. package/dist/internal/{funding → routes}/providers/symbiosis.js +30 -20
  674. package/dist/internal/routes/providers/symbiosis.js.map +1 -0
  675. package/dist/internal/webhookDestinations/slack.js +12 -12
  676. package/dist/internal/webhookDestinations/slack.js.map +1 -1
  677. package/dist/providers/index.d.ts +12 -12
  678. package/dist/providers/index.d.ts.map +1 -1
  679. package/dist/providers/index.js +12 -12
  680. package/dist/providers/index.js.map +1 -1
  681. package/dist/server.d.ts +19 -0
  682. package/dist/server.d.ts.map +1 -0
  683. package/dist/server.js +19 -0
  684. package/dist/server.js.map +1 -0
  685. package/package.json +15 -4
  686. package/src/ApiKey.ts +1 -1
  687. package/src/ApiKeys.test.ts +1033 -3
  688. package/src/ApiKeys.ts +489 -48
  689. package/src/App.test-d.ts +1 -1
  690. package/src/App.test.ts +216 -25
  691. package/src/App.ts +334 -31
  692. package/src/Assets.test.ts +2 -2
  693. package/src/Assets.ts +3 -1
  694. package/src/Auth.test-d.ts +1 -1
  695. package/src/Client.test-d.ts +539 -110
  696. package/src/Handler.ts +0 -1
  697. package/src/OpenApi.contract.test.ts +195 -0
  698. package/src/Scope.ts +17 -5
  699. package/src/Webhooks.ts +1 -1
  700. package/src/admin/App.test.ts +30 -2
  701. package/src/admin/App.ts +42 -6
  702. package/src/admin/apps/api-keys.test.ts +267 -5
  703. package/src/admin/apps/api-keys.ts +100 -50
  704. package/src/admin/apps/earn-vaults.test.ts +158 -0
  705. package/src/admin/apps/earn-vaults.ts +679 -6
  706. package/src/admin/apps/organizations.test.ts +306 -17
  707. package/src/admin/apps/organizations.ts +299 -24
  708. package/src/admin/apps/routes-support.test.ts +200 -0
  709. package/src/admin/apps/routes-support.ts +201 -0
  710. package/src/admin/apps/routes.test.ts +450 -0
  711. package/src/admin/apps/routes.ts +896 -0
  712. package/src/admin/apps/scopes.test.ts +15 -5
  713. package/src/admin/apps/subsidies.test.ts +306 -0
  714. package/src/admin/apps/subsidies.ts +457 -0
  715. package/src/admin/apps/verified-tokens.test.ts +40 -3
  716. package/src/admin/apps/verified-tokens.ts +33 -7
  717. package/src/admin/ui/plugin.ts +1 -2
  718. package/src/admin/ui/src/components/RewardCampaignForm.tsx +1009 -0
  719. package/src/admin/ui/src/lib/config.ts +11 -2
  720. package/src/admin/ui/src/lib/earn-vaults.ts +2 -2
  721. package/src/admin/ui/src/lib/organizations.test.ts +83 -50
  722. package/src/admin/ui/src/lib/organizations.ts +106 -25
  723. package/src/admin/ui/src/lib/query-client.ts +1 -1
  724. package/src/admin/ui/src/lib/reward-campaigns.ts +136 -0
  725. package/src/admin/ui/src/lib/routes.test.ts +88 -0
  726. package/src/admin/ui/src/lib/routes.ts +304 -0
  727. package/src/admin/ui/src/lib/subsidies.ts +75 -0
  728. package/src/admin/ui/src/lib/verified-tokens.ts +24 -9
  729. package/src/admin/ui/src/routeTree.gen.ts +63 -0
  730. package/src/admin/ui/src/routes/__root.tsx +13 -2
  731. package/src/admin/ui/src/routes/api-keys.tsx +196 -84
  732. package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +105 -70
  733. package/src/admin/ui/src/routes/organizations.tsx +34 -4
  734. package/src/admin/ui/src/routes/organizations_.$orgId.tsx +239 -23
  735. package/src/admin/ui/src/routes/routes.tsx +1615 -0
  736. package/src/admin/ui/src/routes/routes_.support.tsx +248 -0
  737. package/src/admin/ui/src/routes/subsidies.tsx +799 -0
  738. package/src/admin/ui/src/routes/verified-tokens.tsx +64 -20
  739. package/src/admin/ui.generated.ts +202 -188
  740. package/src/analytics/Analytics.test.ts +108 -18
  741. package/src/analytics/Analytics.ts +38 -6
  742. package/src/analytics/tables/requestEvents.test.ts +100 -0
  743. package/src/analytics/tables/requestEvents.ts +10 -1
  744. package/src/analytics/tables/routesLifecycleIntervals.ts +140 -0
  745. package/src/apps/Zones.test.ts +15 -0
  746. package/src/apps/Zones.ts +52 -5
  747. package/src/apps/composition.test.ts +68 -60
  748. package/src/apps/data/App.test.ts +180 -2
  749. package/src/apps/data/App.ts +88 -28
  750. package/src/apps/data/routes/activities.test.ts +419 -7
  751. package/src/apps/data/routes/activities.ts +683 -216
  752. package/src/apps/data/routes/balances.test.ts +2 -2
  753. package/src/apps/data/routes/blocks.test.ts +46 -1
  754. package/src/apps/data/routes/coingecko.test.ts +419 -1
  755. package/src/apps/data/routes/coingecko.ts +309 -253
  756. package/src/apps/data/routes/earn.discovery.test.ts +274 -0
  757. package/src/apps/data/routes/earn.test.ts +1294 -17
  758. package/src/apps/data/routes/earn.ts +1838 -321
  759. package/src/apps/data/routes/exchanges.test.ts +12 -15
  760. package/src/apps/data/routes/fee-amm.test.ts +243 -0
  761. package/src/apps/data/routes/fee-amm.ts +201 -162
  762. package/src/apps/data/routes/indexer.test.ts +389 -0
  763. package/src/apps/data/routes/indexer.ts +165 -69
  764. package/src/apps/data/routes/receipts.test.ts +1 -1
  765. package/src/apps/data/routes/rpc.test.ts +384 -8
  766. package/src/apps/data/routes/rpc.ts +452 -227
  767. package/src/apps/data/routes/rpc.zone.test.ts +340 -0
  768. package/src/apps/data/routes/tokenlist.test.ts +285 -0
  769. package/src/apps/data/routes/tokenlist.ts +173 -88
  770. package/src/apps/data/routes/tokens.test.ts +93 -3
  771. package/src/apps/data/routes/tokens.ts +39 -23
  772. package/src/apps/data/routes/transactions.test.ts +1 -1
  773. package/src/apps/data/routes/transfers.test.ts +56 -24
  774. package/src/apps/data/routes/transfers.ts +19 -8
  775. package/src/apps/data/routes/valuation.test.ts +1 -1
  776. package/src/apps/data/routes/verified-tokens.test.ts +345 -0
  777. package/src/apps/data/routes/verified-tokens.ts +99 -29
  778. package/src/apps/data/routes/webhooks.scan.test.ts +29 -0
  779. package/src/apps/data/routes/webhooks.test.ts +651 -83
  780. package/src/apps/data/routes/webhooks.ts +1113 -868
  781. package/src/apps/data/routes/zones.test.ts +148 -71
  782. package/src/apps/data/routes/zones.ts +71 -55
  783. package/src/apps/docs/reference.ts +2 -2
  784. package/src/apps/index.ts +1 -1
  785. package/src/apps/management/App.ts +9 -51
  786. package/src/apps/management/Billing.test.ts +375 -14
  787. package/src/apps/management/Billing.ts +265 -29
  788. package/src/apps/management/routes/api-keys.test.ts +269 -7
  789. package/src/apps/management/routes/api-keys.ts +61 -20
  790. package/src/apps/management/routes/billing.test.ts +477 -15
  791. package/src/apps/management/routes/billing.ts +377 -50
  792. package/src/apps/management/routes/faucet.test.ts +1 -1
  793. package/src/apps/management/routes/faucet.ts +1 -1
  794. package/src/apps/management/routes/invitations.test.ts +270 -3
  795. package/src/apps/management/routes/invitations.ts +185 -15
  796. package/src/apps/management/routes/invoicePreview.test.ts +549 -0
  797. package/src/apps/management/routes/me.test.ts +246 -5
  798. package/src/apps/management/routes/me.ts +7 -2
  799. package/src/apps/management/routes/members.test.ts +108 -0
  800. package/src/apps/management/routes/orgs.test.ts +191 -3
  801. package/src/apps/management/routes/orgs.ts +58 -11
  802. package/src/apps/management/routes/projects.test.ts +33 -3
  803. package/src/apps/management/routes/projects.ts +6 -1
  804. package/src/apps/management/routes/scopes.test.ts +30 -2
  805. package/src/apps/management/routes/scopes.ts +4 -1
  806. package/src/apps/management/routes/usage.test.ts +32 -0
  807. package/src/apps/management/routes/usage.ts +22 -4
  808. package/src/apps/management/routes/verified-token-requests.test.ts +16 -2
  809. package/src/apps/management/routes/verified-token-requests.ts +7 -10
  810. package/src/apps/management/routes/webhooks.test.ts +49 -26
  811. package/src/apps/management/routes/webhooks.ts +78 -22
  812. package/src/apps/mcp.test.ts +113 -30
  813. package/src/apps/mcp.ts +22 -10
  814. package/src/apps/mpp/App.ts +37 -7
  815. package/src/apps/mpp/Mpp.test.ts +49 -8
  816. package/src/apps/mpp/Mpp.zone.test.ts +219 -0
  817. package/src/apps/mpp/internal/Adapter.ts +34 -0
  818. package/src/apps/mpp/internal/Policy.test.ts +86 -31
  819. package/src/apps/mpp/internal/Policy.ts +49 -7
  820. package/src/apps/mpp/internal/Sponsorship.test.ts +207 -0
  821. package/src/apps/mpp/internal/Sponsorship.ts +9 -3
  822. package/src/apps/relay/App.test.ts +839 -64
  823. package/src/apps/relay/App.ts +148 -81
  824. package/src/apps/relay/App.zone-billing.test.ts +257 -0
  825. package/src/apps/relay/Sponsorships.test.ts +67 -4
  826. package/src/apps/relay/Sponsorships.ts +233 -32
  827. package/src/apps/relay/Sponsorships.zone.test.ts +102 -0
  828. package/src/apps/{funding → routes}/Access.ts +6 -6
  829. package/src/apps/routes/App.test.ts +165 -0
  830. package/src/apps/routes/App.ts +96 -0
  831. package/src/apps/{funding → routes}/Inventory.ts +2 -2
  832. package/src/apps/routes/index.ts +1 -0
  833. package/src/apps/{funding → routes}/routes/chains.test.ts +66 -66
  834. package/src/apps/{funding → routes}/routes/chains.ts +23 -23
  835. package/src/apps/{funding → routes}/routes/deposit-addresses.test.ts +1358 -458
  836. package/src/apps/{funding → routes}/routes/deposit-addresses.ts +566 -246
  837. package/src/apps/{funding → routes}/routes/providers.test.ts +27 -33
  838. package/src/apps/{funding → routes}/routes/providers.ts +23 -23
  839. package/src/apps/{funding → routes}/routes/quotes.test.ts +298 -41
  840. package/src/apps/{funding → routes}/routes/quotes.ts +57 -40
  841. package/src/apps/{funding → routes}/routes/transfers.test.ts +1100 -353
  842. package/src/apps/routes/routes/transfers.ts +1332 -0
  843. package/src/cli/Cli.test.ts +1 -1
  844. package/src/cli/commands/admin.test.ts +748 -1
  845. package/src/cli/commands/admin.ts +278 -0
  846. package/src/cloudflare.ts +52 -47
  847. package/src/db/Db.test.ts +245 -2
  848. package/src/db/Db.ts +1485 -34
  849. package/src/db/Schema.ts +729 -228
  850. package/src/db/tables/apiKeyAdmissionBootstraps.ts +4 -0
  851. package/src/db/tables/apiKeyAdmissions.ts +218 -0
  852. package/src/db/tables/apiKeyOwnerAdmissions.ts +4 -0
  853. package/src/db/tables/apiKeyOwnerTombstones.ts +81 -0
  854. package/src/db/tables/apiKeyRevocations.test.ts +74 -0
  855. package/src/db/tables/apiKeyRevocations.ts +121 -0
  856. package/src/db/tables/authAccounts.ts +105 -0
  857. package/src/db/tables/authSessions.ts +13 -0
  858. package/src/db/tables/authVerifications.ts +13 -0
  859. package/src/db/tables/invitations.ts +142 -45
  860. package/src/db/tables/memberships.ts +79 -3
  861. package/src/db/tables/organizations.test.ts +690 -13
  862. package/src/db/tables/organizations.ts +139 -55
  863. package/src/db/tables/projects.test.ts +16 -0
  864. package/src/db/tables/projects.ts +13 -3
  865. package/src/db/tables/requestUsage.ts +4 -1
  866. package/src/db/tables/rewardAccounts.ts +178 -0
  867. package/src/db/tables/rewardCampaignDistributors.ts +68 -0
  868. package/src/db/tables/rewardCampaigns.test.ts +1388 -0
  869. package/src/db/tables/rewardCampaigns.ts +647 -0
  870. package/src/db/tables/rewardCredits.ts +110 -0
  871. package/src/db/tables/rewardEligibilityAssociations.test.ts +271 -0
  872. package/src/db/tables/rewardEligibilityAssociations.ts +184 -0
  873. package/src/db/tables/rewardRuns.ts +514 -0
  874. package/src/db/tables/rewardTransactionAttempts.ts +272 -0
  875. package/src/db/tables/routesCatalog.test.ts +185 -0
  876. package/src/db/tables/routesCatalog.ts +163 -0
  877. package/src/db/tables/routesDepositAddresses.test.ts +1048 -0
  878. package/src/db/tables/routesDepositAddresses.ts +1008 -0
  879. package/src/db/tables/{fundingDepositRequestObservations.test.ts → routesDepositRequestObservations.test.ts} +13 -14
  880. package/src/db/tables/{fundingDepositRequestObservations.ts → routesDepositRequestObservations.ts} +10 -10
  881. package/src/db/tables/{fundingDeposits.test.ts → routesDeposits.test.ts} +388 -46
  882. package/src/db/tables/routesDeposits.ts +1062 -0
  883. package/src/db/tables/routesIdempotency.test.ts +796 -0
  884. package/src/db/tables/routesIdempotency.ts +496 -0
  885. package/src/db/tables/routesSubsidies.test.ts +120 -0
  886. package/src/db/tables/routesSubsidies.ts +71 -0
  887. package/src/db/tables/{fundingTransferEvents.ts → routesTransferEvents.ts} +4 -4
  888. package/src/db/tables/routesTransferSubsidies.ts +38 -0
  889. package/src/db/tables/routesTransferSubsidyNonces.ts +124 -0
  890. package/src/db/tables/routesTransferTransactions.test.ts +195 -0
  891. package/src/db/tables/{fundingTransferTransactions.ts → routesTransferTransactions.ts} +63 -18
  892. package/src/db/tables/routesTransfers.test.ts +338 -0
  893. package/src/db/tables/routesTransfers.ts +662 -0
  894. package/src/db/tables/sponsoredTransactions.test.ts +269 -45
  895. package/src/db/tables/sponsoredTransactions.ts +225 -65
  896. package/src/db/tables/sponsorshipAttributions.test.ts +160 -0
  897. package/src/db/tables/sponsorshipAttributions.ts +168 -0
  898. package/src/db/tables/sponsorshipReconciliationCursors.test.ts +115 -0
  899. package/src/db/tables/sponsorshipReconciliationCursors.ts +67 -0
  900. package/src/db/tables/stripeCustomers.test.ts +85 -0
  901. package/src/db/tables/stripeCustomers.ts +24 -0
  902. package/src/db/tables/users.test.ts +129 -0
  903. package/src/db/tables/users.ts +49 -3
  904. package/src/db/tables/verifiedTokenRequests.test.ts +39 -20
  905. package/src/db/tables/verifiedTokenRequests.ts +80 -44
  906. package/src/db/tables/webhookQueueEvents.ts +8 -1
  907. package/src/db/tables/webhookSubscriptions.ts +95 -20
  908. package/src/handlers/internal/executionError.ts +3 -4
  909. package/src/handlers/internal/multisig.ts +13 -816
  910. package/src/handlers/internal/sponsorship.ts +26 -10
  911. package/src/handlers/relay.test-d.ts +9 -1
  912. package/src/handlers/relay.test.ts +823 -3
  913. package/src/handlers/relay.ts +127 -107
  914. package/src/index.test-d.ts +7 -0
  915. package/src/index.ts +0 -17
  916. package/src/internal/AssetResponse.ts +26 -0
  917. package/src/internal/Auth.test.ts +1656 -9
  918. package/src/internal/Auth.ts +880 -244
  919. package/src/internal/BetterAuth.test.ts +242 -0
  920. package/src/internal/BetterAuth.ts +349 -0
  921. package/src/internal/Cache.ts +2 -0
  922. package/src/internal/EarnRates.test.ts +17 -0
  923. package/src/internal/EarnRates.ts +124 -31
  924. package/src/internal/EarnSharePrices.test.ts +182 -0
  925. package/src/internal/EarnSharePrices.ts +313 -0
  926. package/src/internal/EarnVaults.test.ts +21 -0
  927. package/src/internal/EarnVaults.ts +33 -11
  928. package/src/internal/Email.ts +54 -0
  929. package/src/internal/Idempotency.test.ts +2 -2
  930. package/src/internal/Log.test-d.ts +8 -7
  931. package/src/internal/Log.test.ts +114 -16
  932. package/src/internal/Log.ts +53 -40
  933. package/src/internal/MetricSink.test.ts +313 -26
  934. package/src/internal/MetricSink.ts +73 -8
  935. package/src/internal/Mpp.test.ts +31 -0
  936. package/src/internal/Mpp.ts +21 -24
  937. package/src/internal/OpenApi.ts +45 -12
  938. package/src/internal/Provider.test.ts +1 -1
  939. package/src/internal/Provider.ts +1 -1
  940. package/src/internal/RateLimit.test.ts +21 -3
  941. package/src/internal/RateLimit.ts +12 -1
  942. package/src/internal/Store.test-d.ts +1 -1
  943. package/src/internal/Store.test.ts +151 -8
  944. package/src/internal/Store.ts +76 -9
  945. package/src/internal/Tidx.test.ts +59 -8
  946. package/src/internal/Tidx.ts +86 -14
  947. package/src/internal/Timing.test.ts +77 -0
  948. package/src/internal/Timing.ts +83 -6
  949. package/src/internal/VercelOidc.test.ts +188 -0
  950. package/src/internal/VercelOidc.ts +193 -0
  951. package/src/internal/VerifiedTokens.test.ts +60 -6
  952. package/src/internal/VerifiedTokens.ts +21 -24
  953. package/src/internal/Viem.batch.test.ts +80 -0
  954. package/src/internal/Viem.test.ts +201 -2
  955. package/src/internal/Viem.ts +221 -25
  956. package/src/internal/Webhooks.test.ts +85 -6
  957. package/src/internal/Webhooks.ts +22 -4
  958. package/src/internal/ZoneRpc.ts +50 -0
  959. package/src/internal/exchange/Provider.test.ts +2 -2
  960. package/src/internal/index.test.ts +3 -1
  961. package/src/internal/index.ts +3 -1
  962. package/src/internal/rewards/Audit.ts +231 -0
  963. package/src/internal/rewards/Campaigns.test.ts +1234 -0
  964. package/src/internal/rewards/Campaigns.ts +1205 -0
  965. package/src/internal/rewards/Credits.ts +165 -0
  966. package/src/internal/rewards/Events.local.test.ts +113 -0
  967. package/src/internal/rewards/Events.test.ts +152 -0
  968. package/src/internal/rewards/Events.ts +468 -0
  969. package/src/internal/rewards/Projection.test.ts +681 -0
  970. package/src/internal/rewards/Projection.ts +987 -0
  971. package/src/internal/rewards/Rates.test.ts +171 -0
  972. package/src/internal/rewards/Rates.ts +110 -0
  973. package/src/internal/rewards/Read.test.ts +501 -0
  974. package/src/internal/rewards/Read.ts +476 -0
  975. package/src/internal/rewards/Runner.checkpoint.test.ts +80 -0
  976. package/src/internal/rewards/Runner.states.test.ts +188 -0
  977. package/src/internal/rewards/Runner.test.ts +90 -0
  978. package/src/internal/rewards/Runner.ts +2229 -0
  979. package/src/internal/rewards/Signer.test.ts +79 -0
  980. package/src/internal/rewards/Signer.ts +180 -0
  981. package/src/internal/rewards/index.ts +14 -0
  982. package/src/internal/{funding → routes}/Action.test.ts +63 -14
  983. package/src/internal/{funding → routes}/Action.ts +35 -8
  984. package/src/internal/{funding → routes}/Catalog.test.ts +3 -3
  985. package/src/internal/{funding → routes}/Catalog.ts +39 -39
  986. package/src/internal/{funding → routes}/Chain.test.ts +1 -1
  987. package/src/internal/{funding → routes}/Chain.ts +11 -11
  988. package/src/internal/{funding → routes}/Deposit.test.ts +1 -1
  989. package/src/internal/{funding → routes}/Deposit.ts +93 -45
  990. package/src/internal/{funding → routes}/DepositAddress.test.ts +11 -3
  991. package/src/internal/{funding → routes}/DepositAddress.ts +132 -53
  992. package/src/internal/{funding → routes}/DepositWebhook.test.ts +61 -18
  993. package/src/internal/{funding → routes}/DepositWebhook.ts +9 -9
  994. package/src/internal/routes/Economics.test.ts +42 -0
  995. package/src/internal/routes/Economics.ts +47 -0
  996. package/src/internal/{funding → routes}/Evidence.test.ts +6 -6
  997. package/src/internal/{funding → routes}/Evidence.ts +9 -9
  998. package/src/internal/routes/Observability.test.ts +636 -0
  999. package/src/internal/routes/Observability.ts +668 -0
  1000. package/src/internal/{funding → routes}/Provider.test.ts +489 -153
  1001. package/src/internal/{funding → routes}/Provider.ts +489 -186
  1002. package/src/internal/{funding → routes}/Reconciliation.local.test.ts +84 -12
  1003. package/src/internal/{funding → routes}/Reconciliation.test.ts +1213 -279
  1004. package/src/internal/{funding → routes}/Reconciliation.ts +501 -203
  1005. package/src/internal/routes/Reconciliation.unattributed.test.ts +250 -0
  1006. package/src/internal/{funding → routes}/Route.ts +7 -7
  1007. package/src/internal/{funding → routes}/SourceObservation.test.ts +13 -14
  1008. package/src/internal/{funding → routes}/SourceObservation.ts +13 -13
  1009. package/src/internal/{funding → routes}/Subsidy.local.test.ts +7 -7
  1010. package/src/internal/routes/Subsidy.test.ts +169 -0
  1011. package/src/internal/{funding → routes}/Subsidy.ts +86 -6
  1012. package/src/internal/{funding → routes}/Token.test.ts +1 -1
  1013. package/src/internal/{funding → routes}/Token.ts +5 -5
  1014. package/src/internal/routes/Transfer.test.ts +1199 -0
  1015. package/src/internal/routes/Transfer.ts +1206 -0
  1016. package/src/internal/routes/TransferReconciliation.test.ts +731 -0
  1017. package/src/internal/routes/TransferReconciliation.ts +527 -0
  1018. package/src/internal/routes/TransferSubsidy.test.ts +172 -0
  1019. package/src/internal/routes/TransferSubsidy.ts +447 -0
  1020. package/src/internal/{funding → routes}/TransferWebhook.test.ts +13 -13
  1021. package/src/internal/{funding → routes}/TransferWebhook.ts +7 -7
  1022. package/src/internal/{funding → routes}/index.test.ts +5 -3
  1023. package/src/internal/{funding → routes}/index.ts +2 -0
  1024. package/src/internal/{funding → routes}/providers/across.ts +16 -16
  1025. package/src/internal/{funding → routes}/providers/index.test.ts +157 -44
  1026. package/src/internal/{funding → routes}/providers/relay.test.ts +224 -32
  1027. package/src/internal/{funding → routes}/providers/relay.ts +228 -121
  1028. package/src/internal/{funding → routes}/providers/rhino.ts +16 -16
  1029. package/src/internal/{funding → routes}/providers/squid.ts +17 -17
  1030. package/src/internal/routes/providers/stargate.test.ts +728 -0
  1031. package/src/internal/routes/providers/stargate.ts +1276 -0
  1032. package/src/internal/{funding → routes}/providers/symbiosis.ts +64 -24
  1033. package/src/internal/webhookDestinations/slack.ts +10 -10
  1034. package/src/providers/index.ts +13 -13
  1035. package/src/server.ts +18 -0
  1036. package/dist/apps/funding/Access.d.ts.map +0 -1
  1037. package/dist/apps/funding/Access.js.map +0 -1
  1038. package/dist/apps/funding/App.js.map +0 -1
  1039. package/dist/apps/funding/Inventory.d.ts.map +0 -1
  1040. package/dist/apps/funding/Inventory.js.map +0 -1
  1041. package/dist/apps/funding/ProviderAttempts.d.ts +0 -5
  1042. package/dist/apps/funding/ProviderAttempts.d.ts.map +0 -1
  1043. package/dist/apps/funding/ProviderAttempts.js +0 -24
  1044. package/dist/apps/funding/ProviderAttempts.js.map +0 -1
  1045. package/dist/apps/funding/index.d.ts +0 -2
  1046. package/dist/apps/funding/index.d.ts.map +0 -1
  1047. package/dist/apps/funding/index.js +0 -2
  1048. package/dist/apps/funding/index.js.map +0 -1
  1049. package/dist/apps/funding/routes/chains.d.ts.map +0 -1
  1050. package/dist/apps/funding/routes/chains.js.map +0 -1
  1051. package/dist/apps/funding/routes/deposit-addresses.d.ts.map +0 -1
  1052. package/dist/apps/funding/routes/deposit-addresses.js.map +0 -1
  1053. package/dist/apps/funding/routes/providers.d.ts.map +0 -1
  1054. package/dist/apps/funding/routes/providers.js +0 -57
  1055. package/dist/apps/funding/routes/providers.js.map +0 -1
  1056. package/dist/apps/funding/routes/quotes.d.ts.map +0 -1
  1057. package/dist/apps/funding/routes/quotes.js.map +0 -1
  1058. package/dist/apps/funding/routes/transfers.d.ts.map +0 -1
  1059. package/dist/apps/funding/routes/transfers.js +0 -828
  1060. package/dist/apps/funding/routes/transfers.js.map +0 -1
  1061. package/dist/db/tables/fundingCatalog.d.ts +0 -58
  1062. package/dist/db/tables/fundingCatalog.d.ts.map +0 -1
  1063. package/dist/db/tables/fundingCatalog.js.map +0 -1
  1064. package/dist/db/tables/fundingDepositAddresses.d.ts +0 -192
  1065. package/dist/db/tables/fundingDepositAddresses.d.ts.map +0 -1
  1066. package/dist/db/tables/fundingDepositAddresses.js +0 -235
  1067. package/dist/db/tables/fundingDepositAddresses.js.map +0 -1
  1068. package/dist/db/tables/fundingDepositRequestObservations.d.ts.map +0 -1
  1069. package/dist/db/tables/fundingDepositRequestObservations.js.map +0 -1
  1070. package/dist/db/tables/fundingDeposits.d.ts.map +0 -1
  1071. package/dist/db/tables/fundingDeposits.js +0 -295
  1072. package/dist/db/tables/fundingDeposits.js.map +0 -1
  1073. package/dist/db/tables/fundingIdempotency.d.ts +0 -91
  1074. package/dist/db/tables/fundingIdempotency.d.ts.map +0 -1
  1075. package/dist/db/tables/fundingIdempotency.js +0 -103
  1076. package/dist/db/tables/fundingIdempotency.js.map +0 -1
  1077. package/dist/db/tables/fundingTransferEvents.d.ts.map +0 -1
  1078. package/dist/db/tables/fundingTransferEvents.js.map +0 -1
  1079. package/dist/db/tables/fundingTransferTransactions.d.ts +0 -53
  1080. package/dist/db/tables/fundingTransferTransactions.d.ts.map +0 -1
  1081. package/dist/db/tables/fundingTransferTransactions.js.map +0 -1
  1082. package/dist/db/tables/fundingTransfers.d.ts +0 -99
  1083. package/dist/db/tables/fundingTransfers.d.ts.map +0 -1
  1084. package/dist/db/tables/fundingTransfers.js +0 -110
  1085. package/dist/db/tables/fundingTransfers.js.map +0 -1
  1086. package/dist/internal/funding/Action.d.ts.map +0 -1
  1087. package/dist/internal/funding/Action.js.map +0 -1
  1088. package/dist/internal/funding/Catalog.d.ts.map +0 -1
  1089. package/dist/internal/funding/Catalog.js.map +0 -1
  1090. package/dist/internal/funding/Chain.d.ts.map +0 -1
  1091. package/dist/internal/funding/Chain.js.map +0 -1
  1092. package/dist/internal/funding/Deposit.d.ts.map +0 -1
  1093. package/dist/internal/funding/Deposit.js.map +0 -1
  1094. package/dist/internal/funding/DepositAddress.d.ts.map +0 -1
  1095. package/dist/internal/funding/DepositAddress.js.map +0 -1
  1096. package/dist/internal/funding/DepositWebhook.d.ts.map +0 -1
  1097. package/dist/internal/funding/DepositWebhook.js.map +0 -1
  1098. package/dist/internal/funding/Evidence.d.ts.map +0 -1
  1099. package/dist/internal/funding/Evidence.js.map +0 -1
  1100. package/dist/internal/funding/Provider.d.ts.map +0 -1
  1101. package/dist/internal/funding/Provider.js.map +0 -1
  1102. package/dist/internal/funding/Reconciliation.d.ts.map +0 -1
  1103. package/dist/internal/funding/Reconciliation.js.map +0 -1
  1104. package/dist/internal/funding/Route.d.ts +0 -21
  1105. package/dist/internal/funding/Route.d.ts.map +0 -1
  1106. package/dist/internal/funding/Route.js.map +0 -1
  1107. package/dist/internal/funding/SourceObservation.d.ts.map +0 -1
  1108. package/dist/internal/funding/SourceObservation.js.map +0 -1
  1109. package/dist/internal/funding/Subsidy.d.ts.map +0 -1
  1110. package/dist/internal/funding/Subsidy.js.map +0 -1
  1111. package/dist/internal/funding/Token.d.ts.map +0 -1
  1112. package/dist/internal/funding/Token.js.map +0 -1
  1113. package/dist/internal/funding/Transfer.d.ts.map +0 -1
  1114. package/dist/internal/funding/Transfer.js +0 -462
  1115. package/dist/internal/funding/Transfer.js.map +0 -1
  1116. package/dist/internal/funding/TransferReconciliation.d.ts.map +0 -1
  1117. package/dist/internal/funding/TransferReconciliation.js +0 -192
  1118. package/dist/internal/funding/TransferReconciliation.js.map +0 -1
  1119. package/dist/internal/funding/TransferWebhook.d.ts.map +0 -1
  1120. package/dist/internal/funding/TransferWebhook.js.map +0 -1
  1121. package/dist/internal/funding/index.d.ts.map +0 -1
  1122. package/dist/internal/funding/index.js.map +0 -1
  1123. package/dist/internal/funding/providers/across.d.ts.map +0 -1
  1124. package/dist/internal/funding/providers/across.js.map +0 -1
  1125. package/dist/internal/funding/providers/relay.d.ts.map +0 -1
  1126. package/dist/internal/funding/providers/relay.js.map +0 -1
  1127. package/dist/internal/funding/providers/rhino.d.ts.map +0 -1
  1128. package/dist/internal/funding/providers/rhino.js.map +0 -1
  1129. package/dist/internal/funding/providers/squid.d.ts.map +0 -1
  1130. package/dist/internal/funding/providers/squid.js.map +0 -1
  1131. package/dist/internal/funding/providers/stargate.d.ts.map +0 -1
  1132. package/dist/internal/funding/providers/stargate.js +0 -579
  1133. package/dist/internal/funding/providers/stargate.js.map +0 -1
  1134. package/dist/internal/funding/providers/symbiosis.d.ts.map +0 -1
  1135. package/dist/internal/funding/providers/symbiosis.js.map +0 -1
  1136. package/src/apps/funding/App.test.ts +0 -78
  1137. package/src/apps/funding/App.ts +0 -88
  1138. package/src/apps/funding/ProviderAttempts.ts +0 -26
  1139. package/src/apps/funding/index.ts +0 -1
  1140. package/src/apps/funding/routes/transfers.ts +0 -987
  1141. package/src/db/tables/fundingCatalog.test.ts +0 -122
  1142. package/src/db/tables/fundingCatalog.ts +0 -163
  1143. package/src/db/tables/fundingDepositAddresses.test.ts +0 -608
  1144. package/src/db/tables/fundingDepositAddresses.ts +0 -443
  1145. package/src/db/tables/fundingDeposits.ts +0 -572
  1146. package/src/db/tables/fundingIdempotency.test.ts +0 -182
  1147. package/src/db/tables/fundingIdempotency.ts +0 -180
  1148. package/src/db/tables/fundingTransferTransactions.test.ts +0 -112
  1149. package/src/db/tables/fundingTransfers.test.ts +0 -115
  1150. package/src/db/tables/fundingTransfers.ts +0 -189
  1151. package/src/handlers/internal/multisig.test.ts +0 -818
  1152. package/src/internal/funding/Subsidy.test.ts +0 -75
  1153. package/src/internal/funding/Transfer.test.ts +0 -524
  1154. package/src/internal/funding/Transfer.ts +0 -762
  1155. package/src/internal/funding/TransferReconciliation.test.ts +0 -147
  1156. package/src/internal/funding/TransferReconciliation.ts +0 -264
  1157. package/src/internal/funding/providers/stargate.test.ts +0 -328
  1158. package/src/internal/funding/providers/stargate.ts +0 -856
  1159. /package/dist/apps/{funding → routes}/Inventory.d.ts +0 -0
  1160. /package/src/internal/{funding → routes}/Route.test.ts +0 -0
package/dist/db/Schema.js CHANGED
@@ -14,11 +14,80 @@ export const AdminAuditLog = z.object({
14
14
  .number()
15
15
  .check(z.int(), z.describe('HTTP response status returned to the administrator.')),
16
16
  });
17
- // Row schemas for database tables (`zod/mini`), the source of truth each
18
- // `tables/` module derives its `Table` type from. Nullable fields map to
19
- // nullable columns; the domain layer converts `null` back to absent fields.
20
- // Domain-owned unions and jsonb values stay typed by their owning module via
21
- // `z.custom` (type-only imports) so the two cannot drift.
17
+ /** A durable fence for API keys attributed to a deleted organization or project. */
18
+ export const ApiKeyOwnerTombstone = z.object({
19
+ createdAt: z.string().check(z.describe('When the owner deletion committed (ISO 8601).')),
20
+ id: z.string().check(z.describe('Deterministic organization or project owner key.')),
21
+ });
22
+ /** Legacy aggregate API-key admission count retained for migration compatibility. */
23
+ export const ApiKeyOwnerAdmission = z.object({
24
+ liveKeys: z.number().check(z.int(), z.nonnegative()),
25
+ orgId: z.string(),
26
+ updatedAt: z.string(),
27
+ });
28
+ /** One API key counted toward its organization's live-key admission limit. */
29
+ export const ApiKeyAdmission = z.object({
30
+ expiresAt: z.nullable(z.string()),
31
+ id: z.string(),
32
+ orgId: z.string(),
33
+ projectId: z.nullable(z.string()),
34
+ });
35
+ /** Records an organization's latest bounded legacy-key admission reconciliation. */
36
+ export const ApiKeyAdmissionBootstrap = z.object({
37
+ bootstrappedAt: z.string(),
38
+ orgId: z.string(),
39
+ });
40
+ /** A retained revocation fence for one stable API-key id. */
41
+ export const ApiKeyRevocation = z.object({
42
+ expiresAt: z.string(),
43
+ id: z.string(),
44
+ orgId: z.nullable(z.string()),
45
+ revokedAt: z.string(),
46
+ });
47
+ /** A Better Auth login method linked to a Tempo user. */
48
+ export const AuthAccount = z.object({
49
+ accessToken: z.nullable(z.string()).check(z.describe('OAuth access token, or null.')),
50
+ accessTokenExpiresAt: z
51
+ .nullable(z.date())
52
+ .check(z.describe('When the OAuth access token expires, or null.')),
53
+ accountId: z.string().check(z.describe('Provider-side account identifier.')),
54
+ createdAt: z.date().check(z.describe('When Better Auth created the account.')),
55
+ id: z.string().check(z.describe('Better Auth account row id.')),
56
+ idToken: z.nullable(z.string()).check(z.describe('OpenID Connect identity token, or null.')),
57
+ issuer: z.string().check(z.describe('Issuer namespace for the provider account.')),
58
+ password: z.nullable(z.string()).check(z.describe('Credential password hash, or null.')),
59
+ providerId: z.string().check(z.describe('Authentication provider identifier.')),
60
+ refreshToken: z.nullable(z.string()).check(z.describe('OAuth refresh token, or null.')),
61
+ refreshTokenExpiresAt: z
62
+ .nullable(z.date())
63
+ .check(z.describe('When the OAuth refresh token expires, or null.')),
64
+ scope: z.nullable(z.string()).check(z.describe('Granted OAuth scopes, or null.')),
65
+ updatedAt: z.date().check(z.describe('When Better Auth last changed the account.')),
66
+ userId: z.string().check(z.describe('Tempo user id that owns the login method.')),
67
+ });
68
+ /** A Better Auth session row for the pinned package schema. */
69
+ export const AuthSession = z.object({
70
+ createdAt: z.date().check(z.describe('When Better Auth created the session.')),
71
+ expiresAt: z.date().check(z.describe('When the Better Auth session expires.')),
72
+ id: z.string().check(z.describe('Better Auth session row id.')),
73
+ ipAddress: z.nullable(z.string()).check(z.describe('Client IP address, or null.')),
74
+ provider: z
75
+ .nullable(z.string())
76
+ .check(z.describe('Authentication provider that established the session, or null.')),
77
+ token: z.string().check(z.describe('Opaque Better Auth session token.')),
78
+ updatedAt: z.date().check(z.describe('When Better Auth last changed the session.')),
79
+ userAgent: z.nullable(z.string()).check(z.describe('Client user agent, or null.')),
80
+ userId: z.string().check(z.describe('Owning Better Auth user id.')),
81
+ });
82
+ /** A Better Auth verification row for the pinned package schema. */
83
+ export const AuthVerification = z.object({
84
+ createdAt: z.date().check(z.describe('When Better Auth created the verification.')),
85
+ expiresAt: z.date().check(z.describe('When the verification expires.')),
86
+ id: z.string().check(z.describe('Better Auth verification row id.')),
87
+ identifier: z.string().check(z.describe('Lookup key for the verification purpose.')),
88
+ updatedAt: z.date().check(z.describe('When Better Auth last changed the verification.')),
89
+ value: z.string().check(z.describe('Stored verification credential.')),
90
+ });
22
91
  /** An organization's billing configuration; source-agnostic (limits apply to any billing source). */
23
92
  export const BillingSettings = z.object({
24
93
  createdAt: z.string().check(z.describe('When the settings row was created (ISO 8601).')),
@@ -50,17 +119,6 @@ export const EarlyAccessEntry = z.object({
50
119
  .string()
51
120
  .check(z.describe('Lowercase domain or exact email (contains `@`) granted early access.')),
52
121
  });
53
- /** One billing-source type enabled for an organization. */
54
- export const EnabledBillingSource = z.object({
55
- createdAt: z.string().check(z.describe('When the billing source was enabled (ISO 8601).')),
56
- createdBy: z
57
- .string()
58
- .check(z.describe('Identity that enabled the source, or `migration` for backfilled rows.')),
59
- orgId: z.string().check(z.describe('Organization id (`org_…`) this source is enabled for.')),
60
- source: z
61
- .enum(['stripe', 'tempo'])
62
- .check(z.describe('Enabled billing-source type; `stripe` or `tempo`.')),
63
- });
64
122
  /** One curated Earn vault. */
65
123
  export const EarnVault = z
66
124
  .object({
@@ -84,6 +142,17 @@ export const EarnVault = z
84
142
  .check(z.describe('Curated private Zone routes (`jsonb`).')),
85
143
  })
86
144
  .check(z.describe('One curated Earn vault row.'));
145
+ /** One billing-source type enabled for an organization. */
146
+ export const EnabledBillingSource = z.object({
147
+ createdAt: z.string().check(z.describe('When the billing source was enabled (ISO 8601).')),
148
+ createdBy: z
149
+ .string()
150
+ .check(z.describe('Identity that enabled the source, or `migration` for backfilled rows.')),
151
+ orgId: z.string().check(z.describe('Organization id (`org_…`) this source is enabled for.')),
152
+ source: z
153
+ .enum(['stripe', 'tempo'])
154
+ .check(z.describe('Enabled billing-source type; `stripe` or `tempo`.')),
155
+ });
87
156
  /** A pending, expiring offer of organization membership. */
88
157
  export const Invitation = z.object({
89
158
  acceptedAt: z
@@ -168,14 +237,26 @@ export const Organization = z.object({
168
237
  sponsorshipSubsidyDurationDays: z
169
238
  .nullable(z.number().check(z.int(), z.positive()))
170
239
  .check(z.describe('Promotional sponsorship duration in days, or null when disabled.')),
240
+ // The persisted column name predates attribution-scoped promotion limits.
171
241
  sponsorshipSubsidyProjectSpendLimit: z
172
242
  .nullable(z.string())
173
- .check(z.describe('Per-project promotional spend cap in decimal USD, or null when disabled.')),
243
+ .check(z.describe('Per-attribution promotional spend cap in decimal USD, or null when disabled.')),
174
244
  updatedAt: z.string().check(z.describe('When the organization was last updated (ISO 8601).')),
175
245
  userId: z
176
246
  .nullable(z.string())
177
247
  .check(z.describe('Owning user id (`usr_…`), or null for organizations created by the super admin.')),
178
248
  });
249
+ /** An organization Routes subsidy policy. */
250
+ export const RoutesSubsidy = z.object({
251
+ createdAt: z.string().check(z.describe('When the Routes subsidy policy was created (ISO 8601).')),
252
+ enabled: z.boolean().check(z.describe('Whether the organization enables Routes subsidies.')),
253
+ frequency: z.literal('tx').check(z.describe('Interval over which the subsidy limit applies.')),
254
+ maxAmount: z
255
+ .nullable(z.string())
256
+ .check(z.describe('Maximum Routes subsidy gap in decimal USD, or null when disabled.')),
257
+ orgId: z.string().check(z.describe('Organization id (`org_…`).')),
258
+ updatedAt: z.string().check(z.describe('When the Routes subsidy policy was updated (ISO 8601).')),
259
+ });
179
260
  /** A project: an app or integration within an organization. */
180
261
  export const Project = z.object({
181
262
  createdAt: z.string().check(z.describe('When the project was created (ISO 8601).')),
@@ -197,9 +278,245 @@ export const Project = z.object({
197
278
  .check(z.describe('Promotional spend cap in fee-token base units, or null.')),
198
279
  updatedAt: z.string().check(z.describe('When the project was last updated (ISO 8601).')),
199
280
  });
281
+ /** A per-hour request-count watermark: the running total already reported to the meter. */
282
+ export const RequestUsageBucket = z.object({
283
+ bucketStart: z.string().check(z.describe('UTC hour start this bucket covers (ISO 8601).')),
284
+ environment: z
285
+ .enum(['production', 'sandbox'])
286
+ .check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
287
+ orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
288
+ reportedCount: z
289
+ .number()
290
+ .check(z.describe('Cumulative request count already reported to the meter for this bucket.')),
291
+ updatedAt: z.string().check(z.describe('When the watermark last advanced (ISO 8601).')),
292
+ });
293
+ /** One request-count meter event: a frozen additive delta with its exactly-once state. */
294
+ export const RequestUsageMeterEvent = z.object({
295
+ bucketStart: z.string().check(z.describe('UTC hour start this event bills for (ISO 8601).')),
296
+ deltaCount: z
297
+ .number()
298
+ .check(z.describe('Frozen request count this event bills; a positive additive delta.')),
299
+ environment: z
300
+ .enum(['production', 'sandbox'])
301
+ .check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
302
+ error: z.nullable(z.string()).check(z.describe('Last failure detail while `pending`, or null.')),
303
+ firstAttemptedAt: z.string().check(z.describe('When this event was first claimed (ISO 8601).')),
304
+ identifier: z
305
+ .string()
306
+ .check(z.describe('Deterministic id; also the Stripe meter-event identifier and idempotency key.')), // prettier-ignore
307
+ orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
308
+ reason: z
309
+ .nullable(z.string())
310
+ .check(z.describe('Skip reason when `state` is `skipped` (`no_customer` | `customer_canceled`), or null.')), // prettier-ignore
311
+ reportedAt: z
312
+ .nullable(z.string())
313
+ .check(z.describe('When Stripe acknowledged the event (ISO 8601), or null.')),
314
+ sequence: z
315
+ .number()
316
+ .check(z.describe('Reported-count watermark observed when this delta was claimed.')),
317
+ state: z
318
+ .enum(['pending', 'reported', 'skipped'])
319
+ .check(z.describe('Exactly-once state: `pending` retries, `reported` is done, `skipped` is audited.')), // prettier-ignore
320
+ stripeCustomerId: z.string().check(z.describe('Stripe customer id the event bills against.')),
321
+ });
322
+ /** One reward campaign bound to a verified Earn vault. */
323
+ export const RewardCampaign = z.object({
324
+ assetAddress: z.custom().check(z.describe('Vault base-asset address (lowercase).')),
325
+ assetDecimals: z
326
+ .number()
327
+ .check(z.int(), z.nonnegative(), z.lte(255), z.describe('Vault base-asset decimals.')),
328
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
329
+ config: z.custom().check(z.describe('Active campaign configuration.')),
330
+ controllerAddress: z
331
+ .nullable(z.custom())
332
+ .check(z.describe('Target-yield controller, or null.')),
333
+ createdAt: z.string().check(z.describe('When the campaign was created (ISO 8601).')),
334
+ deliveredThrough: z.string().check(z.regex(/^\d+$/), z.describe('Last delivered Unix boundary.')),
335
+ distributorAddress: z
336
+ .nullable(z.custom())
337
+ .check(z.describe('Merkle distributor, or null.')),
338
+ earnShareAddress: z.custom().check(z.describe('Vault EarnShare address (lowercase).')),
339
+ earnShareDecimals: z
340
+ .number()
341
+ .check(z.int(), z.nonnegative(), z.lte(255), z.describe('Vault EarnShare decimals.')),
342
+ eventCursor: z
343
+ .nullable(z.custom())
344
+ .check(z.describe('Last applied TIDX event, or null.')),
345
+ paused: z.boolean().check(z.describe('Whether new campaign work is paused.')),
346
+ pendingConfig: z
347
+ .nullable(z.custom())
348
+ .check(z.describe('Future configuration, or null.')),
349
+ pendingEffectiveAt: z.nullable(z.string()).check(z.describe('Pending Unix boundary, or null.')),
350
+ provisioningError: z
351
+ .nullable(z.string())
352
+ .check(z.describe('Actionable provisioning error, or null.')),
353
+ signerAddress: z
354
+ .nullable(z.custom())
355
+ .check(z.describe('Signer permanently bound when reward periphery is first provisioned.')),
356
+ updatedAt: z.string().check(z.describe('When campaign state last changed (ISO 8601).')),
357
+ vaultAddress: z.custom().check(z.describe('Verified EarnVault address (lowercase).')),
358
+ });
359
+ /** One verified reward distributor retained for historical payout recognition. */
360
+ export const RewardCampaignDistributor = z.object({
361
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
362
+ createdAt: z.string().check(z.describe('When the distributor was first recorded (ISO 8601).')),
363
+ distributorAddress: z.custom().check(z.describe('Verified reward distributor address.')),
364
+ vaultAddress: z.custom().check(z.describe('Verified EarnVault address (lowercase).')),
365
+ });
366
+ /** One current delivered recipient projection. */
367
+ export const RewardAccount = z.object({
368
+ accrualRemainder: z
369
+ .string()
370
+ .check(z.regex(/^\d+$/), z.describe('Carried reward arithmetic remainder.')),
371
+ allocatedPrincipalAssets: z
372
+ .string()
373
+ .check(z.regex(/^\d+$/), z.describe('Principal allocated against campaign caps.')),
374
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
375
+ cumulativeEntitlement: z
376
+ .string()
377
+ .check(z.regex(/^\d+$/), z.describe('Cumulative EarnShare entitlement.')),
378
+ cumulativePaid: z.string().check(z.regex(/^\d+$/), z.describe('Cumulative EarnShare paid.')),
379
+ deferral: z.nullable(z.string()).check(z.describe('Current payout deferral reason, or null.')),
380
+ eligibilityRegisteredAt: z
381
+ .nullable(z.string())
382
+ .check(z.describe('Eligibility registration version consumed by this projection.')),
383
+ lots: z
384
+ .array(z.custom())
385
+ .check(z.describe('Surviving qualified deposit lots.')),
386
+ pendingRewardAssets: z
387
+ .string()
388
+ .check(z.regex(/^\d+$/), z.describe('Unsettled base-asset reward units.')),
389
+ publicEarnShares: z
390
+ .string()
391
+ .check(z.regex(/^\d+$/), z.describe('Current attributable public EarnShare balance.')),
392
+ qualifiedEarnShares: z
393
+ .string()
394
+ .check(z.regex(/^\d+$/), z.describe('Current qualified EarnShare balance.')),
395
+ recipient: z.custom().check(z.describe('Registered reward recipient (lowercase).')),
396
+ registrationOrder: z
397
+ .string()
398
+ .check(z.regex(/^\d+$/), z.describe('Eligibility registration order.')),
399
+ updatedAt: z.string().check(z.describe('When delivered account state last changed (ISO 8601).')),
400
+ vaultAddress: z.custom().check(z.describe('EarnVault address (lowercase).')),
401
+ });
402
+ /** One run-once manual reward credit added to a recipient's pending rewards. */
403
+ export const RewardCredit = z.object({
404
+ assets: z.string().check(z.regex(/^\d+$/), z.describe('Credited base-asset reward units.')),
405
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
406
+ createdAt: z.string().check(z.describe('When the credit was applied (ISO 8601).')),
407
+ recipient: z.custom().check(z.describe('Credited reward recipient (lowercase).')),
408
+ reference: z
409
+ .string()
410
+ .check(z.describe('Operator reference identifying the credit batch; unique per recipient.')),
411
+ vaultAddress: z.custom().check(z.describe('EarnVault address (lowercase).')),
412
+ });
413
+ /** One durable reward execution. */
414
+ export const RewardRun = z.object({
415
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
416
+ config: z
417
+ .custom()
418
+ .check(z.describe('Configuration snapshot consumed by the run.')),
419
+ createdAt: z.string().check(z.describe('When the run was created (ISO 8601).')),
420
+ endsAt: z.string().check(z.regex(/^\d+$/), z.describe('Exclusive final Unix boundary.')),
421
+ error: z.nullable(z.string()).check(z.describe('Actionable run error, or null.')),
422
+ evidence: z
423
+ .nullable(z.custom())
424
+ .check(z.describe('Resumable or completed calculation evidence, or null.')),
425
+ fence: z.string().check(z.regex(/^\d+$/), z.describe('Monotonic lease fencing token.')),
426
+ fundedAssets: z
427
+ .nullable(z.string())
428
+ .check(z.describe('Base assets pulled for boost settlement, or null.')),
429
+ id: z.string().check(z.describe('Opaque reward run id (`rrn_…`).')),
430
+ leaseExpiresAt: z
431
+ .nullable(z.string())
432
+ .check(z.describe('Worker lease expiry (ISO 8601), or null.')),
433
+ liability: z
434
+ .nullable(z.string())
435
+ .check(z.describe('Published cumulative EarnShare liability, or null.')),
436
+ mintedEarnShares: z.nullable(z.string()).check(z.describe('Measured EarnShare mint, or null.')),
437
+ phase: z
438
+ .enum([
439
+ 'indexing',
440
+ 'calculating',
441
+ 'targetYield',
442
+ 'statement',
443
+ 'settling',
444
+ 'publishing',
445
+ 'paying',
446
+ 'delivered',
447
+ 'failed',
448
+ ])
449
+ .check(z.describe('Recoverable execution phase.')),
450
+ root: z.nullable(z.custom()).check(z.describe('Published Merkle root, or null.')),
451
+ rootVersion: z.nullable(z.string()).check(z.describe('Published root version, or null.')),
452
+ startsAfter: z
453
+ .string()
454
+ .check(z.regex(/^\d+$/), z.describe('Previously delivered Unix boundary.')),
455
+ statement: z
456
+ .nullable(z.custom())
457
+ .check(z.describe('Latest cumulative statement, or null.')),
458
+ statementHash: z
459
+ .nullable(z.custom())
460
+ .check(z.describe('Statement content hash, or null.')),
461
+ updatedAt: z.string().check(z.describe('When run state last changed (ISO 8601).')),
462
+ vaultAddress: z.custom().check(z.describe('EarnVault address (lowercase).')),
463
+ });
464
+ /** One append-only signed reward transaction attempt. */
465
+ export const RewardTransactionAttempt = z.object({
466
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain receiving the transaction.')),
467
+ confirmedBlockHash: z
468
+ .nullable(z.custom())
469
+ .check(z.describe('Confirmed canonical block hash, or null.')),
470
+ createdAt: z.string().check(z.describe('When the attempt was created (ISO 8601).')),
471
+ expiresAt: z
472
+ .nullable(z.string())
473
+ .check(z.describe('Expiring nonce deadline (ISO 8601), or null.')),
474
+ id: z.string().check(z.describe('Opaque transaction attempt id (`rat_…`).')),
475
+ intent: z.custom().check(z.describe('Typed signer intent.')),
476
+ intentId: z.custom().check(z.describe('Deterministic typed intent id.')),
477
+ nonce: z.nullable(z.string()).check(z.describe('Signer nonce, or null before signing.')),
478
+ receipt: z
479
+ .nullable(z.custom())
480
+ .check(z.describe('Canonical receipt, or null.')),
481
+ replacementOf: z.nullable(z.string()).check(z.describe('Replaced attempt id, or null.')),
482
+ runId: z
483
+ .nullable(z.string())
484
+ .check(z.describe('Owning reward run id, or null for provisioning.')),
485
+ signedBytes: z
486
+ .nullable(z.custom())
487
+ .check(z.describe('Exact signed transaction bytes, or null.')),
488
+ signer: z.custom().check(z.describe('Signing account (lowercase).')),
489
+ state: z
490
+ .enum(['created', 'signed', 'broadcast', 'confirmed', 'expired', 'ineffective', 'reverted'])
491
+ .check(z.describe('Attempt lifecycle state.')),
492
+ transactionHash: z.nullable(z.custom()).check(z.describe('Transaction hash, or null.')),
493
+ updatedAt: z.string().check(z.describe('When attempt state last changed (ISO 8601).')),
494
+ vaultAddress: z.custom().check(z.describe('Bound EarnVault address (lowercase).')),
495
+ });
496
+ /** One wallet and Earn vault association eligible for rewards. */
497
+ export const RewardEligibilityAssociation = z
498
+ .object({
499
+ chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
500
+ firstRegisteredAt: z
501
+ .string()
502
+ .check(z.describe('When the association was first registered (ISO 8601).')),
503
+ latestRegisteredAt: z
504
+ .string()
505
+ .check(z.describe('When the association was most recently registered (ISO 8601).')),
506
+ registrationOrder: z
507
+ .string()
508
+ .check(z.regex(/^\d+$/), z.describe('Monotonic registration order.')),
509
+ transactionHash: z.optional(z.custom().check(z.describe('Latest registration transaction hash.'))),
510
+ vaultAddress: z.custom().check(z.describe('Earn vault address (lowercase).')),
511
+ walletAddress: z.custom().check(z.describe('Eligible wallet address (lowercase).')),
512
+ })
513
+ .check(z.describe('One persisted reward eligibility association.'));
200
514
  /** A transaction sponsored by the managed fee payer — the billable unit of fee payer spend. */
201
515
  export const SponsoredTransaction = z.object({
202
516
  apiKeyId: z.string().check(z.describe('API key id (`key_…`) that requested sponsorship.')),
517
+ sponsorshipAttributionId: z
518
+ .nullable(z.string())
519
+ .check(z.describe('Canonical sponsorship attribution id snapshotted at sponsorship, or null.')),
203
520
  billable: z
204
521
  .boolean()
205
522
  .check(z.describe('Whether the sponsorship accrues billable spend; false for sandbox.')),
@@ -220,6 +537,9 @@ export const SponsoredTransaction = z.object({
220
537
  feeToken: z
221
538
  .nullable(z.string())
222
539
  .check(z.describe('Fee token address, or null when the chain default applied.')),
540
+ finalizationAttemptedAt: z
541
+ .nullable(z.string())
542
+ .check(z.describe('When finalization last claimed this pending row (ISO 8601), or null.')),
223
543
  finalizedAt: z
224
544
  .nullable(z.string())
225
545
  .check(z.describe('When the sponsorship reached a terminal status (ISO 8601), or null.')),
@@ -246,46 +566,41 @@ export const SponsoredTransaction = z.object({
246
566
  .nullable(z.string())
247
567
  .check(z.describe('Transaction hash, or null for fill intents until reconciled.')),
248
568
  });
249
- /** A per-hour request-count watermark: the running total already reported to the meter. */
250
- export const RequestUsageBucket = z.object({
251
- bucketStart: z.string().check(z.describe('UTC hour start this bucket covers (ISO 8601).')),
252
- environment: z
253
- .enum(['production', 'sandbox'])
254
- .check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
255
- orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
256
- reportedCount: z
569
+ /** Durable position for failed sponsorship reconciliation. */
570
+ export const SponsorshipReconciliationCursor = z.object({
571
+ blockNumber: z.string().check(z.regex(/^\d+$/), z.describe('Last scanned block number.')),
572
+ chainId: z.number().check(z.int(), z.describe('Chain whose fee-payer transactions are scanned.')),
573
+ complete: z
574
+ .boolean()
575
+ .check(z.describe('Whether the next scan starts from the newest candidate.')),
576
+ feePayer: z.custom().check(z.describe('Lowercase managed fee-payer address.')),
577
+ retryCount: z
257
578
  .number()
258
- .check(z.describe('Cumulative request count already reported to the meter for this bucket.')),
259
- updatedAt: z.string().check(z.describe('When the watermark last advanced (ISO 8601).')),
579
+ .check(z.int(), z.nonnegative(), z.describe('Failed attempts for the blocked candidate.')),
580
+ retryKey: z
581
+ .nullable(z.string())
582
+ .check(z.describe('Blocked candidate block number and transaction index.')),
583
+ revision: z.string().check(z.describe('Revision fencing overlapping reconciliation passes.')),
584
+ transactionIndex: z.number().check(z.int(), z.nonnegative(), z.describe('Last scanned transaction index.')), // prettier-ignore
585
+ updatedAt: z.string().check(z.describe('When reconciliation saved this position (ISO 8601).')),
260
586
  });
261
- /** One request-count meter event: a frozen additive delta with its exactly-once state. */
262
- export const RequestUsageMeterEvent = z.object({
263
- bucketStart: z.string().check(z.describe('UTC hour start this event bills for (ISO 8601).')),
264
- deltaCount: z
265
- .number()
266
- .check(z.describe('Frozen request count this event bills; a positive additive delta.')),
267
- environment: z
268
- .enum(['production', 'sandbox'])
269
- .check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
270
- error: z.nullable(z.string()).check(z.describe('Last failure detail while `pending`, or null.')),
271
- firstAttemptedAt: z.string().check(z.describe('When this event was first claimed (ISO 8601).')),
272
- identifier: z
273
- .string()
274
- .check(z.describe('Deterministic id; also the Stripe meter-event identifier and idempotency key.')), // prettier-ignore
275
- orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
276
- reason: z
587
+ /** A canonical sponsorship attribution resolved from an external id or Tempo Project. */
588
+ export const SponsorshipAttribution = z.object({
589
+ createdAt: z.string().check(z.describe('When the attribution was created (ISO 8601).')),
590
+ endsAt: z
277
591
  .nullable(z.string())
278
- .check(z.describe('Skip reason when `state` is `skipped` (`no_customer` | `customer_canceled`), or null.')), // prettier-ignore
279
- reportedAt: z
592
+ .check(z.describe('When promotional sponsorship ends (ISO 8601), or null before activation.')),
593
+ externalId: z.nullable(z.string()).check(z.describe('External partner attribution id, or null.')),
594
+ id: z.string().check(z.describe('Sponsorship attribution id (`sat_…`).')),
595
+ orgId: z.string().check(z.describe('Owning Tempo organization id (`org_…`).')),
596
+ projectId: z.nullable(z.string()).check(z.describe('Tempo Project id (`prj_…`), or null.')),
597
+ spendLimit: z
280
598
  .nullable(z.string())
281
- .check(z.describe('When Stripe acknowledged the event (ISO 8601), or null.')),
282
- sequence: z
283
- .number()
284
- .check(z.describe('Reported-count watermark observed when this delta was claimed.')),
285
- state: z
286
- .enum(['pending', 'reported', 'skipped'])
287
- .check(z.describe('Exactly-once state: `pending` retries, `reported` is done, `skipped` is audited.')), // prettier-ignore
288
- stripeCustomerId: z.string().check(z.describe('Stripe customer id the event bills against.')),
599
+ .check(z.describe('Promotional spend cap in fee-token base units, or null.')),
600
+ startsAt: z
601
+ .nullable(z.string())
602
+ .check(z.describe('When promotional sponsorship started (ISO 8601), or null before activation.')),
603
+ updatedAt: z.string().check(z.describe('When the attribution was last updated (ISO 8601).')),
289
604
  });
290
605
  /** An organization's Stripe billing source: the customer link and derived status. */
291
606
  export const StripeCustomer = z.object({
@@ -310,71 +625,76 @@ export const User = z.object({
310
625
  createdAt: z.string().check(z.describe('When the user was created (ISO 8601).')),
311
626
  email: z
312
627
  .nullable(z.string())
313
- .check(z.describe('Verified email from the wallet identity token, or null.')),
628
+ .check(z.describe('Normalized verified email, or null for a wallet-only identity.')),
629
+ emailVerified: z.boolean().check(z.describe('Whether the email was verified.')),
314
630
  id: z
315
631
  .string()
316
632
  .check(z.describe('Opaque user id (`usr_…`).'), z.meta({ examples: ['usr_1a2b3c4d5e6f7g8h9j0k1m2n'] })),
633
+ image: z.nullable(z.string()).check(z.describe('Profile image URL, or null.')),
634
+ name: z.string().check(z.describe('Display name.')),
317
635
  updatedAt: z.string().check(z.describe('When the user was last updated (ISO 8601).')),
318
636
  });
319
- /** Metadata for the current funding catalog snapshot. */
320
- export const FundingCatalog = z.object({
321
- id: z.string().check(z.describe('Singleton funding catalog id.')),
322
- updatedAt: z.string().check(z.describe('When the funding catalog was last published.')),
323
- version: z.string().check(z.describe('Opaque funding catalog version.')),
637
+ /** Metadata for the current route catalog snapshot. */
638
+ export const RoutesCatalog = z.object({
639
+ id: z.string().check(z.describe('Singleton route catalog id.')),
640
+ updatedAt: z.string().check(z.describe('When the route catalog was last published.')),
641
+ version: z.string().check(z.describe('Opaque route catalog version.')),
324
642
  });
325
- /** One chain available to the funding catalog. */
326
- export const FundingChain = z.object({
643
+ /** One chain available to the route catalog. */
644
+ export const RoutesChain = z.object({
327
645
  aliases: z
328
646
  .readonly(z.array(z.string()))
329
- .check(z.describe('Caller-facing aliases accepted for the funding chain.')),
330
- id: z.string().check(z.describe('CAIP-2 funding chain identifier.')),
331
- name: z.string().check(z.describe('Human-readable funding chain name.')),
647
+ .check(z.describe('Caller-facing aliases accepted for the route chain.')),
648
+ id: z.string().check(z.describe('CAIP-2 route chain identifier.')),
649
+ name: z.string().check(z.describe('Human-readable route chain name.')),
332
650
  parentChainId: z
333
651
  .nullable(z.string())
334
- .check(z.describe('Parent funding chain identifier for a Zone, or null.')),
652
+ .check(z.describe('Parent route chain identifier for a Zone, or null.')),
335
653
  rpcUrls: z
336
654
  ._default(z.readonly(z.array(z.url())), [])
337
- .check(z.describe('Public RPC endpoints used for funding-chain evidence.')),
338
- slug: z.string().check(z.describe('Stable funding chain slug.')),
655
+ .check(z.describe('Public RPC endpoints used for routes-chain evidence.')),
656
+ slug: z.string().check(z.describe('Stable route chain slug.')),
339
657
  });
340
- /** One token available to the funding catalog. */
341
- export const FundingToken = z.object({
658
+ /** One token available to the route catalog. */
659
+ export const RoutesToken = z.object({
342
660
  currency: z.string().check(z.describe('Monetary denomination represented by the token.')),
343
- id: z.string().check(z.describe('Stable funding token identifier.')),
344
- name: z.string().check(z.describe('Human-readable funding token name.')),
345
- symbol: z.string().check(z.describe('Funding token ticker symbol.')),
346
- });
347
- /** Chain-specific metadata for one funding token. */
348
- export const FundingChainToken = z.object({
349
- address: z.string().check(z.describe('Token address on the funding chain.')),
350
- chainId: z.string().check(z.describe('CAIP-2 identifier of the funding chain.')),
661
+ id: z.string().check(z.describe('Stable route token identifier.')),
662
+ name: z.string().check(z.describe('Human-readable route token name.')),
663
+ symbol: z.string().check(z.describe('Route token ticker symbol.')),
664
+ });
665
+ /** Chain-specific metadata for one route token. */
666
+ export const RoutesChainToken = z.object({
667
+ address: z.string().check(z.describe('Token address on the route chain.')),
668
+ chainId: z.string().check(z.describe('CAIP-2 identifier of the route chain.')),
351
669
  decimals: z.number().check(z.int(), z.nonnegative(), z.describe('Token decimal precision.')),
352
670
  name: z.nullable(z.string()).check(z.describe('Chain-specific token name override, or null.')),
353
- standard: z.string().check(z.describe('Token standard on the funding chain.')),
354
- tokenId: z.string().check(z.describe('Stable funding token identifier.')),
671
+ standard: z.string().check(z.describe('Token standard on the route chain.')),
672
+ tokenId: z.string().check(z.describe('Stable route token identifier.')),
355
673
  });
356
- /** One source-to-destination route supported by a funding provider. */
357
- export const FundingRoute = z.object({
674
+ /** One source-to-destination route supported by a route provider. */
675
+ export const RoutesRoute = z.object({
358
676
  capabilities: z
359
677
  .nullable(z.custom())
360
678
  .check(z.describe('Executable capability (`jsonb`), or null for indicative-only routes.')),
361
679
  configuration: z
362
680
  .nullable(z.custom())
363
681
  .check(z.describe('Provider-specific route configuration (`jsonb`), or null.')),
364
- destinationChainId: z.string().check(z.describe('Destination funding chain identifier.')),
365
- destinationTokenId: z.string().check(z.describe('Destination funding token identifier.')),
366
- providerId: z.string().check(z.describe('Funding provider identifier.')),
367
- sourceChainId: z.string().check(z.describe('Source funding chain identifier.')),
368
- sourceTokenId: z.string().check(z.describe('Source funding token identifier.')),
682
+ destinationChainId: z.string().check(z.describe('Destination route chain identifier.')),
683
+ destinationTokenId: z.string().check(z.describe('Destination route token identifier.')),
684
+ providerId: z.string().check(z.describe('Route provider identifier.')),
685
+ sourceChainId: z.string().check(z.describe('Source route chain identifier.')),
686
+ sourceTokenId: z.string().check(z.describe('Source route token identifier.')),
369
687
  });
370
688
  /**
371
- * A reusable funding deposit address. Public route fields live in `snapshot`;
689
+ * A reusable route deposit address. Public route fields live in `snapshot`;
372
690
  * provider routing and correlation remain private.
373
691
  */
374
- export const FundingDepositAddress = z.object({
692
+ export const RoutesDepositAddress = z.object({
375
693
  address: z.string().check(z.describe('Reusable source-chain deposit address.')),
376
- apiKeyId: z.string().check(z.describe('API key id (`key_…`) that provisioned the address.')),
377
694
  createdAt: z.string().check(z.describe('When the address was created (ISO 8601).')),
695
+ creatorUserId: z
696
+ .nullable(z.string())
697
+ .check(z.describe('Canonical creator user retained after organization deletion, or null.')),
378
698
  deliveryStrategy: z
379
699
  .custom()
380
700
  .check(z.describe('Whether the provider or Tempo delivers the requested destination token.')),
@@ -382,7 +702,7 @@ export const FundingDepositAddress = z.object({
382
702
  environment: z
383
703
  .enum(['production', 'sandbox'])
384
704
  .check(z.describe('Key environment the address belongs to.')),
385
- id: z.string().check(z.describe('Funding deposit address id (`fda_…`).')),
705
+ id: z.string().check(z.describe('Route deposit address id (`rda_…`).')),
386
706
  lastPolledAt: z
387
707
  .nullable(z.string())
388
708
  .check(z.describe('When provider reconciliation last completed successfully, or null.')),
@@ -399,7 +719,7 @@ export const FundingDepositAddress = z.object({
399
719
  providerOutputToken: z
400
720
  .custom()
401
721
  .check(z.describe('Token that the provider outputs on Tempo (`jsonb`).')),
402
- providerId: z.string().check(z.describe('Selected funding provider id.')),
722
+ providerId: z.string().check(z.describe('Selected route provider id.')),
403
723
  providerRequestIds: z
404
724
  .readonly(z.array(z.string()))
405
725
  .check(z.describe('Private provider request identifiers (`jsonb`).')),
@@ -414,13 +734,16 @@ export const FundingDepositAddress = z.object({
414
734
  sourceChainId: z.string().check(z.describe('Source chain CAIP-2 id.')),
415
735
  sourceTokenKey: z.string().check(z.describe('Source token key.')),
416
736
  status: z.custom().check(z.describe('Lifecycle status.')),
737
+ statusUpdatedAt: z
738
+ .nullable(z.string())
739
+ .check(z.describe('When the address entered its current status, or null for legacy rows.')),
417
740
  subsidize: z.boolean().check(z.describe('Whether Tempo guarantees normalized 1:1 delivery.')),
418
741
  updatedAt: z.string().check(z.describe('When the address last materially changed (ISO 8601).')),
419
742
  version: z.number().check(z.int(), z.describe('Material version used to guard updates.')),
420
743
  });
421
744
  /** First Tempo observations of one provider request through polling and webhooks. */
422
- export const FundingDepositRequestObservation = z.object({
423
- depositAddressId: z.string().check(z.describe('Funding deposit address id (`fda_…`).')),
745
+ export const RoutesDepositRequestObservation = z.object({
746
+ depositAddressId: z.string().check(z.describe('Route deposit address id (`rda_…`).')),
424
747
  pollObservedAt: z
425
748
  .nullable(z.string())
426
749
  .check(z.describe('When polling first observed the provider request, or null.')),
@@ -433,21 +756,24 @@ export const FundingDepositRequestObservation = z.object({
433
756
  * One provider-observed deposit. Public route and evidence live in `snapshot`;
434
757
  * reconciliation and settlement state is private.
435
758
  */
436
- export const FundingDeposit = z.object({
759
+ export const RoutesDeposit = z.object({
437
760
  createdAt: z.string().check(z.describe('When the deposit was detected (ISO 8601).')),
438
- depositAddressId: z.string().check(z.describe('Funding deposit address id (`fda_…`).')),
761
+ depositAddressId: z.string().check(z.describe('Route deposit address id (`rda_…`).')),
439
762
  detectionTrigger: z
440
763
  .nullable(z.custom())
441
764
  .check(z.describe('Mechanism that first detected the deposit, or null for legacy rows.')),
442
765
  environment: z
443
766
  .enum(['production', 'sandbox'])
444
767
  .check(z.describe('Key environment inherited from the deposit address.')),
445
- id: z.string().check(z.describe('Funding deposit id (`fdp_…`).')),
768
+ id: z.string().check(z.describe('Route deposit id (`rdp_…`).')),
446
769
  orgId: z.string().check(z.describe('Owning organization id (`org_…`).')),
447
770
  pollObservedAt: z
448
771
  .nullable(z.string())
449
772
  .check(z.describe('When polling first observed the provider request, or null.')),
450
773
  projectId: z.nullable(z.string()).check(z.describe('Attributed project id (`prj_…`), or null.')),
774
+ providerDeliveredAt: z
775
+ .nullable(z.string())
776
+ .check(z.describe('When provider delivery was first verified, or null.')),
451
777
  providerOutputAmount: z
452
778
  .nullable(z.custom())
453
779
  .check(z.describe('Provider output amount verified on Tempo (`jsonb`), or null.')),
@@ -463,6 +789,9 @@ export const FundingDeposit = z.object({
463
789
  providerState: z
464
790
  .nullable(z.custom())
465
791
  .check(z.describe('Bounded private provider state (`jsonb`), or null.')),
792
+ providerSubsidy: z
793
+ .nullable(z.custom())
794
+ .check(z.describe('Provider-paid subsidy amount and token (`jsonb`), or null.')),
466
795
  providerTransactionHashes: z
467
796
  .readonly(z.array(z.string()))
468
797
  .check(z.describe('Private provider-leg transaction references (`jsonb`).')),
@@ -492,9 +821,15 @@ export const FundingDeposit = z.object({
492
821
  statusReason: z
493
822
  .nullable(z.custom())
494
823
  .check(z.describe('Customer-safe status reason (`jsonb`), or null.')),
824
+ statusUpdatedAt: z
825
+ .nullable(z.string())
826
+ .check(z.describe('When the deposit entered its current status, or null for legacy rows.')),
495
827
  subsidyAmount: z
496
828
  .nullable(z.custom())
497
829
  .check(z.describe('Destination token amount supplied by Tempo (`jsonb`), or null.')),
830
+ subsidyMeterReportedAt: z
831
+ .nullable(z.string())
832
+ .check(z.describe('Effective Stripe meter-event time, or null before acknowledgement.')),
498
833
  tempoGasPaid: z.nullable(z.string()).check(z.describe('Tempo gas paid for settlement, or null.')),
499
834
  updatedAt: z.string().check(z.describe('When the deposit last materially changed (ISO 8601).')),
500
835
  version: z.number().check(z.int(), z.describe('Material version used to guard updates.')),
@@ -503,20 +838,20 @@ export const FundingDeposit = z.object({
503
838
  .check(z.describe('When Tempo first received an authenticated provider webhook, or null.')),
504
839
  });
505
840
  /**
506
- * A durable funding transfer. Lifecycle state lives in typed columns; the
841
+ * A durable route transfer. Lifecycle state lives in typed columns; the
507
842
  * public quote terms and reconciled fields live in the `snapshot` jsonb and
508
843
  * merge in at serialization (`Transfer.toPublic`).
509
844
  */
510
- export const FundingTransfer = z.object({
845
+ export const RoutesTransfer = z.object({
511
846
  apiKeyId: z.string().check(z.describe('API key id (`key_…`) that created the transfer.')),
512
847
  createdAt: z.string().check(z.describe('When the transfer was created (ISO 8601).')),
513
848
  environment: z
514
849
  .enum(['production', 'sandbox'])
515
850
  .check(z.describe('Key environment the transfer belongs to.')),
516
- id: z.string().check(z.describe('Transfer id (`ftr_…`, lexically time-ordered).')),
851
+ id: z.string().check(z.describe('Transfer id (`rtr_…`, lexically time-ordered).')),
517
852
  method: z
518
853
  .custom()
519
- .check(z.describe('Funding method selected at creation.')),
854
+ .check(z.describe('Route method selected at creation.')),
520
855
  mode: z
521
856
  .custom()
522
857
  .check(z.describe('Amount mode selected at creation.')),
@@ -524,7 +859,10 @@ export const FundingTransfer = z.object({
524
859
  projectId: z
525
860
  .nullable(z.string())
526
861
  .check(z.describe('Attributed project id (`prj_…`), or null for organization-attributed keys.')), // prettier-ignore
527
- providerId: z.string().check(z.describe('Selected funding provider id.')),
862
+ providerDeliveredAt: z
863
+ .nullable(z.string())
864
+ .check(z.describe('When destination provider delivery was first verified, or null.')),
865
+ providerId: z.string().check(z.describe('Selected route provider id.')),
528
866
  providerState: z
529
867
  .nullable(z.custom())
530
868
  .check(z.describe('Private provider state (`jsonb`), or null. Never serialized publicly.')), // prettier-ignore
@@ -538,42 +876,117 @@ export const FundingTransfer = z.object({
538
876
  statusReason: z
539
877
  .nullable(z.custom())
540
878
  .check(z.describe('Customer-safe status reason (`jsonb`), or null.')),
879
+ statusUpdatedAt: z
880
+ .nullable(z.string())
881
+ .check(z.describe('When the transfer entered its current status, or null for legacy rows.')),
882
+ subsidyAccount: z
883
+ .nullable(z.string())
884
+ .check(z.describe('Destination subsidy signer address, or null before reservation.')),
885
+ subsidyAmount: z
886
+ .nullable(z.custom())
887
+ .check(z.describe('Destination token amount supplied by Tempo (`jsonb`), or null.')),
888
+ subsidyChainId: z
889
+ .nullable(z.string())
890
+ .check(z.describe('Destination subsidy chain id, or null before reservation.')),
891
+ subsidyCommitmentAmount: z
892
+ .nullable(z.custom())
893
+ .check(z.describe('Maximum destination subsidy authorized at action creation, or null.')),
894
+ subsidyMeterReportedAt: z
895
+ .nullable(z.string())
896
+ .check(z.describe('Effective Stripe meter-event time, or null before acknowledgement.')),
897
+ subsidyNativeAmount: z
898
+ .nullable(z.string())
899
+ .check(z.describe('Native gas amount reserved by the signed transaction, or null.')),
900
+ subsidyTokenAddress: z
901
+ .nullable(z.string())
902
+ .check(z.describe('Destination subsidy token address, or null before reservation.')),
903
+ subsidyTransactionHash: z
904
+ .nullable(z.string())
905
+ .check(z.describe('Persisted destination subsidy transaction hash, or null.')),
541
906
  updatedAt: z.string().check(z.describe('When the transfer last materially changed (ISO 8601).')),
542
907
  version: z
543
908
  .number()
544
909
  .check(z.int(), z.describe('Increments on every material change; guards transitions.')),
545
910
  });
546
- /** One immutable public snapshot of a funding transfer at a material version. */
547
- export const FundingTransferEvent = z.object({
911
+ /** One immutable public snapshot of a route transfer at a material version. */
912
+ export const RoutesTransferEvent = z.object({
548
913
  createdAt: z.string().check(z.describe('When the version was committed (ISO 8601).')),
549
914
  snapshot: z
550
915
  .custom()
551
916
  .check(z.describe('The complete public transfer at this version (`jsonb`).')),
552
917
  status: z.custom().check(z.describe('Status at this version.')),
553
- transferId: z.string().check(z.describe('Transfer id (`ftr_…`) the event belongs to.')),
918
+ transferId: z.string().check(z.describe('Transfer id (`rtr_…`) the event belongs to.')),
554
919
  version: z.number().check(z.int(), z.describe('Material version the event records.')),
555
920
  });
556
- /** One verified transaction reference associated with a funding transfer. */
557
- export const FundingTransferTransaction = z.object({
921
+ /** One verified transaction reference associated with a route transfer. */
922
+ export const RoutesTransferTransaction = z.object({
558
923
  chainId: z.string().check(z.describe('CAIP-2 chain the transaction executed on.')),
559
924
  createdAt: z.string().check(z.describe('When the reference was accepted (ISO 8601).')),
925
+ environment: z.string().check(z.describe('Environment derived from the owning transfer.')),
926
+ orgId: z.string().check(z.describe('Organization derived from the owning transfer.')),
927
+ projectId: z.nullable(z.string()).check(z.describe('Project derived from the owning transfer.')),
560
928
  role: z
561
929
  .custom()
562
930
  .check(z.describe('What the transaction evidences: `source`, `destination`, or `refund`.')),
563
931
  transactionRef: z
564
932
  .string()
565
933
  .check(z.describe('EVM transaction hash or case-sensitive Solana signature.')),
566
- transferId: z.string().check(z.describe('Transfer id (`ftr_…`) the reference belongs to.')),
934
+ transferId: z.string().check(z.describe('Transfer id (`rtr_…`) the reference belongs to.')),
935
+ });
936
+ /** One globally deduplicated destination subsidy for a verified source transaction. */
937
+ export const RoutesTransferSubsidy = z.object({
938
+ createdAt: z.string().check(z.describe('When the signed subsidy was persisted (ISO 8601).')),
939
+ destinationChainId: z
940
+ .string()
941
+ .check(z.describe('Destination CAIP-2 chain receiving the subsidy.')),
942
+ recipient: z.string().check(z.describe('Lowercase destination recipient address.')),
943
+ sourceChainId: z
944
+ .string()
945
+ .check(z.describe('Source CAIP-2 chain containing the verified payment.')),
946
+ tokenAddress: z.string().check(z.describe('Lowercase destination token address.')),
947
+ transaction: z
948
+ .custom()
949
+ .check(z.describe('Signed subsidy retained for replay, including after transfer deletion.')),
950
+ transactionRef: z.string().check(z.describe('Canonical source execution transaction reference.')),
951
+ transferId: z
952
+ .string()
953
+ .check(z.describe('Transfer responsible for this subsidy and its billing.')),
954
+ });
955
+ /** One durable next nonce for a destination subsidy signer on an EVM chain. */
956
+ export const RoutesTransferSubsidyNonce = z.object({
957
+ account: z.string().check(z.describe('Lowercase destination subsidy signer address.')),
958
+ blockedAt: z
959
+ .nullable(z.string())
960
+ .check(z.describe('When this signer lane became blocked, or null.')),
961
+ blockedReason: z
962
+ .nullable(z.literal('broadcast_rejected'))
963
+ .check(z.describe('Bounded reason this signer lane is blocked, or null.')),
964
+ blockedTransferId: z
965
+ .nullable(z.string())
966
+ .check(z.describe('Transfer holding the blocked signer nonce, or null.')),
967
+ chainId: z.string().check(z.describe('Destination EVM chain CAIP-2 id.')),
968
+ nextNonce: z.string().check(z.regex(/^\d+$/), z.describe('Next unreserved EOA nonce.')),
969
+ updatedAt: z.string().check(z.describe('When the nonce was last reserved (ISO 8601).')),
567
970
  });
568
971
  /**
569
- * An API-key-scoped idempotency claim for funding resource creation. The row
972
+ * An API-key-scoped idempotency claim for route resource creation. The row
570
973
  * retains recovery checkpoints and completed responses until `expiresAt`.
571
974
  */
572
- export const FundingIdempotencyRequest = z.object({
975
+ export const RoutesIdempotencyRequest = z.object({
573
976
  apiKeyId: z.string().check(z.describe('API key id (`key_…`) the claim is scoped to.')),
574
977
  createdAt: z.string().check(z.describe('When the claim was taken (ISO 8601).')),
575
- expiresAt: z.string().check(z.describe('When the claim stops replaying (ISO 8601).')),
978
+ expiresAt: z.string().check(z.describe('Scheduled claim replay expiry (ISO 8601).')),
979
+ irrevocable: z.boolean().check(z.describe('Whether provider success creates durable liability.')),
576
980
  keyHash: z.string().check(z.describe('SHA-256 of the caller Idempotency-Key.')),
981
+ matchHash: z
982
+ .nullable(z.string())
983
+ .check(z.describe('Canonical reusable deposit-address identity, or null before selection.')),
984
+ operation: z
985
+ .nullable(z.union([z.literal('deposit_address'), z.literal('transfer')]))
986
+ .check(z.describe('Route creation operation owning the claim, or null for legacy rows.')),
987
+ orgId: z
988
+ .nullable(z.string())
989
+ .check(z.describe('Organization reserving deposit-address capacity, or null.')),
577
990
  requestHash: z.string().check(z.describe('SHA-256 fingerprint of the canonical request.')),
578
991
  response: z
579
992
  .nullable(z.string())
@@ -583,7 +996,7 @@ export const FundingIdempotencyRequest = z.object({
583
996
  .check(z.describe('Claim state for execution, recovery, or replay.')),
584
997
  transferId: z
585
998
  .nullable(z.string())
586
- .check(z.describe('Transfer id (`ftr_…`) the completed claim created, or null.')),
999
+ .check(z.describe('Transfer id (`rtr_…`) the completed claim created, or null.')),
587
1000
  });
588
1001
  /**
589
1002
  * A verified token: one row per curated token, ordered by `position` (list
@@ -643,57 +1056,6 @@ export const VerifiedTokenRequest = z.object({
643
1056
  symbol: z.string().check(z.describe('Ticker symbol.'), z.meta({ examples: ['USDC'] })),
644
1057
  updatedAt: z.string().check(z.describe('When the request was last changed (ISO 8601).')),
645
1058
  });
646
- /**
647
- * A webhook subscription. The `Webhooks.Owner` union maps to (`ownerType`,
648
- * `ownerId`); jsonb object columns round-trip as parsed values. `pollerCursor`
649
- * replaces the old per-subscription cursor key.
650
- */
651
- export const WebhookSubscription = z.object({
652
- chainId: z.number().check(z.int(), z.describe('Chain the subscription listens on.')),
653
- context: z
654
- .nullable(z.custom())
655
- .check(z.describe('Human context (`jsonb`), or null.')),
656
- createdAt: z.string().check(z.describe('ISO timestamp of creation.')),
657
- destination: z
658
- .custom()
659
- .check(z.describe('Delivery destination (`jsonb`).')),
660
- environment: z
661
- .nullable(z.enum(['production', 'sandbox']))
662
- .check(z.describe('API-key environment for private resource events, or null.')),
663
- eventType: z
664
- .custom()
665
- .check(z.describe('Event type the subscription listens to.')),
666
- expiresAt: z
667
- .nullable(z.string())
668
- .check(z.describe('ISO expiry timestamp (MPP-owned subscriptions), or null.')),
669
- failureCount: z
670
- .number()
671
- .check(z.int(), z.describe('Consecutive delivery failures; drives auto-disable.')),
672
- filters: z
673
- .custom()
674
- .check(z.describe('Event-type-specific filter predicates (`jsonb`).')),
675
- id: z
676
- .string()
677
- .check(z.describe('Subscription id (`wh_…`, lexically time-ordered).'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
678
- lastDeliveryAt: z
679
- .nullable(z.string())
680
- .check(z.describe('ISO timestamp of the last successful delivery, or null.')),
681
- ownerId: z
682
- .string()
683
- .check(z.describe('Owner identifier: `orgId` for `api_key` owners, `payer` for `mpp`.')),
684
- ownerType: z.custom().check(z.describe('Owner kind.')),
685
- pollerCursor: z
686
- .nullable(z.string())
687
- .check(z.describe('Poller keyset cursor, or null before the first tick.')),
688
- projectId: z
689
- .nullable(z.string())
690
- .check(z.describe('API-key project attribution for private resource events, or null.')),
691
- secret: z.string().check(z.describe('HMAC signing secret.')),
692
- status: z.custom().check(z.describe('Lifecycle status.')),
693
- updatedAt: z
694
- .string()
695
- .check(z.describe('ISO timestamp of the last mutation (`pollerCursor` writes excluded).')),
696
- });
697
1059
  /**
698
1060
  * A webhook delivery attempt. Rows are invisible past `expiresAt` (the
699
1061
  * retention deadline that replaces the old store TTL) and pruned by the
@@ -769,4 +1131,55 @@ export const WebhookQueueEvent = z.object({
769
1131
  .string()
770
1132
  .check(z.describe('Owning subscription id (`wh_...`); FK with `ON DELETE CASCADE`.')),
771
1133
  });
1134
+ /**
1135
+ * A webhook subscription. The `Webhooks.Owner` union maps to (`ownerType`,
1136
+ * `ownerId`); jsonb object columns round-trip as parsed values. `pollerCursor`
1137
+ * replaces the old per-subscription cursor key.
1138
+ */
1139
+ export const WebhookSubscription = z.object({
1140
+ chainId: z.number().check(z.int(), z.describe('Chain the subscription listens on.')),
1141
+ context: z
1142
+ .nullable(z.custom())
1143
+ .check(z.describe('Human context (`jsonb`), or null.')),
1144
+ createdAt: z.string().check(z.describe('ISO timestamp of creation.')),
1145
+ destination: z
1146
+ .custom()
1147
+ .check(z.describe('Delivery destination (`jsonb`).')),
1148
+ environment: z
1149
+ .nullable(z.enum(['production', 'sandbox']))
1150
+ .check(z.describe('API-key environment for private resource events, or null.')),
1151
+ eventType: z
1152
+ .custom()
1153
+ .check(z.describe('Event type the subscription listens to.')),
1154
+ expiresAt: z
1155
+ .nullable(z.string())
1156
+ .check(z.describe('ISO expiry timestamp (MPP-owned subscriptions), or null.')),
1157
+ failureCount: z
1158
+ .number()
1159
+ .check(z.int(), z.describe('Consecutive delivery failures; drives auto-disable.')),
1160
+ filters: z
1161
+ .custom()
1162
+ .check(z.describe('Event-type-specific filter predicates (`jsonb`).')),
1163
+ id: z
1164
+ .string()
1165
+ .check(z.describe('Subscription id (`wh_…`, lexically time-ordered).'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
1166
+ lastDeliveryAt: z
1167
+ .nullable(z.string())
1168
+ .check(z.describe('ISO timestamp of the last successful delivery, or null.')),
1169
+ ownerId: z
1170
+ .string()
1171
+ .check(z.describe('Owner identifier: `orgId` for `api_key` owners, `payer` for `mpp`.')),
1172
+ ownerType: z.custom().check(z.describe('Owner kind.')),
1173
+ pollerCursor: z
1174
+ .nullable(z.string())
1175
+ .check(z.describe('Poller keyset cursor, or null before the first tick.')),
1176
+ projectId: z
1177
+ .nullable(z.string())
1178
+ .check(z.describe('API-key project attribution for private resource events, or null.')),
1179
+ secret: z.string().check(z.describe('HMAC signing secret.')),
1180
+ status: z.custom().check(z.describe('Lifecycle status.')),
1181
+ updatedAt: z
1182
+ .string()
1183
+ .check(z.describe('ISO timestamp of the last mutation (`pollerCursor` writes excluded).')),
1184
+ });
772
1185
  //# sourceMappingURL=Schema.js.map