tapimo 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +21383 -18056
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +301 -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 +2 -2
- package/dist/Webhooks.js.map +1 -1
- package/dist/admin/App.d.ts +3936 -1337
- 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 +159 -7
- 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 +1446 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.js +465 -8
- package/dist/admin/apps/earn-vaults.js.map +1 -1
- package/dist/admin/apps/organizations.d.ts +344 -3
- package/dist/admin/apps/organizations.d.ts.map +1 -1
- package/dist/admin/apps/organizations.js +288 -10
- 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 +16 -16
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
- package/dist/admin/apps/verified-tokens.js +3 -3
- 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 +129 -69
- 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 +40 -8
- package/dist/apps/Zones.js.map +1 -1
- package/dist/apps/data/App.d.ts +4310 -2548
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +86 -26
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +364 -34
- 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 +94 -22
- package/dist/apps/data/routes/addresses.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +37 -37
- 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 +1641 -352
- package/dist/apps/data/routes/earn.d.ts.map +1 -1
- package/dist/apps/data/routes/earn.js +1561 -120
- package/dist/apps/data/routes/earn.js.map +1 -1
- package/dist/apps/data/routes/exchanges.d.ts +15 -0
- package/dist/apps/data/routes/exchanges.d.ts.map +1 -1
- package/dist/apps/data/routes/exchanges.js +180 -114
- package/dist/apps/data/routes/exchanges.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts +5 -0
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +49 -38
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +125 -0
- 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/rpc.d.ts +507 -33
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +266 -156
- 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 +95 -93
- 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 +16 -0
- 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/verified-tokens.d.ts +4 -4
- 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 +1210 -70
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +301 -163
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- 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 +4119 -3297
- 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 +49 -8
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +221 -26
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +174 -72
- 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 +364 -78
- 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 +99 -24
- 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 +42 -42
- 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 +16 -16
- package/dist/apps/management/routes/orgs.d.ts +36 -20
- 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 +40 -40
- 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 +8 -8
- 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 +16 -16
- package/dist/apps/management/routes/webhooks.d.ts +931 -215
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +71 -25
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/mcp.d.ts +1 -1
- package/dist/apps/mcp.js +7 -7
- package/dist/apps/mcp.js.map +1 -1
- 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 +177 -26
- 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 +232 -25
- 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 +841 -136
- package/dist/apps/{funding → routes}/App.d.ts.map +1 -1
- package/dist/apps/{funding → routes}/App.js +17 -17
- 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 +7 -7
- 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 +123 -59
- package/dist/apps/routes/routes/deposit-addresses.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.js +498 -223
- 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 +19 -16
- 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 +957 -71
- 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 +1052 -15
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +785 -133
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +590 -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 +51 -5
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +135 -47
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +27 -1
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +38 -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/routesTransferTransactions.js +86 -0
- 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 +112 -13
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +241 -38
- 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/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 +22 -10
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +50 -15
- 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 +48 -12
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +603 -175
- 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 +31 -14
- 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 +46 -2068
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +171 -11
- 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 -3
- 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 +9 -17
- 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 +350 -104
- package/dist/internal/routes/Provider.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Provider.js +233 -97
- 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 +13 -15
- 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 +324 -34
- 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/routes/TransferReconciliation.d.ts +55 -0
- 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/routes/TransferWebhook.d.ts +21 -0
- package/dist/internal/routes/TransferWebhook.d.ts.map +1 -0
- package/dist/internal/routes/TransferWebhook.js +43 -0
- package/dist/internal/routes/TransferWebhook.js.map +1 -0
- package/dist/internal/{funding → routes}/index.d.ts +3 -0
- package/dist/internal/routes/index.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/index.js +3 -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 +197 -122
- 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/routes/providers/stargate.d.ts +165 -0
- 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.d.ts.map +1 -1
- package/dist/internal/webhookDestinations/slack.js +22 -6
- 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 +335 -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 +611 -101
- package/src/Handler.ts +0 -1
- package/src/OpenApi.contract.test.ts +195 -0
- package/src/Scope.ts +17 -5
- package/src/Webhooks.ts +2 -2
- 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 +681 -7
- package/src/admin/apps/organizations.test.ts +342 -1
- package/src/admin/apps/organizations.ts +368 -8
- 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 +8 -3
- package/src/admin/apps/verified-tokens.ts +3 -3
- 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 +147 -3
- package/src/admin/ui/src/lib/organizations.ts +136 -0
- 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/routeTree.gen.ts +63 -0
- package/src/admin/ui/src/routes/__root.tsx +12 -1
- 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_.$orgId.tsx +334 -2
- 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.generated.ts +144 -69
- 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 +18 -3
- package/src/apps/Zones.ts +55 -8
- package/src/apps/composition.test.ts +68 -59
- package/src/apps/data/App.test.ts +154 -2
- package/src/apps/data/App.ts +102 -33
- 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 +1661 -29
- package/src/apps/data/routes/earn.ts +2314 -328
- package/src/apps/data/routes/exchanges.test.ts +752 -30
- package/src/apps/data/routes/exchanges.ts +954 -753
- package/src/apps/data/routes/fee-amm.test.ts +224 -0
- package/src/apps/data/routes/fee-amm.ts +208 -178
- 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 +352 -8
- package/src/apps/data/routes/rpc.ts +407 -219
- 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.test.ts +659 -81
- package/src/apps/data/routes/webhooks.ts +1104 -817
- 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 +283 -34
- 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/webhooks.test.ts +49 -26
- package/src/apps/management/routes/webhooks.ts +93 -38
- package/src/apps/mcp.test.ts +6 -6
- package/src/apps/mcp.ts +7 -7
- 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 +1024 -38
- package/src/apps/relay/App.ts +228 -32
- 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 +253 -29
- 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 +1362 -462
- package/src/apps/{funding → routes}/routes/deposit-addresses.ts +568 -248
- 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/routes/routes/transfers.test.ts +2876 -0
- 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 +1511 -34
- package/src/db/Schema.ts +744 -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 +725 -7
- package/src/db/tables/organizations.ts +182 -49
- package/src/db/tables/projects.test.ts +71 -0
- package/src/db/tables/projects.ts +59 -4
- 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} +316 -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/routesTransferTransactions.ts +158 -0
- package/src/db/tables/routesTransfers.test.ts +338 -0
- package/src/db/tables/routesTransfers.ts +662 -0
- package/src/db/tables/sponsoredTransactions.test.ts +563 -1
- package/src/db/tables/sponsoredTransactions.ts +386 -42
- 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/webhookQueueEvents.ts +8 -1
- package/src/db/tables/webhookSubscriptions.ts +103 -21
- 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 +1564 -9
- package/src/internal/Auth.ts +833 -239
- 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 +37 -15
- package/src/internal/Email.ts +54 -0
- package/src/internal/Idempotency.test.ts +2 -2
- package/src/internal/Log.test-d.ts +10 -7
- package/src/internal/Log.test.ts +114 -16
- package/src/internal/Log.ts +55 -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 +249 -17
- package/src/internal/Webhooks.test.ts +125 -1
- 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 -8
- 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 +11 -22
- 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 +531 -185
- 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 +18 -22
- 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/routes/TransferWebhook.test.ts +128 -0
- package/src/internal/routes/TransferWebhook.ts +67 -0
- package/src/internal/{funding → routes}/index.test.ts +6 -3
- package/src/internal/{funding → routes}/index.ts +3 -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 +165 -32
- package/src/internal/{funding → routes}/providers/relay.ts +231 -136
- 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 +20 -5
- 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 -622
- 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 -15
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.js +0 -27
- package/dist/db/tables/fundingTransferTransactions.js.map +0 -1
- package/dist/db/tables/fundingTransfers.d.ts +0 -82
- package/dist/db/tables/fundingTransfers.d.ts.map +0 -1
- package/dist/db/tables/fundingTransfers.js +0 -89
- 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 -334
- package/dist/internal/funding/Transfer.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 +0 -38
- package/dist/internal/funding/providers/stargate.d.ts.map +0 -1
- package/dist/internal/funding/providers/stargate.js +0 -277
- 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 -78
- package/src/apps/funding/ProviderAttempts.ts +0 -26
- package/src/apps/funding/index.ts +0 -1
- package/src/apps/funding/routes/transfers.test.ts +0 -1638
- package/src/apps/funding/routes/transfers.ts +0 -721
- 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 -69
- package/src/db/tables/fundingTransferTransactions.ts +0 -37
- package/src/db/tables/fundingTransfers.test.ts +0 -89
- package/src/db/tables/fundingTransfers.ts +0 -153
- 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 -369
- package/src/internal/funding/Transfer.ts +0 -545
- package/src/internal/funding/providers/stargate.test.ts +0 -163
- package/src/internal/funding/providers/stargate.ts +0 -409
- /package/dist/apps/{funding → routes}/Inventory.d.ts +0 -0
- /package/src/internal/{funding → routes}/Route.test.ts +0 -0
|
@@ -14,7 +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
|
|
17
|
+
import * as RoutesDeposit from '../../../internal/routes/Deposit.js';
|
|
18
|
+
import * as RoutesTransfer from '../../../internal/routes/Transfer.js';
|
|
18
19
|
import * as Transactions from './transactions.js';
|
|
19
20
|
import * as Transfers from './transfers.js';
|
|
20
21
|
/** Default cap on live subscriptions per owner, overridable via `webhook.maxPerOwner`. */
|
|
@@ -34,11 +35,21 @@ const redactedSlackUrl = 'https://hooks.slack.com/…';
|
|
|
34
35
|
*/
|
|
35
36
|
export const eventTypes = [
|
|
36
37
|
'block:created',
|
|
37
|
-
'
|
|
38
|
+
'routes:deposit.updated',
|
|
39
|
+
'routes:transfer.updated',
|
|
38
40
|
'log:emitted',
|
|
39
41
|
'token:transfer',
|
|
40
42
|
'transaction:included',
|
|
41
43
|
];
|
|
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
|
+
];
|
|
49
|
+
/** Returns whether an event type carries an owner-scoped route resource. */
|
|
50
|
+
export function isRoutesEventType(eventType) {
|
|
51
|
+
return routesEventTypes.includes(eventType);
|
|
52
|
+
}
|
|
42
53
|
/** Subscribable event types surfaced by `GET /webhooks/event-types`. */
|
|
43
54
|
const eventTypeDescriptions = [
|
|
44
55
|
{
|
|
@@ -46,8 +57,12 @@ const eventTypeDescriptions = [
|
|
|
46
57
|
type: 'block:created',
|
|
47
58
|
},
|
|
48
59
|
{
|
|
49
|
-
description: 'A
|
|
50
|
-
type: '
|
|
60
|
+
description: 'A route deposit materially changed after verified reconciliation, filterable by deposit address, recipient, or status.',
|
|
61
|
+
type: 'routes:deposit.updated',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
description: 'A route transfer materially changed, filterable by transfer ID or lifecycle status.',
|
|
65
|
+
type: 'routes:transfer.updated',
|
|
51
66
|
},
|
|
52
67
|
{
|
|
53
68
|
description: 'Any contract event log, filtered by emitting address, event signature/topics, or decoded arguments.',
|
|
@@ -66,7 +81,7 @@ const eventTypeDescriptions = [
|
|
|
66
81
|
export var schema;
|
|
67
82
|
(function (schema) {
|
|
68
83
|
/** Subscribable event type. */
|
|
69
|
-
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');
|
|
70
85
|
/** Subscription lifecycle status. */
|
|
71
86
|
schema.Status = z
|
|
72
87
|
.enum(['active', 'disabled', 'paused'])
|
|
@@ -91,42 +106,46 @@ export var schema;
|
|
|
91
106
|
* your Slack incoming-webhook URL), or a `betterstack` destination (a structured
|
|
92
107
|
* log event POSTed to a Better Stack source with a bearer source token).
|
|
93
108
|
*/
|
|
94
|
-
const
|
|
109
|
+
const DestinationSchema = z
|
|
95
110
|
.discriminatedUnion('type', [
|
|
96
111
|
z.object({
|
|
97
|
-
type: z.literal('url'),
|
|
112
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
98
113
|
url: Url,
|
|
99
114
|
}),
|
|
100
115
|
z.object({
|
|
101
|
-
type: z.literal('slack'),
|
|
116
|
+
type: z.literal('slack').check(z.meta({ examples: ['slack'] })),
|
|
102
117
|
url: SlackUrl,
|
|
103
118
|
}),
|
|
104
119
|
z.object({
|
|
105
120
|
token: BetterstackToken,
|
|
106
|
-
type: z.literal('betterstack'),
|
|
121
|
+
type: z.literal('betterstack').check(z.meta({ examples: ['betterstack'] })),
|
|
107
122
|
url: BetterstackUrl,
|
|
108
123
|
}),
|
|
109
124
|
])
|
|
110
|
-
.check(z.describe('Delivery destination: an HTTPS URL, a Slack incoming-webhook URL, or a Better Stack source.'));
|
|
111
|
-
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
|
|
112
128
|
.discriminatedUnion('type', [
|
|
113
129
|
z.object({
|
|
114
|
-
type: z.literal('url'),
|
|
130
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
115
131
|
url: Url,
|
|
116
132
|
}),
|
|
117
133
|
z.object({
|
|
118
|
-
type: z.literal('slack'),
|
|
119
|
-
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] })),
|
|
120
138
|
}),
|
|
121
139
|
z.object({
|
|
122
140
|
token: z
|
|
123
141
|
.literal(redactedBetterstackToken)
|
|
124
|
-
.check(z.describe('Redacted Better Stack source token.')),
|
|
125
|
-
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'] })),
|
|
126
144
|
url: BetterstackUrl,
|
|
127
145
|
}),
|
|
128
146
|
])
|
|
129
|
-
.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');
|
|
130
149
|
/**
|
|
131
150
|
* Equality / membership operator for a filterable field. A consumer can pass a
|
|
132
151
|
* bare value (shorthand for exact equality, the common case) or an operator
|
|
@@ -158,7 +177,7 @@ export var schema;
|
|
|
158
177
|
lt: z.optional(Schema.Quantity),
|
|
159
178
|
lte: z.optional(Schema.Quantity),
|
|
160
179
|
})
|
|
161
|
-
.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' }] })),
|
|
162
181
|
]);
|
|
163
182
|
/**
|
|
164
183
|
* Byte/calldata-matching operator for hex fields (tx `input`, `calls[].input`).
|
|
@@ -176,7 +195,7 @@ export var schema;
|
|
|
176
195
|
* drift. All are optional and AND-combined; omit every field to subscribe to
|
|
177
196
|
* the full stream.
|
|
178
197
|
*/
|
|
179
|
-
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');
|
|
180
199
|
/**
|
|
181
200
|
* `transaction:included` subscription filters: operators over every column the
|
|
182
201
|
* `txs` envelope exposes, plus inner account-abstraction `calls` and the
|
|
@@ -186,7 +205,7 @@ export var schema;
|
|
|
186
205
|
* `address` matches either side (`from` OR `to`); when `includeCalls` is set
|
|
187
206
|
* (default), `to`/`address` also match an inner call target (`calls[].to`).
|
|
188
207
|
*/
|
|
189
|
-
schema.TxFilters = z
|
|
208
|
+
schema.TxFilters = OpenApi.component(z
|
|
190
209
|
.strictObject({
|
|
191
210
|
hash: z.optional(schema.eq(Schema.Hash).check(z.describe('Match this exact transaction hash (or any of several).'))),
|
|
192
211
|
address: z.optional(schema.eq(Schema.Address).check(z.describe('Match transactions where this address is the sender or recipient.'))),
|
|
@@ -215,7 +234,7 @@ export var schema;
|
|
|
215
234
|
blockNumber: z.optional(schema.compare.check(z.describe('Match the block-number bounds.'))),
|
|
216
235
|
timestamp: z.optional(schema.compare.check(z.describe('Match the block timestamp bounds (unix s).'))),
|
|
217
236
|
})
|
|
218
|
-
.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');
|
|
219
238
|
/** A 32-byte log topic (lowercased hex). */
|
|
220
239
|
const topic = Schema.Hash;
|
|
221
240
|
/**
|
|
@@ -226,7 +245,7 @@ export var schema;
|
|
|
226
245
|
* firehose), and an addressless filter must still be selective — an event
|
|
227
246
|
* anchor (`signature`/`topic0`) plus at least one indexed topic or argument.
|
|
228
247
|
*/
|
|
229
|
-
schema.LogFilters = z
|
|
248
|
+
schema.LogFilters = OpenApi.component(z
|
|
230
249
|
.strictObject({
|
|
231
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'] }))),
|
|
232
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({
|
|
@@ -249,7 +268,9 @@ export var schema;
|
|
|
249
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' }] }))),
|
|
250
269
|
blockNumber: z.optional(schema.compare.check(z.describe('Only match logs within these block-number bounds.'))),
|
|
251
270
|
})
|
|
252
|
-
.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, {
|
|
253
274
|
error: 'At least one log filter is required.',
|
|
254
275
|
}), z.refine((f) => !(f.signature && f.topic0), {
|
|
255
276
|
error: 'Pass `signature` or `topic0`, not both.',
|
|
@@ -257,14 +278,14 @@ export var schema;
|
|
|
257
278
|
error: '`args` requires `signature` to decode the event.',
|
|
258
279
|
}), z.refine((f) => hasLogPushdown(f), {
|
|
259
280
|
error: 'Log filters must include a pushdown-capable address or an event/topic0 anchor plus an indexed topic or argument.',
|
|
260
|
-
}));
|
|
281
|
+
})), 'WebhookLogFilters');
|
|
261
282
|
/**
|
|
262
283
|
* `block:created` subscription filters. All optional and AND-combined; unlike
|
|
263
284
|
* `log:emitted`, an empty filter is allowed — one row per block is a bounded,
|
|
264
285
|
* non-abusive heartbeat feed. Block-level metadata only (no transaction
|
|
265
286
|
* predicates; use `transaction:included` for those).
|
|
266
287
|
*/
|
|
267
|
-
schema.BlockFilters = z
|
|
288
|
+
schema.BlockFilters = OpenApi.component(z
|
|
268
289
|
.strictObject({
|
|
269
290
|
number: z.optional(schema.compare.check(z.describe('Only match blocks within these block-number bounds.'))),
|
|
270
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'] }))),
|
|
@@ -273,21 +294,28 @@ export var schema;
|
|
|
273
294
|
gasLimit: z.optional(schema.compare.check(z.describe('Only match blocks whose gas limit is within these bounds.'))),
|
|
274
295
|
timestamp: z.optional(schema.compare.check(z.describe('Only match blocks whose unix timestamp (seconds) is within these bounds.'))),
|
|
275
296
|
})
|
|
276
|
-
.check(z.describe('Filters that narrow which new blocks trigger this webhook.'),
|
|
277
|
-
/** `
|
|
278
|
-
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
|
|
279
300
|
.strictObject({
|
|
280
|
-
depositAddressId: z.optional(
|
|
301
|
+
depositAddressId: z.optional(RoutesDeposit.schema.Snapshot.shape.depositAddressId),
|
|
281
302
|
recipient: z.optional(Schema.Address),
|
|
282
|
-
status: z.optional(
|
|
303
|
+
status: z.optional(RoutesDeposit.schema.Status),
|
|
283
304
|
})
|
|
284
|
-
.check(z.describe('Filters that narrow which
|
|
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
|
|
308
|
+
.strictObject({
|
|
309
|
+
id: z.optional(RoutesTransfer.schema.RoutesTransfer.shape.id),
|
|
310
|
+
status: z.optional(RoutesTransfer.schema.Status),
|
|
311
|
+
})
|
|
312
|
+
.check(z.describe('Filters that narrow which route transfer changes trigger this webhook.')), 'WebhookRoutesTransferFilters');
|
|
285
313
|
/**
|
|
286
314
|
* Optional human context describing what a subscription is for. Surfaced by
|
|
287
315
|
* destinations (Slack header + description, Better Stack log fields) and echoed
|
|
288
316
|
* on every delivered event envelope.
|
|
289
317
|
*/
|
|
290
|
-
schema.Context = z
|
|
318
|
+
schema.Context = OpenApi.component(z
|
|
291
319
|
.object({
|
|
292
320
|
description: z.optional(z
|
|
293
321
|
.string()
|
|
@@ -301,15 +329,17 @@ export var schema;
|
|
|
301
329
|
.string()
|
|
302
330
|
.check(z.maxLength(120), z.describe('Short label for this subscription.'), z.meta({ examples: ['Prod USDC large transfers'] }))),
|
|
303
331
|
})
|
|
304
|
-
.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');
|
|
305
333
|
/**
|
|
306
334
|
* Public subscription representation. Never includes the signing `secret`
|
|
307
335
|
* (returned once by `POST /webhooks`) or the internal owner.
|
|
308
336
|
*/
|
|
309
|
-
schema.Subscription = z
|
|
337
|
+
schema.Subscription = OpenApi.component(z
|
|
310
338
|
.object({
|
|
311
339
|
chainId: chainIdResponse,
|
|
312
|
-
context: z
|
|
340
|
+
context: z
|
|
341
|
+
.optional(schema.Context)
|
|
342
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
313
343
|
createdAt: z.iso
|
|
314
344
|
.datetime()
|
|
315
345
|
.check(z.describe('When the subscription was created, as an ISO 8601 timestamp.'), z.meta({ examples: ['2024-01-01T00:00:00Z'] })),
|
|
@@ -336,13 +366,13 @@ export var schema;
|
|
|
336
366
|
.datetime()
|
|
337
367
|
.check(z.describe('When the subscription was last changed, as an ISO 8601 timestamp.'), z.meta({ examples: ['2024-01-01T00:00:00Z'] })),
|
|
338
368
|
})
|
|
339
|
-
.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');
|
|
340
370
|
/** Outcome of a single delivery attempt. */
|
|
341
371
|
schema.DeliveryStatus = z
|
|
342
372
|
.enum(['failed', 'pending', 'succeeded'])
|
|
343
373
|
.check(z.describe('Outcome of a webhook delivery attempt.'), z.meta({ examples: ['succeeded'] }));
|
|
344
374
|
/** A logged delivery attempt for a subscription. */
|
|
345
|
-
schema.Delivery = z
|
|
375
|
+
schema.Delivery = OpenApi.component(z
|
|
346
376
|
.object({
|
|
347
377
|
attempt: z
|
|
348
378
|
.number()
|
|
@@ -360,7 +390,7 @@ export var schema;
|
|
|
360
390
|
.string()
|
|
361
391
|
.check(z.describe('Webhook delivery ID (`whd_…`).'), z.meta({ examples: ['whd_001718668800000_C1yJkk7CuML98HFthEDk9PsY'] })),
|
|
362
392
|
requestUrl: z
|
|
363
|
-
.
|
|
393
|
+
.url()
|
|
364
394
|
.check(z.describe('Your callback URL that Tempo attempted to deliver to.'), z.meta({ examples: ['https://example.com/webhooks'] })),
|
|
365
395
|
responseMs: z
|
|
366
396
|
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
@@ -373,14 +403,14 @@ export var schema;
|
|
|
373
403
|
.string()
|
|
374
404
|
.check(z.describe('Subscription ID (`wh_…`) this delivery belongs to.'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
|
|
375
405
|
})
|
|
376
|
-
.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');
|
|
377
407
|
/**
|
|
378
408
|
* A `transfer` event payload: the decoded TIP-20 `Transfer` row. Mirrors a
|
|
379
409
|
* `GET /transfers` row but without the `sourceToken` metadata enrichment the
|
|
380
410
|
* read endpoint adds (webhook delivery does not perform per-event token
|
|
381
411
|
* lookups).
|
|
382
412
|
*/
|
|
383
|
-
schema.TransferEvent = z
|
|
413
|
+
schema.TransferEvent = OpenApi.component(z
|
|
384
414
|
.object({
|
|
385
415
|
address: Schema.TokenAddress.check(z.describe('TIP-20 token contract address.'), z.meta({ examples: ['0x20c0000000000000000000008f5425160ebe5525'] })),
|
|
386
416
|
amount: z
|
|
@@ -408,12 +438,12 @@ export var schema;
|
|
|
408
438
|
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
409
439
|
})),
|
|
410
440
|
})
|
|
411
|
-
.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');
|
|
412
442
|
/**
|
|
413
443
|
* A `transaction` event payload using the humanized transaction shape without
|
|
414
444
|
* opt-in read resources such as receipts.
|
|
415
445
|
*/
|
|
416
|
-
schema.TransactionEvent = z
|
|
446
|
+
schema.TransactionEvent = OpenApi.component(z
|
|
417
447
|
.object({
|
|
418
448
|
...Transactions.schema.Transaction.shape,
|
|
419
449
|
meta: z
|
|
@@ -422,14 +452,14 @@ export var schema;
|
|
|
422
452
|
})
|
|
423
453
|
.check(z.describe('Metadata for this transaction webhook event.')),
|
|
424
454
|
})
|
|
425
|
-
.check(z.describe('A transaction included in a block.'));
|
|
455
|
+
.check(z.describe('A transaction included in a block.')), 'WebhookTransactionEvent');
|
|
426
456
|
/**
|
|
427
457
|
* A `log:emitted` event payload: the raw contract event log. When a
|
|
428
458
|
* `signature` filter was supplied and decoding succeeds, the best-effort
|
|
429
459
|
* `event`/`args` fields carry the decoded event name and arguments (large
|
|
430
460
|
* integers as decimal strings).
|
|
431
461
|
*/
|
|
432
|
-
schema.LogEvent = z
|
|
462
|
+
schema.LogEvent = OpenApi.component(z
|
|
433
463
|
.object({
|
|
434
464
|
address: Schema.Address.check(z.describe('Contract that emitted the log.'), z.meta({ examples: ['0x20c00000000000000000000071de0cd31ab0d105'] })),
|
|
435
465
|
args: z.optional(z
|
|
@@ -477,9 +507,9 @@ export var schema;
|
|
|
477
507
|
.number()
|
|
478
508
|
.check(z.int(), z.nonnegative(), z.describe('Index of the transaction within its block.'), z.meta({ examples: [0] })),
|
|
479
509
|
})
|
|
480
|
-
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).'));
|
|
510
|
+
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).')), 'WebhookLogEvent');
|
|
481
511
|
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
482
|
-
schema.BlockEvent = z
|
|
512
|
+
schema.BlockEvent = OpenApi.component(z
|
|
483
513
|
.object({
|
|
484
514
|
number: z
|
|
485
515
|
.number()
|
|
@@ -505,19 +535,25 @@ export var schema;
|
|
|
505
535
|
.datetime()
|
|
506
536
|
.check(z.describe('When the block was produced, as an ISO 8601 timestamp.'), z.meta({ examples: ['2026-01-14T18:38:03.685Z'] })),
|
|
507
537
|
})
|
|
508
|
-
.check(z.describe('Payload for a `block:created` event (a new block header).'));
|
|
509
|
-
/** Public
|
|
510
|
-
schema.
|
|
538
|
+
.check(z.describe('Payload for a `block:created` event (a new block header).')), 'WebhookBlockEvent');
|
|
539
|
+
/** Public route deposit after a committed material change. */
|
|
540
|
+
schema.RoutesDepositEvent = RoutesDeposit.schema.RoutesDeposit;
|
|
541
|
+
/** Public route transfer after a committed material change. */
|
|
542
|
+
schema.RoutesTransferEvent = RoutesTransfer.schema.RoutesTransfer;
|
|
511
543
|
/** A `ping` (synthetic test-delivery) payload, sent by `POST /webhooks/:id/ping`. */
|
|
512
|
-
schema.PingEvent = z
|
|
544
|
+
schema.PingEvent = OpenApi.component(z
|
|
513
545
|
.object({
|
|
514
|
-
ping: z
|
|
546
|
+
ping: z
|
|
547
|
+
.literal(true)
|
|
548
|
+
.check(z.describe('Marks this payload as a synthetic ping test.'), z.meta({ examples: [true] })),
|
|
515
549
|
})
|
|
516
|
-
.check(z.describe('Payload for a webhook ping test delivery.'));
|
|
550
|
+
.check(z.describe('Payload for a webhook ping test delivery.')), 'WebhookPingEvent');
|
|
517
551
|
/** Fields common to every delivery envelope. */
|
|
518
552
|
const envelopeBase = {
|
|
519
553
|
chainId: Schema.ChainId,
|
|
520
|
-
context: z
|
|
554
|
+
context: z
|
|
555
|
+
.optional(schema.Context)
|
|
556
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
521
557
|
createdAt: z.iso
|
|
522
558
|
.datetime()
|
|
523
559
|
.check(z.describe('When Tempo built this delivery envelope, as an ISO 8601 timestamp.'), z.meta({ examples: ['2026-01-14T18:38:03.000Z'] })),
|
|
@@ -537,121 +573,176 @@ export var schema;
|
|
|
537
573
|
* variant selector — without per-variant titles, inline `oneOf` members render
|
|
538
574
|
* as a single (first) collapsed schema.
|
|
539
575
|
*/
|
|
540
|
-
schema.Envelope = z
|
|
576
|
+
schema.Envelope = OpenApi.component(z
|
|
541
577
|
.discriminatedUnion('type', [
|
|
542
578
|
z
|
|
543
|
-
.object({
|
|
579
|
+
.object({
|
|
580
|
+
...envelopeBase,
|
|
581
|
+
data: schema.TransferEvent,
|
|
582
|
+
type: z.literal('token:transfer').check(z.meta({ examples: ['token:transfer'] })),
|
|
583
|
+
})
|
|
544
584
|
.check(z.meta({ title: 'Transfer event' })),
|
|
545
585
|
z
|
|
546
586
|
.object({
|
|
547
587
|
...envelopeBase,
|
|
548
588
|
data: schema.TransactionEvent,
|
|
549
|
-
type: z
|
|
589
|
+
type: z
|
|
590
|
+
.literal('transaction:included')
|
|
591
|
+
.check(z.meta({ examples: ['transaction:included'] })),
|
|
550
592
|
})
|
|
551
593
|
.check(z.meta({ title: 'Included transaction event' })),
|
|
552
594
|
z
|
|
553
|
-
.object({
|
|
595
|
+
.object({
|
|
596
|
+
...envelopeBase,
|
|
597
|
+
data: schema.LogEvent,
|
|
598
|
+
type: z.literal('log:emitted').check(z.meta({ examples: ['log:emitted'] })),
|
|
599
|
+
})
|
|
554
600
|
.check(z.meta({ title: 'Log event' })),
|
|
555
601
|
z
|
|
556
|
-
.object({
|
|
602
|
+
.object({
|
|
603
|
+
...envelopeBase,
|
|
604
|
+
data: schema.BlockEvent,
|
|
605
|
+
type: z.literal('block:created').check(z.meta({ examples: ['block:created'] })),
|
|
606
|
+
})
|
|
557
607
|
.check(z.meta({ title: 'Block event' })),
|
|
558
608
|
z
|
|
559
609
|
.object({
|
|
560
610
|
...envelopeBase,
|
|
561
|
-
data: schema.
|
|
562
|
-
type: z
|
|
611
|
+
data: schema.RoutesDepositEvent,
|
|
612
|
+
type: z
|
|
613
|
+
.literal('routes:deposit.updated')
|
|
614
|
+
.check(z.meta({ examples: ['routes:deposit.updated'] })),
|
|
563
615
|
})
|
|
564
|
-
.check(z.meta({ title: '
|
|
616
|
+
.check(z.meta({ title: 'Route deposit updated event' })),
|
|
565
617
|
z
|
|
566
|
-
.object({
|
|
618
|
+
.object({
|
|
619
|
+
...envelopeBase,
|
|
620
|
+
data: schema.RoutesTransferEvent,
|
|
621
|
+
type: z
|
|
622
|
+
.literal('routes:transfer.updated')
|
|
623
|
+
.check(z.meta({ examples: ['routes:transfer.updated'] })),
|
|
624
|
+
})
|
|
625
|
+
.check(z.meta({ title: 'Route transfer updated event' })),
|
|
626
|
+
z
|
|
627
|
+
.object({
|
|
628
|
+
...envelopeBase,
|
|
629
|
+
data: schema.PingEvent,
|
|
630
|
+
type: z.literal('ping').check(z.meta({ examples: ['ping'] })),
|
|
631
|
+
})
|
|
567
632
|
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
568
633
|
])
|
|
569
|
-
.check(z.describe('The signed JSON payload Tempo POSTs to
|
|
634
|
+
.check(z.describe('The signed JSON payload Tempo POSTs to a webhook destination.')), 'WebhookEventEnvelope');
|
|
570
635
|
/** Schemas for the getWebhookEventTypes operation. */
|
|
571
636
|
let getWebhookEventTypes;
|
|
572
637
|
(function (getWebhookEventTypes) {
|
|
573
|
-
|
|
638
|
+
const EventTypeEntry = OpenApi.component(z
|
|
574
639
|
.object({
|
|
575
|
-
|
|
576
|
-
.
|
|
577
|
-
description:
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
640
|
+
description: z
|
|
641
|
+
.string()
|
|
642
|
+
.check(z.describe('Plain-English description of the event type.'), z.meta({ examples: ['TIP-20 token transfer event.'] })),
|
|
643
|
+
type: schema.EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
644
|
+
})
|
|
645
|
+
.check(z.describe('One webhook event type available for subscription.')), 'WebhookEventType');
|
|
646
|
+
getWebhookEventTypes.Response = OpenApi.component(z
|
|
647
|
+
.object({
|
|
648
|
+
data: z.array(EventTypeEntry).check(z.describe('Webhook event types available for subscription.'), z.meta({
|
|
649
|
+
examples: [[{ description: 'TIP-20 token transfer event.', type: 'token:transfer' }]],
|
|
650
|
+
})),
|
|
583
651
|
})
|
|
584
|
-
.check(z.describe('List of webhook event types Tempo can send.'));
|
|
652
|
+
.check(z.describe('List of webhook event types Tempo can send.')), 'WebhookEventTypeList');
|
|
585
653
|
})(getWebhookEventTypes = schema.getWebhookEventTypes || (schema.getWebhookEventTypes = {}));
|
|
586
654
|
/** Schemas for the createWebhook operation. */
|
|
587
655
|
let createWebhook;
|
|
588
656
|
(function (createWebhook) {
|
|
657
|
+
/** Request variant for TIP-20 transfer subscriptions. */
|
|
658
|
+
createWebhook.TransferBody = OpenApi.component(z
|
|
659
|
+
.object({
|
|
660
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
661
|
+
context: z.optional(schema.Context),
|
|
662
|
+
destination: Destination,
|
|
663
|
+
eventType: z
|
|
664
|
+
.literal('token:transfer')
|
|
665
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['token:transfer'] })),
|
|
666
|
+
filters: z.optional(schema.TransferFilters),
|
|
667
|
+
})
|
|
668
|
+
.check(z.meta({ title: 'Transfer subscription' })), 'CreateWebhookTransferRequest');
|
|
669
|
+
/** Request variant for included transaction subscriptions. */
|
|
670
|
+
createWebhook.TransactionBody = OpenApi.component(z
|
|
671
|
+
.object({
|
|
672
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
673
|
+
context: z.optional(schema.Context),
|
|
674
|
+
destination: Destination,
|
|
675
|
+
eventType: z
|
|
676
|
+
.literal('transaction:included')
|
|
677
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['transaction:included'] })),
|
|
678
|
+
filters: z.optional(schema.TxFilters),
|
|
679
|
+
})
|
|
680
|
+
.check(z.meta({ title: 'Included-transaction subscription' })), 'CreateWebhookTransactionRequest');
|
|
681
|
+
/** Request variant for emitted log subscriptions. */
|
|
682
|
+
createWebhook.LogBody = OpenApi.component(z
|
|
683
|
+
.object({
|
|
684
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
685
|
+
context: z.optional(schema.Context),
|
|
686
|
+
destination: Destination,
|
|
687
|
+
eventType: z
|
|
688
|
+
.literal('log:emitted')
|
|
689
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['log:emitted'] })),
|
|
690
|
+
filters: schema.LogFilters,
|
|
691
|
+
})
|
|
692
|
+
.check(z.meta({ title: 'Log subscription' })), 'CreateWebhookLogRequest');
|
|
693
|
+
/** Request variant for created block subscriptions. */
|
|
694
|
+
createWebhook.BlockBody = OpenApi.component(z
|
|
695
|
+
.object({
|
|
696
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
697
|
+
context: z.optional(schema.Context),
|
|
698
|
+
destination: Destination,
|
|
699
|
+
eventType: z
|
|
700
|
+
.literal('block:created')
|
|
701
|
+
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['block:created'] })),
|
|
702
|
+
filters: z.optional(schema.BlockFilters),
|
|
703
|
+
})
|
|
704
|
+
.check(z.meta({ title: 'Block subscription' })), 'CreateWebhookBlockRequest');
|
|
705
|
+
/** Request variant for route deposit subscriptions. */
|
|
706
|
+
createWebhook.RoutesDepositBody = OpenApi.component(z
|
|
707
|
+
.object({
|
|
708
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
709
|
+
context: z.optional(schema.Context),
|
|
710
|
+
destination: Destination,
|
|
711
|
+
eventType: z
|
|
712
|
+
.literal('routes:deposit.updated')
|
|
713
|
+
.check(z.describe('Event type for committed route deposit changes.'), z.meta({ examples: ['routes:deposit.updated'] })),
|
|
714
|
+
filters: z.optional(schema.RoutesDepositFilters),
|
|
715
|
+
})
|
|
716
|
+
.check(z.meta({ title: 'Route deposit subscription' })), 'CreateWebhookRoutesDepositRequest');
|
|
717
|
+
/** Request variant for route transfer subscriptions. */
|
|
718
|
+
createWebhook.RoutesTransferBody = OpenApi.component(z
|
|
719
|
+
.object({
|
|
720
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
721
|
+
context: z.optional(schema.Context),
|
|
722
|
+
destination: Destination,
|
|
723
|
+
eventType: z
|
|
724
|
+
.literal('routes:transfer.updated')
|
|
725
|
+
.check(z.describe('Event type for committed route transfer changes.'), z.meta({ examples: ['routes:transfer.updated'] })),
|
|
726
|
+
filters: z.optional(schema.RoutesTransferFilters),
|
|
727
|
+
})
|
|
728
|
+
.check(z.meta({ title: 'Route transfer subscription' })), 'CreateWebhookRoutesTransferRequest');
|
|
589
729
|
/**
|
|
590
730
|
* Discriminated on `eventType` so each variant carries its own typed
|
|
591
731
|
* `filters` object — this is what lets the docs render the valid filter
|
|
592
732
|
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
593
733
|
* doc renderer's selector (see {@link schema.Envelope}).
|
|
594
734
|
*/
|
|
595
|
-
createWebhook.Body = z
|
|
735
|
+
createWebhook.Body = OpenApi.component(z
|
|
596
736
|
.discriminatedUnion('eventType', [
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
.literal('token:transfer')
|
|
604
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['token:transfer'] })),
|
|
605
|
-
filters: z.optional(schema.TransferFilters),
|
|
606
|
-
})
|
|
607
|
-
.check(z.meta({ title: 'Transfer subscription' })),
|
|
608
|
-
z
|
|
609
|
-
.object({
|
|
610
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
611
|
-
context: z.optional(schema.Context),
|
|
612
|
-
destination: Destination,
|
|
613
|
-
eventType: z
|
|
614
|
-
.literal('transaction:included')
|
|
615
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['transaction:included'] })),
|
|
616
|
-
filters: z.optional(schema.TxFilters),
|
|
617
|
-
})
|
|
618
|
-
.check(z.meta({ title: 'Included-transaction subscription' })),
|
|
619
|
-
z
|
|
620
|
-
.object({
|
|
621
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
622
|
-
context: z.optional(schema.Context),
|
|
623
|
-
destination: Destination,
|
|
624
|
-
eventType: z
|
|
625
|
-
.literal('log:emitted')
|
|
626
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['log:emitted'] })),
|
|
627
|
-
filters: schema.LogFilters,
|
|
628
|
-
})
|
|
629
|
-
.check(z.meta({ title: 'Log subscription' })),
|
|
630
|
-
z
|
|
631
|
-
.object({
|
|
632
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
633
|
-
context: z.optional(schema.Context),
|
|
634
|
-
destination: Destination,
|
|
635
|
-
eventType: z
|
|
636
|
-
.literal('block:created')
|
|
637
|
-
.check(z.describe('Event type you want Tempo to send to your webhook URL.'), z.meta({ examples: ['block:created'] })),
|
|
638
|
-
filters: z.optional(schema.BlockFilters),
|
|
639
|
-
})
|
|
640
|
-
.check(z.meta({ title: 'Block subscription' })),
|
|
641
|
-
z
|
|
642
|
-
.object({
|
|
643
|
-
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
644
|
-
context: z.optional(schema.Context),
|
|
645
|
-
destination: Destination,
|
|
646
|
-
eventType: z
|
|
647
|
-
.literal('funding:deposit.updated')
|
|
648
|
-
.check(z.describe('Event type for committed funding deposit changes.'), z.meta({ examples: ['funding:deposit.updated'] })),
|
|
649
|
-
filters: z.optional(schema.FundingDepositFilters),
|
|
650
|
-
})
|
|
651
|
-
.check(z.meta({ title: 'Funding deposit subscription' })),
|
|
737
|
+
createWebhook.TransferBody,
|
|
738
|
+
createWebhook.TransactionBody,
|
|
739
|
+
createWebhook.LogBody,
|
|
740
|
+
createWebhook.BlockBody,
|
|
741
|
+
createWebhook.RoutesDepositBody,
|
|
742
|
+
createWebhook.RoutesTransferBody,
|
|
652
743
|
])
|
|
653
|
-
.check(z.describe('Details for creating a webhook subscription.'));
|
|
654
|
-
createWebhook.Response = z
|
|
744
|
+
.check(z.describe('Details for creating a webhook subscription.')), 'CreateWebhookRequest');
|
|
745
|
+
createWebhook.Response = OpenApi.component(z
|
|
655
746
|
.object({
|
|
656
747
|
...schema.Subscription.shape,
|
|
657
748
|
destination: Destination,
|
|
@@ -659,7 +750,7 @@ export var schema;
|
|
|
659
750
|
.string()
|
|
660
751
|
.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'] })),
|
|
661
752
|
})
|
|
662
|
-
.check(z.describe('The new webhook subscription, including the one-time signing secret.'));
|
|
753
|
+
.check(z.describe('The new webhook subscription, including the one-time signing secret.')), 'CreateWebhookResponse');
|
|
663
754
|
})(createWebhook = schema.createWebhook || (schema.createWebhook = {}));
|
|
664
755
|
/** Schemas for the listWebhooks operation. */
|
|
665
756
|
let listWebhooks;
|
|
@@ -672,15 +763,17 @@ export var schema;
|
|
|
672
763
|
page: Schema.Page,
|
|
673
764
|
})
|
|
674
765
|
.check(...Schema.pageChecks(), z.describe('Query parameters for listing your webhook subscriptions.'));
|
|
675
|
-
listWebhooks.Response = z
|
|
766
|
+
listWebhooks.Response = OpenApi.component(z
|
|
676
767
|
.object({
|
|
677
|
-
data: z
|
|
768
|
+
data: z
|
|
769
|
+
.array(schema.Subscription)
|
|
770
|
+
.check(z.describe('Webhook subscriptions on this page.'), z.meta({ examples: [[]] })),
|
|
678
771
|
meta: z
|
|
679
772
|
.optional(Schema.CountMeta)
|
|
680
|
-
.check(z.describe('Extra response metadata requested with `include`.')),
|
|
773
|
+
.check(z.describe('Extra response metadata requested with `include`.'), z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] })),
|
|
681
774
|
nextCursor: Schema.NextCursor,
|
|
682
775
|
})
|
|
683
|
-
.check(z.describe('A page of
|
|
776
|
+
.check(z.describe('A page of webhook subscriptions.')), 'WebhookList');
|
|
684
777
|
})(listWebhooks = schema.listWebhooks || (schema.listWebhooks = {}));
|
|
685
778
|
/** Schemas for the getWebhook operation. */
|
|
686
779
|
let getWebhook;
|
|
@@ -706,21 +799,23 @@ export var schema;
|
|
|
706
799
|
page: Schema.Page,
|
|
707
800
|
})
|
|
708
801
|
.check(...Schema.pageChecks(), z.describe('Query parameters for listing webhook delivery attempts.'));
|
|
709
|
-
listWebhookDeliveries.Response = z
|
|
802
|
+
listWebhookDeliveries.Response = OpenApi.component(z
|
|
710
803
|
.object({
|
|
711
|
-
data: z
|
|
804
|
+
data: z
|
|
805
|
+
.array(schema.Delivery)
|
|
806
|
+
.check(z.describe('Webhook delivery attempts on this page.'), z.meta({ examples: [[]] })),
|
|
712
807
|
meta: z
|
|
713
808
|
.optional(Schema.CountMeta)
|
|
714
|
-
.check(z.describe('Extra response metadata requested with `include`.')),
|
|
809
|
+
.check(z.describe('Extra response metadata requested with `include`.'), z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] })),
|
|
715
810
|
nextCursor: Schema.NextCursor,
|
|
716
811
|
})
|
|
717
|
-
.check(z.describe('A page of webhook delivery attempts.'));
|
|
812
|
+
.check(z.describe('A page of webhook delivery attempts.')), 'WebhookDeliveryList');
|
|
718
813
|
})(listWebhookDeliveries = schema.listWebhookDeliveries || (schema.listWebhookDeliveries = {}));
|
|
719
814
|
/** Schemas for the pingWebhook operation. */
|
|
720
815
|
let pingWebhook;
|
|
721
816
|
(function (pingWebhook) {
|
|
722
817
|
pingWebhook.Params = getWebhook.Params;
|
|
723
|
-
pingWebhook.Response = z
|
|
818
|
+
pingWebhook.Response = OpenApi.component(z
|
|
724
819
|
.object({
|
|
725
820
|
delivered: z
|
|
726
821
|
.boolean()
|
|
@@ -738,7 +833,7 @@ export var schema;
|
|
|
738
833
|
.optional(z.number().check(z.int()))
|
|
739
834
|
.check(z.describe('HTTP status your endpoint returned, when Tempo received a response.'), z.meta({ examples: [200] })),
|
|
740
835
|
})
|
|
741
|
-
.check(z.describe('Result of sending a synthetic ping event to
|
|
836
|
+
.check(z.describe('Result of sending a synthetic ping event to a webhook destination.')), 'PingWebhookResponse');
|
|
742
837
|
})(pingWebhook = schema.pingWebhook || (schema.pingWebhook = {}));
|
|
743
838
|
/** Schemas for the retryWebhookDelivery operation. */
|
|
744
839
|
let retryWebhookDelivery;
|
|
@@ -753,13 +848,13 @@ export var schema;
|
|
|
753
848
|
.check(z.describe('Webhook subscription ID (`wh_…`).'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
|
|
754
849
|
})
|
|
755
850
|
.check(z.describe('Path parameters for retrying a webhook delivery.'));
|
|
756
|
-
retryWebhookDelivery.Response = pingWebhook.Response;
|
|
851
|
+
retryWebhookDelivery.Response = OpenApi.component(pingWebhook.Response, 'RetryWebhookDeliveryResponse');
|
|
757
852
|
})(retryWebhookDelivery = schema.retryWebhookDelivery || (schema.retryWebhookDelivery = {}));
|
|
758
853
|
/** Schemas for the updateWebhook operation. */
|
|
759
854
|
let updateWebhook;
|
|
760
855
|
(function (updateWebhook) {
|
|
761
856
|
updateWebhook.Params = getWebhook.Params;
|
|
762
|
-
updateWebhook.Body = z
|
|
857
|
+
updateWebhook.Body = OpenApi.component(z
|
|
763
858
|
.object({
|
|
764
859
|
context: z
|
|
765
860
|
.optional(z.nullable(schema.Context))
|
|
@@ -774,20 +869,20 @@ export var schema;
|
|
|
774
869
|
.optional(schema.Status)
|
|
775
870
|
.check(z.describe('New lifecycle status, such as pausing or resuming delivery.')),
|
|
776
871
|
})
|
|
777
|
-
.check(z.describe('Fields
|
|
872
|
+
.check(z.describe('Fields to update on the webhook subscription.')), 'UpdateWebhookRequest');
|
|
778
873
|
updateWebhook.Response = schema.Subscription;
|
|
779
874
|
})(updateWebhook = schema.updateWebhook || (schema.updateWebhook = {}));
|
|
780
875
|
/** Schemas for the deleteWebhook operation. */
|
|
781
876
|
let deleteWebhook;
|
|
782
877
|
(function (deleteWebhook) {
|
|
783
878
|
deleteWebhook.Params = getWebhook.Params;
|
|
784
|
-
deleteWebhook.Response = z
|
|
879
|
+
deleteWebhook.Response = OpenApi.component(z
|
|
785
880
|
.object({
|
|
786
881
|
id: z
|
|
787
882
|
.string()
|
|
788
883
|
.check(z.describe('ID of the webhook subscription that was deleted.'), z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] })),
|
|
789
884
|
})
|
|
790
|
-
.check(z.describe('Confirmation that the webhook subscription was deleted.'));
|
|
885
|
+
.check(z.describe('Confirmation that the webhook subscription was deleted.')), 'DeleteWebhookResponse');
|
|
791
886
|
})(deleteWebhook = schema.deleteWebhook || (schema.deleteWebhook = {}));
|
|
792
887
|
})(schema || (schema = {}));
|
|
793
888
|
/**
|
|
@@ -799,8 +894,7 @@ export var schema;
|
|
|
799
894
|
*/
|
|
800
895
|
export function webhooks(options = {}) {
|
|
801
896
|
const hidden = !options.enabled;
|
|
802
|
-
const availableEventTypes = eventTypeDescriptions.filter((eventType) => eventType.type
|
|
803
|
-
options.applicationEventTypes?.includes(eventType.type));
|
|
897
|
+
const availableEventTypes = eventTypeDescriptions.filter((eventType) => !isRoutesEventType(eventType.type) || options.applicationEventTypes?.includes(eventType.type));
|
|
804
898
|
const availableEventTypeSet = new Set(availableEventTypes.map((eventType) => eventType.type));
|
|
805
899
|
// Gate the whole resource on a configured state store. Without it the
|
|
806
900
|
// outbound-HTTP surface is disabled (read-only deployment).
|
|
@@ -823,6 +917,16 @@ export function webhooks(options = {}) {
|
|
|
823
917
|
hide: hidden,
|
|
824
918
|
operationId: 'getWebhookEventTypes',
|
|
825
919
|
responses: OpenApi.responses({
|
|
920
|
+
errors: {
|
|
921
|
+
400: {
|
|
922
|
+
codes: [],
|
|
923
|
+
description: 'The API key credential is malformed.',
|
|
924
|
+
},
|
|
925
|
+
404: {
|
|
926
|
+
codes: ['webhooks_not_enabled'],
|
|
927
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
928
|
+
},
|
|
929
|
+
},
|
|
826
930
|
success: {
|
|
827
931
|
description: 'Webhook event types available for subscription.',
|
|
828
932
|
schema: schema.getWebhookEventTypes.Response,
|
|
@@ -868,7 +972,11 @@ export function webhooks(options = {}) {
|
|
|
868
972
|
},
|
|
869
973
|
403: {
|
|
870
974
|
codes: ['api_key_forbidden', 'limit_exceeded'],
|
|
871
|
-
description: 'The API key lacks access or
|
|
975
|
+
description: 'The API key lacks access or its creator-shared subscription limit was reached.',
|
|
976
|
+
},
|
|
977
|
+
404: {
|
|
978
|
+
codes: ['webhooks_not_enabled'],
|
|
979
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
872
980
|
},
|
|
873
981
|
},
|
|
874
982
|
success: {
|
|
@@ -901,10 +1009,10 @@ export function webhooks(options = {}) {
|
|
|
901
1009
|
message: 'Webhook event type is not available in this deployment',
|
|
902
1010
|
status: 400,
|
|
903
1011
|
});
|
|
904
|
-
if (body.eventType
|
|
1012
|
+
if (isRoutesEventType(body.eventType)) {
|
|
905
1013
|
if (principal?.type !== 'api_key')
|
|
906
1014
|
return unauthorized(c);
|
|
907
|
-
if (!principal.apiKey.scopes.some((scope) => scope === Scope.wildcard || scope === '
|
|
1015
|
+
if (!principal.apiKey.scopes.some((scope) => scope === Scope.wildcard || scope === 'routes:read'))
|
|
908
1016
|
return Response.error(c, {
|
|
909
1017
|
code: 'api_key_forbidden',
|
|
910
1018
|
message: 'API key missing required scope',
|
|
@@ -919,9 +1027,9 @@ export function webhooks(options = {}) {
|
|
|
919
1027
|
// Preserve destination errors before the creation-time RPC dependency.
|
|
920
1028
|
WebhookDestination.assertDestination(body.destination);
|
|
921
1029
|
const maxPerOwner = webhook.maxPerOwner ?? defaultMaxPerOwner;
|
|
922
|
-
if ((await Webhooks.
|
|
1030
|
+
if ((await Webhooks.countSubscriptionsForLimit(db, { owner })) >= maxPerOwner)
|
|
923
1031
|
throw new Webhooks.LimitExceededError(maxPerOwner);
|
|
924
|
-
const startBlockNumber = body.eventType
|
|
1032
|
+
const startBlockNumber = isRoutesEventType(body.eventType)
|
|
925
1033
|
? undefined
|
|
926
1034
|
: await getRpcHead(c.get('getClient')(chainId));
|
|
927
1035
|
const subscription = await Webhooks.createSubscription(db, {
|
|
@@ -958,6 +1066,16 @@ export function webhooks(options = {}) {
|
|
|
958
1066
|
hide: hidden,
|
|
959
1067
|
operationId: 'listWebhooks',
|
|
960
1068
|
responses: OpenApi.responses({
|
|
1069
|
+
errors: {
|
|
1070
|
+
400: {
|
|
1071
|
+
codes: ['query_invalid'],
|
|
1072
|
+
description: 'The query parameters are invalid.',
|
|
1073
|
+
},
|
|
1074
|
+
404: {
|
|
1075
|
+
codes: ['webhooks_not_enabled'],
|
|
1076
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
961
1079
|
success: {
|
|
962
1080
|
description: 'A page of webhook subscriptions.',
|
|
963
1081
|
schema: schema.listWebhooks.Response,
|
|
@@ -1025,9 +1143,13 @@ export function webhooks(options = {}) {
|
|
|
1025
1143
|
operationId: 'getWebhook',
|
|
1026
1144
|
responses: OpenApi.responses({
|
|
1027
1145
|
errors: {
|
|
1146
|
+
400: {
|
|
1147
|
+
codes: ['param_invalid'],
|
|
1148
|
+
description: 'The webhook ID is invalid.',
|
|
1149
|
+
},
|
|
1028
1150
|
404: {
|
|
1029
1151
|
description: 'No webhook subscription was found for that ID.',
|
|
1030
|
-
codes: ['webhook_not_found'],
|
|
1152
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1031
1153
|
},
|
|
1032
1154
|
},
|
|
1033
1155
|
success: {
|
|
@@ -1075,9 +1197,13 @@ export function webhooks(options = {}) {
|
|
|
1075
1197
|
operationId: 'listWebhookDeliveries',
|
|
1076
1198
|
responses: OpenApi.responses({
|
|
1077
1199
|
errors: {
|
|
1200
|
+
400: {
|
|
1201
|
+
codes: ['param_invalid', 'query_invalid'],
|
|
1202
|
+
description: 'The webhook ID or query parameters are invalid.',
|
|
1203
|
+
},
|
|
1078
1204
|
404: {
|
|
1079
1205
|
description: 'No webhook subscription was found for that ID.',
|
|
1080
|
-
codes: ['webhook_not_found'],
|
|
1206
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1081
1207
|
},
|
|
1082
1208
|
},
|
|
1083
1209
|
success: {
|
|
@@ -1153,9 +1279,13 @@ export function webhooks(options = {}) {
|
|
|
1153
1279
|
operationId: 'pingWebhook',
|
|
1154
1280
|
responses: OpenApi.responses({
|
|
1155
1281
|
errors: {
|
|
1282
|
+
400: {
|
|
1283
|
+
codes: ['param_invalid'],
|
|
1284
|
+
description: 'The webhook ID is invalid.',
|
|
1285
|
+
},
|
|
1156
1286
|
404: {
|
|
1157
1287
|
description: 'No webhook subscription was found for that ID.',
|
|
1158
|
-
codes: ['webhook_not_found'],
|
|
1288
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1159
1289
|
},
|
|
1160
1290
|
},
|
|
1161
1291
|
success: {
|
|
@@ -1211,9 +1341,13 @@ export function webhooks(options = {}) {
|
|
|
1211
1341
|
operationId: 'retryWebhookDelivery',
|
|
1212
1342
|
responses: OpenApi.responses({
|
|
1213
1343
|
errors: {
|
|
1344
|
+
400: {
|
|
1345
|
+
codes: ['param_invalid'],
|
|
1346
|
+
description: 'The webhook or delivery ID is invalid.',
|
|
1347
|
+
},
|
|
1214
1348
|
404: {
|
|
1215
1349
|
description: 'No webhook subscription or delivery was found for those IDs.',
|
|
1216
|
-
codes: ['webhook_not_found', 'delivery_not_found'],
|
|
1350
|
+
codes: ['webhook_not_found', 'delivery_not_found', 'webhooks_not_enabled'],
|
|
1217
1351
|
},
|
|
1218
1352
|
},
|
|
1219
1353
|
success: {
|
|
@@ -1290,7 +1424,7 @@ export function webhooks(options = {}) {
|
|
|
1290
1424
|
},
|
|
1291
1425
|
404: {
|
|
1292
1426
|
description: 'No webhook subscription was found for that ID.',
|
|
1293
|
-
codes: ['webhook_not_found'],
|
|
1427
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1294
1428
|
},
|
|
1295
1429
|
},
|
|
1296
1430
|
success: {
|
|
@@ -1352,9 +1486,13 @@ export function webhooks(options = {}) {
|
|
|
1352
1486
|
operationId: 'deleteWebhook',
|
|
1353
1487
|
responses: OpenApi.responses({
|
|
1354
1488
|
errors: {
|
|
1489
|
+
400: {
|
|
1490
|
+
codes: ['param_invalid'],
|
|
1491
|
+
description: 'The webhook ID is invalid.',
|
|
1492
|
+
},
|
|
1355
1493
|
404: {
|
|
1356
1494
|
description: 'No webhook subscription was found for that ID.',
|
|
1357
|
-
codes: ['webhook_not_found'],
|
|
1495
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1358
1496
|
},
|
|
1359
1497
|
},
|
|
1360
1498
|
success: {
|
|
@@ -1479,7 +1617,8 @@ export async function getRpcHead(client) {
|
|
|
1479
1617
|
}
|
|
1480
1618
|
const filterSchemas = {
|
|
1481
1619
|
'block:created': schema.BlockFilters,
|
|
1482
|
-
'
|
|
1620
|
+
'routes:deposit.updated': schema.RoutesDepositFilters,
|
|
1621
|
+
'routes:transfer.updated': schema.RoutesTransferFilters,
|
|
1483
1622
|
'log:emitted': schema.LogFilters,
|
|
1484
1623
|
'token:transfer': schema.TransferFilters,
|
|
1485
1624
|
'transaction:included': schema.TxFilters,
|
|
@@ -1920,8 +2059,7 @@ function toPublic(subscription) {
|
|
|
1920
2059
|
...(subscription.context === undefined ? {} : { context: subscription.context }),
|
|
1921
2060
|
createdAt: subscription.createdAt,
|
|
1922
2061
|
destination: redactDestination(subscription.destination),
|
|
1923
|
-
...(subscription.eventType
|
|
1924
|
-
subscription.environment !== undefined
|
|
2062
|
+
...(isRoutesEventType(subscription.eventType) && subscription.environment !== undefined
|
|
1925
2063
|
? { environment: subscription.environment }
|
|
1926
2064
|
: {}),
|
|
1927
2065
|
eventType: subscription.eventType,
|