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