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
|
@@ -17,8 +17,8 @@ import type * as Viem from '../../../internal/Viem.js'
|
|
|
17
17
|
import * as WebhookDestination from '../../../internal/WebhookDestination.js'
|
|
18
18
|
import * as WebhookTransfer from '../../../internal/WebhookTransfer.js'
|
|
19
19
|
import * as Webhooks from '../../../internal/Webhooks.js'
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
20
|
+
import * as RoutesDeposit from '../../../internal/routes/Deposit.js'
|
|
21
|
+
import * as RoutesTransfer from '../../../internal/routes/Transfer.js'
|
|
22
22
|
import * as Transactions from './transactions.js'
|
|
23
23
|
import * as Transfers from './transfers.js'
|
|
24
24
|
|
|
@@ -42,8 +42,8 @@ const redactedSlackUrl = 'https://hooks.slack.com/…'
|
|
|
42
42
|
*/
|
|
43
43
|
export const eventTypes = [
|
|
44
44
|
'block:created',
|
|
45
|
-
'
|
|
46
|
-
'
|
|
45
|
+
'routes:deposit.updated',
|
|
46
|
+
'routes:transfer.updated',
|
|
47
47
|
'log:emitted',
|
|
48
48
|
'token:transfer',
|
|
49
49
|
'transaction:included',
|
|
@@ -52,18 +52,18 @@ export const eventTypes = [
|
|
|
52
52
|
/** Event types a subscription can listen to. Derived from {@link eventTypes}. */
|
|
53
53
|
export type EventType = (typeof eventTypes)[number]
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
export const
|
|
57
|
-
'
|
|
58
|
-
'
|
|
55
|
+
/** Route resource events produced by the API instead of chain scans. */
|
|
56
|
+
export const routesEventTypes = [
|
|
57
|
+
'routes:deposit.updated',
|
|
58
|
+
'routes:transfer.updated',
|
|
59
59
|
] as const satisfies readonly EventType[]
|
|
60
60
|
|
|
61
|
-
/** Event type carrying an owner-scoped
|
|
62
|
-
export type
|
|
61
|
+
/** Event type carrying an owner-scoped route resource. */
|
|
62
|
+
export type RoutesEventType = (typeof routesEventTypes)[number]
|
|
63
63
|
|
|
64
|
-
/** Returns whether an event type carries an owner-scoped
|
|
65
|
-
export function
|
|
66
|
-
return (
|
|
64
|
+
/** Returns whether an event type carries an owner-scoped route resource. */
|
|
65
|
+
export function isRoutesEventType(eventType: EventType): eventType is RoutesEventType {
|
|
66
|
+
return (routesEventTypes as readonly EventType[]).includes(eventType)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/** Subscribable event types surfaced by `GET /webhooks/event-types`. */
|
|
@@ -75,13 +75,13 @@ const eventTypeDescriptions = [
|
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
description:
|
|
78
|
-
'A
|
|
79
|
-
type: '
|
|
78
|
+
'A route deposit materially changed after verified reconciliation, filterable by deposit address, recipient, or status.',
|
|
79
|
+
type: 'routes:deposit.updated',
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
description:
|
|
83
|
-
'A
|
|
84
|
-
type: '
|
|
83
|
+
'A route transfer materially changed, filterable by transfer ID or lifecycle status.',
|
|
84
|
+
type: 'routes:transfer.updated',
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
description:
|
|
@@ -102,7 +102,10 @@ const eventTypeDescriptions = [
|
|
|
102
102
|
/** Zod schemas owned by the webhooks resource. */
|
|
103
103
|
export namespace schema {
|
|
104
104
|
/** Subscribable event type. */
|
|
105
|
-
export const EventType =
|
|
105
|
+
export const EventType = OpenApi.component(
|
|
106
|
+
z.enum(eventTypes).check(z.describe('Event type you can subscribe to.')),
|
|
107
|
+
'WebhookSubscriptionEventType',
|
|
108
|
+
)
|
|
106
109
|
|
|
107
110
|
/** Subscription lifecycle status. */
|
|
108
111
|
export const Status = z
|
|
@@ -158,19 +161,19 @@ export namespace schema {
|
|
|
158
161
|
* your Slack incoming-webhook URL), or a `betterstack` destination (a structured
|
|
159
162
|
* log event POSTed to a Better Stack source with a bearer source token).
|
|
160
163
|
*/
|
|
161
|
-
const
|
|
164
|
+
const DestinationSchema = z
|
|
162
165
|
.discriminatedUnion('type', [
|
|
163
166
|
z.object({
|
|
164
|
-
type: z.literal('url'),
|
|
167
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
165
168
|
url: Url,
|
|
166
169
|
}),
|
|
167
170
|
z.object({
|
|
168
|
-
type: z.literal('slack'),
|
|
171
|
+
type: z.literal('slack').check(z.meta({ examples: ['slack'] })),
|
|
169
172
|
url: SlackUrl,
|
|
170
173
|
}),
|
|
171
174
|
z.object({
|
|
172
175
|
token: BetterstackToken,
|
|
173
|
-
type: z.literal('betterstack'),
|
|
176
|
+
type: z.literal('betterstack').check(z.meta({ examples: ['betterstack'] })),
|
|
174
177
|
url: BetterstackUrl,
|
|
175
178
|
}),
|
|
176
179
|
])
|
|
@@ -178,27 +181,41 @@ export namespace schema {
|
|
|
178
181
|
z.describe(
|
|
179
182
|
'Delivery destination: an HTTPS URL, a Slack incoming-webhook URL, or a Better Stack source.',
|
|
180
183
|
),
|
|
184
|
+
z.meta({ examples: [{ type: 'url', url: 'https://example.com/webhooks' }] }),
|
|
181
185
|
)
|
|
186
|
+
const Destination = OpenApi.component(DestinationSchema, 'WebhookDestination')
|
|
182
187
|
|
|
183
|
-
const
|
|
188
|
+
const PublicDestinationSchema = z
|
|
184
189
|
.discriminatedUnion('type', [
|
|
185
190
|
z.object({
|
|
186
|
-
type: z.literal('url'),
|
|
191
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
187
192
|
url: Url,
|
|
188
193
|
}),
|
|
189
194
|
z.object({
|
|
190
|
-
type: z.literal('slack'),
|
|
191
|
-
url: z
|
|
195
|
+
type: z.literal('slack').check(z.meta({ examples: ['slack'] })),
|
|
196
|
+
url: z
|
|
197
|
+
.literal(redactedSlackUrl)
|
|
198
|
+
.check(
|
|
199
|
+
z.describe('Redacted Slack webhook URL.'),
|
|
200
|
+
z.meta({ examples: [redactedSlackUrl] }),
|
|
201
|
+
),
|
|
192
202
|
}),
|
|
193
203
|
z.object({
|
|
194
204
|
token: z
|
|
195
205
|
.literal(redactedBetterstackToken)
|
|
196
|
-
.check(
|
|
197
|
-
|
|
206
|
+
.check(
|
|
207
|
+
z.describe('Redacted Better Stack source token.'),
|
|
208
|
+
z.meta({ examples: [redactedBetterstackToken] }),
|
|
209
|
+
),
|
|
210
|
+
type: z.literal('betterstack').check(z.meta({ examples: ['betterstack'] })),
|
|
198
211
|
url: BetterstackUrl,
|
|
199
212
|
}),
|
|
200
213
|
])
|
|
201
|
-
.check(
|
|
214
|
+
.check(
|
|
215
|
+
z.describe('Delivery destination with bearer credentials redacted.'),
|
|
216
|
+
z.meta({ examples: [{ type: 'url', url: 'https://example.com/webhooks' }] }),
|
|
217
|
+
)
|
|
218
|
+
const PublicDestination = OpenApi.component(PublicDestinationSchema, 'WebhookPublicDestination')
|
|
202
219
|
|
|
203
220
|
/**
|
|
204
221
|
* Equality / membership operator for a filterable field. A consumer can pass a
|
|
@@ -233,7 +250,10 @@ export namespace schema {
|
|
|
233
250
|
lt: z.optional(Schema.Quantity),
|
|
234
251
|
lte: z.optional(Schema.Quantity),
|
|
235
252
|
})
|
|
236
|
-
.check(
|
|
253
|
+
.check(
|
|
254
|
+
z.refine((c) => Object.keys(c).length > 0, { error: 'Comparison cannot be empty.' }),
|
|
255
|
+
z.meta({ examples: [{ gte: '0x1' }] }),
|
|
256
|
+
),
|
|
237
257
|
])
|
|
238
258
|
|
|
239
259
|
/**
|
|
@@ -253,9 +273,11 @@ export namespace schema {
|
|
|
253
273
|
* drift. All are optional and AND-combined; omit every field to subscribe to
|
|
254
274
|
* the full stream.
|
|
255
275
|
*/
|
|
256
|
-
export const TransferFilters =
|
|
257
|
-
|
|
258
|
-
|
|
276
|
+
export const TransferFilters = OpenApi.component(
|
|
277
|
+
Transfers.schema.Predicates.check(
|
|
278
|
+
z.describe('Filters that narrow which TIP-20 transfer events trigger this webhook.'),
|
|
279
|
+
),
|
|
280
|
+
'WebhookTransferFilters',
|
|
259
281
|
)
|
|
260
282
|
|
|
261
283
|
/**
|
|
@@ -267,80 +289,88 @@ export namespace schema {
|
|
|
267
289
|
* `address` matches either side (`from` OR `to`); when `includeCalls` is set
|
|
268
290
|
* (default), `to`/`address` also match an inner call target (`calls[].to`).
|
|
269
291
|
*/
|
|
270
|
-
export const TxFilters =
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
z.describe('Match transactions where this address is the sender or recipient.'),
|
|
292
|
+
export const TxFilters = OpenApi.component(
|
|
293
|
+
z
|
|
294
|
+
.strictObject({
|
|
295
|
+
hash: z.optional(
|
|
296
|
+
eq(Schema.Hash).check(
|
|
297
|
+
z.describe('Match this exact transaction hash (or any of several).'),
|
|
298
|
+
),
|
|
278
299
|
),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
to: z.optional(
|
|
284
|
-
eq(Schema.Address).check(
|
|
285
|
-
z.describe('Match transactions sent to this address (root `to`; see `includeCalls`).'),
|
|
300
|
+
address: z.optional(
|
|
301
|
+
eq(Schema.Address).check(
|
|
302
|
+
z.describe('Match transactions where this address is the sender or recipient.'),
|
|
303
|
+
),
|
|
286
304
|
),
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
.check(
|
|
305
|
+
from: z.optional(
|
|
306
|
+
eq(Schema.Address).check(z.describe('Match transactions whose sender (`from`) is this.')),
|
|
307
|
+
),
|
|
308
|
+
to: z.optional(
|
|
309
|
+
eq(Schema.Address).check(
|
|
310
|
+
z.describe('Match transactions sent to this address (root `to`; see `includeCalls`).'),
|
|
311
|
+
),
|
|
312
|
+
),
|
|
313
|
+
includeCalls: z.optional(
|
|
314
|
+
z
|
|
315
|
+
.boolean()
|
|
316
|
+
.check(
|
|
317
|
+
z.describe(
|
|
318
|
+
'When true (default), `to`/`address` also match an inner account-abstraction call target (`calls[].to`).',
|
|
319
|
+
),
|
|
320
|
+
z.meta({ examples: [true] }),
|
|
321
|
+
),
|
|
322
|
+
),
|
|
323
|
+
value: z.optional(compare.check(z.describe('Match the transaction value (wei) bounds.'))),
|
|
324
|
+
input: z.optional(
|
|
325
|
+
bytes.check(
|
|
292
326
|
z.describe(
|
|
293
|
-
'
|
|
327
|
+
'Match top-level calldata by 4-byte `selector`, hex `startsWith`, or exact.',
|
|
294
328
|
),
|
|
295
|
-
z.meta({ examples: [true] }),
|
|
296
329
|
),
|
|
297
|
-
),
|
|
298
|
-
value: z.optional(compare.check(z.describe('Match the transaction value (wei) bounds.'))),
|
|
299
|
-
input: z.optional(
|
|
300
|
-
bytes.check(
|
|
301
|
-
z.describe('Match top-level calldata by 4-byte `selector`, hex `startsWith`, or exact.'),
|
|
302
330
|
),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
331
|
+
calls: z.optional(
|
|
332
|
+
z
|
|
333
|
+
.strictObject({
|
|
334
|
+
to: eq(Schema.Address),
|
|
335
|
+
})
|
|
336
|
+
.check(
|
|
337
|
+
z.describe(
|
|
338
|
+
'Match if ANY inner account-abstraction call targets this address (`calls[].to`).',
|
|
339
|
+
),
|
|
312
340
|
),
|
|
341
|
+
),
|
|
342
|
+
callCount: z.optional(
|
|
343
|
+
compare.check(z.describe('Match the number of inner calls (`call_count`).')),
|
|
344
|
+
),
|
|
345
|
+
txType: z.optional(
|
|
346
|
+
eq(Schema.Hex).check(
|
|
347
|
+
z.describe('Match the transaction type (e.g. `0x76` for Tempo AA).'),
|
|
313
348
|
),
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
})
|
|
340
|
-
.check(
|
|
341
|
-
z.describe('Filters that narrow which included transactions trigger this webhook.'),
|
|
342
|
-
z.meta({ title: 'Included-transaction filters' }),
|
|
343
|
-
)
|
|
349
|
+
),
|
|
350
|
+
feeToken: z.optional(
|
|
351
|
+
eq(Schema.TokenAddress).check(z.describe('Match the fee token address.')),
|
|
352
|
+
),
|
|
353
|
+
gasLimit: z.optional(compare.check(z.describe('Match the gas limit bounds.'))),
|
|
354
|
+
maxFeePerGas: z.optional(compare.check(z.describe('Match the max fee per gas bounds.'))),
|
|
355
|
+
maxPriorityFeePerGas: z.optional(
|
|
356
|
+
compare.check(z.describe('Match the max priority fee per gas bounds.')),
|
|
357
|
+
),
|
|
358
|
+
nonce: z.optional(compare.check(z.describe('Match the nonce bounds.'))),
|
|
359
|
+
nonceKey: z.optional(eq(Schema.Hex).check(z.describe('Match the nonce key (Tempo AA).'))),
|
|
360
|
+
validBefore: z.optional(
|
|
361
|
+
compare.check(z.describe('Match the `validBefore` bounds (unix s).')),
|
|
362
|
+
),
|
|
363
|
+
validAfter: z.optional(
|
|
364
|
+
compare.check(z.describe('Match the `validAfter` bounds (unix s).')),
|
|
365
|
+
),
|
|
366
|
+
blockNumber: z.optional(compare.check(z.describe('Match the block-number bounds.'))),
|
|
367
|
+
timestamp: z.optional(
|
|
368
|
+
compare.check(z.describe('Match the block timestamp bounds (unix s).')),
|
|
369
|
+
),
|
|
370
|
+
})
|
|
371
|
+
.check(z.describe('Filters that narrow which included transactions trigger this webhook.')),
|
|
372
|
+
'WebhookTransactionFilters',
|
|
373
|
+
)
|
|
344
374
|
|
|
345
375
|
/** A 32-byte log topic (lowercased hex). */
|
|
346
376
|
const topic = Schema.Hash
|
|
@@ -353,87 +383,92 @@ export namespace schema {
|
|
|
353
383
|
* firehose), and an addressless filter must still be selective — an event
|
|
354
384
|
* anchor (`signature`/`topic0`) plus at least one indexed topic or argument.
|
|
355
385
|
*/
|
|
356
|
-
export const LogFilters =
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
386
|
+
export const LogFilters = OpenApi.component(
|
|
387
|
+
z
|
|
388
|
+
.strictObject({
|
|
389
|
+
address: z.optional(
|
|
390
|
+
eq(Schema.Address).check(
|
|
391
|
+
z.describe('Only match logs emitted by this contract address (or any of several).'),
|
|
392
|
+
z.meta({ examples: ['0x20c0000000000000000000008f5425160ebe5525'] }),
|
|
393
|
+
),
|
|
362
394
|
),
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
395
|
+
signature: z.optional(
|
|
396
|
+
z.string().check(
|
|
397
|
+
z.describe(
|
|
398
|
+
'Human-readable ABI event signature used to derive `topic0` and decode `args`, e.g. `event Transfer(address indexed from, address indexed to, uint256 value)`.',
|
|
399
|
+
),
|
|
400
|
+
z.meta({
|
|
401
|
+
examples: ['event Transfer(address indexed from, address indexed to, uint256 value)'],
|
|
402
|
+
}),
|
|
368
403
|
),
|
|
369
|
-
z.meta({
|
|
370
|
-
examples: ['event Transfer(address indexed from, address indexed to, uint256 value)'],
|
|
371
|
-
}),
|
|
372
404
|
),
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
405
|
+
topic0: z.optional(
|
|
406
|
+
eq(topic).check(
|
|
407
|
+
z.describe('Event signature hash (topic 0). Mutually exclusive with `signature`.'),
|
|
408
|
+
z.meta({
|
|
409
|
+
examples: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'],
|
|
410
|
+
}),
|
|
411
|
+
),
|
|
380
412
|
),
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
413
|
+
topic1: z.optional(
|
|
414
|
+
eq(topic).check(
|
|
415
|
+
z.describe('Raw indexed argument 1 (topic 1).'),
|
|
416
|
+
z.meta({
|
|
417
|
+
examples: ['0x000000000000000000000000e7687128b0a808c2831ff94d4f7b2fb35c65af38'],
|
|
418
|
+
}),
|
|
419
|
+
),
|
|
388
420
|
),
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
421
|
+
topic2: z.optional(
|
|
422
|
+
eq(topic).check(
|
|
423
|
+
z.describe('Raw indexed argument 2 (topic 2).'),
|
|
424
|
+
z.meta({
|
|
425
|
+
examples: ['0x0000000000000000000000009e39034aae71fb89f66061a2602eb6efec271754'],
|
|
426
|
+
}),
|
|
427
|
+
),
|
|
396
428
|
),
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
429
|
+
topic3: z.optional(
|
|
430
|
+
eq(topic).check(
|
|
431
|
+
z.describe('Raw indexed argument 3 (topic 3).'),
|
|
432
|
+
z.meta({
|
|
433
|
+
examples: ['0x0000000000000000000000000000000000000000000000000000000000000000'],
|
|
434
|
+
}),
|
|
435
|
+
),
|
|
404
436
|
),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
437
|
+
args: z.optional(
|
|
438
|
+
z
|
|
439
|
+
.record(z.string(), z.unknown())
|
|
440
|
+
.check(
|
|
441
|
+
z.describe(
|
|
442
|
+
'Match decoded event arguments by name (indexed or non-indexed). Requires `signature`. Each value is an exact value or a super admin object.',
|
|
443
|
+
),
|
|
444
|
+
z.meta({ examples: [{ to: '0x9e39034aae71fb89f66061a2602eb6efec271754' }] }),
|
|
412
445
|
),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
446
|
+
),
|
|
447
|
+
blockNumber: z.optional(
|
|
448
|
+
compare.check(z.describe('Only match logs within these block-number bounds.')),
|
|
449
|
+
),
|
|
450
|
+
})
|
|
451
|
+
.check(
|
|
452
|
+
z.describe('Filters that narrow which contract event logs trigger this webhook.'),
|
|
453
|
+
z.meta({
|
|
454
|
+
examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }],
|
|
455
|
+
}),
|
|
456
|
+
z.refine((f) => Object.keys(f).length > 0, {
|
|
457
|
+
error: 'At least one log filter is required.',
|
|
458
|
+
}),
|
|
459
|
+
z.refine((f) => !(f.signature && f.topic0), {
|
|
460
|
+
error: 'Pass `signature` or `topic0`, not both.',
|
|
461
|
+
}),
|
|
462
|
+
z.refine((f) => !f.args || f.signature, {
|
|
463
|
+
error: '`args` requires `signature` to decode the event.',
|
|
464
|
+
}),
|
|
465
|
+
z.refine((f) => hasLogPushdown(f), {
|
|
466
|
+
error:
|
|
467
|
+
'Log filters must include a pushdown-capable address or an event/topic0 anchor plus an indexed topic or argument.',
|
|
468
|
+
}),
|
|
418
469
|
),
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
z.describe('Filters that narrow which contract event logs trigger this webhook.'),
|
|
422
|
-
z.meta({ title: 'Log filters' }),
|
|
423
|
-
z.refine((f) => Object.keys(f).length > 0, {
|
|
424
|
-
error: 'At least one log filter is required.',
|
|
425
|
-
}),
|
|
426
|
-
z.refine((f) => !(f.signature && f.topic0), {
|
|
427
|
-
error: 'Pass `signature` or `topic0`, not both.',
|
|
428
|
-
}),
|
|
429
|
-
z.refine((f) => !f.args || f.signature, {
|
|
430
|
-
error: '`args` requires `signature` to decode the event.',
|
|
431
|
-
}),
|
|
432
|
-
z.refine((f) => hasLogPushdown(f), {
|
|
433
|
-
error:
|
|
434
|
-
'Log filters must include a pushdown-capable address or an event/topic0 anchor plus an indexed topic or argument.',
|
|
435
|
-
}),
|
|
436
|
-
)
|
|
470
|
+
'WebhookLogFilters',
|
|
471
|
+
)
|
|
437
472
|
|
|
438
473
|
/**
|
|
439
474
|
* `block:created` subscription filters. All optional and AND-combined; unlike
|
|
@@ -441,177 +476,187 @@ export namespace schema {
|
|
|
441
476
|
* non-abusive heartbeat feed. Block-level metadata only (no transaction
|
|
442
477
|
* predicates; use `transaction:included` for those).
|
|
443
478
|
*/
|
|
444
|
-
export const BlockFilters =
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
miner: z.optional(
|
|
450
|
-
eq(Schema.Address).check(
|
|
451
|
-
z.describe('Only match blocks produced by this address (the miner/producer).'),
|
|
452
|
-
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
479
|
+
export const BlockFilters = OpenApi.component(
|
|
480
|
+
z
|
|
481
|
+
.strictObject({
|
|
482
|
+
number: z.optional(
|
|
483
|
+
compare.check(z.describe('Only match blocks within these block-number bounds.')),
|
|
453
484
|
),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
485
|
+
miner: z.optional(
|
|
486
|
+
eq(Schema.Address).check(
|
|
487
|
+
z.describe('Only match blocks produced by this address (the miner/producer).'),
|
|
488
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
489
|
+
),
|
|
458
490
|
),
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
gasLimit: z.optional(
|
|
464
|
-
compare.check(z.describe('Only match blocks whose gas limit is within these bounds.')),
|
|
465
|
-
),
|
|
466
|
-
timestamp: z.optional(
|
|
467
|
-
compare.check(
|
|
468
|
-
z.describe('Only match blocks whose unix timestamp (seconds) is within these bounds.'),
|
|
491
|
+
proposer: z.optional(
|
|
492
|
+
eq(Schema.Address).check(
|
|
493
|
+
z.describe('Only match blocks proposed by this consensus proposer (when available).'),
|
|
494
|
+
),
|
|
469
495
|
),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
496
|
+
gasUsed: z.optional(
|
|
497
|
+
compare.check(
|
|
498
|
+
z.describe('Only match blocks whose total gas used is within these bounds.'),
|
|
499
|
+
),
|
|
500
|
+
),
|
|
501
|
+
gasLimit: z.optional(
|
|
502
|
+
compare.check(z.describe('Only match blocks whose gas limit is within these bounds.')),
|
|
503
|
+
),
|
|
504
|
+
timestamp: z.optional(
|
|
505
|
+
compare.check(
|
|
506
|
+
z.describe('Only match blocks whose unix timestamp (seconds) is within these bounds.'),
|
|
507
|
+
),
|
|
508
|
+
),
|
|
509
|
+
})
|
|
510
|
+
.check(z.describe('Filters that narrow which new blocks trigger this webhook.')),
|
|
511
|
+
'WebhookBlockFilters',
|
|
512
|
+
)
|
|
476
513
|
|
|
477
|
-
/** `
|
|
478
|
-
export const
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
z.describe('Filters that narrow which
|
|
486
|
-
|
|
487
|
-
|
|
514
|
+
/** `routes:deposit.updated` subscription filters. All are optional and AND-combined. */
|
|
515
|
+
export const RoutesDepositFilters = OpenApi.component(
|
|
516
|
+
z
|
|
517
|
+
.strictObject({
|
|
518
|
+
depositAddressId: z.optional(RoutesDeposit.schema.Snapshot.shape.depositAddressId),
|
|
519
|
+
recipient: z.optional(Schema.Address),
|
|
520
|
+
status: z.optional(RoutesDeposit.schema.Status),
|
|
521
|
+
})
|
|
522
|
+
.check(z.describe('Filters that narrow which route deposit changes trigger this webhook.')),
|
|
523
|
+
'WebhookRoutesDepositFilters',
|
|
524
|
+
)
|
|
488
525
|
|
|
489
|
-
/** `
|
|
490
|
-
export const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
z.describe('Filters that narrow which
|
|
497
|
-
|
|
498
|
-
|
|
526
|
+
/** `routes:transfer.updated` subscription filters. All are optional and AND-combined. */
|
|
527
|
+
export const RoutesTransferFilters = OpenApi.component(
|
|
528
|
+
z
|
|
529
|
+
.strictObject({
|
|
530
|
+
id: z.optional(RoutesTransfer.schema.RoutesTransfer.shape.id),
|
|
531
|
+
status: z.optional(RoutesTransfer.schema.Status),
|
|
532
|
+
})
|
|
533
|
+
.check(z.describe('Filters that narrow which route transfer changes trigger this webhook.')),
|
|
534
|
+
'WebhookRoutesTransferFilters',
|
|
535
|
+
)
|
|
499
536
|
|
|
500
537
|
/**
|
|
501
538
|
* Optional human context describing what a subscription is for. Surfaced by
|
|
502
539
|
* destinations (Slack header + description, Better Stack log fields) and echoed
|
|
503
540
|
* on every delivered event envelope.
|
|
504
541
|
*/
|
|
505
|
-
export const Context =
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
z
|
|
509
|
-
|
|
542
|
+
export const Context = OpenApi.component(
|
|
543
|
+
z
|
|
544
|
+
.object({
|
|
545
|
+
description: z.optional(
|
|
546
|
+
z
|
|
547
|
+
.string()
|
|
548
|
+
.check(
|
|
549
|
+
z.maxLength(500),
|
|
550
|
+
z.describe('Longer description of what this subscription is for.'),
|
|
551
|
+
z.meta({ examples: ['Notify #ops when a large USDC transfer settles on mainnet.'] }),
|
|
552
|
+
),
|
|
553
|
+
),
|
|
554
|
+
metadata: z.optional(
|
|
555
|
+
z
|
|
556
|
+
.record(
|
|
557
|
+
z.string().check(z.minLength(1), z.maxLength(64)),
|
|
558
|
+
z.string().check(z.maxLength(500)),
|
|
559
|
+
)
|
|
560
|
+
.check(
|
|
561
|
+
z.refine((m) => Object.keys(m).length <= 20, {
|
|
562
|
+
error: 'At most 20 metadata entries are allowed.',
|
|
563
|
+
}),
|
|
564
|
+
z.describe(
|
|
565
|
+
'Arbitrary key/value labels echoed on every delivered event and rendered by destinations (Slack fields, Better Stack log fields). Keys are 1–64 chars, values ≤500 chars, ≤20 entries.',
|
|
566
|
+
),
|
|
567
|
+
z.meta({ examples: [{ env: 'prod', team: 'payments' }] }),
|
|
568
|
+
),
|
|
569
|
+
),
|
|
570
|
+
title: z.optional(
|
|
571
|
+
z
|
|
572
|
+
.string()
|
|
573
|
+
.check(
|
|
574
|
+
z.maxLength(120),
|
|
575
|
+
z.describe('Short label for this subscription.'),
|
|
576
|
+
z.meta({ examples: ['Prod USDC large transfers'] }),
|
|
577
|
+
),
|
|
578
|
+
),
|
|
579
|
+
})
|
|
580
|
+
.check(z.describe('Human context describing what this webhook subscription is for.')),
|
|
581
|
+
'WebhookContext',
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Public subscription representation. Never includes the signing `secret`
|
|
586
|
+
* (returned once by `POST /webhooks`) or the internal owner.
|
|
587
|
+
*/
|
|
588
|
+
export const Subscription = OpenApi.component(
|
|
589
|
+
z
|
|
590
|
+
.object({
|
|
591
|
+
chainId: chainIdResponse,
|
|
592
|
+
context: z
|
|
593
|
+
.optional(Context)
|
|
594
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
595
|
+
createdAt: z.iso
|
|
596
|
+
.datetime()
|
|
510
597
|
.check(
|
|
511
|
-
z.
|
|
512
|
-
z.
|
|
513
|
-
z.meta({ examples: ['Notify #ops when a large USDC transfer settles on mainnet.'] }),
|
|
598
|
+
z.describe('When the subscription was created, as an ISO 8601 timestamp.'),
|
|
599
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
514
600
|
),
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
.
|
|
519
|
-
z.
|
|
520
|
-
z.
|
|
521
|
-
)
|
|
601
|
+
destination: PublicDestination,
|
|
602
|
+
environment: z
|
|
603
|
+
.optional(z.enum(['production', 'sandbox']))
|
|
604
|
+
.check(
|
|
605
|
+
z.describe('API-key environment for private resource events, when applicable.'),
|
|
606
|
+
z.meta({ examples: ['production'] }),
|
|
607
|
+
),
|
|
608
|
+
eventType: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
609
|
+
expiresAt: z
|
|
610
|
+
.optional(z.iso.datetime())
|
|
522
611
|
.check(
|
|
523
|
-
z.refine((m) => Object.keys(m).length <= 20, {
|
|
524
|
-
error: 'At most 20 metadata entries are allowed.',
|
|
525
|
-
}),
|
|
526
612
|
z.describe(
|
|
527
|
-
'
|
|
613
|
+
'When the subscription expires, as an ISO 8601 timestamp. Only MPP-paid subscriptions expire.',
|
|
528
614
|
),
|
|
529
|
-
z.meta({ examples: [
|
|
615
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
530
616
|
),
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
z
|
|
534
|
-
.string()
|
|
617
|
+
failureCount: z
|
|
618
|
+
.number()
|
|
535
619
|
.check(
|
|
536
|
-
z.
|
|
537
|
-
z.
|
|
538
|
-
z.
|
|
620
|
+
z.int(),
|
|
621
|
+
z.nonnegative(),
|
|
622
|
+
z.describe(
|
|
623
|
+
'Number of delivery failures in a row for this subscription, capped at the auto-disable threshold.',
|
|
624
|
+
),
|
|
625
|
+
z.meta({ examples: [0] }),
|
|
539
626
|
),
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Public subscription representation. Never includes the signing `secret`
|
|
546
|
-
* (returned once by `POST /webhooks`) or the internal owner.
|
|
547
|
-
*/
|
|
548
|
-
export const Subscription = z
|
|
549
|
-
.object({
|
|
550
|
-
chainId: chainIdResponse,
|
|
551
|
-
context: z.optional(Context),
|
|
552
|
-
createdAt: z.iso
|
|
553
|
-
.datetime()
|
|
554
|
-
.check(
|
|
555
|
-
z.describe('When the subscription was created, as an ISO 8601 timestamp.'),
|
|
556
|
-
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
627
|
+
filters: Filters.check(
|
|
628
|
+
z.describe('Filters applied to this event type.'),
|
|
629
|
+
z.meta({ examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }] }),
|
|
557
630
|
),
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
z.meta({ examples: ['production'] }),
|
|
564
|
-
),
|
|
565
|
-
eventType: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
566
|
-
expiresAt: z
|
|
567
|
-
.optional(z.iso.datetime())
|
|
568
|
-
.check(
|
|
569
|
-
z.describe(
|
|
570
|
-
'When the subscription expires, as an ISO 8601 timestamp. Only MPP-paid subscriptions expire.',
|
|
631
|
+
id: z
|
|
632
|
+
.string()
|
|
633
|
+
.check(
|
|
634
|
+
z.describe('Webhook subscription ID (`wh_…`).'),
|
|
635
|
+
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
571
636
|
),
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
z.describe(
|
|
580
|
-
'Number of delivery failures in a row for this subscription, capped at the auto-disable threshold.',
|
|
637
|
+
lastDeliveryAt: z
|
|
638
|
+
.optional(z.iso.datetime())
|
|
639
|
+
.check(
|
|
640
|
+
z.describe(
|
|
641
|
+
'When Tempo last delivered an event successfully, as an ISO 8601 timestamp. Refreshed at most once per minute during sustained delivery.',
|
|
642
|
+
),
|
|
643
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
581
644
|
),
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
id: z
|
|
589
|
-
.string()
|
|
590
|
-
.check(
|
|
591
|
-
z.describe('Webhook subscription ID (`wh_…`).'),
|
|
592
|
-
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
593
|
-
),
|
|
594
|
-
lastDeliveryAt: z
|
|
595
|
-
.optional(z.iso.datetime())
|
|
596
|
-
.check(
|
|
597
|
-
z.describe(
|
|
598
|
-
'When Tempo last delivered an event successfully, as an ISO 8601 timestamp. Refreshed at most once per minute during sustained delivery.',
|
|
645
|
+
status: Status.check(z.meta({ examples: ['active'] })),
|
|
646
|
+
updatedAt: z.iso
|
|
647
|
+
.datetime()
|
|
648
|
+
.check(
|
|
649
|
+
z.describe('When the subscription was last changed, as an ISO 8601 timestamp.'),
|
|
650
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
599
651
|
),
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
.datetime()
|
|
605
|
-
.check(
|
|
606
|
-
z.describe('When the subscription was last changed, as an ISO 8601 timestamp.'),
|
|
607
|
-
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
652
|
+
})
|
|
653
|
+
.check(
|
|
654
|
+
z.describe(
|
|
655
|
+
'A webhook subscription that tells Tempo which onchain events to send to its destination.',
|
|
608
656
|
),
|
|
609
|
-
})
|
|
610
|
-
.check(
|
|
611
|
-
z.describe(
|
|
612
|
-
'A webhook subscription that tells Tempo which onchain events to send to your destination.',
|
|
613
657
|
),
|
|
614
|
-
|
|
658
|
+
'Webhook',
|
|
659
|
+
)
|
|
615
660
|
|
|
616
661
|
/** Outcome of a single delivery attempt. */
|
|
617
662
|
export const DeliveryStatus = z
|
|
@@ -622,69 +667,72 @@ export namespace schema {
|
|
|
622
667
|
)
|
|
623
668
|
|
|
624
669
|
/** A logged delivery attempt for a subscription. */
|
|
625
|
-
export const Delivery =
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
createdAt: z.iso
|
|
636
|
-
.datetime()
|
|
637
|
-
.check(
|
|
638
|
-
z.describe('When this delivery attempt was created, as an ISO 8601 timestamp.'),
|
|
639
|
-
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
640
|
-
),
|
|
641
|
-
error: z
|
|
642
|
-
.optional(z.string())
|
|
643
|
-
.check(
|
|
644
|
-
z.describe('Why delivery failed, present when `status` is `failed`.'),
|
|
645
|
-
z.meta({ examples: ['Connection timed out'] }),
|
|
646
|
-
),
|
|
647
|
-
eventId: z
|
|
648
|
-
.string()
|
|
649
|
-
.check(
|
|
650
|
-
z.describe('Stable event ID (`evt_…`) you can use to dedupe webhook deliveries.'),
|
|
651
|
-
z.meta({ examples: ['evt_abc123'] }),
|
|
652
|
-
),
|
|
653
|
-
id: z
|
|
654
|
-
.string()
|
|
655
|
-
.check(
|
|
656
|
-
z.describe('Webhook delivery ID (`whd_…`).'),
|
|
657
|
-
z.meta({ examples: ['whd_001718668800000_C1yJkk7CuML98HFthEDk9PsY'] }),
|
|
658
|
-
),
|
|
659
|
-
requestUrl: z
|
|
660
|
-
.string()
|
|
661
|
-
.check(
|
|
662
|
-
z.describe('Your callback URL that Tempo attempted to deliver to.'),
|
|
663
|
-
z.meta({ examples: ['https://example.com/webhooks'] }),
|
|
664
|
-
),
|
|
665
|
-
responseMs: z
|
|
666
|
-
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
667
|
-
.check(
|
|
668
|
-
z.describe(
|
|
669
|
-
'How long the delivery attempt took in milliseconds, when Tempo made a request.',
|
|
670
|
+
export const Delivery = OpenApi.component(
|
|
671
|
+
z
|
|
672
|
+
.object({
|
|
673
|
+
attempt: z
|
|
674
|
+
.number()
|
|
675
|
+
.check(
|
|
676
|
+
z.int(),
|
|
677
|
+
z.positive(),
|
|
678
|
+
z.describe('Retry attempt number for this delivery, starting at 1.'),
|
|
679
|
+
z.meta({ examples: [1] }),
|
|
670
680
|
),
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
681
|
+
createdAt: z.iso
|
|
682
|
+
.datetime()
|
|
683
|
+
.check(
|
|
684
|
+
z.describe('When this delivery attempt was created, as an ISO 8601 timestamp.'),
|
|
685
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
686
|
+
),
|
|
687
|
+
error: z
|
|
688
|
+
.optional(z.string())
|
|
689
|
+
.check(
|
|
690
|
+
z.describe('Why delivery failed, present when `status` is `failed`.'),
|
|
691
|
+
z.meta({ examples: ['Connection timed out'] }),
|
|
692
|
+
),
|
|
693
|
+
eventId: z
|
|
694
|
+
.string()
|
|
695
|
+
.check(
|
|
696
|
+
z.describe('Stable event ID (`evt_…`) you can use to dedupe webhook deliveries.'),
|
|
697
|
+
z.meta({ examples: ['evt_abc123'] }),
|
|
698
|
+
),
|
|
699
|
+
id: z
|
|
700
|
+
.string()
|
|
701
|
+
.check(
|
|
702
|
+
z.describe('Webhook delivery ID (`whd_…`).'),
|
|
703
|
+
z.meta({ examples: ['whd_001718668800000_C1yJkk7CuML98HFthEDk9PsY'] }),
|
|
704
|
+
),
|
|
705
|
+
requestUrl: z
|
|
706
|
+
.url()
|
|
707
|
+
.check(
|
|
708
|
+
z.describe('Your callback URL that Tempo attempted to deliver to.'),
|
|
709
|
+
z.meta({ examples: ['https://example.com/webhooks'] }),
|
|
710
|
+
),
|
|
711
|
+
responseMs: z
|
|
712
|
+
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
713
|
+
.check(
|
|
714
|
+
z.describe(
|
|
715
|
+
'How long the delivery attempt took in milliseconds, when Tempo made a request.',
|
|
716
|
+
),
|
|
717
|
+
z.meta({ examples: [12] }),
|
|
718
|
+
),
|
|
719
|
+
responseStatus: z
|
|
720
|
+
.optional(z.number().check(z.int()))
|
|
721
|
+
.check(
|
|
722
|
+
z.describe('HTTP status your endpoint returned, when Tempo received a response.'),
|
|
723
|
+
z.meta({ examples: [200] }),
|
|
724
|
+
),
|
|
725
|
+
status: DeliveryStatus.check(z.meta({ examples: ['succeeded'] })),
|
|
726
|
+
subscriptionId: z
|
|
727
|
+
.string()
|
|
728
|
+
.check(
|
|
729
|
+
z.describe('Subscription ID (`wh_…`) this delivery belongs to.'),
|
|
730
|
+
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
731
|
+
),
|
|
732
|
+
})
|
|
733
|
+
.check(z.describe('One attempt by Tempo to deliver an event to a webhook destination.')),
|
|
734
|
+
'WebhookDelivery',
|
|
735
|
+
)
|
|
688
736
|
|
|
689
737
|
/**
|
|
690
738
|
* A `transfer` event payload: the decoded TIP-20 `Transfer` row. Mirrors a
|
|
@@ -692,88 +740,94 @@ export namespace schema {
|
|
|
692
740
|
* read endpoint adds (webhook delivery does not perform per-event token
|
|
693
741
|
* lookups).
|
|
694
742
|
*/
|
|
695
|
-
export const TransferEvent =
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
amount: z
|
|
702
|
-
.string()
|
|
703
|
-
.check(
|
|
704
|
-
z.describe('Amount transferred, as a decimal integer string in the token base unit.'),
|
|
705
|
-
z.meta({ examples: ['10000'] }),
|
|
743
|
+
export const TransferEvent = OpenApi.component(
|
|
744
|
+
z
|
|
745
|
+
.object({
|
|
746
|
+
address: Schema.TokenAddress.check(
|
|
747
|
+
z.describe('TIP-20 token contract address.'),
|
|
748
|
+
z.meta({ examples: ['0x20c0000000000000000000008f5425160ebe5525'] }),
|
|
706
749
|
),
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
750
|
+
amount: z
|
|
751
|
+
.string()
|
|
752
|
+
.check(
|
|
753
|
+
z.describe('Amount transferred, as a decimal integer string in the token base unit.'),
|
|
754
|
+
z.meta({ examples: ['10000'] }),
|
|
755
|
+
),
|
|
756
|
+
blockNumber: z
|
|
757
|
+
.number()
|
|
758
|
+
.check(
|
|
759
|
+
z.int(),
|
|
760
|
+
z.nonnegative(),
|
|
761
|
+
z.describe('Block number where this transfer was included.'),
|
|
762
|
+
z.meta({ examples: [1000002] }),
|
|
763
|
+
),
|
|
764
|
+
recipient: Schema.Address.check(
|
|
765
|
+
z.describe('Address that received the transfer.'),
|
|
766
|
+
z.meta({ examples: ['0x9e39034aae71fb89f66061a2602eb6efec271754'] }),
|
|
714
767
|
),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
),
|
|
719
|
-
sender: Schema.Address.check(
|
|
720
|
-
z.describe('Address that sent the transfer.'),
|
|
721
|
-
z.meta({ examples: ['0xe7687128b0a808c2831ff94d4f7b2fb35c65af38'] }),
|
|
722
|
-
),
|
|
723
|
-
timestamp: z.iso
|
|
724
|
-
.datetime()
|
|
725
|
-
.check(
|
|
726
|
-
z.describe('Block timestamp as an ISO 8601 string.'),
|
|
727
|
-
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
768
|
+
sender: Schema.Address.check(
|
|
769
|
+
z.describe('Address that sent the transfer.'),
|
|
770
|
+
z.meta({ examples: ['0xe7687128b0a808c2831ff94d4f7b2fb35c65af38'] }),
|
|
728
771
|
),
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
.object({
|
|
732
|
-
decimals: z
|
|
733
|
-
.number()
|
|
734
|
-
.check(
|
|
735
|
-
z.int(),
|
|
736
|
-
z.nonnegative(),
|
|
737
|
-
z.describe('Number of decimals the token uses.'),
|
|
738
|
-
z.meta({ examples: [6] }),
|
|
739
|
-
),
|
|
740
|
-
symbol: z
|
|
741
|
-
.string()
|
|
742
|
-
.check(z.describe('Token symbol (e.g. `USDC`).'), z.meta({ examples: ['USDC'] })),
|
|
743
|
-
})
|
|
772
|
+
timestamp: z.iso
|
|
773
|
+
.datetime()
|
|
744
774
|
.check(
|
|
745
|
-
z.describe(
|
|
746
|
-
|
|
747
|
-
),
|
|
775
|
+
z.describe('Block timestamp as an ISO 8601 string.'),
|
|
776
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
748
777
|
),
|
|
778
|
+
token: z.optional(
|
|
779
|
+
z
|
|
780
|
+
.object({
|
|
781
|
+
decimals: z
|
|
782
|
+
.number()
|
|
783
|
+
.check(
|
|
784
|
+
z.int(),
|
|
785
|
+
z.nonnegative(),
|
|
786
|
+
z.describe('Number of decimals the token uses.'),
|
|
787
|
+
z.meta({ examples: [6] }),
|
|
788
|
+
),
|
|
789
|
+
symbol: z
|
|
790
|
+
.string()
|
|
791
|
+
.check(z.describe('Token symbol (e.g. `USDC`).'), z.meta({ examples: ['USDC'] })),
|
|
792
|
+
})
|
|
793
|
+
.check(
|
|
794
|
+
z.describe(
|
|
795
|
+
'Best-effort token metadata (symbol/decimals) resolved before delivery so `amount` can render as a human amount. Omitted when the lookup is unavailable.',
|
|
796
|
+
),
|
|
797
|
+
),
|
|
798
|
+
),
|
|
799
|
+
transactionHash: Schema.Hash.check(
|
|
800
|
+
z.describe('Transaction hash that contains this transfer.'),
|
|
801
|
+
z.meta({
|
|
802
|
+
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
803
|
+
}),
|
|
804
|
+
),
|
|
805
|
+
})
|
|
806
|
+
.check(
|
|
807
|
+
z.describe('Payload for a `token:transfer` event, decoded from a TIP-20 `Transfer` log.'),
|
|
749
808
|
),
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
z.meta({
|
|
753
|
-
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
754
|
-
}),
|
|
755
|
-
),
|
|
756
|
-
})
|
|
757
|
-
.check(
|
|
758
|
-
z.describe('Payload for a `token:transfer` event, decoded from a TIP-20 `Transfer` log.'),
|
|
759
|
-
)
|
|
809
|
+
'WebhookTransferEvent',
|
|
810
|
+
)
|
|
760
811
|
|
|
761
812
|
/**
|
|
762
813
|
* A `transaction` event payload using the humanized transaction shape without
|
|
763
814
|
* opt-in read resources such as receipts.
|
|
764
815
|
*/
|
|
765
|
-
export const TransactionEvent =
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
816
|
+
export const TransactionEvent = OpenApi.component(
|
|
817
|
+
z
|
|
818
|
+
.object({
|
|
819
|
+
...Transactions.schema.Transaction.shape,
|
|
820
|
+
meta: z
|
|
821
|
+
.object({
|
|
822
|
+
rpc: Transactions.schema.Rpc.Transaction.check(
|
|
823
|
+
z.describe('The original JSON-RPC transaction payload.'),
|
|
824
|
+
),
|
|
825
|
+
})
|
|
826
|
+
.check(z.describe('Metadata for this transaction webhook event.')),
|
|
827
|
+
})
|
|
828
|
+
.check(z.describe('A transaction included in a block.')),
|
|
829
|
+
'WebhookTransactionEvent',
|
|
830
|
+
)
|
|
777
831
|
|
|
778
832
|
/**
|
|
779
833
|
* A `log:emitted` event payload: the raw contract event log. When a
|
|
@@ -781,188 +835,204 @@ export namespace schema {
|
|
|
781
835
|
* `event`/`args` fields carry the decoded event name and arguments (large
|
|
782
836
|
* integers as decimal strings).
|
|
783
837
|
*/
|
|
784
|
-
export const LogEvent =
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
args: z.optional(
|
|
791
|
-
z
|
|
792
|
-
.record(z.string(), z.unknown())
|
|
793
|
-
.check(
|
|
794
|
-
z.describe(
|
|
795
|
-
'Decoded event arguments, present only when a `signature` filter was supplied and decoding succeeded.',
|
|
796
|
-
),
|
|
797
|
-
z.meta({ examples: [{ from: '0xe768…', to: '0x9e39…', value: '10000' }] }),
|
|
798
|
-
),
|
|
799
|
-
),
|
|
800
|
-
blockNumber: z
|
|
801
|
-
.number()
|
|
802
|
-
.check(
|
|
803
|
-
z.int(),
|
|
804
|
-
z.nonnegative(),
|
|
805
|
-
z.describe('Block number the log was included in.'),
|
|
806
|
-
z.meta({ examples: [1000002] }),
|
|
838
|
+
export const LogEvent = OpenApi.component(
|
|
839
|
+
z
|
|
840
|
+
.object({
|
|
841
|
+
address: Schema.Address.check(
|
|
842
|
+
z.describe('Contract that emitted the log.'),
|
|
843
|
+
z.meta({ examples: ['0x20c00000000000000000000071de0cd31ab0d105'] }),
|
|
807
844
|
),
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
.object({
|
|
817
|
-
name: z
|
|
818
|
-
.string()
|
|
819
|
-
.check(z.describe('Decoded event name.'), z.meta({ examples: ['Transfer'] })),
|
|
820
|
-
signature: z.string().check(
|
|
821
|
-
z.describe('Human-readable event signature used to decode the log.'),
|
|
822
|
-
z.meta({
|
|
823
|
-
examples: [
|
|
824
|
-
'event Transfer(address indexed from, address indexed to, uint256 value)',
|
|
825
|
-
],
|
|
826
|
-
}),
|
|
827
|
-
),
|
|
828
|
-
topic0: Schema.Hash.check(
|
|
829
|
-
z.describe('Event signature hash (topic 0).'),
|
|
830
|
-
z.meta({
|
|
831
|
-
examples: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'],
|
|
832
|
-
}),
|
|
845
|
+
args: z.optional(
|
|
846
|
+
z
|
|
847
|
+
.record(z.string(), z.unknown())
|
|
848
|
+
.check(
|
|
849
|
+
z.describe(
|
|
850
|
+
'Decoded event arguments, present only when a `signature` filter was supplied and decoding succeeded.',
|
|
851
|
+
),
|
|
852
|
+
z.meta({ examples: [{ from: '0xe768…', to: '0x9e39…', value: '10000' }] }),
|
|
833
853
|
),
|
|
834
|
-
|
|
854
|
+
),
|
|
855
|
+
blockNumber: z
|
|
856
|
+
.number()
|
|
835
857
|
.check(
|
|
836
|
-
z.
|
|
837
|
-
|
|
838
|
-
),
|
|
858
|
+
z.int(),
|
|
859
|
+
z.nonnegative(),
|
|
860
|
+
z.describe('Block number the log was included in.'),
|
|
861
|
+
z.meta({ examples: [1000002] }),
|
|
839
862
|
),
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
z.nonnegative(),
|
|
846
|
-
z.describe('Index of the log within its block.'),
|
|
847
|
-
z.meta({ examples: [0] }),
|
|
863
|
+
data: Schema.Hex.check(
|
|
864
|
+
z.describe('Unindexed log data (ABI-encoded).'),
|
|
865
|
+
z.meta({
|
|
866
|
+
examples: ['0x0000000000000000000000000000000000000000000000000000000000002710'],
|
|
867
|
+
}),
|
|
848
868
|
),
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
869
|
+
event: z.optional(
|
|
870
|
+
z
|
|
871
|
+
.object({
|
|
872
|
+
name: z
|
|
873
|
+
.string()
|
|
874
|
+
.check(z.describe('Decoded event name.'), z.meta({ examples: ['Transfer'] })),
|
|
875
|
+
signature: z.string().check(
|
|
876
|
+
z.describe('Human-readable event signature used to decode the log.'),
|
|
877
|
+
z.meta({
|
|
878
|
+
examples: [
|
|
879
|
+
'event Transfer(address indexed from, address indexed to, uint256 value)',
|
|
880
|
+
],
|
|
881
|
+
}),
|
|
882
|
+
),
|
|
883
|
+
topic0: Schema.Hash.check(
|
|
884
|
+
z.describe('Event signature hash (topic 0).'),
|
|
885
|
+
z.meta({
|
|
886
|
+
examples: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'],
|
|
887
|
+
}),
|
|
888
|
+
),
|
|
889
|
+
})
|
|
890
|
+
.check(
|
|
891
|
+
z.describe(
|
|
892
|
+
'Decoded event identity, present only when a `signature` filter was supplied.',
|
|
893
|
+
),
|
|
894
|
+
),
|
|
854
895
|
),
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
896
|
+
logIndex: z
|
|
897
|
+
.number()
|
|
898
|
+
.check(
|
|
899
|
+
z.int(),
|
|
900
|
+
z.nonnegative(),
|
|
901
|
+
z.describe('Index of the log within its block.'),
|
|
902
|
+
z.meta({ examples: [0] }),
|
|
903
|
+
),
|
|
904
|
+
timestamp: z.iso
|
|
905
|
+
.datetime()
|
|
906
|
+
.check(
|
|
907
|
+
z.describe('When the block was produced, as an ISO 8601 timestamp.'),
|
|
908
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
909
|
+
),
|
|
910
|
+
topics: z.array(Schema.Hash).check(
|
|
911
|
+
z.describe('Log topics, starting with the event signature hash (topic 0).'),
|
|
912
|
+
z.meta({
|
|
913
|
+
examples: [
|
|
914
|
+
[
|
|
915
|
+
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
|
|
916
|
+
'0x000000000000000000000000e7687128b0a808c2831ff94d4f7b2fb35c65af38',
|
|
917
|
+
],
|
|
862
918
|
],
|
|
863
|
-
|
|
864
|
-
}),
|
|
865
|
-
),
|
|
866
|
-
transactionHash: Schema.Hash.check(
|
|
867
|
-
z.describe('Hash of the transaction that emitted the log.'),
|
|
868
|
-
z.meta({
|
|
869
|
-
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
870
|
-
}),
|
|
871
|
-
),
|
|
872
|
-
transactionIndex: z
|
|
873
|
-
.number()
|
|
874
|
-
.check(
|
|
875
|
-
z.int(),
|
|
876
|
-
z.nonnegative(),
|
|
877
|
-
z.describe('Index of the transaction within its block.'),
|
|
878
|
-
z.meta({ examples: [0] }),
|
|
879
|
-
),
|
|
880
|
-
})
|
|
881
|
-
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).'))
|
|
882
|
-
|
|
883
|
-
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
884
|
-
export const BlockEvent = z
|
|
885
|
-
.object({
|
|
886
|
-
number: z
|
|
887
|
-
.number()
|
|
888
|
-
.check(
|
|
889
|
-
z.int(),
|
|
890
|
-
z.nonnegative(),
|
|
891
|
-
z.describe('Block height, starting from genesis block 0.'),
|
|
892
|
-
z.meta({ examples: [1000002] }),
|
|
919
|
+
}),
|
|
893
920
|
),
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
),
|
|
900
|
-
parentHash: Schema.Hash.check(
|
|
901
|
-
z.describe('Hash of the previous block in the chain.'),
|
|
902
|
-
z.meta({
|
|
903
|
-
examples: ['0xa406dff9c51cc2abbef3a811f0499e99a568bf781019f129ab45dca1df0e43e5'],
|
|
904
|
-
}),
|
|
905
|
-
),
|
|
906
|
-
miner: Schema.Address.check(
|
|
907
|
-
z.describe('Address of the block producer (miner/proposer).'),
|
|
908
|
-
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
909
|
-
),
|
|
910
|
-
proposer: z.optional(
|
|
911
|
-
Schema.Address.check(
|
|
912
|
-
z.describe('Consensus proposer of the block, when the chain records one.'),
|
|
913
|
-
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
921
|
+
transactionHash: Schema.Hash.check(
|
|
922
|
+
z.describe('Hash of the transaction that emitted the log.'),
|
|
923
|
+
z.meta({
|
|
924
|
+
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
925
|
+
}),
|
|
914
926
|
),
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
927
|
+
transactionIndex: z
|
|
928
|
+
.number()
|
|
929
|
+
.check(
|
|
930
|
+
z.int(),
|
|
931
|
+
z.nonnegative(),
|
|
932
|
+
z.describe('Index of the transaction within its block.'),
|
|
933
|
+
z.meta({ examples: [0] }),
|
|
934
|
+
),
|
|
935
|
+
})
|
|
936
|
+
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).')),
|
|
937
|
+
'WebhookLogEvent',
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
941
|
+
export const BlockEvent = OpenApi.component(
|
|
942
|
+
z
|
|
943
|
+
.object({
|
|
944
|
+
number: z
|
|
945
|
+
.number()
|
|
946
|
+
.check(
|
|
947
|
+
z.int(),
|
|
948
|
+
z.nonnegative(),
|
|
949
|
+
z.describe('Block height, starting from genesis block 0.'),
|
|
950
|
+
z.meta({ examples: [1000002] }),
|
|
951
|
+
),
|
|
952
|
+
hash: Schema.Hash.check(
|
|
953
|
+
z.describe('Hash that identifies this block.'),
|
|
954
|
+
z.meta({
|
|
955
|
+
examples: ['0x3fe7d9e595f3d8215ec840c6ef55ac0bead58933e96fc2ead0f2aaf79715f45d'],
|
|
956
|
+
}),
|
|
923
957
|
),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
z.describe('Maximum gas available for all transactions in this block.'),
|
|
930
|
-
z.meta({ examples: [500000000] }),
|
|
958
|
+
parentHash: Schema.Hash.check(
|
|
959
|
+
z.describe('Hash of the previous block in the chain.'),
|
|
960
|
+
z.meta({
|
|
961
|
+
examples: ['0xa406dff9c51cc2abbef3a811f0499e99a568bf781019f129ab45dca1df0e43e5'],
|
|
962
|
+
}),
|
|
931
963
|
),
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
z.int(),
|
|
936
|
-
z.nonnegative(),
|
|
937
|
-
z.describe('Number of transactions included in this block.'),
|
|
938
|
-
z.meta({ examples: [3] }),
|
|
964
|
+
miner: Schema.Address.check(
|
|
965
|
+
z.describe('Address of the block producer (miner/proposer).'),
|
|
966
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
939
967
|
),
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
968
|
+
proposer: z.optional(
|
|
969
|
+
Schema.Address.check(
|
|
970
|
+
z.describe('Consensus proposer of the block, when the chain records one.'),
|
|
971
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
972
|
+
),
|
|
945
973
|
),
|
|
946
|
-
|
|
947
|
-
|
|
974
|
+
gasUsed: z
|
|
975
|
+
.number()
|
|
976
|
+
.check(
|
|
977
|
+
z.int(),
|
|
978
|
+
z.nonnegative(),
|
|
979
|
+
z.describe('Total gas used by every transaction in this block.'),
|
|
980
|
+
z.meta({ examples: [4340281] }),
|
|
981
|
+
),
|
|
982
|
+
gasLimit: z
|
|
983
|
+
.number()
|
|
984
|
+
.check(
|
|
985
|
+
z.int(),
|
|
986
|
+
z.nonnegative(),
|
|
987
|
+
z.describe('Maximum gas available for all transactions in this block.'),
|
|
988
|
+
z.meta({ examples: [500000000] }),
|
|
989
|
+
),
|
|
990
|
+
transactionCount: z
|
|
991
|
+
.number()
|
|
992
|
+
.check(
|
|
993
|
+
z.int(),
|
|
994
|
+
z.nonnegative(),
|
|
995
|
+
z.describe('Number of transactions included in this block.'),
|
|
996
|
+
z.meta({ examples: [3] }),
|
|
997
|
+
),
|
|
998
|
+
timestamp: z.iso
|
|
999
|
+
.datetime()
|
|
1000
|
+
.check(
|
|
1001
|
+
z.describe('When the block was produced, as an ISO 8601 timestamp.'),
|
|
1002
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
1003
|
+
),
|
|
1004
|
+
})
|
|
1005
|
+
.check(z.describe('Payload for a `block:created` event (a new block header).')),
|
|
1006
|
+
'WebhookBlockEvent',
|
|
1007
|
+
)
|
|
948
1008
|
|
|
949
|
-
/** Public
|
|
950
|
-
export const
|
|
1009
|
+
/** Public route deposit after a committed material change. */
|
|
1010
|
+
export const RoutesDepositEvent = RoutesDeposit.schema.RoutesDeposit
|
|
951
1011
|
|
|
952
|
-
/** Public
|
|
953
|
-
export const
|
|
1012
|
+
/** Public route transfer after a committed material change. */
|
|
1013
|
+
export const RoutesTransferEvent = RoutesTransfer.schema.RoutesTransfer
|
|
954
1014
|
|
|
955
1015
|
/** A `ping` (synthetic test-delivery) payload, sent by `POST /webhooks/:id/ping`. */
|
|
956
|
-
export const PingEvent =
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1016
|
+
export const PingEvent = OpenApi.component(
|
|
1017
|
+
z
|
|
1018
|
+
.object({
|
|
1019
|
+
ping: z
|
|
1020
|
+
.literal(true)
|
|
1021
|
+
.check(
|
|
1022
|
+
z.describe('Marks this payload as a synthetic ping test.'),
|
|
1023
|
+
z.meta({ examples: [true] }),
|
|
1024
|
+
),
|
|
1025
|
+
})
|
|
1026
|
+
.check(z.describe('Payload for a webhook ping test delivery.')),
|
|
1027
|
+
'WebhookPingEvent',
|
|
1028
|
+
)
|
|
961
1029
|
|
|
962
1030
|
/** Fields common to every delivery envelope. */
|
|
963
1031
|
const envelopeBase = {
|
|
964
1032
|
chainId: Schema.ChainId,
|
|
965
|
-
context: z
|
|
1033
|
+
context: z
|
|
1034
|
+
.optional(Context)
|
|
1035
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
966
1036
|
createdAt: z.iso
|
|
967
1037
|
.datetime()
|
|
968
1038
|
.check(
|
|
@@ -992,176 +1062,254 @@ export namespace schema {
|
|
|
992
1062
|
* variant selector — without per-variant titles, inline `oneOf` members render
|
|
993
1063
|
* as a single (first) collapsed schema.
|
|
994
1064
|
*/
|
|
995
|
-
export const Envelope =
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
.object({ ...envelopeBase, data: TransferEvent, type: z.literal('token:transfer') })
|
|
999
|
-
.check(z.meta({ title: 'Transfer event' })),
|
|
1000
|
-
z
|
|
1001
|
-
.object({
|
|
1002
|
-
...envelopeBase,
|
|
1003
|
-
data: TransactionEvent,
|
|
1004
|
-
type: z.literal('transaction:included'),
|
|
1005
|
-
})
|
|
1006
|
-
.check(z.meta({ title: 'Included transaction event' })),
|
|
1007
|
-
z
|
|
1008
|
-
.object({ ...envelopeBase, data: LogEvent, type: z.literal('log:emitted') })
|
|
1009
|
-
.check(z.meta({ title: 'Log event' })),
|
|
1010
|
-
z
|
|
1011
|
-
.object({ ...envelopeBase, data: BlockEvent, type: z.literal('block:created') })
|
|
1012
|
-
.check(z.meta({ title: 'Block event' })),
|
|
1013
|
-
z
|
|
1014
|
-
.object({
|
|
1015
|
-
...envelopeBase,
|
|
1016
|
-
data: FundingDepositEvent,
|
|
1017
|
-
type: z.literal('funding:deposit.updated'),
|
|
1018
|
-
})
|
|
1019
|
-
.check(z.meta({ title: 'Funding deposit updated event' })),
|
|
1020
|
-
z
|
|
1021
|
-
.object({
|
|
1022
|
-
...envelopeBase,
|
|
1023
|
-
data: FundingTransferEvent,
|
|
1024
|
-
type: z.literal('funding:transfer.updated'),
|
|
1025
|
-
})
|
|
1026
|
-
.check(z.meta({ title: 'Funding transfer updated event' })),
|
|
1027
|
-
z
|
|
1028
|
-
.object({ ...envelopeBase, data: PingEvent, type: z.literal('ping') })
|
|
1029
|
-
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
1030
|
-
])
|
|
1031
|
-
.check(z.describe('The signed JSON payload Tempo POSTs to your webhook URL.'))
|
|
1032
|
-
|
|
1033
|
-
/** Schemas for the getWebhookEventTypes operation. */
|
|
1034
|
-
export namespace getWebhookEventTypes {
|
|
1035
|
-
export const Response = z
|
|
1036
|
-
.object({
|
|
1037
|
-
data: z
|
|
1038
|
-
.array(
|
|
1039
|
-
z.object({
|
|
1040
|
-
description: z
|
|
1041
|
-
.string()
|
|
1042
|
-
.check(
|
|
1043
|
-
z.describe('Plain-English description of the event type.'),
|
|
1044
|
-
z.meta({ examples: ['TIP-20 token transfer event.'] }),
|
|
1045
|
-
),
|
|
1046
|
-
type: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
1047
|
-
}),
|
|
1048
|
-
)
|
|
1049
|
-
.check(z.describe('Webhook event types available for subscription.')),
|
|
1050
|
-
})
|
|
1051
|
-
.check(z.describe('List of webhook event types Tempo can send.'))
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
/** Schemas for the createWebhook operation. */
|
|
1055
|
-
export namespace createWebhook {
|
|
1056
|
-
/**
|
|
1057
|
-
* Discriminated on `eventType` so each variant carries its own typed
|
|
1058
|
-
* `filters` object — this is what lets the docs render the valid filter
|
|
1059
|
-
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
1060
|
-
* doc renderer's selector (see {@link schema.Envelope}).
|
|
1061
|
-
*/
|
|
1062
|
-
export const Body = z
|
|
1063
|
-
.discriminatedUnion('eventType', [
|
|
1065
|
+
export const Envelope = OpenApi.component(
|
|
1066
|
+
z
|
|
1067
|
+
.discriminatedUnion('type', [
|
|
1064
1068
|
z
|
|
1065
1069
|
.object({
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
eventType: z
|
|
1070
|
-
.literal('token:transfer')
|
|
1071
|
-
.check(
|
|
1072
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1073
|
-
z.meta({ examples: ['token:transfer'] }),
|
|
1074
|
-
),
|
|
1075
|
-
filters: z.optional(TransferFilters),
|
|
1070
|
+
...envelopeBase,
|
|
1071
|
+
data: TransferEvent,
|
|
1072
|
+
type: z.literal('token:transfer').check(z.meta({ examples: ['token:transfer'] })),
|
|
1076
1073
|
})
|
|
1077
|
-
.check(z.meta({ title: 'Transfer
|
|
1074
|
+
.check(z.meta({ title: 'Transfer event' })),
|
|
1078
1075
|
z
|
|
1079
1076
|
.object({
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
eventType: z
|
|
1077
|
+
...envelopeBase,
|
|
1078
|
+
data: TransactionEvent,
|
|
1079
|
+
type: z
|
|
1084
1080
|
.literal('transaction:included')
|
|
1085
|
-
.check(
|
|
1086
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1087
|
-
z.meta({ examples: ['transaction:included'] }),
|
|
1088
|
-
),
|
|
1089
|
-
filters: z.optional(TxFilters),
|
|
1081
|
+
.check(z.meta({ examples: ['transaction:included'] })),
|
|
1090
1082
|
})
|
|
1091
|
-
.check(z.meta({ title: 'Included
|
|
1083
|
+
.check(z.meta({ title: 'Included transaction event' })),
|
|
1092
1084
|
z
|
|
1093
1085
|
.object({
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
eventType: z
|
|
1098
|
-
.literal('log:emitted')
|
|
1099
|
-
.check(
|
|
1100
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1101
|
-
z.meta({ examples: ['log:emitted'] }),
|
|
1102
|
-
),
|
|
1103
|
-
filters: LogFilters,
|
|
1086
|
+
...envelopeBase,
|
|
1087
|
+
data: LogEvent,
|
|
1088
|
+
type: z.literal('log:emitted').check(z.meta({ examples: ['log:emitted'] })),
|
|
1104
1089
|
})
|
|
1105
|
-
.check(z.meta({ title: 'Log
|
|
1090
|
+
.check(z.meta({ title: 'Log event' })),
|
|
1106
1091
|
z
|
|
1107
1092
|
.object({
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
eventType: z
|
|
1112
|
-
.literal('block:created')
|
|
1113
|
-
.check(
|
|
1114
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1115
|
-
z.meta({ examples: ['block:created'] }),
|
|
1116
|
-
),
|
|
1117
|
-
filters: z.optional(BlockFilters),
|
|
1093
|
+
...envelopeBase,
|
|
1094
|
+
data: BlockEvent,
|
|
1095
|
+
type: z.literal('block:created').check(z.meta({ examples: ['block:created'] })),
|
|
1118
1096
|
})
|
|
1119
|
-
.check(z.meta({ title: 'Block
|
|
1097
|
+
.check(z.meta({ title: 'Block event' })),
|
|
1120
1098
|
z
|
|
1121
1099
|
.object({
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
.
|
|
1127
|
-
.check(
|
|
1128
|
-
z.describe('Event type for committed funding deposit changes.'),
|
|
1129
|
-
z.meta({ examples: ['funding:deposit.updated'] }),
|
|
1130
|
-
),
|
|
1131
|
-
filters: z.optional(FundingDepositFilters),
|
|
1100
|
+
...envelopeBase,
|
|
1101
|
+
data: RoutesDepositEvent,
|
|
1102
|
+
type: z
|
|
1103
|
+
.literal('routes:deposit.updated')
|
|
1104
|
+
.check(z.meta({ examples: ['routes:deposit.updated'] })),
|
|
1132
1105
|
})
|
|
1133
|
-
.check(z.meta({ title: '
|
|
1106
|
+
.check(z.meta({ title: 'Route deposit updated event' })),
|
|
1134
1107
|
z
|
|
1135
1108
|
.object({
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
.
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1109
|
+
...envelopeBase,
|
|
1110
|
+
data: RoutesTransferEvent,
|
|
1111
|
+
type: z
|
|
1112
|
+
.literal('routes:transfer.updated')
|
|
1113
|
+
.check(z.meta({ examples: ['routes:transfer.updated'] })),
|
|
1114
|
+
})
|
|
1115
|
+
.check(z.meta({ title: 'Route transfer updated event' })),
|
|
1116
|
+
z
|
|
1117
|
+
.object({
|
|
1118
|
+
...envelopeBase,
|
|
1119
|
+
data: PingEvent,
|
|
1120
|
+
type: z.literal('ping').check(z.meta({ examples: ['ping'] })),
|
|
1146
1121
|
})
|
|
1147
|
-
.check(z.meta({ title: '
|
|
1122
|
+
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
1148
1123
|
])
|
|
1149
|
-
.check(z.describe('
|
|
1124
|
+
.check(z.describe('The signed JSON payload Tempo POSTs to a webhook destination.')),
|
|
1125
|
+
'WebhookEventEnvelope',
|
|
1126
|
+
)
|
|
1150
1127
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
'
|
|
1128
|
+
/** Schemas for the getWebhookEventTypes operation. */
|
|
1129
|
+
export namespace getWebhookEventTypes {
|
|
1130
|
+
const EventTypeEntry = OpenApi.component(
|
|
1131
|
+
z
|
|
1132
|
+
.object({
|
|
1133
|
+
description: z
|
|
1134
|
+
.string()
|
|
1135
|
+
.check(
|
|
1136
|
+
z.describe('Plain-English description of the event type.'),
|
|
1137
|
+
z.meta({ examples: ['TIP-20 token transfer event.'] }),
|
|
1160
1138
|
),
|
|
1161
|
-
|
|
1139
|
+
type: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
1140
|
+
})
|
|
1141
|
+
.check(z.describe('One webhook event type available for subscription.')),
|
|
1142
|
+
'WebhookEventType',
|
|
1143
|
+
)
|
|
1144
|
+
|
|
1145
|
+
export const Response = OpenApi.component(
|
|
1146
|
+
z
|
|
1147
|
+
.object({
|
|
1148
|
+
data: z.array(EventTypeEntry).check(
|
|
1149
|
+
z.describe('Webhook event types available for subscription.'),
|
|
1150
|
+
z.meta({
|
|
1151
|
+
examples: [[{ description: 'TIP-20 token transfer event.', type: 'token:transfer' }]],
|
|
1152
|
+
}),
|
|
1162
1153
|
),
|
|
1163
|
-
|
|
1164
|
-
|
|
1154
|
+
})
|
|
1155
|
+
.check(z.describe('List of webhook event types Tempo can send.')),
|
|
1156
|
+
'WebhookEventTypeList',
|
|
1157
|
+
)
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/** Schemas for the createWebhook operation. */
|
|
1161
|
+
export namespace createWebhook {
|
|
1162
|
+
/** Request variant for TIP-20 transfer subscriptions. */
|
|
1163
|
+
export const TransferBody = OpenApi.component(
|
|
1164
|
+
z
|
|
1165
|
+
.object({
|
|
1166
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1167
|
+
context: z.optional(Context),
|
|
1168
|
+
destination: Destination,
|
|
1169
|
+
eventType: z
|
|
1170
|
+
.literal('token:transfer')
|
|
1171
|
+
.check(
|
|
1172
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1173
|
+
z.meta({ examples: ['token:transfer'] }),
|
|
1174
|
+
),
|
|
1175
|
+
filters: z.optional(TransferFilters),
|
|
1176
|
+
})
|
|
1177
|
+
.check(z.meta({ title: 'Transfer subscription' })),
|
|
1178
|
+
'CreateWebhookTransferRequest',
|
|
1179
|
+
)
|
|
1180
|
+
|
|
1181
|
+
/** Request variant for included transaction subscriptions. */
|
|
1182
|
+
export const TransactionBody = OpenApi.component(
|
|
1183
|
+
z
|
|
1184
|
+
.object({
|
|
1185
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1186
|
+
context: z.optional(Context),
|
|
1187
|
+
destination: Destination,
|
|
1188
|
+
eventType: z
|
|
1189
|
+
.literal('transaction:included')
|
|
1190
|
+
.check(
|
|
1191
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1192
|
+
z.meta({ examples: ['transaction:included'] }),
|
|
1193
|
+
),
|
|
1194
|
+
filters: z.optional(TxFilters),
|
|
1195
|
+
})
|
|
1196
|
+
.check(z.meta({ title: 'Included-transaction subscription' })),
|
|
1197
|
+
'CreateWebhookTransactionRequest',
|
|
1198
|
+
)
|
|
1199
|
+
|
|
1200
|
+
/** Request variant for emitted log subscriptions. */
|
|
1201
|
+
export const LogBody = OpenApi.component(
|
|
1202
|
+
z
|
|
1203
|
+
.object({
|
|
1204
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1205
|
+
context: z.optional(Context),
|
|
1206
|
+
destination: Destination,
|
|
1207
|
+
eventType: z
|
|
1208
|
+
.literal('log:emitted')
|
|
1209
|
+
.check(
|
|
1210
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1211
|
+
z.meta({ examples: ['log:emitted'] }),
|
|
1212
|
+
),
|
|
1213
|
+
filters: LogFilters,
|
|
1214
|
+
})
|
|
1215
|
+
.check(z.meta({ title: 'Log subscription' })),
|
|
1216
|
+
'CreateWebhookLogRequest',
|
|
1217
|
+
)
|
|
1218
|
+
|
|
1219
|
+
/** Request variant for created block subscriptions. */
|
|
1220
|
+
export const BlockBody = OpenApi.component(
|
|
1221
|
+
z
|
|
1222
|
+
.object({
|
|
1223
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1224
|
+
context: z.optional(Context),
|
|
1225
|
+
destination: Destination,
|
|
1226
|
+
eventType: z
|
|
1227
|
+
.literal('block:created')
|
|
1228
|
+
.check(
|
|
1229
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1230
|
+
z.meta({ examples: ['block:created'] }),
|
|
1231
|
+
),
|
|
1232
|
+
filters: z.optional(BlockFilters),
|
|
1233
|
+
})
|
|
1234
|
+
.check(z.meta({ title: 'Block subscription' })),
|
|
1235
|
+
'CreateWebhookBlockRequest',
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
/** Request variant for route deposit subscriptions. */
|
|
1239
|
+
export const RoutesDepositBody = OpenApi.component(
|
|
1240
|
+
z
|
|
1241
|
+
.object({
|
|
1242
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1243
|
+
context: z.optional(Context),
|
|
1244
|
+
destination: Destination,
|
|
1245
|
+
eventType: z
|
|
1246
|
+
.literal('routes:deposit.updated')
|
|
1247
|
+
.check(
|
|
1248
|
+
z.describe('Event type for committed route deposit changes.'),
|
|
1249
|
+
z.meta({ examples: ['routes:deposit.updated'] }),
|
|
1250
|
+
),
|
|
1251
|
+
filters: z.optional(RoutesDepositFilters),
|
|
1252
|
+
})
|
|
1253
|
+
.check(z.meta({ title: 'Route deposit subscription' })),
|
|
1254
|
+
'CreateWebhookRoutesDepositRequest',
|
|
1255
|
+
)
|
|
1256
|
+
|
|
1257
|
+
/** Request variant for route transfer subscriptions. */
|
|
1258
|
+
export const RoutesTransferBody = OpenApi.component(
|
|
1259
|
+
z
|
|
1260
|
+
.object({
|
|
1261
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1262
|
+
context: z.optional(Context),
|
|
1263
|
+
destination: Destination,
|
|
1264
|
+
eventType: z
|
|
1265
|
+
.literal('routes:transfer.updated')
|
|
1266
|
+
.check(
|
|
1267
|
+
z.describe('Event type for committed route transfer changes.'),
|
|
1268
|
+
z.meta({ examples: ['routes:transfer.updated'] }),
|
|
1269
|
+
),
|
|
1270
|
+
filters: z.optional(RoutesTransferFilters),
|
|
1271
|
+
})
|
|
1272
|
+
.check(z.meta({ title: 'Route transfer subscription' })),
|
|
1273
|
+
'CreateWebhookRoutesTransferRequest',
|
|
1274
|
+
)
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Discriminated on `eventType` so each variant carries its own typed
|
|
1278
|
+
* `filters` object — this is what lets the docs render the valid filter
|
|
1279
|
+
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
1280
|
+
* doc renderer's selector (see {@link schema.Envelope}).
|
|
1281
|
+
*/
|
|
1282
|
+
export const Body = OpenApi.component(
|
|
1283
|
+
z
|
|
1284
|
+
.discriminatedUnion('eventType', [
|
|
1285
|
+
TransferBody,
|
|
1286
|
+
TransactionBody,
|
|
1287
|
+
LogBody,
|
|
1288
|
+
BlockBody,
|
|
1289
|
+
RoutesDepositBody,
|
|
1290
|
+
RoutesTransferBody,
|
|
1291
|
+
])
|
|
1292
|
+
.check(z.describe('Details for creating a webhook subscription.')),
|
|
1293
|
+
'CreateWebhookRequest',
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
export const Response = OpenApi.component(
|
|
1297
|
+
z
|
|
1298
|
+
.object({
|
|
1299
|
+
...Subscription.shape,
|
|
1300
|
+
destination: Destination,
|
|
1301
|
+
secret: z
|
|
1302
|
+
.string()
|
|
1303
|
+
.check(
|
|
1304
|
+
z.describe(
|
|
1305
|
+
'HMAC signing secret (`whsec_…`) used to verify Tempo webhook signatures. It is shown once when you create the webhook, so store it now.',
|
|
1306
|
+
),
|
|
1307
|
+
z.meta({ examples: ['whsec_abc123'] }),
|
|
1308
|
+
),
|
|
1309
|
+
})
|
|
1310
|
+
.check(z.describe('The new webhook subscription, including the one-time signing secret.')),
|
|
1311
|
+
'CreateWebhookResponse',
|
|
1312
|
+
)
|
|
1165
1313
|
}
|
|
1166
1314
|
|
|
1167
1315
|
/** Schemas for the listWebhooks operation. */
|
|
@@ -1178,15 +1326,23 @@ export namespace schema {
|
|
|
1178
1326
|
z.describe('Query parameters for listing your webhook subscriptions.'),
|
|
1179
1327
|
)
|
|
1180
1328
|
|
|
1181
|
-
export const Response =
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1329
|
+
export const Response = OpenApi.component(
|
|
1330
|
+
z
|
|
1331
|
+
.object({
|
|
1332
|
+
data: z
|
|
1333
|
+
.array(Subscription)
|
|
1334
|
+
.check(z.describe('Webhook subscriptions on this page.'), z.meta({ examples: [[]] })),
|
|
1335
|
+
meta: z
|
|
1336
|
+
.optional(Schema.CountMeta)
|
|
1337
|
+
.check(
|
|
1338
|
+
z.describe('Extra response metadata requested with `include`.'),
|
|
1339
|
+
z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] }),
|
|
1340
|
+
),
|
|
1341
|
+
nextCursor: Schema.NextCursor,
|
|
1342
|
+
})
|
|
1343
|
+
.check(z.describe('A page of webhook subscriptions.')),
|
|
1344
|
+
'WebhookList',
|
|
1345
|
+
)
|
|
1190
1346
|
}
|
|
1191
1347
|
|
|
1192
1348
|
/** Schemas for the getWebhook operation. */
|
|
@@ -1221,55 +1377,69 @@ export namespace schema {
|
|
|
1221
1377
|
z.describe('Query parameters for listing webhook delivery attempts.'),
|
|
1222
1378
|
)
|
|
1223
1379
|
|
|
1224
|
-
export const Response =
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1380
|
+
export const Response = OpenApi.component(
|
|
1381
|
+
z
|
|
1382
|
+
.object({
|
|
1383
|
+
data: z
|
|
1384
|
+
.array(Delivery)
|
|
1385
|
+
.check(
|
|
1386
|
+
z.describe('Webhook delivery attempts on this page.'),
|
|
1387
|
+
z.meta({ examples: [[]] }),
|
|
1388
|
+
),
|
|
1389
|
+
meta: z
|
|
1390
|
+
.optional(Schema.CountMeta)
|
|
1391
|
+
.check(
|
|
1392
|
+
z.describe('Extra response metadata requested with `include`.'),
|
|
1393
|
+
z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] }),
|
|
1394
|
+
),
|
|
1395
|
+
nextCursor: Schema.NextCursor,
|
|
1396
|
+
})
|
|
1397
|
+
.check(z.describe('A page of webhook delivery attempts.')),
|
|
1398
|
+
'WebhookDeliveryList',
|
|
1399
|
+
)
|
|
1233
1400
|
}
|
|
1234
1401
|
|
|
1235
1402
|
/** Schemas for the pingWebhook operation. */
|
|
1236
1403
|
export namespace pingWebhook {
|
|
1237
1404
|
export const Params = getWebhook.Params
|
|
1238
1405
|
|
|
1239
|
-
export const Response =
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1406
|
+
export const Response = OpenApi.component(
|
|
1407
|
+
z
|
|
1408
|
+
.object({
|
|
1409
|
+
delivered: z
|
|
1410
|
+
.boolean()
|
|
1411
|
+
.check(
|
|
1412
|
+
z.describe('Whether your endpoint returned a 2xx response.'),
|
|
1413
|
+
z.meta({ examples: [true] }),
|
|
1414
|
+
),
|
|
1415
|
+
error: z
|
|
1416
|
+
.optional(z.string())
|
|
1417
|
+
.check(
|
|
1418
|
+
z.describe('Why the delivery failed, present when `delivered` is `false`.'),
|
|
1419
|
+
z.meta({ examples: ['Connection timed out'] }),
|
|
1420
|
+
),
|
|
1421
|
+
eventId: z
|
|
1422
|
+
.string()
|
|
1423
|
+
.check(
|
|
1424
|
+
z.describe('Synthetic event ID (`evt_…`) Tempo sent for this ping.'),
|
|
1425
|
+
z.meta({ examples: ['evt_abc123'] }),
|
|
1426
|
+
),
|
|
1427
|
+
responseMs: z
|
|
1428
|
+
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
1429
|
+
.check(
|
|
1430
|
+
z.describe('Round-trip delivery time in milliseconds, when the request completed.'),
|
|
1431
|
+
z.meta({ examples: [12] }),
|
|
1432
|
+
),
|
|
1433
|
+
responseStatus: z
|
|
1434
|
+
.optional(z.number().check(z.int()))
|
|
1435
|
+
.check(
|
|
1436
|
+
z.describe('HTTP status your endpoint returned, when Tempo received a response.'),
|
|
1437
|
+
z.meta({ examples: [200] }),
|
|
1438
|
+
),
|
|
1439
|
+
})
|
|
1440
|
+
.check(z.describe('Result of sending a synthetic ping event to a webhook destination.')),
|
|
1441
|
+
'PingWebhookResponse',
|
|
1442
|
+
)
|
|
1273
1443
|
}
|
|
1274
1444
|
|
|
1275
1445
|
/** Schemas for the retryWebhookDelivery operation. */
|
|
@@ -1291,32 +1461,37 @@ export namespace schema {
|
|
|
1291
1461
|
})
|
|
1292
1462
|
.check(z.describe('Path parameters for retrying a webhook delivery.'))
|
|
1293
1463
|
|
|
1294
|
-
export const Response = pingWebhook.Response
|
|
1464
|
+
export const Response = OpenApi.component(pingWebhook.Response, 'RetryWebhookDeliveryResponse')
|
|
1295
1465
|
}
|
|
1296
1466
|
|
|
1297
1467
|
/** Schemas for the updateWebhook operation. */
|
|
1298
1468
|
export namespace updateWebhook {
|
|
1299
1469
|
export const Params = getWebhook.Params
|
|
1300
1470
|
|
|
1301
|
-
export const Body =
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1471
|
+
export const Body = OpenApi.component(
|
|
1472
|
+
z
|
|
1473
|
+
.object({
|
|
1474
|
+
context: z
|
|
1475
|
+
.optional(z.nullable(Context))
|
|
1476
|
+
.check(z.describe('New human context, or `null` to clear it.')),
|
|
1477
|
+
destination: z
|
|
1478
|
+
.optional(Destination)
|
|
1479
|
+
.check(
|
|
1480
|
+
z.describe('New delivery destination for future events (URL or Slack channel).'),
|
|
1481
|
+
),
|
|
1482
|
+
filters: z
|
|
1483
|
+
.optional(Filters)
|
|
1484
|
+
.check(
|
|
1485
|
+
z.describe('New filters to apply to future webhook events.'),
|
|
1486
|
+
z.meta({ examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }] }),
|
|
1487
|
+
),
|
|
1488
|
+
status: z
|
|
1489
|
+
.optional(Status)
|
|
1490
|
+
.check(z.describe('New lifecycle status, such as pausing or resuming delivery.')),
|
|
1491
|
+
})
|
|
1492
|
+
.check(z.describe('Fields to update on the webhook subscription.')),
|
|
1493
|
+
'UpdateWebhookRequest',
|
|
1494
|
+
)
|
|
1320
1495
|
|
|
1321
1496
|
export const Response = Subscription
|
|
1322
1497
|
}
|
|
@@ -1325,16 +1500,19 @@ export namespace schema {
|
|
|
1325
1500
|
export namespace deleteWebhook {
|
|
1326
1501
|
export const Params = getWebhook.Params
|
|
1327
1502
|
|
|
1328
|
-
export const Response =
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1503
|
+
export const Response = OpenApi.component(
|
|
1504
|
+
z
|
|
1505
|
+
.object({
|
|
1506
|
+
id: z
|
|
1507
|
+
.string()
|
|
1508
|
+
.check(
|
|
1509
|
+
z.describe('ID of the webhook subscription that was deleted.'),
|
|
1510
|
+
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
1511
|
+
),
|
|
1512
|
+
})
|
|
1513
|
+
.check(z.describe('Confirmation that the webhook subscription was deleted.')),
|
|
1514
|
+
'DeleteWebhookResponse',
|
|
1515
|
+
)
|
|
1338
1516
|
}
|
|
1339
1517
|
}
|
|
1340
1518
|
|
|
@@ -1349,8 +1527,7 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1349
1527
|
const hidden = !options.enabled
|
|
1350
1528
|
const availableEventTypes = eventTypeDescriptions.filter(
|
|
1351
1529
|
(eventType) =>
|
|
1352
|
-
!
|
|
1353
|
-
options.applicationEventTypes?.includes(eventType.type),
|
|
1530
|
+
!isRoutesEventType(eventType.type) || options.applicationEventTypes?.includes(eventType.type),
|
|
1354
1531
|
)
|
|
1355
1532
|
const availableEventTypeSet = new Set(availableEventTypes.map((eventType) => eventType.type))
|
|
1356
1533
|
// Gate the whole resource on a configured state store. Without it the
|
|
@@ -1378,6 +1555,16 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1378
1555
|
hide: hidden,
|
|
1379
1556
|
operationId: 'getWebhookEventTypes',
|
|
1380
1557
|
responses: OpenApi.responses({
|
|
1558
|
+
errors: {
|
|
1559
|
+
400: {
|
|
1560
|
+
codes: [],
|
|
1561
|
+
description: 'The API key credential is malformed.',
|
|
1562
|
+
},
|
|
1563
|
+
404: {
|
|
1564
|
+
codes: ['webhooks_not_enabled'],
|
|
1565
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1566
|
+
},
|
|
1567
|
+
},
|
|
1381
1568
|
success: {
|
|
1382
1569
|
description: 'Webhook event types available for subscription.',
|
|
1383
1570
|
schema: schema.getWebhookEventTypes.Response,
|
|
@@ -1432,7 +1619,12 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1432
1619
|
},
|
|
1433
1620
|
403: {
|
|
1434
1621
|
codes: ['api_key_forbidden', 'limit_exceeded'],
|
|
1435
|
-
description:
|
|
1622
|
+
description:
|
|
1623
|
+
'The API key lacks access or its creator-shared subscription limit was reached.',
|
|
1624
|
+
},
|
|
1625
|
+
404: {
|
|
1626
|
+
codes: ['webhooks_not_enabled'],
|
|
1627
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1436
1628
|
},
|
|
1437
1629
|
},
|
|
1438
1630
|
success: {
|
|
@@ -1466,11 +1658,11 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1466
1658
|
message: 'Webhook event type is not available in this deployment',
|
|
1467
1659
|
status: 400,
|
|
1468
1660
|
})
|
|
1469
|
-
if (
|
|
1661
|
+
if (isRoutesEventType(body.eventType)) {
|
|
1470
1662
|
if (principal?.type !== 'api_key') return unauthorized(c)
|
|
1471
1663
|
if (
|
|
1472
1664
|
!principal.apiKey.scopes.some(
|
|
1473
|
-
(scope) => scope === Scope.wildcard || scope === '
|
|
1665
|
+
(scope) => scope === Scope.wildcard || scope === 'routes:read',
|
|
1474
1666
|
)
|
|
1475
1667
|
)
|
|
1476
1668
|
return Response.error(c, {
|
|
@@ -1488,9 +1680,9 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1488
1680
|
// Preserve destination errors before the creation-time RPC dependency.
|
|
1489
1681
|
WebhookDestination.assertDestination(body.destination)
|
|
1490
1682
|
const maxPerOwner = webhook.maxPerOwner ?? defaultMaxPerOwner
|
|
1491
|
-
if ((await Webhooks.
|
|
1683
|
+
if ((await Webhooks.countSubscriptionsForLimit(db, { owner })) >= maxPerOwner)
|
|
1492
1684
|
throw new Webhooks.LimitExceededError(maxPerOwner)
|
|
1493
|
-
const startBlockNumber =
|
|
1685
|
+
const startBlockNumber = isRoutesEventType(body.eventType)
|
|
1494
1686
|
? undefined
|
|
1495
1687
|
: await getRpcHead(c.get('getClient')(chainId))
|
|
1496
1688
|
const subscription = await Webhooks.createSubscription(
|
|
@@ -1538,6 +1730,16 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1538
1730
|
hide: hidden,
|
|
1539
1731
|
operationId: 'listWebhooks',
|
|
1540
1732
|
responses: OpenApi.responses({
|
|
1733
|
+
errors: {
|
|
1734
|
+
400: {
|
|
1735
|
+
codes: ['query_invalid'],
|
|
1736
|
+
description: 'The query parameters are invalid.',
|
|
1737
|
+
},
|
|
1738
|
+
404: {
|
|
1739
|
+
codes: ['webhooks_not_enabled'],
|
|
1740
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1741
|
+
},
|
|
1742
|
+
},
|
|
1541
1743
|
success: {
|
|
1542
1744
|
description: 'A page of webhook subscriptions.',
|
|
1543
1745
|
schema: schema.listWebhooks.Response,
|
|
@@ -1615,9 +1817,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1615
1817
|
operationId: 'getWebhook',
|
|
1616
1818
|
responses: OpenApi.responses({
|
|
1617
1819
|
errors: {
|
|
1820
|
+
400: {
|
|
1821
|
+
codes: ['param_invalid'],
|
|
1822
|
+
description: 'The webhook ID is invalid.',
|
|
1823
|
+
},
|
|
1618
1824
|
404: {
|
|
1619
1825
|
description: 'No webhook subscription was found for that ID.',
|
|
1620
|
-
codes: ['webhook_not_found'],
|
|
1826
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1621
1827
|
},
|
|
1622
1828
|
},
|
|
1623
1829
|
success: {
|
|
@@ -1672,9 +1878,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1672
1878
|
operationId: 'listWebhookDeliveries',
|
|
1673
1879
|
responses: OpenApi.responses({
|
|
1674
1880
|
errors: {
|
|
1881
|
+
400: {
|
|
1882
|
+
codes: ['param_invalid', 'query_invalid'],
|
|
1883
|
+
description: 'The webhook ID or query parameters are invalid.',
|
|
1884
|
+
},
|
|
1675
1885
|
404: {
|
|
1676
1886
|
description: 'No webhook subscription was found for that ID.',
|
|
1677
|
-
codes: ['webhook_not_found'],
|
|
1887
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1678
1888
|
},
|
|
1679
1889
|
},
|
|
1680
1890
|
success: {
|
|
@@ -1761,9 +1971,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1761
1971
|
operationId: 'pingWebhook',
|
|
1762
1972
|
responses: OpenApi.responses({
|
|
1763
1973
|
errors: {
|
|
1974
|
+
400: {
|
|
1975
|
+
codes: ['param_invalid'],
|
|
1976
|
+
description: 'The webhook ID is invalid.',
|
|
1977
|
+
},
|
|
1764
1978
|
404: {
|
|
1765
1979
|
description: 'No webhook subscription was found for that ID.',
|
|
1766
|
-
codes: ['webhook_not_found'],
|
|
1980
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1767
1981
|
},
|
|
1768
1982
|
},
|
|
1769
1983
|
success: {
|
|
@@ -1826,9 +2040,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1826
2040
|
operationId: 'retryWebhookDelivery',
|
|
1827
2041
|
responses: OpenApi.responses({
|
|
1828
2042
|
errors: {
|
|
2043
|
+
400: {
|
|
2044
|
+
codes: ['param_invalid'],
|
|
2045
|
+
description: 'The webhook or delivery ID is invalid.',
|
|
2046
|
+
},
|
|
1829
2047
|
404: {
|
|
1830
2048
|
description: 'No webhook subscription or delivery was found for those IDs.',
|
|
1831
|
-
codes: ['webhook_not_found', 'delivery_not_found'],
|
|
2049
|
+
codes: ['webhook_not_found', 'delivery_not_found', 'webhooks_not_enabled'],
|
|
1832
2050
|
},
|
|
1833
2051
|
},
|
|
1834
2052
|
success: {
|
|
@@ -1914,7 +2132,7 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1914
2132
|
},
|
|
1915
2133
|
404: {
|
|
1916
2134
|
description: 'No webhook subscription was found for that ID.',
|
|
1917
|
-
codes: ['webhook_not_found'],
|
|
2135
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1918
2136
|
},
|
|
1919
2137
|
},
|
|
1920
2138
|
success: {
|
|
@@ -1981,9 +2199,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1981
2199
|
operationId: 'deleteWebhook',
|
|
1982
2200
|
responses: OpenApi.responses({
|
|
1983
2201
|
errors: {
|
|
2202
|
+
400: {
|
|
2203
|
+
codes: ['param_invalid'],
|
|
2204
|
+
description: 'The webhook ID is invalid.',
|
|
2205
|
+
},
|
|
1984
2206
|
404: {
|
|
1985
2207
|
description: 'No webhook subscription was found for that ID.',
|
|
1986
|
-
codes: ['webhook_not_found'],
|
|
2208
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1987
2209
|
},
|
|
1988
2210
|
},
|
|
1989
2211
|
success: {
|
|
@@ -2143,8 +2365,8 @@ export async function getRpcHead(client: Viem.getClient.ReturnType): Promise<num
|
|
|
2143
2365
|
|
|
2144
2366
|
const filterSchemas = {
|
|
2145
2367
|
'block:created': schema.BlockFilters,
|
|
2146
|
-
'
|
|
2147
|
-
'
|
|
2368
|
+
'routes:deposit.updated': schema.RoutesDepositFilters,
|
|
2369
|
+
'routes:transfer.updated': schema.RoutesTransferFilters,
|
|
2148
2370
|
'log:emitted': schema.LogFilters,
|
|
2149
2371
|
'token:transfer': schema.TransferFilters,
|
|
2150
2372
|
'transaction:included': schema.TxFilters,
|
|
@@ -2396,8 +2618,18 @@ function pushEventArgs(args: Record<string, unknown> | undefined, event: AbiEven
|
|
|
2396
2618
|
return pushed
|
|
2397
2619
|
}
|
|
2398
2620
|
|
|
2621
|
+
type LogPushdownFilters = {
|
|
2622
|
+
address?: unknown
|
|
2623
|
+
args?: Record<string, unknown> | undefined
|
|
2624
|
+
signature?: string | undefined
|
|
2625
|
+
topic0?: unknown
|
|
2626
|
+
topic1?: unknown
|
|
2627
|
+
topic2?: unknown
|
|
2628
|
+
topic3?: unknown
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2399
2631
|
/** Checks that the accepted filter carries a selective anchor rather than matching every log. */
|
|
2400
|
-
function hasLogPushdown(f:
|
|
2632
|
+
function hasLogPushdown(f: LogPushdownFilters): boolean {
|
|
2401
2633
|
if (pushAddress(f.address) !== undefined) return true
|
|
2402
2634
|
|
|
2403
2635
|
const secondaryTopic = [f.topic1, f.topic2, f.topic3].some(
|
|
@@ -2667,7 +2899,7 @@ function toPublic(subscription: Webhooks.Subscription) {
|
|
|
2667
2899
|
...(subscription.context === undefined ? {} : { context: subscription.context }),
|
|
2668
2900
|
createdAt: subscription.createdAt,
|
|
2669
2901
|
destination: redactDestination(subscription.destination),
|
|
2670
|
-
...(
|
|
2902
|
+
...(isRoutesEventType(subscription.eventType) && subscription.environment !== undefined
|
|
2671
2903
|
? { environment: subscription.environment }
|
|
2672
2904
|
: {}),
|
|
2673
2905
|
eventType: subscription.eventType,
|