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.
- package/README.md +7 -4
- package/dist/ApiKey.js +1 -1
- package/dist/ApiKey.js.map +1 -1
- package/dist/ApiKeys.d.ts +95 -14
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +360 -49
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +12466 -10374
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +300 -22
- package/dist/App.js.map +1 -1
- package/dist/Assets.d.ts.map +1 -1
- package/dist/Assets.js +2 -1
- package/dist/Assets.js.map +1 -1
- package/dist/Handler.d.ts +0 -1
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js +0 -1
- package/dist/Handler.js.map +1 -1
- package/dist/Scope.d.ts +13 -5
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +16 -5
- package/dist/Scope.js.map +1 -1
- package/dist/Webhooks.js +1 -1
- package/dist/Webhooks.js.map +1 -1
- package/dist/admin/App.d.ts +3057 -546
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/App.js +26 -5
- package/dist/admin/App.js.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +179 -27
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +95 -43
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +1398 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.js +463 -7
- package/dist/admin/apps/earn-vaults.js.map +1 -1
- package/dist/admin/apps/organizations.d.ts +267 -15
- package/dist/admin/apps/organizations.d.ts.map +1 -1
- package/dist/admin/apps/organizations.js +241 -25
- package/dist/admin/apps/organizations.js.map +1 -1
- package/dist/admin/apps/routes-support.d.ts +95 -0
- package/dist/admin/apps/routes-support.d.ts.map +1 -0
- package/dist/admin/apps/routes-support.js +151 -0
- package/dist/admin/apps/routes-support.js.map +1 -0
- package/dist/admin/apps/routes.d.ts +2764 -0
- package/dist/admin/apps/routes.d.ts.map +1 -0
- package/dist/admin/apps/routes.js +728 -0
- package/dist/admin/apps/routes.js.map +1 -0
- package/dist/admin/apps/subsidies.d.ts +501 -0
- package/dist/admin/apps/subsidies.d.ts.map +1 -0
- package/dist/admin/apps/subsidies.js +384 -0
- package/dist/admin/apps/subsidies.js.map +1 -0
- package/dist/admin/apps/verified-tokens.d.ts +166 -160
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
- package/dist/admin/apps/verified-tokens.js +27 -7
- package/dist/admin/apps/verified-tokens.js.map +1 -1
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +201 -149
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +5 -2
- package/dist/analytics/Analytics.d.ts.map +1 -1
- package/dist/analytics/Analytics.js +31 -1
- package/dist/analytics/Analytics.js.map +1 -1
- package/dist/analytics/tables/requestEvents.d.ts +2 -1
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
- package/dist/analytics/tables/requestEvents.js +10 -1
- package/dist/analytics/tables/requestEvents.js.map +1 -1
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts +72 -0
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts.map +1 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js +56 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js.map +1 -0
- package/dist/apps/Zones.d.ts +21 -12526
- package/dist/apps/Zones.d.ts.map +1 -1
- package/dist/apps/Zones.js +37 -5
- package/dist/apps/Zones.js.map +1 -1
- package/dist/apps/data/App.d.ts +3971 -2595
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +76 -21
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +629 -299
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +495 -190
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +72 -0
- package/dist/apps/data/routes/addresses.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +116 -116
- package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
- package/dist/apps/data/routes/coingecko.js +47 -21
- package/dist/apps/data/routes/coingecko.js.map +1 -1
- package/dist/apps/data/routes/earn.d.ts +1450 -337
- package/dist/apps/data/routes/earn.d.ts.map +1 -1
- package/dist/apps/data/routes/earn.js +1226 -144
- package/dist/apps/data/routes/earn.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts +113 -108
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +41 -21
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +142 -17
- package/dist/apps/data/routes/indexer.d.ts.map +1 -1
- package/dist/apps/data/routes/indexer.js +83 -27
- package/dist/apps/data/routes/indexer.js.map +1 -1
- package/dist/apps/data/routes/receipts.d.ts +235 -235
- package/dist/apps/data/routes/rpc.d.ts +507 -33
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +309 -165
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +47 -15
- package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
- package/dist/apps/data/routes/tokenlist.js +68 -11
- package/dist/apps/data/routes/tokenlist.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +2 -0
- package/dist/apps/data/routes/tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/tokens.js +26 -14
- package/dist/apps/data/routes/tokens.js.map +1 -1
- package/dist/apps/data/routes/transfers.d.ts +93 -77
- package/dist/apps/data/routes/transfers.d.ts.map +1 -1
- package/dist/apps/data/routes/transfers.js +9 -7
- package/dist/apps/data/routes/transfers.js.map +1 -1
- package/dist/apps/data/routes/valuation.d.ts +32 -32
- package/dist/apps/data/routes/verified-tokens.d.ts +88 -88
- package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/verified-tokens.js +64 -20
- package/dist/apps/data/routes/verified-tokens.js.map +1 -1
- package/dist/apps/data/routes/webhooks.d.ts +614 -177
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +308 -205
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/data/routes/zones.d.ts +31 -31
- package/dist/apps/data/routes/zones.d.ts.map +1 -1
- package/dist/apps/data/routes/zones.js +20 -12
- package/dist/apps/data/routes/zones.js.map +1 -1
- package/dist/apps/docs/reference.js +2 -2
- package/dist/apps/docs/reference.js.map +1 -1
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/management/App.d.ts +3780 -3402
- package/dist/apps/management/App.d.ts.map +1 -1
- package/dist/apps/management/App.js +5 -14
- package/dist/apps/management/App.js.map +1 -1
- package/dist/apps/management/Billing.d.ts +48 -7
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +204 -25
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +317 -215
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.js +43 -15
- package/dist/apps/management/routes/api-keys.js.map +1 -1
- package/dist/apps/management/routes/billing.d.ts +290 -4
- package/dist/apps/management/routes/billing.d.ts.map +1 -1
- package/dist/apps/management/routes/billing.js +274 -49
- package/dist/apps/management/routes/billing.js.map +1 -1
- package/dist/apps/management/routes/faucet.d.ts +6 -6
- package/dist/apps/management/routes/faucet.js +1 -1
- package/dist/apps/management/routes/faucet.js.map +1 -1
- package/dist/apps/management/routes/invitations.d.ts +213 -138
- package/dist/apps/management/routes/invitations.d.ts.map +1 -1
- package/dist/apps/management/routes/invitations.js +117 -13
- package/dist/apps/management/routes/invitations.js.map +1 -1
- package/dist/apps/management/routes/invite-links.d.ts +166 -166
- package/dist/apps/management/routes/me.d.ts.map +1 -1
- package/dist/apps/management/routes/me.js +6 -2
- package/dist/apps/management/routes/me.js.map +1 -1
- package/dist/apps/management/routes/members.d.ts +30 -30
- package/dist/apps/management/routes/orgs.d.ts +103 -87
- package/dist/apps/management/routes/orgs.d.ts.map +1 -1
- package/dist/apps/management/routes/orgs.js +52 -12
- package/dist/apps/management/routes/orgs.js.map +1 -1
- package/dist/apps/management/routes/projects.d.ts +125 -125
- package/dist/apps/management/routes/projects.d.ts.map +1 -1
- package/dist/apps/management/routes/projects.js +6 -1
- package/dist/apps/management/routes/projects.js.map +1 -1
- package/dist/apps/management/routes/scopes.d.ts.map +1 -1
- package/dist/apps/management/routes/scopes.js +4 -1
- package/dist/apps/management/routes/scopes.js.map +1 -1
- package/dist/apps/management/routes/usage.d.ts +24 -24
- package/dist/apps/management/routes/usage.js +21 -4
- package/dist/apps/management/routes/usage.js.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.d.ts +95 -95
- package/dist/apps/management/routes/verified-token-requests.d.ts.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.js +7 -9
- package/dist/apps/management/routes/verified-token-requests.js.map +1 -1
- package/dist/apps/management/routes/webhooks.d.ts +682 -616
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +58 -12
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/mcp.d.ts +1 -1
- package/dist/apps/mcp.d.ts.map +1 -1
- package/dist/apps/mcp.js +23 -10
- package/dist/apps/mcp.js.map +1 -1
- package/dist/apps/mpp/App.d.ts +44 -44
- package/dist/apps/mpp/App.d.ts.map +1 -1
- package/dist/apps/mpp/App.js +35 -7
- package/dist/apps/mpp/App.js.map +1 -1
- package/dist/apps/mpp/internal/Adapter.d.ts +2 -0
- package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Adapter.js +30 -1
- package/dist/apps/mpp/internal/Adapter.js.map +1 -1
- package/dist/apps/mpp/internal/Policy.d.ts +22 -4
- package/dist/apps/mpp/internal/Policy.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Policy.js +24 -6
- package/dist/apps/mpp/internal/Policy.js.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.d.ts +3 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.js +6 -3
- package/dist/apps/mpp/internal/Sponsorship.js.map +1 -1
- package/dist/apps/relay/App.d.ts +2 -0
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +134 -75
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts +5 -3
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +209 -28
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/apps/{funding → routes}/Access.d.ts +4 -4
- package/dist/apps/routes/Access.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Access.js +4 -4
- package/dist/apps/routes/Access.js.map +1 -0
- package/dist/apps/{funding → routes}/App.d.ts +418 -124
- package/dist/apps/{funding → routes}/App.d.ts.map +1 -1
- package/dist/apps/{funding → routes}/App.js +16 -16
- package/dist/apps/routes/App.js.map +1 -0
- package/dist/apps/routes/Inventory.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Inventory.js +2 -2
- package/dist/apps/routes/Inventory.js.map +1 -0
- package/dist/apps/routes/index.d.ts +2 -0
- package/dist/apps/routes/index.d.ts.map +1 -0
- package/dist/apps/routes/index.js +2 -0
- package/dist/apps/routes/index.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.d.ts +32 -32
- package/dist/apps/routes/routes/chains.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.js +25 -25
- package/dist/apps/routes/routes/chains.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.d.ts +107 -43
- package/dist/apps/routes/routes/deposit-addresses.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.js +497 -222
- package/dist/apps/routes/routes/deposit-addresses.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/providers.d.ts +8 -8
- package/dist/apps/routes/routes/providers.d.ts.map +1 -0
- package/dist/apps/routes/routes/providers.js +57 -0
- package/dist/apps/routes/routes/providers.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.d.ts +106 -103
- package/dist/apps/routes/routes/quotes.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.js +55 -38
- package/dist/apps/routes/routes/quotes.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/transfers.d.ts +733 -428
- package/dist/apps/routes/routes/transfers.d.ts.map +1 -0
- package/dist/apps/routes/routes/transfers.js +1140 -0
- package/dist/apps/routes/routes/transfers.js.map +1 -0
- package/dist/cli/Cli.d.ts +30 -0
- package/dist/cli/Cli.d.ts.map +1 -1
- package/dist/cli/commands/admin.d.ts +36 -0
- package/dist/cli/commands/admin.d.ts.map +1 -1
- package/dist/cli/commands/admin.js +273 -0
- package/dist/cli/commands/admin.js.map +1 -1
- package/dist/cloudflare.d.ts +16 -14
- package/dist/cloudflare.d.ts.map +1 -1
- package/dist/cloudflare.js +26 -21
- package/dist/cloudflare.js.map +1 -1
- package/dist/db/Db.d.ts +63 -21
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +1035 -15
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +780 -133
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +575 -162
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts +4 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js +2 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts +73 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.js +142 -0
- package/dist/db/tables/apiKeyAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts +4 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js +2 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts +20 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js +57 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js.map +1 -0
- package/dist/db/tables/apiKeyRevocations.d.ts +21 -0
- package/dist/db/tables/apiKeyRevocations.d.ts.map +1 -0
- package/dist/db/tables/apiKeyRevocations.js +98 -0
- package/dist/db/tables/apiKeyRevocations.js.map +1 -0
- package/dist/db/tables/authAccounts.d.ts +47 -0
- package/dist/db/tables/authAccounts.d.ts.map +1 -0
- package/dist/db/tables/authAccounts.js +72 -0
- package/dist/db/tables/authAccounts.js.map +1 -0
- package/dist/db/tables/authSessions.d.ts +12 -0
- package/dist/db/tables/authSessions.d.ts.map +1 -0
- package/dist/db/tables/authSessions.js +2 -0
- package/dist/db/tables/authSessions.js.map +1 -0
- package/dist/db/tables/authVerifications.d.ts +12 -0
- package/dist/db/tables/authVerifications.d.ts.map +1 -0
- package/dist/db/tables/authVerifications.js +2 -0
- package/dist/db/tables/authVerifications.js.map +1 -0
- package/dist/db/tables/invitations.d.ts +17 -1
- package/dist/db/tables/invitations.d.ts.map +1 -1
- package/dist/db/tables/invitations.js +123 -43
- package/dist/db/tables/invitations.js.map +1 -1
- package/dist/db/tables/memberships.d.ts +8 -0
- package/dist/db/tables/memberships.d.ts.map +1 -1
- package/dist/db/tables/memberships.js +51 -2
- package/dist/db/tables/memberships.js.map +1 -1
- package/dist/db/tables/organizations.d.ts +32 -10
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +110 -49
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +2 -0
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +12 -3
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/requestUsage.d.ts.map +1 -1
- package/dist/db/tables/requestUsage.js.map +1 -1
- package/dist/db/tables/rewardAccounts.d.ts +86 -0
- package/dist/db/tables/rewardAccounts.d.ts.map +1 -0
- package/dist/db/tables/rewardAccounts.js +88 -0
- package/dist/db/tables/rewardAccounts.js.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts +36 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.js +30 -0
- package/dist/db/tables/rewardCampaignDistributors.js.map +1 -0
- package/dist/db/tables/rewardCampaigns.d.ts +171 -0
- package/dist/db/tables/rewardCampaigns.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaigns.js +392 -0
- package/dist/db/tables/rewardCampaigns.js.map +1 -0
- package/dist/db/tables/rewardCredits.d.ts +53 -0
- package/dist/db/tables/rewardCredits.d.ts.map +1 -0
- package/dist/db/tables/rewardCredits.js +63 -0
- package/dist/db/tables/rewardCredits.js.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts +61 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.js +103 -0
- package/dist/db/tables/rewardEligibilityAssociations.js.map +1 -0
- package/dist/db/tables/rewardRuns.d.ts +188 -0
- package/dist/db/tables/rewardRuns.d.ts.map +1 -0
- package/dist/db/tables/rewardRuns.js +278 -0
- package/dist/db/tables/rewardRuns.js.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts +100 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.js +163 -0
- package/dist/db/tables/rewardTransactionAttempts.js.map +1 -0
- package/dist/db/tables/routesCatalog.d.ts +58 -0
- package/dist/db/tables/routesCatalog.d.ts.map +1 -0
- package/dist/db/tables/{fundingCatalog.js → routesCatalog.js} +19 -19
- package/dist/db/tables/routesCatalog.js.map +1 -0
- package/dist/db/tables/routesDepositAddresses.d.ts +476 -0
- package/dist/db/tables/routesDepositAddresses.d.ts.map +1 -0
- package/dist/db/tables/routesDepositAddresses.js +587 -0
- package/dist/db/tables/routesDepositAddresses.js.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.d.ts → routesDepositRequestObservations.d.ts} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.d.ts.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.js → routesDepositRequestObservations.js} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.js.map +1 -0
- package/dist/db/tables/{fundingDeposits.d.ts → routesDeposits.d.ts} +210 -22
- package/dist/db/tables/routesDeposits.d.ts.map +1 -0
- package/dist/db/tables/routesDeposits.js +576 -0
- package/dist/db/tables/routesDeposits.js.map +1 -0
- package/dist/db/tables/routesIdempotency.d.ts +166 -0
- package/dist/db/tables/routesIdempotency.d.ts.map +1 -0
- package/dist/db/tables/routesIdempotency.js +330 -0
- package/dist/db/tables/routesIdempotency.js.map +1 -0
- package/dist/db/tables/routesSubsidies.d.ts +27 -0
- package/dist/db/tables/routesSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesSubsidies.js +45 -0
- package/dist/db/tables/routesSubsidies.js.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.d.ts → routesTransferEvents.d.ts} +3 -3
- package/dist/db/tables/routesTransferEvents.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.js → routesTransferEvents.js} +3 -3
- package/dist/db/tables/routesTransferEvents.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts +19 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.js +17 -0
- package/dist/db/tables/routesTransferSubsidies.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts +51 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js +82 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js.map +1 -0
- package/dist/db/tables/routesTransferTransactions.d.ts +77 -0
- package/dist/db/tables/routesTransferTransactions.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferTransactions.js → routesTransferTransactions.js} +31 -13
- package/dist/db/tables/routesTransferTransactions.js.map +1 -0
- package/dist/db/tables/routesTransfers.d.ts +319 -0
- package/dist/db/tables/routesTransfers.d.ts.map +1 -0
- package/dist/db/tables/routesTransfers.js +372 -0
- package/dist/db/tables/routesTransfers.js.map +1 -0
- package/dist/db/tables/sponsoredTransactions.d.ts +75 -20
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +124 -54
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/sponsorshipAttributions.d.ts +69 -0
- package/dist/db/tables/sponsorshipAttributions.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipAttributions.js +77 -0
- package/dist/db/tables/sponsorshipAttributions.js.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts +22 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js +45 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js.map +1 -0
- package/dist/db/tables/stripeCustomers.d.ts +11 -0
- package/dist/db/tables/stripeCustomers.d.ts.map +1 -1
- package/dist/db/tables/stripeCustomers.js +13 -0
- package/dist/db/tables/stripeCustomers.js.map +1 -1
- package/dist/db/tables/users.d.ts +17 -1
- package/dist/db/tables/users.d.ts.map +1 -1
- package/dist/db/tables/users.js +47 -2
- package/dist/db/tables/users.js.map +1 -1
- package/dist/db/tables/verifiedTokenRequests.d.ts +21 -4
- package/dist/db/tables/verifiedTokenRequests.d.ts.map +1 -1
- package/dist/db/tables/verifiedTokenRequests.js +65 -44
- package/dist/db/tables/verifiedTokenRequests.js.map +1 -1
- package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
- package/dist/db/tables/webhookQueueEvents.js +5 -1
- package/dist/db/tables/webhookQueueEvents.js.map +1 -1
- package/dist/db/tables/webhookSubscriptions.d.ts +19 -11
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +45 -13
- package/dist/db/tables/webhookSubscriptions.js.map +1 -1
- package/dist/handlers/internal/executionError.d.ts +2 -2
- package/dist/handlers/internal/executionError.d.ts.map +1 -1
- package/dist/handlers/internal/executionError.js +1 -2
- package/dist/handlers/internal/executionError.js.map +1 -1
- package/dist/handlers/internal/multisig.d.ts +4 -232
- package/dist/handlers/internal/multisig.d.ts.map +1 -1
- package/dist/handlers/internal/multisig.js +11 -537
- package/dist/handlers/internal/multisig.js.map +1 -1
- package/dist/handlers/internal/sponsorship.d.ts +19 -8
- package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
- package/dist/handlers/internal/sponsorship.js +13 -9
- package/dist/handlers/internal/sponsorship.js.map +1 -1
- package/dist/handlers/relay.d.ts +9 -12
- package/dist/handlers/relay.d.ts.map +1 -1
- package/dist/handlers/relay.js +81 -85
- package/dist/handlers/relay.js.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/AssetResponse.d.ts +12 -0
- package/dist/internal/AssetResponse.d.ts.map +1 -0
- package/dist/internal/AssetResponse.js +21 -0
- package/dist/internal/AssetResponse.js.map +1 -0
- package/dist/internal/Auth.d.ts +64 -12
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +631 -180
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/BetterAuth.d.ts +1488 -0
- package/dist/internal/BetterAuth.d.ts.map +1 -0
- package/dist/internal/BetterAuth.js +253 -0
- package/dist/internal/BetterAuth.js.map +1 -0
- package/dist/internal/Cache.d.ts +2 -0
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +2 -0
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/EarnRates.d.ts +26 -3
- package/dist/internal/EarnRates.d.ts.map +1 -1
- package/dist/internal/EarnRates.js +84 -19
- package/dist/internal/EarnRates.js.map +1 -1
- package/dist/internal/EarnSharePrices.d.ts +120 -0
- package/dist/internal/EarnSharePrices.d.ts.map +1 -0
- package/dist/internal/EarnSharePrices.js +179 -0
- package/dist/internal/EarnSharePrices.js.map +1 -0
- package/dist/internal/EarnVaults.d.ts +4 -0
- package/dist/internal/EarnVaults.d.ts.map +1 -1
- package/dist/internal/EarnVaults.js +27 -10
- package/dist/internal/EarnVaults.js.map +1 -1
- package/dist/internal/Email.d.ts +37 -0
- package/dist/internal/Email.d.ts.map +1 -0
- package/dist/internal/Email.js +16 -0
- package/dist/internal/Email.js.map +1 -0
- package/dist/internal/Log.d.ts +32 -28
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +18 -11
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/MetricSink.d.ts +3 -0
- package/dist/internal/MetricSink.d.ts.map +1 -1
- package/dist/internal/MetricSink.js +67 -8
- package/dist/internal/MetricSink.js.map +1 -1
- package/dist/internal/Mpp.d.ts.map +1 -1
- package/dist/internal/Mpp.js +20 -25
- package/dist/internal/Mpp.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +26 -3
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +25 -10
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/Provider.d.ts +1 -1
- package/dist/internal/Provider.d.ts.map +1 -1
- package/dist/internal/RateLimit.d.ts.map +1 -1
- package/dist/internal/RateLimit.js +13 -1
- package/dist/internal/RateLimit.js.map +1 -1
- package/dist/internal/Store.d.ts +16 -0
- package/dist/internal/Store.d.ts.map +1 -1
- package/dist/internal/Store.js +59 -8
- package/dist/internal/Store.js.map +1 -1
- package/dist/internal/Tidx.d.ts +9 -2
- package/dist/internal/Tidx.d.ts.map +1 -1
- package/dist/internal/Tidx.js +78 -11
- package/dist/internal/Tidx.js.map +1 -1
- package/dist/internal/Timing.d.ts +26 -0
- package/dist/internal/Timing.d.ts.map +1 -1
- package/dist/internal/Timing.js +63 -5
- package/dist/internal/Timing.js.map +1 -1
- package/dist/internal/VercelOidc.d.ts +94 -0
- package/dist/internal/VercelOidc.d.ts.map +1 -0
- package/dist/internal/VercelOidc.js +128 -0
- package/dist/internal/VercelOidc.js.map +1 -0
- package/dist/internal/VerifiedTokens.d.ts +2 -8
- package/dist/internal/VerifiedTokens.d.ts.map +1 -1
- package/dist/internal/VerifiedTokens.js +24 -24
- package/dist/internal/VerifiedTokens.js.map +1 -1
- package/dist/internal/Viem.d.ts +30 -2067
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +167 -17
- package/dist/internal/Viem.js.map +1 -1
- package/dist/internal/Webhooks.d.ts +12 -4
- package/dist/internal/Webhooks.d.ts.map +1 -1
- package/dist/internal/Webhooks.js +9 -3
- package/dist/internal/Webhooks.js.map +1 -1
- package/dist/internal/ZoneRpc.d.ts +7 -0
- package/dist/internal/ZoneRpc.d.ts.map +1 -0
- package/dist/internal/ZoneRpc.js +49 -0
- package/dist/internal/ZoneRpc.js.map +1 -0
- package/dist/internal/index.d.ts +3 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +3 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/rewards/Audit.d.ts +88 -0
- package/dist/internal/rewards/Audit.d.ts.map +1 -0
- package/dist/internal/rewards/Audit.js +134 -0
- package/dist/internal/rewards/Audit.js.map +1 -0
- package/dist/internal/rewards/Campaigns.d.ts +572 -0
- package/dist/internal/rewards/Campaigns.d.ts.map +1 -0
- package/dist/internal/rewards/Campaigns.js +531 -0
- package/dist/internal/rewards/Campaigns.js.map +1 -0
- package/dist/internal/rewards/Credits.d.ts +76 -0
- package/dist/internal/rewards/Credits.d.ts.map +1 -0
- package/dist/internal/rewards/Credits.js +95 -0
- package/dist/internal/rewards/Credits.js.map +1 -0
- package/dist/internal/rewards/Events.d.ts +100 -0
- package/dist/internal/rewards/Events.d.ts.map +1 -0
- package/dist/internal/rewards/Events.js +340 -0
- package/dist/internal/rewards/Events.js.map +1 -0
- package/dist/internal/rewards/Projection.d.ts +237 -0
- package/dist/internal/rewards/Projection.d.ts.map +1 -0
- package/dist/internal/rewards/Projection.js +616 -0
- package/dist/internal/rewards/Projection.js.map +1 -0
- package/dist/internal/rewards/Rates.d.ts +44 -0
- package/dist/internal/rewards/Rates.d.ts.map +1 -0
- package/dist/internal/rewards/Rates.js +60 -0
- package/dist/internal/rewards/Rates.js.map +1 -0
- package/dist/internal/rewards/Read.d.ts +158 -0
- package/dist/internal/rewards/Read.d.ts.map +1 -0
- package/dist/internal/rewards/Read.js +292 -0
- package/dist/internal/rewards/Read.js.map +1 -0
- package/dist/internal/rewards/Runner.d.ts +164 -0
- package/dist/internal/rewards/Runner.d.ts.map +1 -0
- package/dist/internal/rewards/Runner.js +1778 -0
- package/dist/internal/rewards/Runner.js.map +1 -0
- package/dist/internal/rewards/Signer.d.ts +224 -0
- package/dist/internal/rewards/Signer.d.ts.map +1 -0
- package/dist/internal/rewards/Signer.js +135 -0
- package/dist/internal/rewards/Signer.js.map +1 -0
- package/dist/internal/rewards/index.d.ts +15 -0
- package/dist/internal/rewards/index.d.ts.map +1 -0
- package/dist/internal/rewards/index.js +15 -0
- package/dist/internal/rewards/index.js.map +1 -0
- package/dist/internal/{funding → routes}/Action.d.ts +12 -1
- package/dist/internal/routes/Action.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Action.js +17 -9
- package/dist/internal/routes/Action.js.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.d.ts +20 -20
- package/dist/internal/routes/Catalog.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.js +29 -29
- package/dist/internal/routes/Catalog.js.map +1 -0
- package/dist/internal/{funding → routes}/Chain.d.ts +10 -10
- package/dist/internal/routes/Chain.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Chain.js +3 -3
- package/dist/internal/routes/Chain.js.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.d.ts +45 -23
- package/dist/internal/routes/Deposit.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.js +60 -27
- package/dist/internal/routes/Deposit.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.d.ts +56 -27
- package/dist/internal/routes/DepositAddress.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.js +95 -33
- package/dist/internal/routes/DepositAddress.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.d.ts +4 -4
- package/dist/internal/routes/DepositWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.js +4 -4
- package/dist/internal/routes/DepositWebhook.js.map +1 -0
- package/dist/internal/routes/Economics.d.ts +25 -0
- package/dist/internal/routes/Economics.d.ts.map +1 -0
- package/dist/internal/routes/Economics.js +28 -0
- package/dist/internal/routes/Economics.js.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.d.ts +3 -3
- package/dist/internal/routes/Evidence.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.js +7 -7
- package/dist/internal/routes/Evidence.js.map +1 -0
- package/dist/internal/routes/Observability.d.ts +154 -0
- package/dist/internal/routes/Observability.d.ts.map +1 -0
- package/dist/internal/routes/Observability.js +389 -0
- package/dist/internal/routes/Observability.js.map +1 -0
- package/dist/internal/{funding → routes}/Provider.d.ts +311 -105
- package/dist/internal/routes/Provider.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Provider.js +229 -98
- package/dist/internal/routes/Provider.js.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.d.ts +11 -6
- package/dist/internal/routes/Reconciliation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.js +408 -158
- package/dist/internal/routes/Reconciliation.js.map +1 -0
- package/dist/internal/routes/Route.d.ts +21 -0
- package/dist/internal/routes/Route.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Route.js +1 -1
- package/dist/internal/routes/Route.js.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.d.ts +6 -6
- package/dist/internal/routes/SourceObservation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.js +8 -8
- package/dist/internal/routes/SourceObservation.js.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.d.ts +48 -3
- package/dist/internal/routes/Subsidy.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.js +43 -3
- package/dist/internal/routes/Subsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/Token.d.ts +4 -4
- package/dist/internal/routes/Token.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Token.js +3 -3
- package/dist/internal/routes/Token.js.map +1 -0
- package/dist/internal/{funding → routes}/Transfer.d.ts +241 -46
- package/dist/internal/routes/Transfer.d.ts.map +1 -0
- package/dist/internal/routes/Transfer.js +728 -0
- package/dist/internal/routes/Transfer.js.map +1 -0
- package/dist/internal/{funding → routes}/TransferReconciliation.d.ts +13 -10
- package/dist/internal/routes/TransferReconciliation.d.ts.map +1 -0
- package/dist/internal/routes/TransferReconciliation.js +422 -0
- package/dist/internal/routes/TransferReconciliation.js.map +1 -0
- package/dist/internal/routes/TransferSubsidy.d.ts +201 -0
- package/dist/internal/routes/TransferSubsidy.d.ts.map +1 -0
- package/dist/internal/routes/TransferSubsidy.js +256 -0
- package/dist/internal/routes/TransferSubsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/TransferWebhook.d.ts +5 -5
- package/dist/internal/routes/TransferWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/TransferWebhook.js +3 -3
- package/dist/internal/routes/TransferWebhook.js.map +1 -0
- package/dist/internal/{funding → routes}/index.d.ts +2 -0
- package/dist/internal/routes/index.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/index.js +2 -0
- package/dist/internal/routes/index.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.d.ts +4 -4
- package/dist/internal/routes/providers/across.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.js +13 -13
- package/dist/internal/routes/providers/across.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.d.ts +21 -12
- package/dist/internal/routes/providers/relay.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.js +194 -110
- package/dist/internal/routes/providers/relay.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.d.ts +4 -4
- package/dist/internal/routes/providers/rhino.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.js +10 -10
- package/dist/internal/routes/providers/rhino.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.d.ts +4 -4
- package/dist/internal/routes/providers/squid.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.js +14 -14
- package/dist/internal/routes/providers/squid.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/stargate.d.ts +46 -18
- package/dist/internal/routes/providers/stargate.d.ts.map +1 -0
- package/dist/internal/routes/providers/stargate.js +898 -0
- package/dist/internal/routes/providers/stargate.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.d.ts +4 -4
- package/dist/internal/routes/providers/symbiosis.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.js +30 -20
- package/dist/internal/routes/providers/symbiosis.js.map +1 -0
- package/dist/internal/webhookDestinations/slack.js +12 -12
- package/dist/internal/webhookDestinations/slack.js.map +1 -1
- package/dist/providers/index.d.ts +12 -12
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +12 -12
- package/dist/providers/index.js.map +1 -1
- package/dist/server.d.ts +19 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +19 -0
- package/dist/server.js.map +1 -0
- package/package.json +15 -4
- package/src/ApiKey.ts +1 -1
- package/src/ApiKeys.test.ts +1033 -3
- package/src/ApiKeys.ts +489 -48
- package/src/App.test-d.ts +1 -1
- package/src/App.test.ts +216 -25
- package/src/App.ts +334 -31
- package/src/Assets.test.ts +2 -2
- package/src/Assets.ts +3 -1
- package/src/Auth.test-d.ts +1 -1
- package/src/Client.test-d.ts +539 -110
- package/src/Handler.ts +0 -1
- package/src/OpenApi.contract.test.ts +195 -0
- package/src/Scope.ts +17 -5
- package/src/Webhooks.ts +1 -1
- package/src/admin/App.test.ts +30 -2
- package/src/admin/App.ts +42 -6
- package/src/admin/apps/api-keys.test.ts +267 -5
- package/src/admin/apps/api-keys.ts +100 -50
- package/src/admin/apps/earn-vaults.test.ts +158 -0
- package/src/admin/apps/earn-vaults.ts +679 -6
- package/src/admin/apps/organizations.test.ts +306 -17
- package/src/admin/apps/organizations.ts +299 -24
- package/src/admin/apps/routes-support.test.ts +200 -0
- package/src/admin/apps/routes-support.ts +201 -0
- package/src/admin/apps/routes.test.ts +450 -0
- package/src/admin/apps/routes.ts +896 -0
- package/src/admin/apps/scopes.test.ts +15 -5
- package/src/admin/apps/subsidies.test.ts +306 -0
- package/src/admin/apps/subsidies.ts +457 -0
- package/src/admin/apps/verified-tokens.test.ts +40 -3
- package/src/admin/apps/verified-tokens.ts +33 -7
- package/src/admin/ui/plugin.ts +1 -2
- package/src/admin/ui/src/components/RewardCampaignForm.tsx +1009 -0
- package/src/admin/ui/src/lib/config.ts +11 -2
- package/src/admin/ui/src/lib/earn-vaults.ts +2 -2
- package/src/admin/ui/src/lib/organizations.test.ts +83 -50
- package/src/admin/ui/src/lib/organizations.ts +106 -25
- package/src/admin/ui/src/lib/query-client.ts +1 -1
- package/src/admin/ui/src/lib/reward-campaigns.ts +136 -0
- package/src/admin/ui/src/lib/routes.test.ts +88 -0
- package/src/admin/ui/src/lib/routes.ts +304 -0
- package/src/admin/ui/src/lib/subsidies.ts +75 -0
- package/src/admin/ui/src/lib/verified-tokens.ts +24 -9
- package/src/admin/ui/src/routeTree.gen.ts +63 -0
- package/src/admin/ui/src/routes/__root.tsx +13 -2
- package/src/admin/ui/src/routes/api-keys.tsx +196 -84
- package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +105 -70
- package/src/admin/ui/src/routes/organizations.tsx +34 -4
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +239 -23
- package/src/admin/ui/src/routes/routes.tsx +1615 -0
- package/src/admin/ui/src/routes/routes_.support.tsx +248 -0
- package/src/admin/ui/src/routes/subsidies.tsx +799 -0
- package/src/admin/ui/src/routes/verified-tokens.tsx +64 -20
- package/src/admin/ui.generated.ts +202 -188
- package/src/analytics/Analytics.test.ts +108 -18
- package/src/analytics/Analytics.ts +38 -6
- package/src/analytics/tables/requestEvents.test.ts +100 -0
- package/src/analytics/tables/requestEvents.ts +10 -1
- package/src/analytics/tables/routesLifecycleIntervals.ts +140 -0
- package/src/apps/Zones.test.ts +15 -0
- package/src/apps/Zones.ts +52 -5
- package/src/apps/composition.test.ts +68 -60
- package/src/apps/data/App.test.ts +180 -2
- package/src/apps/data/App.ts +88 -28
- package/src/apps/data/routes/activities.test.ts +419 -7
- package/src/apps/data/routes/activities.ts +683 -216
- package/src/apps/data/routes/balances.test.ts +2 -2
- package/src/apps/data/routes/blocks.test.ts +46 -1
- package/src/apps/data/routes/coingecko.test.ts +419 -1
- package/src/apps/data/routes/coingecko.ts +309 -253
- package/src/apps/data/routes/earn.discovery.test.ts +274 -0
- package/src/apps/data/routes/earn.test.ts +1294 -17
- package/src/apps/data/routes/earn.ts +1838 -321
- package/src/apps/data/routes/exchanges.test.ts +12 -15
- package/src/apps/data/routes/fee-amm.test.ts +243 -0
- package/src/apps/data/routes/fee-amm.ts +201 -162
- package/src/apps/data/routes/indexer.test.ts +389 -0
- package/src/apps/data/routes/indexer.ts +165 -69
- package/src/apps/data/routes/receipts.test.ts +1 -1
- package/src/apps/data/routes/rpc.test.ts +384 -8
- package/src/apps/data/routes/rpc.ts +452 -227
- package/src/apps/data/routes/rpc.zone.test.ts +340 -0
- package/src/apps/data/routes/tokenlist.test.ts +285 -0
- package/src/apps/data/routes/tokenlist.ts +173 -88
- package/src/apps/data/routes/tokens.test.ts +93 -3
- package/src/apps/data/routes/tokens.ts +39 -23
- package/src/apps/data/routes/transactions.test.ts +1 -1
- package/src/apps/data/routes/transfers.test.ts +56 -24
- package/src/apps/data/routes/transfers.ts +19 -8
- package/src/apps/data/routes/valuation.test.ts +1 -1
- package/src/apps/data/routes/verified-tokens.test.ts +345 -0
- package/src/apps/data/routes/verified-tokens.ts +99 -29
- package/src/apps/data/routes/webhooks.scan.test.ts +29 -0
- package/src/apps/data/routes/webhooks.test.ts +651 -83
- package/src/apps/data/routes/webhooks.ts +1113 -868
- package/src/apps/data/routes/zones.test.ts +148 -71
- package/src/apps/data/routes/zones.ts +71 -55
- package/src/apps/docs/reference.ts +2 -2
- package/src/apps/index.ts +1 -1
- package/src/apps/management/App.ts +9 -51
- package/src/apps/management/Billing.test.ts +375 -14
- package/src/apps/management/Billing.ts +265 -29
- package/src/apps/management/routes/api-keys.test.ts +269 -7
- package/src/apps/management/routes/api-keys.ts +61 -20
- package/src/apps/management/routes/billing.test.ts +477 -15
- package/src/apps/management/routes/billing.ts +377 -50
- package/src/apps/management/routes/faucet.test.ts +1 -1
- package/src/apps/management/routes/faucet.ts +1 -1
- package/src/apps/management/routes/invitations.test.ts +270 -3
- package/src/apps/management/routes/invitations.ts +185 -15
- package/src/apps/management/routes/invoicePreview.test.ts +549 -0
- package/src/apps/management/routes/me.test.ts +246 -5
- package/src/apps/management/routes/me.ts +7 -2
- package/src/apps/management/routes/members.test.ts +108 -0
- package/src/apps/management/routes/orgs.test.ts +191 -3
- package/src/apps/management/routes/orgs.ts +58 -11
- package/src/apps/management/routes/projects.test.ts +33 -3
- package/src/apps/management/routes/projects.ts +6 -1
- package/src/apps/management/routes/scopes.test.ts +30 -2
- package/src/apps/management/routes/scopes.ts +4 -1
- package/src/apps/management/routes/usage.test.ts +32 -0
- package/src/apps/management/routes/usage.ts +22 -4
- package/src/apps/management/routes/verified-token-requests.test.ts +16 -2
- package/src/apps/management/routes/verified-token-requests.ts +7 -10
- package/src/apps/management/routes/webhooks.test.ts +49 -26
- package/src/apps/management/routes/webhooks.ts +78 -22
- package/src/apps/mcp.test.ts +113 -30
- package/src/apps/mcp.ts +22 -10
- package/src/apps/mpp/App.ts +37 -7
- package/src/apps/mpp/Mpp.test.ts +49 -8
- package/src/apps/mpp/Mpp.zone.test.ts +219 -0
- package/src/apps/mpp/internal/Adapter.ts +34 -0
- package/src/apps/mpp/internal/Policy.test.ts +86 -31
- package/src/apps/mpp/internal/Policy.ts +49 -7
- package/src/apps/mpp/internal/Sponsorship.test.ts +207 -0
- package/src/apps/mpp/internal/Sponsorship.ts +9 -3
- package/src/apps/relay/App.test.ts +839 -64
- package/src/apps/relay/App.ts +148 -81
- package/src/apps/relay/App.zone-billing.test.ts +257 -0
- package/src/apps/relay/Sponsorships.test.ts +67 -4
- package/src/apps/relay/Sponsorships.ts +233 -32
- package/src/apps/relay/Sponsorships.zone.test.ts +102 -0
- package/src/apps/{funding → routes}/Access.ts +6 -6
- package/src/apps/routes/App.test.ts +165 -0
- package/src/apps/routes/App.ts +96 -0
- package/src/apps/{funding → routes}/Inventory.ts +2 -2
- package/src/apps/routes/index.ts +1 -0
- package/src/apps/{funding → routes}/routes/chains.test.ts +66 -66
- package/src/apps/{funding → routes}/routes/chains.ts +23 -23
- package/src/apps/{funding → routes}/routes/deposit-addresses.test.ts +1358 -458
- package/src/apps/{funding → routes}/routes/deposit-addresses.ts +566 -246
- package/src/apps/{funding → routes}/routes/providers.test.ts +27 -33
- package/src/apps/{funding → routes}/routes/providers.ts +23 -23
- package/src/apps/{funding → routes}/routes/quotes.test.ts +298 -41
- package/src/apps/{funding → routes}/routes/quotes.ts +57 -40
- package/src/apps/{funding → routes}/routes/transfers.test.ts +1100 -353
- package/src/apps/routes/routes/transfers.ts +1332 -0
- package/src/cli/Cli.test.ts +1 -1
- package/src/cli/commands/admin.test.ts +748 -1
- package/src/cli/commands/admin.ts +278 -0
- package/src/cloudflare.ts +52 -47
- package/src/db/Db.test.ts +245 -2
- package/src/db/Db.ts +1485 -34
- package/src/db/Schema.ts +729 -228
- package/src/db/tables/apiKeyAdmissionBootstraps.ts +4 -0
- package/src/db/tables/apiKeyAdmissions.ts +218 -0
- package/src/db/tables/apiKeyOwnerAdmissions.ts +4 -0
- package/src/db/tables/apiKeyOwnerTombstones.ts +81 -0
- package/src/db/tables/apiKeyRevocations.test.ts +74 -0
- package/src/db/tables/apiKeyRevocations.ts +121 -0
- package/src/db/tables/authAccounts.ts +105 -0
- package/src/db/tables/authSessions.ts +13 -0
- package/src/db/tables/authVerifications.ts +13 -0
- package/src/db/tables/invitations.ts +142 -45
- package/src/db/tables/memberships.ts +79 -3
- package/src/db/tables/organizations.test.ts +690 -13
- package/src/db/tables/organizations.ts +139 -55
- package/src/db/tables/projects.test.ts +16 -0
- package/src/db/tables/projects.ts +13 -3
- package/src/db/tables/requestUsage.ts +4 -1
- package/src/db/tables/rewardAccounts.ts +178 -0
- package/src/db/tables/rewardCampaignDistributors.ts +68 -0
- package/src/db/tables/rewardCampaigns.test.ts +1388 -0
- package/src/db/tables/rewardCampaigns.ts +647 -0
- package/src/db/tables/rewardCredits.ts +110 -0
- package/src/db/tables/rewardEligibilityAssociations.test.ts +271 -0
- package/src/db/tables/rewardEligibilityAssociations.ts +184 -0
- package/src/db/tables/rewardRuns.ts +514 -0
- package/src/db/tables/rewardTransactionAttempts.ts +272 -0
- package/src/db/tables/routesCatalog.test.ts +185 -0
- package/src/db/tables/routesCatalog.ts +163 -0
- package/src/db/tables/routesDepositAddresses.test.ts +1048 -0
- package/src/db/tables/routesDepositAddresses.ts +1008 -0
- package/src/db/tables/{fundingDepositRequestObservations.test.ts → routesDepositRequestObservations.test.ts} +13 -14
- package/src/db/tables/{fundingDepositRequestObservations.ts → routesDepositRequestObservations.ts} +10 -10
- package/src/db/tables/{fundingDeposits.test.ts → routesDeposits.test.ts} +388 -46
- package/src/db/tables/routesDeposits.ts +1062 -0
- package/src/db/tables/routesIdempotency.test.ts +796 -0
- package/src/db/tables/routesIdempotency.ts +496 -0
- package/src/db/tables/routesSubsidies.test.ts +120 -0
- package/src/db/tables/routesSubsidies.ts +71 -0
- package/src/db/tables/{fundingTransferEvents.ts → routesTransferEvents.ts} +4 -4
- package/src/db/tables/routesTransferSubsidies.ts +38 -0
- package/src/db/tables/routesTransferSubsidyNonces.ts +124 -0
- package/src/db/tables/routesTransferTransactions.test.ts +195 -0
- package/src/db/tables/{fundingTransferTransactions.ts → routesTransferTransactions.ts} +63 -18
- package/src/db/tables/routesTransfers.test.ts +338 -0
- package/src/db/tables/routesTransfers.ts +662 -0
- package/src/db/tables/sponsoredTransactions.test.ts +269 -45
- package/src/db/tables/sponsoredTransactions.ts +225 -65
- package/src/db/tables/sponsorshipAttributions.test.ts +160 -0
- package/src/db/tables/sponsorshipAttributions.ts +168 -0
- package/src/db/tables/sponsorshipReconciliationCursors.test.ts +115 -0
- package/src/db/tables/sponsorshipReconciliationCursors.ts +67 -0
- package/src/db/tables/stripeCustomers.test.ts +85 -0
- package/src/db/tables/stripeCustomers.ts +24 -0
- package/src/db/tables/users.test.ts +129 -0
- package/src/db/tables/users.ts +49 -3
- package/src/db/tables/verifiedTokenRequests.test.ts +39 -20
- package/src/db/tables/verifiedTokenRequests.ts +80 -44
- package/src/db/tables/webhookQueueEvents.ts +8 -1
- package/src/db/tables/webhookSubscriptions.ts +95 -20
- package/src/handlers/internal/executionError.ts +3 -4
- package/src/handlers/internal/multisig.ts +13 -816
- package/src/handlers/internal/sponsorship.ts +26 -10
- package/src/handlers/relay.test-d.ts +9 -1
- package/src/handlers/relay.test.ts +823 -3
- package/src/handlers/relay.ts +127 -107
- package/src/index.test-d.ts +7 -0
- package/src/index.ts +0 -17
- package/src/internal/AssetResponse.ts +26 -0
- package/src/internal/Auth.test.ts +1656 -9
- package/src/internal/Auth.ts +880 -244
- package/src/internal/BetterAuth.test.ts +242 -0
- package/src/internal/BetterAuth.ts +349 -0
- package/src/internal/Cache.ts +2 -0
- package/src/internal/EarnRates.test.ts +17 -0
- package/src/internal/EarnRates.ts +124 -31
- package/src/internal/EarnSharePrices.test.ts +182 -0
- package/src/internal/EarnSharePrices.ts +313 -0
- package/src/internal/EarnVaults.test.ts +21 -0
- package/src/internal/EarnVaults.ts +33 -11
- package/src/internal/Email.ts +54 -0
- package/src/internal/Idempotency.test.ts +2 -2
- package/src/internal/Log.test-d.ts +8 -7
- package/src/internal/Log.test.ts +114 -16
- package/src/internal/Log.ts +53 -40
- package/src/internal/MetricSink.test.ts +313 -26
- package/src/internal/MetricSink.ts +73 -8
- package/src/internal/Mpp.test.ts +31 -0
- package/src/internal/Mpp.ts +21 -24
- package/src/internal/OpenApi.ts +45 -12
- package/src/internal/Provider.test.ts +1 -1
- package/src/internal/Provider.ts +1 -1
- package/src/internal/RateLimit.test.ts +21 -3
- package/src/internal/RateLimit.ts +12 -1
- package/src/internal/Store.test-d.ts +1 -1
- package/src/internal/Store.test.ts +151 -8
- package/src/internal/Store.ts +76 -9
- package/src/internal/Tidx.test.ts +59 -8
- package/src/internal/Tidx.ts +86 -14
- package/src/internal/Timing.test.ts +77 -0
- package/src/internal/Timing.ts +83 -6
- package/src/internal/VercelOidc.test.ts +188 -0
- package/src/internal/VercelOidc.ts +193 -0
- package/src/internal/VerifiedTokens.test.ts +60 -6
- package/src/internal/VerifiedTokens.ts +21 -24
- package/src/internal/Viem.batch.test.ts +80 -0
- package/src/internal/Viem.test.ts +201 -2
- package/src/internal/Viem.ts +221 -25
- package/src/internal/Webhooks.test.ts +85 -6
- package/src/internal/Webhooks.ts +22 -4
- package/src/internal/ZoneRpc.ts +50 -0
- package/src/internal/exchange/Provider.test.ts +2 -2
- package/src/internal/index.test.ts +3 -1
- package/src/internal/index.ts +3 -1
- package/src/internal/rewards/Audit.ts +231 -0
- package/src/internal/rewards/Campaigns.test.ts +1234 -0
- package/src/internal/rewards/Campaigns.ts +1205 -0
- package/src/internal/rewards/Credits.ts +165 -0
- package/src/internal/rewards/Events.local.test.ts +113 -0
- package/src/internal/rewards/Events.test.ts +152 -0
- package/src/internal/rewards/Events.ts +468 -0
- package/src/internal/rewards/Projection.test.ts +681 -0
- package/src/internal/rewards/Projection.ts +987 -0
- package/src/internal/rewards/Rates.test.ts +171 -0
- package/src/internal/rewards/Rates.ts +110 -0
- package/src/internal/rewards/Read.test.ts +501 -0
- package/src/internal/rewards/Read.ts +476 -0
- package/src/internal/rewards/Runner.checkpoint.test.ts +80 -0
- package/src/internal/rewards/Runner.states.test.ts +188 -0
- package/src/internal/rewards/Runner.test.ts +90 -0
- package/src/internal/rewards/Runner.ts +2229 -0
- package/src/internal/rewards/Signer.test.ts +79 -0
- package/src/internal/rewards/Signer.ts +180 -0
- package/src/internal/rewards/index.ts +14 -0
- package/src/internal/{funding → routes}/Action.test.ts +63 -14
- package/src/internal/{funding → routes}/Action.ts +35 -8
- package/src/internal/{funding → routes}/Catalog.test.ts +3 -3
- package/src/internal/{funding → routes}/Catalog.ts +39 -39
- package/src/internal/{funding → routes}/Chain.test.ts +1 -1
- package/src/internal/{funding → routes}/Chain.ts +11 -11
- package/src/internal/{funding → routes}/Deposit.test.ts +1 -1
- package/src/internal/{funding → routes}/Deposit.ts +93 -45
- package/src/internal/{funding → routes}/DepositAddress.test.ts +11 -3
- package/src/internal/{funding → routes}/DepositAddress.ts +132 -53
- package/src/internal/{funding → routes}/DepositWebhook.test.ts +61 -18
- package/src/internal/{funding → routes}/DepositWebhook.ts +9 -9
- package/src/internal/routes/Economics.test.ts +42 -0
- package/src/internal/routes/Economics.ts +47 -0
- package/src/internal/{funding → routes}/Evidence.test.ts +6 -6
- package/src/internal/{funding → routes}/Evidence.ts +9 -9
- package/src/internal/routes/Observability.test.ts +636 -0
- package/src/internal/routes/Observability.ts +668 -0
- package/src/internal/{funding → routes}/Provider.test.ts +489 -153
- package/src/internal/{funding → routes}/Provider.ts +489 -186
- package/src/internal/{funding → routes}/Reconciliation.local.test.ts +84 -12
- package/src/internal/{funding → routes}/Reconciliation.test.ts +1213 -279
- package/src/internal/{funding → routes}/Reconciliation.ts +501 -203
- package/src/internal/routes/Reconciliation.unattributed.test.ts +250 -0
- package/src/internal/{funding → routes}/Route.ts +7 -7
- package/src/internal/{funding → routes}/SourceObservation.test.ts +13 -14
- package/src/internal/{funding → routes}/SourceObservation.ts +13 -13
- package/src/internal/{funding → routes}/Subsidy.local.test.ts +7 -7
- package/src/internal/routes/Subsidy.test.ts +169 -0
- package/src/internal/{funding → routes}/Subsidy.ts +86 -6
- package/src/internal/{funding → routes}/Token.test.ts +1 -1
- package/src/internal/{funding → routes}/Token.ts +5 -5
- package/src/internal/routes/Transfer.test.ts +1199 -0
- package/src/internal/routes/Transfer.ts +1206 -0
- package/src/internal/routes/TransferReconciliation.test.ts +731 -0
- package/src/internal/routes/TransferReconciliation.ts +527 -0
- package/src/internal/routes/TransferSubsidy.test.ts +172 -0
- package/src/internal/routes/TransferSubsidy.ts +447 -0
- package/src/internal/{funding → routes}/TransferWebhook.test.ts +13 -13
- package/src/internal/{funding → routes}/TransferWebhook.ts +7 -7
- package/src/internal/{funding → routes}/index.test.ts +5 -3
- package/src/internal/{funding → routes}/index.ts +2 -0
- package/src/internal/{funding → routes}/providers/across.ts +16 -16
- package/src/internal/{funding → routes}/providers/index.test.ts +157 -44
- package/src/internal/{funding → routes}/providers/relay.test.ts +224 -32
- package/src/internal/{funding → routes}/providers/relay.ts +228 -121
- package/src/internal/{funding → routes}/providers/rhino.ts +16 -16
- package/src/internal/{funding → routes}/providers/squid.ts +17 -17
- package/src/internal/routes/providers/stargate.test.ts +728 -0
- package/src/internal/routes/providers/stargate.ts +1276 -0
- package/src/internal/{funding → routes}/providers/symbiosis.ts +64 -24
- package/src/internal/webhookDestinations/slack.ts +10 -10
- package/src/providers/index.ts +13 -13
- package/src/server.ts +18 -0
- package/dist/apps/funding/Access.d.ts.map +0 -1
- package/dist/apps/funding/Access.js.map +0 -1
- package/dist/apps/funding/App.js.map +0 -1
- package/dist/apps/funding/Inventory.d.ts.map +0 -1
- package/dist/apps/funding/Inventory.js.map +0 -1
- package/dist/apps/funding/ProviderAttempts.d.ts +0 -5
- package/dist/apps/funding/ProviderAttempts.d.ts.map +0 -1
- package/dist/apps/funding/ProviderAttempts.js +0 -24
- package/dist/apps/funding/ProviderAttempts.js.map +0 -1
- package/dist/apps/funding/index.d.ts +0 -2
- package/dist/apps/funding/index.d.ts.map +0 -1
- package/dist/apps/funding/index.js +0 -2
- package/dist/apps/funding/index.js.map +0 -1
- package/dist/apps/funding/routes/chains.d.ts.map +0 -1
- package/dist/apps/funding/routes/chains.js.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.d.ts.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.js.map +0 -1
- package/dist/apps/funding/routes/providers.d.ts.map +0 -1
- package/dist/apps/funding/routes/providers.js +0 -57
- package/dist/apps/funding/routes/providers.js.map +0 -1
- package/dist/apps/funding/routes/quotes.d.ts.map +0 -1
- package/dist/apps/funding/routes/quotes.js.map +0 -1
- package/dist/apps/funding/routes/transfers.d.ts.map +0 -1
- package/dist/apps/funding/routes/transfers.js +0 -828
- package/dist/apps/funding/routes/transfers.js.map +0 -1
- package/dist/db/tables/fundingCatalog.d.ts +0 -58
- package/dist/db/tables/fundingCatalog.d.ts.map +0 -1
- package/dist/db/tables/fundingCatalog.js.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.d.ts +0 -192
- package/dist/db/tables/fundingDepositAddresses.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.js +0 -235
- package/dist/db/tables/fundingDepositAddresses.js.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.js.map +0 -1
- package/dist/db/tables/fundingDeposits.d.ts.map +0 -1
- package/dist/db/tables/fundingDeposits.js +0 -295
- package/dist/db/tables/fundingDeposits.js.map +0 -1
- package/dist/db/tables/fundingIdempotency.d.ts +0 -91
- package/dist/db/tables/fundingIdempotency.d.ts.map +0 -1
- package/dist/db/tables/fundingIdempotency.js +0 -103
- package/dist/db/tables/fundingIdempotency.js.map +0 -1
- package/dist/db/tables/fundingTransferEvents.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferEvents.js.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.d.ts +0 -53
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.js.map +0 -1
- package/dist/db/tables/fundingTransfers.d.ts +0 -99
- package/dist/db/tables/fundingTransfers.d.ts.map +0 -1
- package/dist/db/tables/fundingTransfers.js +0 -110
- package/dist/db/tables/fundingTransfers.js.map +0 -1
- package/dist/internal/funding/Action.d.ts.map +0 -1
- package/dist/internal/funding/Action.js.map +0 -1
- package/dist/internal/funding/Catalog.d.ts.map +0 -1
- package/dist/internal/funding/Catalog.js.map +0 -1
- package/dist/internal/funding/Chain.d.ts.map +0 -1
- package/dist/internal/funding/Chain.js.map +0 -1
- package/dist/internal/funding/Deposit.d.ts.map +0 -1
- package/dist/internal/funding/Deposit.js.map +0 -1
- package/dist/internal/funding/DepositAddress.d.ts.map +0 -1
- package/dist/internal/funding/DepositAddress.js.map +0 -1
- package/dist/internal/funding/DepositWebhook.d.ts.map +0 -1
- package/dist/internal/funding/DepositWebhook.js.map +0 -1
- package/dist/internal/funding/Evidence.d.ts.map +0 -1
- package/dist/internal/funding/Evidence.js.map +0 -1
- package/dist/internal/funding/Provider.d.ts.map +0 -1
- package/dist/internal/funding/Provider.js.map +0 -1
- package/dist/internal/funding/Reconciliation.d.ts.map +0 -1
- package/dist/internal/funding/Reconciliation.js.map +0 -1
- package/dist/internal/funding/Route.d.ts +0 -21
- package/dist/internal/funding/Route.d.ts.map +0 -1
- package/dist/internal/funding/Route.js.map +0 -1
- package/dist/internal/funding/SourceObservation.d.ts.map +0 -1
- package/dist/internal/funding/SourceObservation.js.map +0 -1
- package/dist/internal/funding/Subsidy.d.ts.map +0 -1
- package/dist/internal/funding/Subsidy.js.map +0 -1
- package/dist/internal/funding/Token.d.ts.map +0 -1
- package/dist/internal/funding/Token.js.map +0 -1
- package/dist/internal/funding/Transfer.d.ts.map +0 -1
- package/dist/internal/funding/Transfer.js +0 -462
- package/dist/internal/funding/Transfer.js.map +0 -1
- package/dist/internal/funding/TransferReconciliation.d.ts.map +0 -1
- package/dist/internal/funding/TransferReconciliation.js +0 -192
- package/dist/internal/funding/TransferReconciliation.js.map +0 -1
- package/dist/internal/funding/TransferWebhook.d.ts.map +0 -1
- package/dist/internal/funding/TransferWebhook.js.map +0 -1
- package/dist/internal/funding/index.d.ts.map +0 -1
- package/dist/internal/funding/index.js.map +0 -1
- package/dist/internal/funding/providers/across.d.ts.map +0 -1
- package/dist/internal/funding/providers/across.js.map +0 -1
- package/dist/internal/funding/providers/relay.d.ts.map +0 -1
- package/dist/internal/funding/providers/relay.js.map +0 -1
- package/dist/internal/funding/providers/rhino.d.ts.map +0 -1
- package/dist/internal/funding/providers/rhino.js.map +0 -1
- package/dist/internal/funding/providers/squid.d.ts.map +0 -1
- package/dist/internal/funding/providers/squid.js.map +0 -1
- package/dist/internal/funding/providers/stargate.d.ts.map +0 -1
- package/dist/internal/funding/providers/stargate.js +0 -579
- package/dist/internal/funding/providers/stargate.js.map +0 -1
- package/dist/internal/funding/providers/symbiosis.d.ts.map +0 -1
- package/dist/internal/funding/providers/symbiosis.js.map +0 -1
- package/src/apps/funding/App.test.ts +0 -78
- package/src/apps/funding/App.ts +0 -88
- package/src/apps/funding/ProviderAttempts.ts +0 -26
- package/src/apps/funding/index.ts +0 -1
- package/src/apps/funding/routes/transfers.ts +0 -987
- package/src/db/tables/fundingCatalog.test.ts +0 -122
- package/src/db/tables/fundingCatalog.ts +0 -163
- package/src/db/tables/fundingDepositAddresses.test.ts +0 -608
- package/src/db/tables/fundingDepositAddresses.ts +0 -443
- package/src/db/tables/fundingDeposits.ts +0 -572
- package/src/db/tables/fundingIdempotency.test.ts +0 -182
- package/src/db/tables/fundingIdempotency.ts +0 -180
- package/src/db/tables/fundingTransferTransactions.test.ts +0 -112
- package/src/db/tables/fundingTransfers.test.ts +0 -115
- package/src/db/tables/fundingTransfers.ts +0 -189
- package/src/handlers/internal/multisig.test.ts +0 -818
- package/src/internal/funding/Subsidy.test.ts +0 -75
- package/src/internal/funding/Transfer.test.ts +0 -524
- package/src/internal/funding/Transfer.ts +0 -762
- package/src/internal/funding/TransferReconciliation.test.ts +0 -147
- package/src/internal/funding/TransferReconciliation.ts +0 -264
- package/src/internal/funding/providers/stargate.test.ts +0 -328
- package/src/internal/funding/providers/stargate.ts +0 -856
- /package/dist/apps/{funding → routes}/Inventory.d.ts +0 -0
- /package/src/internal/{funding → routes}/Route.test.ts +0 -0
|
@@ -14,8 +14,8 @@ import * as Value from '../../../internal/Value.js';
|
|
|
14
14
|
import * as WebhookDestination from '../../../internal/WebhookDestination.js';
|
|
15
15
|
import * as WebhookTransfer from '../../../internal/WebhookTransfer.js';
|
|
16
16
|
import * as Webhooks from '../../../internal/Webhooks.js';
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
17
|
+
import * as RoutesDeposit from '../../../internal/routes/Deposit.js';
|
|
18
|
+
import * as RoutesTransfer from '../../../internal/routes/Transfer.js';
|
|
19
19
|
import * as Transactions from './transactions.js';
|
|
20
20
|
import * as Transfers from './transfers.js';
|
|
21
21
|
/** Default cap on live subscriptions per owner, overridable via `webhook.maxPerOwner`. */
|
|
@@ -35,20 +35,20 @@ const redactedSlackUrl = 'https://hooks.slack.com/…';
|
|
|
35
35
|
*/
|
|
36
36
|
export const eventTypes = [
|
|
37
37
|
'block:created',
|
|
38
|
-
'
|
|
39
|
-
'
|
|
38
|
+
'routes:deposit.updated',
|
|
39
|
+
'routes:transfer.updated',
|
|
40
40
|
'log:emitted',
|
|
41
41
|
'token:transfer',
|
|
42
42
|
'transaction:included',
|
|
43
43
|
];
|
|
44
|
-
/**
|
|
45
|
-
export const
|
|
46
|
-
'
|
|
47
|
-
'
|
|
44
|
+
/** Route resource events produced by the API instead of chain scans. */
|
|
45
|
+
export const routesEventTypes = [
|
|
46
|
+
'routes:deposit.updated',
|
|
47
|
+
'routes:transfer.updated',
|
|
48
48
|
];
|
|
49
|
-
/** Returns whether an event type carries an owner-scoped
|
|
50
|
-
export function
|
|
51
|
-
return
|
|
49
|
+
/** Returns whether an event type carries an owner-scoped route resource. */
|
|
50
|
+
export function isRoutesEventType(eventType) {
|
|
51
|
+
return routesEventTypes.includes(eventType);
|
|
52
52
|
}
|
|
53
53
|
/** Subscribable event types surfaced by `GET /webhooks/event-types`. */
|
|
54
54
|
const eventTypeDescriptions = [
|
|
@@ -57,12 +57,12 @@ const eventTypeDescriptions = [
|
|
|
57
57
|
type: 'block:created',
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
description: 'A
|
|
61
|
-
type: '
|
|
60
|
+
description: 'A route deposit materially changed after verified reconciliation, filterable by deposit address, recipient, or status.',
|
|
61
|
+
type: 'routes:deposit.updated',
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
description: 'A
|
|
65
|
-
type: '
|
|
64
|
+
description: 'A route transfer materially changed, filterable by transfer ID or lifecycle status.',
|
|
65
|
+
type: 'routes:transfer.updated',
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
description: 'Any contract event log, filtered by emitting address, event signature/topics, or decoded arguments.',
|
|
@@ -81,7 +81,7 @@ const eventTypeDescriptions = [
|
|
|
81
81
|
export var schema;
|
|
82
82
|
(function (schema) {
|
|
83
83
|
/** Subscribable event type. */
|
|
84
|
-
schema.EventType = z.enum(eventTypes).check(z.describe('Event type you can subscribe to.'));
|
|
84
|
+
schema.EventType = OpenApi.component(z.enum(eventTypes).check(z.describe('Event type you can subscribe to.')), 'WebhookSubscriptionEventType');
|
|
85
85
|
/** Subscription lifecycle status. */
|
|
86
86
|
schema.Status = z
|
|
87
87
|
.enum(['active', 'disabled', 'paused'])
|
|
@@ -106,42 +106,46 @@ export var schema;
|
|
|
106
106
|
* your Slack incoming-webhook URL), or a `betterstack` destination (a structured
|
|
107
107
|
* log event POSTed to a Better Stack source with a bearer source token).
|
|
108
108
|
*/
|
|
109
|
-
const
|
|
109
|
+
const DestinationSchema = z
|
|
110
110
|
.discriminatedUnion('type', [
|
|
111
111
|
z.object({
|
|
112
|
-
type: z.literal('url'),
|
|
112
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
113
113
|
url: Url,
|
|
114
114
|
}),
|
|
115
115
|
z.object({
|
|
116
|
-
type: z.literal('slack'),
|
|
116
|
+
type: z.literal('slack').check(z.meta({ examples: ['slack'] })),
|
|
117
117
|
url: SlackUrl,
|
|
118
118
|
}),
|
|
119
119
|
z.object({
|
|
120
120
|
token: BetterstackToken,
|
|
121
|
-
type: z.literal('betterstack'),
|
|
121
|
+
type: z.literal('betterstack').check(z.meta({ examples: ['betterstack'] })),
|
|
122
122
|
url: BetterstackUrl,
|
|
123
123
|
}),
|
|
124
124
|
])
|
|
125
|
-
.check(z.describe('Delivery destination: an HTTPS URL, a Slack incoming-webhook URL, or a Better Stack source.'));
|
|
126
|
-
const
|
|
125
|
+
.check(z.describe('Delivery destination: an HTTPS URL, a Slack incoming-webhook URL, or a Better Stack source.'), z.meta({ examples: [{ type: 'url', url: 'https://example.com/webhooks' }] }));
|
|
126
|
+
const Destination = OpenApi.component(DestinationSchema, 'WebhookDestination');
|
|
127
|
+
const PublicDestinationSchema = z
|
|
127
128
|
.discriminatedUnion('type', [
|
|
128
129
|
z.object({
|
|
129
|
-
type: z.literal('url'),
|
|
130
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
130
131
|
url: Url,
|
|
131
132
|
}),
|
|
132
133
|
z.object({
|
|
133
|
-
type: z.literal('slack'),
|
|
134
|
-
url: z
|
|
134
|
+
type: z.literal('slack').check(z.meta({ examples: ['slack'] })),
|
|
135
|
+
url: z
|
|
136
|
+
.literal(redactedSlackUrl)
|
|
137
|
+
.check(z.describe('Redacted Slack webhook URL.'), z.meta({ examples: [redactedSlackUrl] })),
|
|
135
138
|
}),
|
|
136
139
|
z.object({
|
|
137
140
|
token: z
|
|
138
141
|
.literal(redactedBetterstackToken)
|
|
139
|
-
.check(z.describe('Redacted Better Stack source token.')),
|
|
140
|
-
type: z.literal('betterstack'),
|
|
142
|
+
.check(z.describe('Redacted Better Stack source token.'), z.meta({ examples: [redactedBetterstackToken] })),
|
|
143
|
+
type: z.literal('betterstack').check(z.meta({ examples: ['betterstack'] })),
|
|
141
144
|
url: BetterstackUrl,
|
|
142
145
|
}),
|
|
143
146
|
])
|
|
144
|
-
.check(z.describe('Delivery destination with bearer credentials redacted.'));
|
|
147
|
+
.check(z.describe('Delivery destination with bearer credentials redacted.'), z.meta({ examples: [{ type: 'url', url: 'https://example.com/webhooks' }] }));
|
|
148
|
+
const PublicDestination = OpenApi.component(PublicDestinationSchema, 'WebhookPublicDestination');
|
|
145
149
|
/**
|
|
146
150
|
* Equality / membership operator for a filterable field. A consumer can pass a
|
|
147
151
|
* bare value (shorthand for exact equality, the common case) or an operator
|
|
@@ -173,7 +177,7 @@ export var schema;
|
|
|
173
177
|
lt: z.optional(Schema.Quantity),
|
|
174
178
|
lte: z.optional(Schema.Quantity),
|
|
175
179
|
})
|
|
176
|
-
.check(z.refine((c) => Object.keys(c).length > 0, { error: 'Comparison cannot be empty.' })),
|
|
180
|
+
.check(z.refine((c) => Object.keys(c).length > 0, { error: 'Comparison cannot be empty.' }), z.meta({ examples: [{ gte: '0x1' }] })),
|
|
177
181
|
]);
|
|
178
182
|
/**
|
|
179
183
|
* Byte/calldata-matching operator for hex fields (tx `input`, `calls[].input`).
|
|
@@ -191,7 +195,7 @@ export var schema;
|
|
|
191
195
|
* drift. All are optional and AND-combined; omit every field to subscribe to
|
|
192
196
|
* the full stream.
|
|
193
197
|
*/
|
|
194
|
-
schema.TransferFilters = Transfers.schema.Predicates.check(z.describe('Filters that narrow which TIP-20 transfer events trigger this webhook.'),
|
|
198
|
+
schema.TransferFilters = OpenApi.component(Transfers.schema.Predicates.check(z.describe('Filters that narrow which TIP-20 transfer events trigger this webhook.')), 'WebhookTransferFilters');
|
|
195
199
|
/**
|
|
196
200
|
* `transaction:included` subscription filters: operators over every column the
|
|
197
201
|
* `txs` envelope exposes, plus inner account-abstraction `calls` and the
|
|
@@ -201,7 +205,7 @@ export var schema;
|
|
|
201
205
|
* `address` matches either side (`from` OR `to`); when `includeCalls` is set
|
|
202
206
|
* (default), `to`/`address` also match an inner call target (`calls[].to`).
|
|
203
207
|
*/
|
|
204
|
-
schema.TxFilters = z
|
|
208
|
+
schema.TxFilters = OpenApi.component(z
|
|
205
209
|
.strictObject({
|
|
206
210
|
hash: z.optional(schema.eq(Schema.Hash).check(z.describe('Match this exact transaction hash (or any of several).'))),
|
|
207
211
|
address: z.optional(schema.eq(Schema.Address).check(z.describe('Match transactions where this address is the sender or recipient.'))),
|
|
@@ -230,7 +234,7 @@ export var schema;
|
|
|
230
234
|
blockNumber: z.optional(schema.compare.check(z.describe('Match the block-number bounds.'))),
|
|
231
235
|
timestamp: z.optional(schema.compare.check(z.describe('Match the block timestamp bounds (unix s).'))),
|
|
232
236
|
})
|
|
233
|
-
.check(z.describe('Filters that narrow which included transactions trigger this webhook.'),
|
|
237
|
+
.check(z.describe('Filters that narrow which included transactions trigger this webhook.')), 'WebhookTransactionFilters');
|
|
234
238
|
/** A 32-byte log topic (lowercased hex). */
|
|
235
239
|
const topic = Schema.Hash;
|
|
236
240
|
/**
|
|
@@ -241,7 +245,7 @@ export var schema;
|
|
|
241
245
|
* firehose), and an addressless filter must still be selective — an event
|
|
242
246
|
* anchor (`signature`/`topic0`) plus at least one indexed topic or argument.
|
|
243
247
|
*/
|
|
244
|
-
schema.LogFilters = z
|
|
248
|
+
schema.LogFilters = OpenApi.component(z
|
|
245
249
|
.strictObject({
|
|
246
250
|
address: z.optional(schema.eq(Schema.Address).check(z.describe('Only match logs emitted by this contract address (or any of several).'), z.meta({ examples: ['0x20c0000000000000000000008f5425160ebe5525'] }))),
|
|
247
251
|
signature: z.optional(z.string().check(z.describe('Human-readable ABI event signature used to derive `topic0` and decode `args`, e.g. `event Transfer(address indexed from, address indexed to, uint256 value)`.'), z.meta({
|
|
@@ -264,7 +268,9 @@ export var schema;
|
|
|
264
268
|
.check(z.describe('Match decoded event arguments by name (indexed or non-indexed). Requires `signature`. Each value is an exact value or a super admin object.'), z.meta({ examples: [{ to: '0x9e39034aae71fb89f66061a2602eb6efec271754' }] }))),
|
|
265
269
|
blockNumber: z.optional(schema.compare.check(z.describe('Only match logs within these block-number bounds.'))),
|
|
266
270
|
})
|
|
267
|
-
.check(z.describe('Filters that narrow which contract event logs trigger this webhook.'), z.meta({
|
|
271
|
+
.check(z.describe('Filters that narrow which contract event logs trigger this webhook.'), z.meta({
|
|
272
|
+
examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }],
|
|
273
|
+
}), z.refine((f) => Object.keys(f).length > 0, {
|
|
268
274
|
error: 'At least one log filter is required.',
|
|
269
275
|
}), z.refine((f) => !(f.signature && f.topic0), {
|
|
270
276
|
error: 'Pass `signature` or `topic0`, not both.',
|
|
@@ -272,14 +278,14 @@ export var schema;
|
|
|
272
278
|
error: '`args` requires `signature` to decode the event.',
|
|
273
279
|
}), z.refine((f) => hasLogPushdown(f), {
|
|
274
280
|
error: 'Log filters must include a pushdown-capable address or an event/topic0 anchor plus an indexed topic or argument.',
|
|
275
|
-
}));
|
|
281
|
+
})), 'WebhookLogFilters');
|
|
276
282
|
/**
|
|
277
283
|
* `block:created` subscription filters. All optional and AND-combined; unlike
|
|
278
284
|
* `log:emitted`, an empty filter is allowed — one row per block is a bounded,
|
|
279
285
|
* non-abusive heartbeat feed. Block-level metadata only (no transaction
|
|
280
286
|
* predicates; use `transaction:included` for those).
|
|
281
287
|
*/
|
|
282
|
-
schema.BlockFilters = z
|
|
288
|
+
schema.BlockFilters = OpenApi.component(z
|
|
283
289
|
.strictObject({
|
|
284
290
|
number: z.optional(schema.compare.check(z.describe('Only match blocks within these block-number bounds.'))),
|
|
285
291
|
miner: z.optional(schema.eq(Schema.Address).check(z.describe('Only match blocks produced by this address (the miner/producer).'), z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }))),
|
|
@@ -288,28 +294,28 @@ export var schema;
|
|
|
288
294
|
gasLimit: z.optional(schema.compare.check(z.describe('Only match blocks whose gas limit is within these bounds.'))),
|
|
289
295
|
timestamp: z.optional(schema.compare.check(z.describe('Only match blocks whose unix timestamp (seconds) is within these bounds.'))),
|
|
290
296
|
})
|
|
291
|
-
.check(z.describe('Filters that narrow which new blocks trigger this webhook.'),
|
|
292
|
-
/** `
|
|
293
|
-
schema.
|
|
297
|
+
.check(z.describe('Filters that narrow which new blocks trigger this webhook.')), 'WebhookBlockFilters');
|
|
298
|
+
/** `routes:deposit.updated` subscription filters. All are optional and AND-combined. */
|
|
299
|
+
schema.RoutesDepositFilters = OpenApi.component(z
|
|
294
300
|
.strictObject({
|
|
295
|
-
depositAddressId: z.optional(
|
|
301
|
+
depositAddressId: z.optional(RoutesDeposit.schema.Snapshot.shape.depositAddressId),
|
|
296
302
|
recipient: z.optional(Schema.Address),
|
|
297
|
-
status: z.optional(
|
|
303
|
+
status: z.optional(RoutesDeposit.schema.Status),
|
|
298
304
|
})
|
|
299
|
-
.check(z.describe('Filters that narrow which
|
|
300
|
-
/** `
|
|
301
|
-
schema.
|
|
305
|
+
.check(z.describe('Filters that narrow which route deposit changes trigger this webhook.')), 'WebhookRoutesDepositFilters');
|
|
306
|
+
/** `routes:transfer.updated` subscription filters. All are optional and AND-combined. */
|
|
307
|
+
schema.RoutesTransferFilters = OpenApi.component(z
|
|
302
308
|
.strictObject({
|
|
303
|
-
id: z.optional(
|
|
304
|
-
status: z.optional(
|
|
309
|
+
id: z.optional(RoutesTransfer.schema.RoutesTransfer.shape.id),
|
|
310
|
+
status: z.optional(RoutesTransfer.schema.Status),
|
|
305
311
|
})
|
|
306
|
-
.check(z.describe('Filters that narrow which
|
|
312
|
+
.check(z.describe('Filters that narrow which route transfer changes trigger this webhook.')), 'WebhookRoutesTransferFilters');
|
|
307
313
|
/**
|
|
308
314
|
* Optional human context describing what a subscription is for. Surfaced by
|
|
309
315
|
* destinations (Slack header + description, Better Stack log fields) and echoed
|
|
310
316
|
* on every delivered event envelope.
|
|
311
317
|
*/
|
|
312
|
-
schema.Context = z
|
|
318
|
+
schema.Context = OpenApi.component(z
|
|
313
319
|
.object({
|
|
314
320
|
description: z.optional(z
|
|
315
321
|
.string()
|
|
@@ -323,15 +329,17 @@ export var schema;
|
|
|
323
329
|
.string()
|
|
324
330
|
.check(z.maxLength(120), z.describe('Short label for this subscription.'), z.meta({ examples: ['Prod USDC large transfers'] }))),
|
|
325
331
|
})
|
|
326
|
-
.check(z.describe('Human context describing what this webhook subscription is for.'));
|
|
332
|
+
.check(z.describe('Human context describing what this webhook subscription is for.')), 'WebhookContext');
|
|
327
333
|
/**
|
|
328
334
|
* Public subscription representation. Never includes the signing `secret`
|
|
329
335
|
* (returned once by `POST /webhooks`) or the internal owner.
|
|
330
336
|
*/
|
|
331
|
-
schema.Subscription = z
|
|
337
|
+
schema.Subscription = OpenApi.component(z
|
|
332
338
|
.object({
|
|
333
339
|
chainId: chainIdResponse,
|
|
334
|
-
context: z
|
|
340
|
+
context: z
|
|
341
|
+
.optional(schema.Context)
|
|
342
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
335
343
|
createdAt: z.iso
|
|
336
344
|
.datetime()
|
|
337
345
|
.check(z.describe('When the subscription was created, as an ISO 8601 timestamp.'), z.meta({ examples: ['2024-01-01T00:00:00Z'] })),
|
|
@@ -358,13 +366,13 @@ export var schema;
|
|
|
358
366
|
.datetime()
|
|
359
367
|
.check(z.describe('When the subscription was last changed, as an ISO 8601 timestamp.'), z.meta({ examples: ['2024-01-01T00:00:00Z'] })),
|
|
360
368
|
})
|
|
361
|
-
.check(z.describe('A webhook subscription that tells Tempo which onchain events to send to
|
|
369
|
+
.check(z.describe('A webhook subscription that tells Tempo which onchain events to send to its destination.')), 'Webhook');
|
|
362
370
|
/** Outcome of a single delivery attempt. */
|
|
363
371
|
schema.DeliveryStatus = z
|
|
364
372
|
.enum(['failed', 'pending', 'succeeded'])
|
|
365
373
|
.check(z.describe('Outcome of a webhook delivery attempt.'), z.meta({ examples: ['succeeded'] }));
|
|
366
374
|
/** A logged delivery attempt for a subscription. */
|
|
367
|
-
schema.Delivery = z
|
|
375
|
+
schema.Delivery = OpenApi.component(z
|
|
368
376
|
.object({
|
|
369
377
|
attempt: z
|
|
370
378
|
.number()
|
|
@@ -382,7 +390,7 @@ export var schema;
|
|
|
382
390
|
.string()
|
|
383
391
|
.check(z.describe('Webhook delivery ID (`whd_…`).'), z.meta({ examples: ['whd_001718668800000_C1yJkk7CuML98HFthEDk9PsY'] })),
|
|
384
392
|
requestUrl: z
|
|
385
|
-
.
|
|
393
|
+
.url()
|
|
386
394
|
.check(z.describe('Your callback URL that Tempo attempted to deliver to.'), z.meta({ examples: ['https://example.com/webhooks'] })),
|
|
387
395
|
responseMs: z
|
|
388
396
|
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
@@ -395,14 +403,14 @@ export var schema;
|
|
|
395
403
|
.string()
|
|
396
404
|
.check(z.describe('Subscription ID (`wh_…`) this delivery belongs to.'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
|
|
397
405
|
})
|
|
398
|
-
.check(z.describe('One attempt by Tempo to deliver an event to
|
|
406
|
+
.check(z.describe('One attempt by Tempo to deliver an event to a webhook destination.')), 'WebhookDelivery');
|
|
399
407
|
/**
|
|
400
408
|
* A `transfer` event payload: the decoded TIP-20 `Transfer` row. Mirrors a
|
|
401
409
|
* `GET /transfers` row but without the `sourceToken` metadata enrichment the
|
|
402
410
|
* read endpoint adds (webhook delivery does not perform per-event token
|
|
403
411
|
* lookups).
|
|
404
412
|
*/
|
|
405
|
-
schema.TransferEvent = z
|
|
413
|
+
schema.TransferEvent = OpenApi.component(z
|
|
406
414
|
.object({
|
|
407
415
|
address: Schema.TokenAddress.check(z.describe('TIP-20 token contract address.'), z.meta({ examples: ['0x20c0000000000000000000008f5425160ebe5525'] })),
|
|
408
416
|
amount: z
|
|
@@ -430,12 +438,12 @@ export var schema;
|
|
|
430
438
|
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
431
439
|
})),
|
|
432
440
|
})
|
|
433
|
-
.check(z.describe('Payload for a `token:transfer` event, decoded from a TIP-20 `Transfer` log.'));
|
|
441
|
+
.check(z.describe('Payload for a `token:transfer` event, decoded from a TIP-20 `Transfer` log.')), 'WebhookTransferEvent');
|
|
434
442
|
/**
|
|
435
443
|
* A `transaction` event payload using the humanized transaction shape without
|
|
436
444
|
* opt-in read resources such as receipts.
|
|
437
445
|
*/
|
|
438
|
-
schema.TransactionEvent = z
|
|
446
|
+
schema.TransactionEvent = OpenApi.component(z
|
|
439
447
|
.object({
|
|
440
448
|
...Transactions.schema.Transaction.shape,
|
|
441
449
|
meta: z
|
|
@@ -444,14 +452,14 @@ export var schema;
|
|
|
444
452
|
})
|
|
445
453
|
.check(z.describe('Metadata for this transaction webhook event.')),
|
|
446
454
|
})
|
|
447
|
-
.check(z.describe('A transaction included in a block.'));
|
|
455
|
+
.check(z.describe('A transaction included in a block.')), 'WebhookTransactionEvent');
|
|
448
456
|
/**
|
|
449
457
|
* A `log:emitted` event payload: the raw contract event log. When a
|
|
450
458
|
* `signature` filter was supplied and decoding succeeds, the best-effort
|
|
451
459
|
* `event`/`args` fields carry the decoded event name and arguments (large
|
|
452
460
|
* integers as decimal strings).
|
|
453
461
|
*/
|
|
454
|
-
schema.LogEvent = z
|
|
462
|
+
schema.LogEvent = OpenApi.component(z
|
|
455
463
|
.object({
|
|
456
464
|
address: Schema.Address.check(z.describe('Contract that emitted the log.'), z.meta({ examples: ['0x20c00000000000000000000071de0cd31ab0d105'] })),
|
|
457
465
|
args: z.optional(z
|
|
@@ -484,8 +492,9 @@ export var schema;
|
|
|
484
492
|
timestamp: z.iso
|
|
485
493
|
.datetime()
|
|
486
494
|
.check(z.describe('When the block was produced, as an ISO 8601 timestamp.'), z.meta({ examples: ['2026-01-14T18:38:03.685Z'] })),
|
|
487
|
-
topics: z.array(Schema.Hash).check(z.describe('
|
|
495
|
+
topics: z.array(Schema.Hash).check(z.describe('Zero to four log topics; non-anonymous events start with the event signature hash.'), z.meta({
|
|
488
496
|
examples: [
|
|
497
|
+
[],
|
|
489
498
|
[
|
|
490
499
|
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
|
|
491
500
|
'0x000000000000000000000000e7687128b0a808c2831ff94d4f7b2fb35c65af38',
|
|
@@ -499,9 +508,9 @@ export var schema;
|
|
|
499
508
|
.number()
|
|
500
509
|
.check(z.int(), z.nonnegative(), z.describe('Index of the transaction within its block.'), z.meta({ examples: [0] })),
|
|
501
510
|
})
|
|
502
|
-
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).'));
|
|
511
|
+
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).')), 'WebhookLogEvent');
|
|
503
512
|
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
504
|
-
schema.BlockEvent = z
|
|
513
|
+
schema.BlockEvent = OpenApi.component(z
|
|
505
514
|
.object({
|
|
506
515
|
number: z
|
|
507
516
|
.number()
|
|
@@ -527,21 +536,25 @@ export var schema;
|
|
|
527
536
|
.datetime()
|
|
528
537
|
.check(z.describe('When the block was produced, as an ISO 8601 timestamp.'), z.meta({ examples: ['2026-01-14T18:38:03.685Z'] })),
|
|
529
538
|
})
|
|
530
|
-
.check(z.describe('Payload for a `block:created` event (a new block header).'));
|
|
531
|
-
/** Public
|
|
532
|
-
schema.
|
|
533
|
-
/** Public
|
|
534
|
-
schema.
|
|
539
|
+
.check(z.describe('Payload for a `block:created` event (a new block header).')), 'WebhookBlockEvent');
|
|
540
|
+
/** Public route deposit after a committed material change. */
|
|
541
|
+
schema.RoutesDepositEvent = RoutesDeposit.schema.RoutesDeposit;
|
|
542
|
+
/** Public route transfer after a committed material change. */
|
|
543
|
+
schema.RoutesTransferEvent = RoutesTransfer.schema.RoutesTransfer;
|
|
535
544
|
/** A `ping` (synthetic test-delivery) payload, sent by `POST /webhooks/:id/ping`. */
|
|
536
|
-
schema.PingEvent = z
|
|
545
|
+
schema.PingEvent = OpenApi.component(z
|
|
537
546
|
.object({
|
|
538
|
-
ping: z
|
|
547
|
+
ping: z
|
|
548
|
+
.literal(true)
|
|
549
|
+
.check(z.describe('Marks this payload as a synthetic ping test.'), z.meta({ examples: [true] })),
|
|
539
550
|
})
|
|
540
|
-
.check(z.describe('Payload for a webhook ping test delivery.'));
|
|
551
|
+
.check(z.describe('Payload for a webhook ping test delivery.')), 'WebhookPingEvent');
|
|
541
552
|
/** Fields common to every delivery envelope. */
|
|
542
553
|
const envelopeBase = {
|
|
543
554
|
chainId: Schema.ChainId,
|
|
544
|
-
context: z
|
|
555
|
+
context: z
|
|
556
|
+
.optional(schema.Context)
|
|
557
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
545
558
|
createdAt: z.iso
|
|
546
559
|
.datetime()
|
|
547
560
|
.check(z.describe('When Tempo built this delivery envelope, as an ISO 8601 timestamp.'), z.meta({ examples: ['2026-01-14T18:38:03.000Z'] })),
|
|
@@ -561,139 +574,176 @@ export var schema;
|
|
|
561
574
|
* variant selector — without per-variant titles, inline `oneOf` members render
|
|
562
575
|
* as a single (first) collapsed schema.
|
|
563
576
|
*/
|
|
564
|
-
schema.Envelope = z
|
|
577
|
+
schema.Envelope = OpenApi.component(z
|
|
565
578
|
.discriminatedUnion('type', [
|
|
566
579
|
z
|
|
567
|
-
.object({
|
|
580
|
+
.object({
|
|
581
|
+
...envelopeBase,
|
|
582
|
+
data: schema.TransferEvent,
|
|
583
|
+
type: z.literal('token:transfer').check(z.meta({ examples: ['token:transfer'] })),
|
|
584
|
+
})
|
|
568
585
|
.check(z.meta({ title: 'Transfer event' })),
|
|
569
586
|
z
|
|
570
587
|
.object({
|
|
571
588
|
...envelopeBase,
|
|
572
589
|
data: schema.TransactionEvent,
|
|
573
|
-
type: z
|
|
590
|
+
type: z
|
|
591
|
+
.literal('transaction:included')
|
|
592
|
+
.check(z.meta({ examples: ['transaction:included'] })),
|
|
574
593
|
})
|
|
575
594
|
.check(z.meta({ title: 'Included transaction event' })),
|
|
576
595
|
z
|
|
577
|
-
.object({
|
|
596
|
+
.object({
|
|
597
|
+
...envelopeBase,
|
|
598
|
+
data: schema.LogEvent,
|
|
599
|
+
type: z.literal('log:emitted').check(z.meta({ examples: ['log:emitted'] })),
|
|
600
|
+
})
|
|
578
601
|
.check(z.meta({ title: 'Log event' })),
|
|
579
602
|
z
|
|
580
|
-
.object({
|
|
603
|
+
.object({
|
|
604
|
+
...envelopeBase,
|
|
605
|
+
data: schema.BlockEvent,
|
|
606
|
+
type: z.literal('block:created').check(z.meta({ examples: ['block:created'] })),
|
|
607
|
+
})
|
|
581
608
|
.check(z.meta({ title: 'Block event' })),
|
|
582
609
|
z
|
|
583
610
|
.object({
|
|
584
611
|
...envelopeBase,
|
|
585
|
-
data: schema.
|
|
586
|
-
type: z
|
|
612
|
+
data: schema.RoutesDepositEvent,
|
|
613
|
+
type: z
|
|
614
|
+
.literal('routes:deposit.updated')
|
|
615
|
+
.check(z.meta({ examples: ['routes:deposit.updated'] })),
|
|
587
616
|
})
|
|
588
|
-
.check(z.meta({ title: '
|
|
617
|
+
.check(z.meta({ title: 'Route deposit updated event' })),
|
|
589
618
|
z
|
|
590
619
|
.object({
|
|
591
620
|
...envelopeBase,
|
|
592
|
-
data: schema.
|
|
593
|
-
type: z
|
|
621
|
+
data: schema.RoutesTransferEvent,
|
|
622
|
+
type: z
|
|
623
|
+
.literal('routes:transfer.updated')
|
|
624
|
+
.check(z.meta({ examples: ['routes:transfer.updated'] })),
|
|
594
625
|
})
|
|
595
|
-
.check(z.meta({ title: '
|
|
626
|
+
.check(z.meta({ title: 'Route transfer updated event' })),
|
|
596
627
|
z
|
|
597
|
-
.object({
|
|
628
|
+
.object({
|
|
629
|
+
...envelopeBase,
|
|
630
|
+
data: schema.PingEvent,
|
|
631
|
+
type: z.literal('ping').check(z.meta({ examples: ['ping'] })),
|
|
632
|
+
})
|
|
598
633
|
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
599
634
|
])
|
|
600
|
-
.check(z.describe('The signed JSON payload Tempo POSTs to
|
|
635
|
+
.check(z.describe('The signed JSON payload Tempo POSTs to a webhook destination.')), 'WebhookEventEnvelope');
|
|
601
636
|
/** Schemas for the getWebhookEventTypes operation. */
|
|
602
637
|
let getWebhookEventTypes;
|
|
603
638
|
(function (getWebhookEventTypes) {
|
|
604
|
-
|
|
639
|
+
const EventTypeEntry = OpenApi.component(z
|
|
605
640
|
.object({
|
|
606
|
-
|
|
607
|
-
.
|
|
608
|
-
description:
|
|
609
|
-
|
|
610
|
-
.check(z.describe('Plain-English description of the event type.'), z.meta({ examples: ['TIP-20 token transfer event.'] })),
|
|
611
|
-
type: schema.EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
612
|
-
}))
|
|
613
|
-
.check(z.describe('Webhook event types available for subscription.')),
|
|
641
|
+
description: z
|
|
642
|
+
.string()
|
|
643
|
+
.check(z.describe('Plain-English description of the event type.'), z.meta({ examples: ['TIP-20 token transfer event.'] })),
|
|
644
|
+
type: schema.EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
614
645
|
})
|
|
615
|
-
.check(z.describe('
|
|
646
|
+
.check(z.describe('One webhook event type available for subscription.')), 'WebhookEventType');
|
|
647
|
+
getWebhookEventTypes.Response = OpenApi.component(z
|
|
648
|
+
.object({
|
|
649
|
+
data: z.array(EventTypeEntry).check(z.describe('Webhook event types available for subscription.'), z.meta({
|
|
650
|
+
examples: [[{ description: 'TIP-20 token transfer event.', type: 'token:transfer' }]],
|
|
651
|
+
})),
|
|
652
|
+
})
|
|
653
|
+
.check(z.describe('List of webhook event types Tempo can send.')), 'WebhookEventTypeList');
|
|
616
654
|
})(getWebhookEventTypes = schema.getWebhookEventTypes || (schema.getWebhookEventTypes = {}));
|
|
617
655
|
/** Schemas for the createWebhook operation. */
|
|
618
656
|
let createWebhook;
|
|
619
657
|
(function (createWebhook) {
|
|
658
|
+
/** Request variant for TIP-20 transfer subscriptions. */
|
|
659
|
+
createWebhook.TransferBody = OpenApi.component(z
|
|
660
|
+
.object({
|
|
661
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
662
|
+
context: z.optional(schema.Context),
|
|
663
|
+
destination: Destination,
|
|
664
|
+
eventType: z
|
|
665
|
+
.literal('token:transfer')
|
|
666
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['token:transfer'] })),
|
|
667
|
+
filters: z.optional(schema.TransferFilters),
|
|
668
|
+
})
|
|
669
|
+
.check(z.meta({ title: 'Transfer subscription' })), 'CreateWebhookTransferRequest');
|
|
670
|
+
/** Request variant for included transaction subscriptions. */
|
|
671
|
+
createWebhook.TransactionBody = OpenApi.component(z
|
|
672
|
+
.object({
|
|
673
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
674
|
+
context: z.optional(schema.Context),
|
|
675
|
+
destination: Destination,
|
|
676
|
+
eventType: z
|
|
677
|
+
.literal('transaction:included')
|
|
678
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['transaction:included'] })),
|
|
679
|
+
filters: z.optional(schema.TxFilters),
|
|
680
|
+
})
|
|
681
|
+
.check(z.meta({ title: 'Included-transaction subscription' })), 'CreateWebhookTransactionRequest');
|
|
682
|
+
/** Request variant for emitted log subscriptions. */
|
|
683
|
+
createWebhook.LogBody = OpenApi.component(z
|
|
684
|
+
.object({
|
|
685
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
686
|
+
context: z.optional(schema.Context),
|
|
687
|
+
destination: Destination,
|
|
688
|
+
eventType: z
|
|
689
|
+
.literal('log:emitted')
|
|
690
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['log:emitted'] })),
|
|
691
|
+
filters: schema.LogFilters,
|
|
692
|
+
})
|
|
693
|
+
.check(z.meta({ title: 'Log subscription' })), 'CreateWebhookLogRequest');
|
|
694
|
+
/** Request variant for created block subscriptions. */
|
|
695
|
+
createWebhook.BlockBody = OpenApi.component(z
|
|
696
|
+
.object({
|
|
697
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
698
|
+
context: z.optional(schema.Context),
|
|
699
|
+
destination: Destination,
|
|
700
|
+
eventType: z
|
|
701
|
+
.literal('block:created')
|
|
702
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['block:created'] })),
|
|
703
|
+
filters: z.optional(schema.BlockFilters),
|
|
704
|
+
})
|
|
705
|
+
.check(z.meta({ title: 'Block subscription' })), 'CreateWebhookBlockRequest');
|
|
706
|
+
/** Request variant for route deposit subscriptions. */
|
|
707
|
+
createWebhook.RoutesDepositBody = OpenApi.component(z
|
|
708
|
+
.object({
|
|
709
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
710
|
+
context: z.optional(schema.Context),
|
|
711
|
+
destination: Destination,
|
|
712
|
+
eventType: z
|
|
713
|
+
.literal('routes:deposit.updated')
|
|
714
|
+
.check(z.describe('Event type for committed route deposit changes.'), z.meta({ examples: ['routes:deposit.updated'] })),
|
|
715
|
+
filters: z.optional(schema.RoutesDepositFilters),
|
|
716
|
+
})
|
|
717
|
+
.check(z.meta({ title: 'Route deposit subscription' })), 'CreateWebhookRoutesDepositRequest');
|
|
718
|
+
/** Request variant for route transfer subscriptions. */
|
|
719
|
+
createWebhook.RoutesTransferBody = OpenApi.component(z
|
|
720
|
+
.object({
|
|
721
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
722
|
+
context: z.optional(schema.Context),
|
|
723
|
+
destination: Destination,
|
|
724
|
+
eventType: z
|
|
725
|
+
.literal('routes:transfer.updated')
|
|
726
|
+
.check(z.describe('Event type for committed route transfer changes.'), z.meta({ examples: ['routes:transfer.updated'] })),
|
|
727
|
+
filters: z.optional(schema.RoutesTransferFilters),
|
|
728
|
+
})
|
|
729
|
+
.check(z.meta({ title: 'Route transfer subscription' })), 'CreateWebhookRoutesTransferRequest');
|
|
620
730
|
/**
|
|
621
731
|
* Discriminated on `eventType` so each variant carries its own typed
|
|
622
732
|
* `filters` object — this is what lets the docs render the valid filter
|
|
623
733
|
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
624
734
|
* doc renderer's selector (see {@link schema.Envelope}).
|
|
625
735
|
*/
|
|
626
|
-
createWebhook.Body = z
|
|
736
|
+
createWebhook.Body = OpenApi.component(z
|
|
627
737
|
.discriminatedUnion('eventType', [
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
.literal('token:transfer')
|
|
635
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['token:transfer'] })),
|
|
636
|
-
filters: z.optional(schema.TransferFilters),
|
|
637
|
-
})
|
|
638
|
-
.check(z.meta({ title: 'Transfer subscription' })),
|
|
639
|
-
z
|
|
640
|
-
.object({
|
|
641
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
642
|
-
context: z.optional(schema.Context),
|
|
643
|
-
destination: Destination,
|
|
644
|
-
eventType: z
|
|
645
|
-
.literal('transaction:included')
|
|
646
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['transaction:included'] })),
|
|
647
|
-
filters: z.optional(schema.TxFilters),
|
|
648
|
-
})
|
|
649
|
-
.check(z.meta({ title: 'Included-transaction subscription' })),
|
|
650
|
-
z
|
|
651
|
-
.object({
|
|
652
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
653
|
-
context: z.optional(schema.Context),
|
|
654
|
-
destination: Destination,
|
|
655
|
-
eventType: z
|
|
656
|
-
.literal('log:emitted')
|
|
657
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['log:emitted'] })),
|
|
658
|
-
filters: schema.LogFilters,
|
|
659
|
-
})
|
|
660
|
-
.check(z.meta({ title: 'Log subscription' })),
|
|
661
|
-
z
|
|
662
|
-
.object({
|
|
663
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
664
|
-
context: z.optional(schema.Context),
|
|
665
|
-
destination: Destination,
|
|
666
|
-
eventType: z
|
|
667
|
-
.literal('block:created')
|
|
668
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['block:created'] })),
|
|
669
|
-
filters: z.optional(schema.BlockFilters),
|
|
670
|
-
})
|
|
671
|
-
.check(z.meta({ title: 'Block subscription' })),
|
|
672
|
-
z
|
|
673
|
-
.object({
|
|
674
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
675
|
-
context: z.optional(schema.Context),
|
|
676
|
-
destination: Destination,
|
|
677
|
-
eventType: z
|
|
678
|
-
.literal('funding:deposit.updated')
|
|
679
|
-
.check(z.describe('Event type for committed funding deposit changes.'), z.meta({ examples: ['funding:deposit.updated'] })),
|
|
680
|
-
filters: z.optional(schema.FundingDepositFilters),
|
|
681
|
-
})
|
|
682
|
-
.check(z.meta({ title: 'Funding deposit subscription' })),
|
|
683
|
-
z
|
|
684
|
-
.object({
|
|
685
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
686
|
-
context: z.optional(schema.Context),
|
|
687
|
-
destination: Destination,
|
|
688
|
-
eventType: z
|
|
689
|
-
.literal('funding:transfer.updated')
|
|
690
|
-
.check(z.describe('Event type for committed funding transfer changes.'), z.meta({ examples: ['funding:transfer.updated'] })),
|
|
691
|
-
filters: z.optional(schema.FundingTransferFilters),
|
|
692
|
-
})
|
|
693
|
-
.check(z.meta({ title: 'Funding transfer subscription' })),
|
|
738
|
+
createWebhook.TransferBody,
|
|
739
|
+
createWebhook.TransactionBody,
|
|
740
|
+
createWebhook.LogBody,
|
|
741
|
+
createWebhook.BlockBody,
|
|
742
|
+
createWebhook.RoutesDepositBody,
|
|
743
|
+
createWebhook.RoutesTransferBody,
|
|
694
744
|
])
|
|
695
|
-
.check(z.describe('Details for creating a webhook subscription.'));
|
|
696
|
-
createWebhook.Response = z
|
|
745
|
+
.check(z.describe('Details for creating a webhook subscription.')), 'CreateWebhookRequest');
|
|
746
|
+
createWebhook.Response = OpenApi.component(z
|
|
697
747
|
.object({
|
|
698
748
|
...schema.Subscription.shape,
|
|
699
749
|
destination: Destination,
|
|
@@ -701,7 +751,7 @@ export var schema;
|
|
|
701
751
|
.string()
|
|
702
752
|
.check(z.describe('HMAC signing secret (`whsec_…`) used to verify Tempo webhook signatures. It is shown once when you create the webhook, so store it now.'), z.meta({ examples: ['whsec_abc123'] })),
|
|
703
753
|
})
|
|
704
|
-
.check(z.describe('The new webhook subscription, including the one-time signing secret.'));
|
|
754
|
+
.check(z.describe('The new webhook subscription, including the one-time signing secret.')), 'CreateWebhookResponse');
|
|
705
755
|
})(createWebhook = schema.createWebhook || (schema.createWebhook = {}));
|
|
706
756
|
/** Schemas for the listWebhooks operation. */
|
|
707
757
|
let listWebhooks;
|
|
@@ -714,15 +764,17 @@ export var schema;
|
|
|
714
764
|
page: Schema.Page,
|
|
715
765
|
})
|
|
716
766
|
.check(...Schema.pageChecks(), z.describe('Query parameters for listing your webhook subscriptions.'));
|
|
717
|
-
listWebhooks.Response = z
|
|
767
|
+
listWebhooks.Response = OpenApi.component(z
|
|
718
768
|
.object({
|
|
719
|
-
data: z
|
|
769
|
+
data: z
|
|
770
|
+
.array(schema.Subscription)
|
|
771
|
+
.check(z.describe('Webhook subscriptions on this page.'), z.meta({ examples: [[]] })),
|
|
720
772
|
meta: z
|
|
721
773
|
.optional(Schema.CountMeta)
|
|
722
|
-
.check(z.describe('Extra response metadata requested with `include`.')),
|
|
774
|
+
.check(z.describe('Extra response metadata requested with `include`.'), z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] })),
|
|
723
775
|
nextCursor: Schema.NextCursor,
|
|
724
776
|
})
|
|
725
|
-
.check(z.describe('A page of
|
|
777
|
+
.check(z.describe('A page of webhook subscriptions.')), 'WebhookList');
|
|
726
778
|
})(listWebhooks = schema.listWebhooks || (schema.listWebhooks = {}));
|
|
727
779
|
/** Schemas for the getWebhook operation. */
|
|
728
780
|
let getWebhook;
|
|
@@ -748,21 +800,23 @@ export var schema;
|
|
|
748
800
|
page: Schema.Page,
|
|
749
801
|
})
|
|
750
802
|
.check(...Schema.pageChecks(), z.describe('Query parameters for listing webhook delivery attempts.'));
|
|
751
|
-
listWebhookDeliveries.Response = z
|
|
803
|
+
listWebhookDeliveries.Response = OpenApi.component(z
|
|
752
804
|
.object({
|
|
753
|
-
data: z
|
|
805
|
+
data: z
|
|
806
|
+
.array(schema.Delivery)
|
|
807
|
+
.check(z.describe('Webhook delivery attempts on this page.'), z.meta({ examples: [[]] })),
|
|
754
808
|
meta: z
|
|
755
809
|
.optional(Schema.CountMeta)
|
|
756
|
-
.check(z.describe('Extra response metadata requested with `include`.')),
|
|
810
|
+
.check(z.describe('Extra response metadata requested with `include`.'), z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] })),
|
|
757
811
|
nextCursor: Schema.NextCursor,
|
|
758
812
|
})
|
|
759
|
-
.check(z.describe('A page of webhook delivery attempts.'));
|
|
813
|
+
.check(z.describe('A page of webhook delivery attempts.')), 'WebhookDeliveryList');
|
|
760
814
|
})(listWebhookDeliveries = schema.listWebhookDeliveries || (schema.listWebhookDeliveries = {}));
|
|
761
815
|
/** Schemas for the pingWebhook operation. */
|
|
762
816
|
let pingWebhook;
|
|
763
817
|
(function (pingWebhook) {
|
|
764
818
|
pingWebhook.Params = getWebhook.Params;
|
|
765
|
-
pingWebhook.Response = z
|
|
819
|
+
pingWebhook.Response = OpenApi.component(z
|
|
766
820
|
.object({
|
|
767
821
|
delivered: z
|
|
768
822
|
.boolean()
|
|
@@ -780,7 +834,7 @@ export var schema;
|
|
|
780
834
|
.optional(z.number().check(z.int()))
|
|
781
835
|
.check(z.describe('HTTP status your endpoint returned, when Tempo received a response.'), z.meta({ examples: [200] })),
|
|
782
836
|
})
|
|
783
|
-
.check(z.describe('Result of sending a synthetic ping event to
|
|
837
|
+
.check(z.describe('Result of sending a synthetic ping event to a webhook destination.')), 'PingWebhookResponse');
|
|
784
838
|
})(pingWebhook = schema.pingWebhook || (schema.pingWebhook = {}));
|
|
785
839
|
/** Schemas for the retryWebhookDelivery operation. */
|
|
786
840
|
let retryWebhookDelivery;
|
|
@@ -795,13 +849,13 @@ export var schema;
|
|
|
795
849
|
.check(z.describe('Webhook subscription ID (`wh_…`).'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
|
|
796
850
|
})
|
|
797
851
|
.check(z.describe('Path parameters for retrying a webhook delivery.'));
|
|
798
|
-
retryWebhookDelivery.Response = pingWebhook.Response;
|
|
852
|
+
retryWebhookDelivery.Response = OpenApi.component(pingWebhook.Response, 'RetryWebhookDeliveryResponse');
|
|
799
853
|
})(retryWebhookDelivery = schema.retryWebhookDelivery || (schema.retryWebhookDelivery = {}));
|
|
800
854
|
/** Schemas for the updateWebhook operation. */
|
|
801
855
|
let updateWebhook;
|
|
802
856
|
(function (updateWebhook) {
|
|
803
857
|
updateWebhook.Params = getWebhook.Params;
|
|
804
|
-
updateWebhook.Body = z
|
|
858
|
+
updateWebhook.Body = OpenApi.component(z
|
|
805
859
|
.object({
|
|
806
860
|
context: z
|
|
807
861
|
.optional(z.nullable(schema.Context))
|
|
@@ -816,20 +870,20 @@ export var schema;
|
|
|
816
870
|
.optional(schema.Status)
|
|
817
871
|
.check(z.describe('New lifecycle status, such as pausing or resuming delivery.')),
|
|
818
872
|
})
|
|
819
|
-
.check(z.describe('Fields
|
|
873
|
+
.check(z.describe('Fields to update on the webhook subscription.')), 'UpdateWebhookRequest');
|
|
820
874
|
updateWebhook.Response = schema.Subscription;
|
|
821
875
|
})(updateWebhook = schema.updateWebhook || (schema.updateWebhook = {}));
|
|
822
876
|
/** Schemas for the deleteWebhook operation. */
|
|
823
877
|
let deleteWebhook;
|
|
824
878
|
(function (deleteWebhook) {
|
|
825
879
|
deleteWebhook.Params = getWebhook.Params;
|
|
826
|
-
deleteWebhook.Response = z
|
|
880
|
+
deleteWebhook.Response = OpenApi.component(z
|
|
827
881
|
.object({
|
|
828
882
|
id: z
|
|
829
883
|
.string()
|
|
830
884
|
.check(z.describe('ID of the webhook subscription that was deleted.'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
|
|
831
885
|
})
|
|
832
|
-
.check(z.describe('Confirmation that the webhook subscription was deleted.'));
|
|
886
|
+
.check(z.describe('Confirmation that the webhook subscription was deleted.')), 'DeleteWebhookResponse');
|
|
833
887
|
})(deleteWebhook = schema.deleteWebhook || (schema.deleteWebhook = {}));
|
|
834
888
|
})(schema || (schema = {}));
|
|
835
889
|
/**
|
|
@@ -841,8 +895,7 @@ export var schema;
|
|
|
841
895
|
*/
|
|
842
896
|
export function webhooks(options = {}) {
|
|
843
897
|
const hidden = !options.enabled;
|
|
844
|
-
const availableEventTypes = eventTypeDescriptions.filter((eventType) => !
|
|
845
|
-
options.applicationEventTypes?.includes(eventType.type));
|
|
898
|
+
const availableEventTypes = eventTypeDescriptions.filter((eventType) => !isRoutesEventType(eventType.type) || options.applicationEventTypes?.includes(eventType.type));
|
|
846
899
|
const availableEventTypeSet = new Set(availableEventTypes.map((eventType) => eventType.type));
|
|
847
900
|
// Gate the whole resource on a configured state store. Without it the
|
|
848
901
|
// outbound-HTTP surface is disabled (read-only deployment).
|
|
@@ -865,6 +918,16 @@ export function webhooks(options = {}) {
|
|
|
865
918
|
hide: hidden,
|
|
866
919
|
operationId: 'getWebhookEventTypes',
|
|
867
920
|
responses: OpenApi.responses({
|
|
921
|
+
errors: {
|
|
922
|
+
400: {
|
|
923
|
+
codes: [],
|
|
924
|
+
description: 'The API key credential is malformed.',
|
|
925
|
+
},
|
|
926
|
+
404: {
|
|
927
|
+
codes: ['webhooks_not_enabled'],
|
|
928
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
929
|
+
},
|
|
930
|
+
},
|
|
868
931
|
success: {
|
|
869
932
|
description: 'Webhook event types available for subscription.',
|
|
870
933
|
schema: schema.getWebhookEventTypes.Response,
|
|
@@ -910,7 +973,11 @@ export function webhooks(options = {}) {
|
|
|
910
973
|
},
|
|
911
974
|
403: {
|
|
912
975
|
codes: ['api_key_forbidden', 'limit_exceeded'],
|
|
913
|
-
description: 'The API key lacks access or
|
|
976
|
+
description: 'The API key lacks access or its creator-shared subscription limit was reached.',
|
|
977
|
+
},
|
|
978
|
+
404: {
|
|
979
|
+
codes: ['webhooks_not_enabled'],
|
|
980
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
914
981
|
},
|
|
915
982
|
},
|
|
916
983
|
success: {
|
|
@@ -943,10 +1010,10 @@ export function webhooks(options = {}) {
|
|
|
943
1010
|
message: 'Webhook event type is not available in this deployment',
|
|
944
1011
|
status: 400,
|
|
945
1012
|
});
|
|
946
|
-
if (
|
|
1013
|
+
if (isRoutesEventType(body.eventType)) {
|
|
947
1014
|
if (principal?.type !== 'api_key')
|
|
948
1015
|
return unauthorized(c);
|
|
949
|
-
if (!principal.apiKey.scopes.some((scope) => scope === Scope.wildcard || scope === '
|
|
1016
|
+
if (!principal.apiKey.scopes.some((scope) => scope === Scope.wildcard || scope === 'routes:read'))
|
|
950
1017
|
return Response.error(c, {
|
|
951
1018
|
code: 'api_key_forbidden',
|
|
952
1019
|
message: 'API key missing required scope',
|
|
@@ -961,9 +1028,9 @@ export function webhooks(options = {}) {
|
|
|
961
1028
|
// Preserve destination errors before the creation-time RPC dependency.
|
|
962
1029
|
WebhookDestination.assertDestination(body.destination);
|
|
963
1030
|
const maxPerOwner = webhook.maxPerOwner ?? defaultMaxPerOwner;
|
|
964
|
-
if ((await Webhooks.
|
|
1031
|
+
if ((await Webhooks.countSubscriptionsForLimit(db, { owner })) >= maxPerOwner)
|
|
965
1032
|
throw new Webhooks.LimitExceededError(maxPerOwner);
|
|
966
|
-
const startBlockNumber =
|
|
1033
|
+
const startBlockNumber = isRoutesEventType(body.eventType)
|
|
967
1034
|
? undefined
|
|
968
1035
|
: await getRpcHead(c.get('getClient')(chainId));
|
|
969
1036
|
const subscription = await Webhooks.createSubscription(db, {
|
|
@@ -1000,6 +1067,16 @@ export function webhooks(options = {}) {
|
|
|
1000
1067
|
hide: hidden,
|
|
1001
1068
|
operationId: 'listWebhooks',
|
|
1002
1069
|
responses: OpenApi.responses({
|
|
1070
|
+
errors: {
|
|
1071
|
+
400: {
|
|
1072
|
+
codes: ['query_invalid'],
|
|
1073
|
+
description: 'The query parameters are invalid.',
|
|
1074
|
+
},
|
|
1075
|
+
404: {
|
|
1076
|
+
codes: ['webhooks_not_enabled'],
|
|
1077
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1078
|
+
},
|
|
1079
|
+
},
|
|
1003
1080
|
success: {
|
|
1004
1081
|
description: 'A page of webhook subscriptions.',
|
|
1005
1082
|
schema: schema.listWebhooks.Response,
|
|
@@ -1067,9 +1144,13 @@ export function webhooks(options = {}) {
|
|
|
1067
1144
|
operationId: 'getWebhook',
|
|
1068
1145
|
responses: OpenApi.responses({
|
|
1069
1146
|
errors: {
|
|
1147
|
+
400: {
|
|
1148
|
+
codes: ['param_invalid'],
|
|
1149
|
+
description: 'The webhook ID is invalid.',
|
|
1150
|
+
},
|
|
1070
1151
|
404: {
|
|
1071
1152
|
description: 'No webhook subscription was found for that ID.',
|
|
1072
|
-
codes: ['webhook_not_found'],
|
|
1153
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1073
1154
|
},
|
|
1074
1155
|
},
|
|
1075
1156
|
success: {
|
|
@@ -1117,9 +1198,13 @@ export function webhooks(options = {}) {
|
|
|
1117
1198
|
operationId: 'listWebhookDeliveries',
|
|
1118
1199
|
responses: OpenApi.responses({
|
|
1119
1200
|
errors: {
|
|
1201
|
+
400: {
|
|
1202
|
+
codes: ['param_invalid', 'query_invalid'],
|
|
1203
|
+
description: 'The webhook ID or query parameters are invalid.',
|
|
1204
|
+
},
|
|
1120
1205
|
404: {
|
|
1121
1206
|
description: 'No webhook subscription was found for that ID.',
|
|
1122
|
-
codes: ['webhook_not_found'],
|
|
1207
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1123
1208
|
},
|
|
1124
1209
|
},
|
|
1125
1210
|
success: {
|
|
@@ -1195,9 +1280,13 @@ export function webhooks(options = {}) {
|
|
|
1195
1280
|
operationId: 'pingWebhook',
|
|
1196
1281
|
responses: OpenApi.responses({
|
|
1197
1282
|
errors: {
|
|
1283
|
+
400: {
|
|
1284
|
+
codes: ['param_invalid'],
|
|
1285
|
+
description: 'The webhook ID is invalid.',
|
|
1286
|
+
},
|
|
1198
1287
|
404: {
|
|
1199
1288
|
description: 'No webhook subscription was found for that ID.',
|
|
1200
|
-
codes: ['webhook_not_found'],
|
|
1289
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1201
1290
|
},
|
|
1202
1291
|
},
|
|
1203
1292
|
success: {
|
|
@@ -1253,9 +1342,13 @@ export function webhooks(options = {}) {
|
|
|
1253
1342
|
operationId: 'retryWebhookDelivery',
|
|
1254
1343
|
responses: OpenApi.responses({
|
|
1255
1344
|
errors: {
|
|
1345
|
+
400: {
|
|
1346
|
+
codes: ['param_invalid'],
|
|
1347
|
+
description: 'The webhook or delivery ID is invalid.',
|
|
1348
|
+
},
|
|
1256
1349
|
404: {
|
|
1257
1350
|
description: 'No webhook subscription or delivery was found for those IDs.',
|
|
1258
|
-
codes: ['webhook_not_found', 'delivery_not_found'],
|
|
1351
|
+
codes: ['webhook_not_found', 'delivery_not_found', 'webhooks_not_enabled'],
|
|
1259
1352
|
},
|
|
1260
1353
|
},
|
|
1261
1354
|
success: {
|
|
@@ -1332,7 +1425,7 @@ export function webhooks(options = {}) {
|
|
|
1332
1425
|
},
|
|
1333
1426
|
404: {
|
|
1334
1427
|
description: 'No webhook subscription was found for that ID.',
|
|
1335
|
-
codes: ['webhook_not_found'],
|
|
1428
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1336
1429
|
},
|
|
1337
1430
|
},
|
|
1338
1431
|
success: {
|
|
@@ -1394,9 +1487,13 @@ export function webhooks(options = {}) {
|
|
|
1394
1487
|
operationId: 'deleteWebhook',
|
|
1395
1488
|
responses: OpenApi.responses({
|
|
1396
1489
|
errors: {
|
|
1490
|
+
400: {
|
|
1491
|
+
codes: ['param_invalid'],
|
|
1492
|
+
description: 'The webhook ID is invalid.',
|
|
1493
|
+
},
|
|
1397
1494
|
404: {
|
|
1398
1495
|
description: 'No webhook subscription was found for that ID.',
|
|
1399
|
-
codes: ['webhook_not_found'],
|
|
1496
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1400
1497
|
},
|
|
1401
1498
|
},
|
|
1402
1499
|
success: {
|
|
@@ -1521,8 +1618,8 @@ export async function getRpcHead(client) {
|
|
|
1521
1618
|
}
|
|
1522
1619
|
const filterSchemas = {
|
|
1523
1620
|
'block:created': schema.BlockFilters,
|
|
1524
|
-
'
|
|
1525
|
-
'
|
|
1621
|
+
'routes:deposit.updated': schema.RoutesDepositFilters,
|
|
1622
|
+
'routes:transfer.updated': schema.RoutesTransferFilters,
|
|
1526
1623
|
'log:emitted': schema.LogFilters,
|
|
1527
1624
|
'token:transfer': schema.TransferFilters,
|
|
1528
1625
|
'transaction:included': schema.TxFilters,
|
|
@@ -1574,7 +1671,7 @@ const toBig = (value) => BigInt(String(value));
|
|
|
1574
1671
|
function operandEquals(value, target, kind) {
|
|
1575
1672
|
return kind === 'number'
|
|
1576
1673
|
? toBig(value) === toBig(target)
|
|
1577
|
-
: value.toLowerCase() === String(target).toLowerCase();
|
|
1674
|
+
: String(value).toLowerCase() === String(target).toLowerCase();
|
|
1578
1675
|
}
|
|
1579
1676
|
/**
|
|
1580
1677
|
* The JS counterpart of the old SQL `applyOperator`: evaluates one parsed filter
|
|
@@ -1596,10 +1693,11 @@ export function matchesOperator(value, op, kind = 'string') {
|
|
|
1596
1693
|
if (typeof op !== 'object' || op === null)
|
|
1597
1694
|
return operandEquals(value, op, kind);
|
|
1598
1695
|
const o = op;
|
|
1696
|
+
const value_string = String(value);
|
|
1599
1697
|
if ('selector' in o)
|
|
1600
|
-
return
|
|
1698
|
+
return value_string.slice(0, 10).toLowerCase() === String(o['selector']).toLowerCase();
|
|
1601
1699
|
if ('startsWith' in o)
|
|
1602
|
-
return
|
|
1700
|
+
return value_string.toLowerCase().startsWith(String(o['startsWith']).toLowerCase());
|
|
1603
1701
|
if ('in' in o)
|
|
1604
1702
|
return o['in'].some((v) => operandEquals(value, v, kind));
|
|
1605
1703
|
if ('not' in o)
|
|
@@ -1650,12 +1748,11 @@ function toLogEvent(log, timestamp, signature, event) {
|
|
|
1650
1748
|
const blockNumber = log.blockNumber === null ? undefined : Number(log.blockNumber);
|
|
1651
1749
|
const logIndex = log.logIndex ?? undefined;
|
|
1652
1750
|
const transactionIndex = log.transactionIndex ?? undefined;
|
|
1653
|
-
const topics = log.topics
|
|
1654
|
-
const topic0 = Schema.Hash.safeParse(topics[0]);
|
|
1751
|
+
const topics = z.array(Schema.Hash).safeParse(log.topics);
|
|
1655
1752
|
const data = typeof log.data === 'string' ? log.data : '0x';
|
|
1656
1753
|
if (!address.success ||
|
|
1657
1754
|
!transactionHash.success ||
|
|
1658
|
-
!
|
|
1755
|
+
!topics.success ||
|
|
1659
1756
|
blockNumber === undefined ||
|
|
1660
1757
|
logIndex === undefined ||
|
|
1661
1758
|
transactionIndex === undefined ||
|
|
@@ -1667,16 +1764,19 @@ function toLogEvent(log, timestamp, signature, event) {
|
|
|
1667
1764
|
data,
|
|
1668
1765
|
logIndex,
|
|
1669
1766
|
timestamp,
|
|
1670
|
-
topics,
|
|
1767
|
+
topics: topics.data,
|
|
1671
1768
|
transactionHash: transactionHash.data,
|
|
1672
1769
|
transactionIndex,
|
|
1673
1770
|
};
|
|
1674
1771
|
if (!signature || !event || log.args === undefined)
|
|
1675
1772
|
return base;
|
|
1773
|
+
const topic0 = topics.data[0];
|
|
1774
|
+
if (!topic0)
|
|
1775
|
+
return undefined;
|
|
1676
1776
|
return {
|
|
1677
1777
|
...base,
|
|
1678
1778
|
args: serializeArgs(log.args),
|
|
1679
|
-
event: { name: event.name, signature, topic0
|
|
1779
|
+
event: { name: event.name, signature, topic0 },
|
|
1680
1780
|
};
|
|
1681
1781
|
}
|
|
1682
1782
|
/** Narrows an exact or membership operator into an RPC filter value. */
|
|
@@ -1823,7 +1923,10 @@ function matchesLog(log, f, event) {
|
|
|
1823
1923
|
const numeric = /^u?int/.test(input.type);
|
|
1824
1924
|
const value = args[name];
|
|
1825
1925
|
const normalized = input.type === 'address' ? lowercaseLeaves(op) : op;
|
|
1826
|
-
|
|
1926
|
+
const operand = typeof value === 'bigint' || typeof value === 'number' || typeof value === 'string'
|
|
1927
|
+
? value
|
|
1928
|
+
: undefined;
|
|
1929
|
+
if (!matchesOperator(operand, normalized, numeric ? 'number' : 'string'))
|
|
1827
1930
|
return false;
|
|
1828
1931
|
}
|
|
1829
1932
|
}
|
|
@@ -1963,7 +2066,7 @@ function toPublic(subscription) {
|
|
|
1963
2066
|
...(subscription.context === undefined ? {} : { context: subscription.context }),
|
|
1964
2067
|
createdAt: subscription.createdAt,
|
|
1965
2068
|
destination: redactDestination(subscription.destination),
|
|
1966
|
-
...(
|
|
2069
|
+
...(isRoutesEventType(subscription.eventType) && subscription.environment !== undefined
|
|
1967
2070
|
? { environment: subscription.environment }
|
|
1968
2071
|
: {}),
|
|
1969
2072
|
eventType: subscription.eventType,
|