tapimo 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/ApiKey.js +1 -1
- package/dist/ApiKey.js.map +1 -1
- package/dist/ApiKeys.d.ts +95 -14
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +360 -49
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +12466 -10374
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +300 -22
- package/dist/App.js.map +1 -1
- package/dist/Assets.d.ts.map +1 -1
- package/dist/Assets.js +2 -1
- package/dist/Assets.js.map +1 -1
- package/dist/Handler.d.ts +0 -1
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js +0 -1
- package/dist/Handler.js.map +1 -1
- package/dist/Scope.d.ts +13 -5
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +16 -5
- package/dist/Scope.js.map +1 -1
- package/dist/Webhooks.js +1 -1
- package/dist/Webhooks.js.map +1 -1
- package/dist/admin/App.d.ts +3057 -546
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/App.js +26 -5
- package/dist/admin/App.js.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +179 -27
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +95 -43
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +1398 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.js +463 -7
- package/dist/admin/apps/earn-vaults.js.map +1 -1
- package/dist/admin/apps/organizations.d.ts +267 -15
- package/dist/admin/apps/organizations.d.ts.map +1 -1
- package/dist/admin/apps/organizations.js +241 -25
- package/dist/admin/apps/organizations.js.map +1 -1
- package/dist/admin/apps/routes-support.d.ts +95 -0
- package/dist/admin/apps/routes-support.d.ts.map +1 -0
- package/dist/admin/apps/routes-support.js +151 -0
- package/dist/admin/apps/routes-support.js.map +1 -0
- package/dist/admin/apps/routes.d.ts +2764 -0
- package/dist/admin/apps/routes.d.ts.map +1 -0
- package/dist/admin/apps/routes.js +728 -0
- package/dist/admin/apps/routes.js.map +1 -0
- package/dist/admin/apps/subsidies.d.ts +501 -0
- package/dist/admin/apps/subsidies.d.ts.map +1 -0
- package/dist/admin/apps/subsidies.js +384 -0
- package/dist/admin/apps/subsidies.js.map +1 -0
- package/dist/admin/apps/verified-tokens.d.ts +166 -160
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
- package/dist/admin/apps/verified-tokens.js +27 -7
- package/dist/admin/apps/verified-tokens.js.map +1 -1
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +201 -149
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +5 -2
- package/dist/analytics/Analytics.d.ts.map +1 -1
- package/dist/analytics/Analytics.js +31 -1
- package/dist/analytics/Analytics.js.map +1 -1
- package/dist/analytics/tables/requestEvents.d.ts +2 -1
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
- package/dist/analytics/tables/requestEvents.js +10 -1
- package/dist/analytics/tables/requestEvents.js.map +1 -1
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts +72 -0
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts.map +1 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js +56 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js.map +1 -0
- package/dist/apps/Zones.d.ts +21 -12526
- package/dist/apps/Zones.d.ts.map +1 -1
- package/dist/apps/Zones.js +37 -5
- package/dist/apps/Zones.js.map +1 -1
- package/dist/apps/data/App.d.ts +3971 -2595
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +76 -21
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +629 -299
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +495 -190
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +72 -0
- package/dist/apps/data/routes/addresses.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +116 -116
- package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
- package/dist/apps/data/routes/coingecko.js +47 -21
- package/dist/apps/data/routes/coingecko.js.map +1 -1
- package/dist/apps/data/routes/earn.d.ts +1450 -337
- package/dist/apps/data/routes/earn.d.ts.map +1 -1
- package/dist/apps/data/routes/earn.js +1226 -144
- package/dist/apps/data/routes/earn.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts +113 -108
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +41 -21
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +142 -17
- package/dist/apps/data/routes/indexer.d.ts.map +1 -1
- package/dist/apps/data/routes/indexer.js +83 -27
- package/dist/apps/data/routes/indexer.js.map +1 -1
- package/dist/apps/data/routes/receipts.d.ts +235 -235
- package/dist/apps/data/routes/rpc.d.ts +507 -33
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +309 -165
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +47 -15
- package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
- package/dist/apps/data/routes/tokenlist.js +68 -11
- package/dist/apps/data/routes/tokenlist.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +2 -0
- package/dist/apps/data/routes/tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/tokens.js +26 -14
- package/dist/apps/data/routes/tokens.js.map +1 -1
- package/dist/apps/data/routes/transfers.d.ts +93 -77
- package/dist/apps/data/routes/transfers.d.ts.map +1 -1
- package/dist/apps/data/routes/transfers.js +9 -7
- package/dist/apps/data/routes/transfers.js.map +1 -1
- package/dist/apps/data/routes/valuation.d.ts +32 -32
- package/dist/apps/data/routes/verified-tokens.d.ts +88 -88
- package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/verified-tokens.js +64 -20
- package/dist/apps/data/routes/verified-tokens.js.map +1 -1
- package/dist/apps/data/routes/webhooks.d.ts +614 -177
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +308 -205
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/data/routes/zones.d.ts +31 -31
- package/dist/apps/data/routes/zones.d.ts.map +1 -1
- package/dist/apps/data/routes/zones.js +20 -12
- package/dist/apps/data/routes/zones.js.map +1 -1
- package/dist/apps/docs/reference.js +2 -2
- package/dist/apps/docs/reference.js.map +1 -1
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/management/App.d.ts +3780 -3402
- package/dist/apps/management/App.d.ts.map +1 -1
- package/dist/apps/management/App.js +5 -14
- package/dist/apps/management/App.js.map +1 -1
- package/dist/apps/management/Billing.d.ts +48 -7
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +204 -25
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +317 -215
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.js +43 -15
- package/dist/apps/management/routes/api-keys.js.map +1 -1
- package/dist/apps/management/routes/billing.d.ts +290 -4
- package/dist/apps/management/routes/billing.d.ts.map +1 -1
- package/dist/apps/management/routes/billing.js +274 -49
- package/dist/apps/management/routes/billing.js.map +1 -1
- package/dist/apps/management/routes/faucet.d.ts +6 -6
- package/dist/apps/management/routes/faucet.js +1 -1
- package/dist/apps/management/routes/faucet.js.map +1 -1
- package/dist/apps/management/routes/invitations.d.ts +213 -138
- package/dist/apps/management/routes/invitations.d.ts.map +1 -1
- package/dist/apps/management/routes/invitations.js +117 -13
- package/dist/apps/management/routes/invitations.js.map +1 -1
- package/dist/apps/management/routes/invite-links.d.ts +166 -166
- package/dist/apps/management/routes/me.d.ts.map +1 -1
- package/dist/apps/management/routes/me.js +6 -2
- package/dist/apps/management/routes/me.js.map +1 -1
- package/dist/apps/management/routes/members.d.ts +30 -30
- package/dist/apps/management/routes/orgs.d.ts +103 -87
- package/dist/apps/management/routes/orgs.d.ts.map +1 -1
- package/dist/apps/management/routes/orgs.js +52 -12
- package/dist/apps/management/routes/orgs.js.map +1 -1
- package/dist/apps/management/routes/projects.d.ts +125 -125
- package/dist/apps/management/routes/projects.d.ts.map +1 -1
- package/dist/apps/management/routes/projects.js +6 -1
- package/dist/apps/management/routes/projects.js.map +1 -1
- package/dist/apps/management/routes/scopes.d.ts.map +1 -1
- package/dist/apps/management/routes/scopes.js +4 -1
- package/dist/apps/management/routes/scopes.js.map +1 -1
- package/dist/apps/management/routes/usage.d.ts +24 -24
- package/dist/apps/management/routes/usage.js +21 -4
- package/dist/apps/management/routes/usage.js.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.d.ts +95 -95
- package/dist/apps/management/routes/verified-token-requests.d.ts.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.js +7 -9
- package/dist/apps/management/routes/verified-token-requests.js.map +1 -1
- package/dist/apps/management/routes/webhooks.d.ts +682 -616
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +58 -12
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/mcp.d.ts +1 -1
- package/dist/apps/mcp.d.ts.map +1 -1
- package/dist/apps/mcp.js +23 -10
- package/dist/apps/mcp.js.map +1 -1
- package/dist/apps/mpp/App.d.ts +44 -44
- package/dist/apps/mpp/App.d.ts.map +1 -1
- package/dist/apps/mpp/App.js +35 -7
- package/dist/apps/mpp/App.js.map +1 -1
- package/dist/apps/mpp/internal/Adapter.d.ts +2 -0
- package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Adapter.js +30 -1
- package/dist/apps/mpp/internal/Adapter.js.map +1 -1
- package/dist/apps/mpp/internal/Policy.d.ts +22 -4
- package/dist/apps/mpp/internal/Policy.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Policy.js +24 -6
- package/dist/apps/mpp/internal/Policy.js.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.d.ts +3 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.js +6 -3
- package/dist/apps/mpp/internal/Sponsorship.js.map +1 -1
- package/dist/apps/relay/App.d.ts +2 -0
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +134 -75
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts +5 -3
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +209 -28
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/apps/{funding → routes}/Access.d.ts +4 -4
- package/dist/apps/routes/Access.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Access.js +4 -4
- package/dist/apps/routes/Access.js.map +1 -0
- package/dist/apps/{funding → routes}/App.d.ts +418 -124
- package/dist/apps/{funding → routes}/App.d.ts.map +1 -1
- package/dist/apps/{funding → routes}/App.js +16 -16
- package/dist/apps/routes/App.js.map +1 -0
- package/dist/apps/routes/Inventory.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Inventory.js +2 -2
- package/dist/apps/routes/Inventory.js.map +1 -0
- package/dist/apps/routes/index.d.ts +2 -0
- package/dist/apps/routes/index.d.ts.map +1 -0
- package/dist/apps/routes/index.js +2 -0
- package/dist/apps/routes/index.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.d.ts +32 -32
- package/dist/apps/routes/routes/chains.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.js +25 -25
- package/dist/apps/routes/routes/chains.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.d.ts +107 -43
- package/dist/apps/routes/routes/deposit-addresses.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.js +497 -222
- package/dist/apps/routes/routes/deposit-addresses.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/providers.d.ts +8 -8
- package/dist/apps/routes/routes/providers.d.ts.map +1 -0
- package/dist/apps/routes/routes/providers.js +57 -0
- package/dist/apps/routes/routes/providers.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.d.ts +106 -103
- package/dist/apps/routes/routes/quotes.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.js +55 -38
- package/dist/apps/routes/routes/quotes.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/transfers.d.ts +733 -428
- package/dist/apps/routes/routes/transfers.d.ts.map +1 -0
- package/dist/apps/routes/routes/transfers.js +1140 -0
- package/dist/apps/routes/routes/transfers.js.map +1 -0
- package/dist/cli/Cli.d.ts +30 -0
- package/dist/cli/Cli.d.ts.map +1 -1
- package/dist/cli/commands/admin.d.ts +36 -0
- package/dist/cli/commands/admin.d.ts.map +1 -1
- package/dist/cli/commands/admin.js +273 -0
- package/dist/cli/commands/admin.js.map +1 -1
- package/dist/cloudflare.d.ts +16 -14
- package/dist/cloudflare.d.ts.map +1 -1
- package/dist/cloudflare.js +26 -21
- package/dist/cloudflare.js.map +1 -1
- package/dist/db/Db.d.ts +63 -21
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +1035 -15
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +780 -133
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +575 -162
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts +4 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js +2 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts +73 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.js +142 -0
- package/dist/db/tables/apiKeyAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts +4 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js +2 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts +20 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js +57 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js.map +1 -0
- package/dist/db/tables/apiKeyRevocations.d.ts +21 -0
- package/dist/db/tables/apiKeyRevocations.d.ts.map +1 -0
- package/dist/db/tables/apiKeyRevocations.js +98 -0
- package/dist/db/tables/apiKeyRevocations.js.map +1 -0
- package/dist/db/tables/authAccounts.d.ts +47 -0
- package/dist/db/tables/authAccounts.d.ts.map +1 -0
- package/dist/db/tables/authAccounts.js +72 -0
- package/dist/db/tables/authAccounts.js.map +1 -0
- package/dist/db/tables/authSessions.d.ts +12 -0
- package/dist/db/tables/authSessions.d.ts.map +1 -0
- package/dist/db/tables/authSessions.js +2 -0
- package/dist/db/tables/authSessions.js.map +1 -0
- package/dist/db/tables/authVerifications.d.ts +12 -0
- package/dist/db/tables/authVerifications.d.ts.map +1 -0
- package/dist/db/tables/authVerifications.js +2 -0
- package/dist/db/tables/authVerifications.js.map +1 -0
- package/dist/db/tables/invitations.d.ts +17 -1
- package/dist/db/tables/invitations.d.ts.map +1 -1
- package/dist/db/tables/invitations.js +123 -43
- package/dist/db/tables/invitations.js.map +1 -1
- package/dist/db/tables/memberships.d.ts +8 -0
- package/dist/db/tables/memberships.d.ts.map +1 -1
- package/dist/db/tables/memberships.js +51 -2
- package/dist/db/tables/memberships.js.map +1 -1
- package/dist/db/tables/organizations.d.ts +32 -10
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +110 -49
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +2 -0
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +12 -3
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/requestUsage.d.ts.map +1 -1
- package/dist/db/tables/requestUsage.js.map +1 -1
- package/dist/db/tables/rewardAccounts.d.ts +86 -0
- package/dist/db/tables/rewardAccounts.d.ts.map +1 -0
- package/dist/db/tables/rewardAccounts.js +88 -0
- package/dist/db/tables/rewardAccounts.js.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts +36 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.js +30 -0
- package/dist/db/tables/rewardCampaignDistributors.js.map +1 -0
- package/dist/db/tables/rewardCampaigns.d.ts +171 -0
- package/dist/db/tables/rewardCampaigns.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaigns.js +392 -0
- package/dist/db/tables/rewardCampaigns.js.map +1 -0
- package/dist/db/tables/rewardCredits.d.ts +53 -0
- package/dist/db/tables/rewardCredits.d.ts.map +1 -0
- package/dist/db/tables/rewardCredits.js +63 -0
- package/dist/db/tables/rewardCredits.js.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts +61 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.js +103 -0
- package/dist/db/tables/rewardEligibilityAssociations.js.map +1 -0
- package/dist/db/tables/rewardRuns.d.ts +188 -0
- package/dist/db/tables/rewardRuns.d.ts.map +1 -0
- package/dist/db/tables/rewardRuns.js +278 -0
- package/dist/db/tables/rewardRuns.js.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts +100 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.js +163 -0
- package/dist/db/tables/rewardTransactionAttempts.js.map +1 -0
- package/dist/db/tables/routesCatalog.d.ts +58 -0
- package/dist/db/tables/routesCatalog.d.ts.map +1 -0
- package/dist/db/tables/{fundingCatalog.js → routesCatalog.js} +19 -19
- package/dist/db/tables/routesCatalog.js.map +1 -0
- package/dist/db/tables/routesDepositAddresses.d.ts +476 -0
- package/dist/db/tables/routesDepositAddresses.d.ts.map +1 -0
- package/dist/db/tables/routesDepositAddresses.js +587 -0
- package/dist/db/tables/routesDepositAddresses.js.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.d.ts → routesDepositRequestObservations.d.ts} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.d.ts.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.js → routesDepositRequestObservations.js} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.js.map +1 -0
- package/dist/db/tables/{fundingDeposits.d.ts → routesDeposits.d.ts} +210 -22
- package/dist/db/tables/routesDeposits.d.ts.map +1 -0
- package/dist/db/tables/routesDeposits.js +576 -0
- package/dist/db/tables/routesDeposits.js.map +1 -0
- package/dist/db/tables/routesIdempotency.d.ts +166 -0
- package/dist/db/tables/routesIdempotency.d.ts.map +1 -0
- package/dist/db/tables/routesIdempotency.js +330 -0
- package/dist/db/tables/routesIdempotency.js.map +1 -0
- package/dist/db/tables/routesSubsidies.d.ts +27 -0
- package/dist/db/tables/routesSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesSubsidies.js +45 -0
- package/dist/db/tables/routesSubsidies.js.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.d.ts → routesTransferEvents.d.ts} +3 -3
- package/dist/db/tables/routesTransferEvents.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.js → routesTransferEvents.js} +3 -3
- package/dist/db/tables/routesTransferEvents.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts +19 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.js +17 -0
- package/dist/db/tables/routesTransferSubsidies.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts +51 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js +82 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js.map +1 -0
- package/dist/db/tables/routesTransferTransactions.d.ts +77 -0
- package/dist/db/tables/routesTransferTransactions.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferTransactions.js → routesTransferTransactions.js} +31 -13
- package/dist/db/tables/routesTransferTransactions.js.map +1 -0
- package/dist/db/tables/routesTransfers.d.ts +319 -0
- package/dist/db/tables/routesTransfers.d.ts.map +1 -0
- package/dist/db/tables/routesTransfers.js +372 -0
- package/dist/db/tables/routesTransfers.js.map +1 -0
- package/dist/db/tables/sponsoredTransactions.d.ts +75 -20
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +124 -54
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/sponsorshipAttributions.d.ts +69 -0
- package/dist/db/tables/sponsorshipAttributions.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipAttributions.js +77 -0
- package/dist/db/tables/sponsorshipAttributions.js.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts +22 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js +45 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js.map +1 -0
- package/dist/db/tables/stripeCustomers.d.ts +11 -0
- package/dist/db/tables/stripeCustomers.d.ts.map +1 -1
- package/dist/db/tables/stripeCustomers.js +13 -0
- package/dist/db/tables/stripeCustomers.js.map +1 -1
- package/dist/db/tables/users.d.ts +17 -1
- package/dist/db/tables/users.d.ts.map +1 -1
- package/dist/db/tables/users.js +47 -2
- package/dist/db/tables/users.js.map +1 -1
- package/dist/db/tables/verifiedTokenRequests.d.ts +21 -4
- package/dist/db/tables/verifiedTokenRequests.d.ts.map +1 -1
- package/dist/db/tables/verifiedTokenRequests.js +65 -44
- package/dist/db/tables/verifiedTokenRequests.js.map +1 -1
- package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
- package/dist/db/tables/webhookQueueEvents.js +5 -1
- package/dist/db/tables/webhookQueueEvents.js.map +1 -1
- package/dist/db/tables/webhookSubscriptions.d.ts +19 -11
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +45 -13
- package/dist/db/tables/webhookSubscriptions.js.map +1 -1
- package/dist/handlers/internal/executionError.d.ts +2 -2
- package/dist/handlers/internal/executionError.d.ts.map +1 -1
- package/dist/handlers/internal/executionError.js +1 -2
- package/dist/handlers/internal/executionError.js.map +1 -1
- package/dist/handlers/internal/multisig.d.ts +4 -232
- package/dist/handlers/internal/multisig.d.ts.map +1 -1
- package/dist/handlers/internal/multisig.js +11 -537
- package/dist/handlers/internal/multisig.js.map +1 -1
- package/dist/handlers/internal/sponsorship.d.ts +19 -8
- package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
- package/dist/handlers/internal/sponsorship.js +13 -9
- package/dist/handlers/internal/sponsorship.js.map +1 -1
- package/dist/handlers/relay.d.ts +9 -12
- package/dist/handlers/relay.d.ts.map +1 -1
- package/dist/handlers/relay.js +81 -85
- package/dist/handlers/relay.js.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/AssetResponse.d.ts +12 -0
- package/dist/internal/AssetResponse.d.ts.map +1 -0
- package/dist/internal/AssetResponse.js +21 -0
- package/dist/internal/AssetResponse.js.map +1 -0
- package/dist/internal/Auth.d.ts +64 -12
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +631 -180
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/BetterAuth.d.ts +1488 -0
- package/dist/internal/BetterAuth.d.ts.map +1 -0
- package/dist/internal/BetterAuth.js +253 -0
- package/dist/internal/BetterAuth.js.map +1 -0
- package/dist/internal/Cache.d.ts +2 -0
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +2 -0
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/EarnRates.d.ts +26 -3
- package/dist/internal/EarnRates.d.ts.map +1 -1
- package/dist/internal/EarnRates.js +84 -19
- package/dist/internal/EarnRates.js.map +1 -1
- package/dist/internal/EarnSharePrices.d.ts +120 -0
- package/dist/internal/EarnSharePrices.d.ts.map +1 -0
- package/dist/internal/EarnSharePrices.js +179 -0
- package/dist/internal/EarnSharePrices.js.map +1 -0
- package/dist/internal/EarnVaults.d.ts +4 -0
- package/dist/internal/EarnVaults.d.ts.map +1 -1
- package/dist/internal/EarnVaults.js +27 -10
- package/dist/internal/EarnVaults.js.map +1 -1
- package/dist/internal/Email.d.ts +37 -0
- package/dist/internal/Email.d.ts.map +1 -0
- package/dist/internal/Email.js +16 -0
- package/dist/internal/Email.js.map +1 -0
- package/dist/internal/Log.d.ts +32 -28
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +18 -11
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/MetricSink.d.ts +3 -0
- package/dist/internal/MetricSink.d.ts.map +1 -1
- package/dist/internal/MetricSink.js +67 -8
- package/dist/internal/MetricSink.js.map +1 -1
- package/dist/internal/Mpp.d.ts.map +1 -1
- package/dist/internal/Mpp.js +20 -25
- package/dist/internal/Mpp.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +26 -3
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +25 -10
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/Provider.d.ts +1 -1
- package/dist/internal/Provider.d.ts.map +1 -1
- package/dist/internal/RateLimit.d.ts.map +1 -1
- package/dist/internal/RateLimit.js +13 -1
- package/dist/internal/RateLimit.js.map +1 -1
- package/dist/internal/Store.d.ts +16 -0
- package/dist/internal/Store.d.ts.map +1 -1
- package/dist/internal/Store.js +59 -8
- package/dist/internal/Store.js.map +1 -1
- package/dist/internal/Tidx.d.ts +9 -2
- package/dist/internal/Tidx.d.ts.map +1 -1
- package/dist/internal/Tidx.js +78 -11
- package/dist/internal/Tidx.js.map +1 -1
- package/dist/internal/Timing.d.ts +26 -0
- package/dist/internal/Timing.d.ts.map +1 -1
- package/dist/internal/Timing.js +63 -5
- package/dist/internal/Timing.js.map +1 -1
- package/dist/internal/VercelOidc.d.ts +94 -0
- package/dist/internal/VercelOidc.d.ts.map +1 -0
- package/dist/internal/VercelOidc.js +128 -0
- package/dist/internal/VercelOidc.js.map +1 -0
- package/dist/internal/VerifiedTokens.d.ts +2 -8
- package/dist/internal/VerifiedTokens.d.ts.map +1 -1
- package/dist/internal/VerifiedTokens.js +24 -24
- package/dist/internal/VerifiedTokens.js.map +1 -1
- package/dist/internal/Viem.d.ts +30 -2067
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +167 -17
- package/dist/internal/Viem.js.map +1 -1
- package/dist/internal/Webhooks.d.ts +12 -4
- package/dist/internal/Webhooks.d.ts.map +1 -1
- package/dist/internal/Webhooks.js +9 -3
- package/dist/internal/Webhooks.js.map +1 -1
- package/dist/internal/ZoneRpc.d.ts +7 -0
- package/dist/internal/ZoneRpc.d.ts.map +1 -0
- package/dist/internal/ZoneRpc.js +49 -0
- package/dist/internal/ZoneRpc.js.map +1 -0
- package/dist/internal/index.d.ts +3 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +3 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/rewards/Audit.d.ts +88 -0
- package/dist/internal/rewards/Audit.d.ts.map +1 -0
- package/dist/internal/rewards/Audit.js +134 -0
- package/dist/internal/rewards/Audit.js.map +1 -0
- package/dist/internal/rewards/Campaigns.d.ts +572 -0
- package/dist/internal/rewards/Campaigns.d.ts.map +1 -0
- package/dist/internal/rewards/Campaigns.js +531 -0
- package/dist/internal/rewards/Campaigns.js.map +1 -0
- package/dist/internal/rewards/Credits.d.ts +76 -0
- package/dist/internal/rewards/Credits.d.ts.map +1 -0
- package/dist/internal/rewards/Credits.js +95 -0
- package/dist/internal/rewards/Credits.js.map +1 -0
- package/dist/internal/rewards/Events.d.ts +100 -0
- package/dist/internal/rewards/Events.d.ts.map +1 -0
- package/dist/internal/rewards/Events.js +340 -0
- package/dist/internal/rewards/Events.js.map +1 -0
- package/dist/internal/rewards/Projection.d.ts +237 -0
- package/dist/internal/rewards/Projection.d.ts.map +1 -0
- package/dist/internal/rewards/Projection.js +616 -0
- package/dist/internal/rewards/Projection.js.map +1 -0
- package/dist/internal/rewards/Rates.d.ts +44 -0
- package/dist/internal/rewards/Rates.d.ts.map +1 -0
- package/dist/internal/rewards/Rates.js +60 -0
- package/dist/internal/rewards/Rates.js.map +1 -0
- package/dist/internal/rewards/Read.d.ts +158 -0
- package/dist/internal/rewards/Read.d.ts.map +1 -0
- package/dist/internal/rewards/Read.js +292 -0
- package/dist/internal/rewards/Read.js.map +1 -0
- package/dist/internal/rewards/Runner.d.ts +164 -0
- package/dist/internal/rewards/Runner.d.ts.map +1 -0
- package/dist/internal/rewards/Runner.js +1778 -0
- package/dist/internal/rewards/Runner.js.map +1 -0
- package/dist/internal/rewards/Signer.d.ts +224 -0
- package/dist/internal/rewards/Signer.d.ts.map +1 -0
- package/dist/internal/rewards/Signer.js +135 -0
- package/dist/internal/rewards/Signer.js.map +1 -0
- package/dist/internal/rewards/index.d.ts +15 -0
- package/dist/internal/rewards/index.d.ts.map +1 -0
- package/dist/internal/rewards/index.js +15 -0
- package/dist/internal/rewards/index.js.map +1 -0
- package/dist/internal/{funding → routes}/Action.d.ts +12 -1
- package/dist/internal/routes/Action.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Action.js +17 -9
- package/dist/internal/routes/Action.js.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.d.ts +20 -20
- package/dist/internal/routes/Catalog.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.js +29 -29
- package/dist/internal/routes/Catalog.js.map +1 -0
- package/dist/internal/{funding → routes}/Chain.d.ts +10 -10
- package/dist/internal/routes/Chain.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Chain.js +3 -3
- package/dist/internal/routes/Chain.js.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.d.ts +45 -23
- package/dist/internal/routes/Deposit.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.js +60 -27
- package/dist/internal/routes/Deposit.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.d.ts +56 -27
- package/dist/internal/routes/DepositAddress.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.js +95 -33
- package/dist/internal/routes/DepositAddress.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.d.ts +4 -4
- package/dist/internal/routes/DepositWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.js +4 -4
- package/dist/internal/routes/DepositWebhook.js.map +1 -0
- package/dist/internal/routes/Economics.d.ts +25 -0
- package/dist/internal/routes/Economics.d.ts.map +1 -0
- package/dist/internal/routes/Economics.js +28 -0
- package/dist/internal/routes/Economics.js.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.d.ts +3 -3
- package/dist/internal/routes/Evidence.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.js +7 -7
- package/dist/internal/routes/Evidence.js.map +1 -0
- package/dist/internal/routes/Observability.d.ts +154 -0
- package/dist/internal/routes/Observability.d.ts.map +1 -0
- package/dist/internal/routes/Observability.js +389 -0
- package/dist/internal/routes/Observability.js.map +1 -0
- package/dist/internal/{funding → routes}/Provider.d.ts +311 -105
- package/dist/internal/routes/Provider.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Provider.js +229 -98
- package/dist/internal/routes/Provider.js.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.d.ts +11 -6
- package/dist/internal/routes/Reconciliation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.js +408 -158
- package/dist/internal/routes/Reconciliation.js.map +1 -0
- package/dist/internal/routes/Route.d.ts +21 -0
- package/dist/internal/routes/Route.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Route.js +1 -1
- package/dist/internal/routes/Route.js.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.d.ts +6 -6
- package/dist/internal/routes/SourceObservation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.js +8 -8
- package/dist/internal/routes/SourceObservation.js.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.d.ts +48 -3
- package/dist/internal/routes/Subsidy.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.js +43 -3
- package/dist/internal/routes/Subsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/Token.d.ts +4 -4
- package/dist/internal/routes/Token.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Token.js +3 -3
- package/dist/internal/routes/Token.js.map +1 -0
- package/dist/internal/{funding → routes}/Transfer.d.ts +241 -46
- package/dist/internal/routes/Transfer.d.ts.map +1 -0
- package/dist/internal/routes/Transfer.js +728 -0
- package/dist/internal/routes/Transfer.js.map +1 -0
- package/dist/internal/{funding → routes}/TransferReconciliation.d.ts +13 -10
- package/dist/internal/routes/TransferReconciliation.d.ts.map +1 -0
- package/dist/internal/routes/TransferReconciliation.js +422 -0
- package/dist/internal/routes/TransferReconciliation.js.map +1 -0
- package/dist/internal/routes/TransferSubsidy.d.ts +201 -0
- package/dist/internal/routes/TransferSubsidy.d.ts.map +1 -0
- package/dist/internal/routes/TransferSubsidy.js +256 -0
- package/dist/internal/routes/TransferSubsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/TransferWebhook.d.ts +5 -5
- package/dist/internal/routes/TransferWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/TransferWebhook.js +3 -3
- package/dist/internal/routes/TransferWebhook.js.map +1 -0
- package/dist/internal/{funding → routes}/index.d.ts +2 -0
- package/dist/internal/routes/index.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/index.js +2 -0
- package/dist/internal/routes/index.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.d.ts +4 -4
- package/dist/internal/routes/providers/across.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.js +13 -13
- package/dist/internal/routes/providers/across.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.d.ts +21 -12
- package/dist/internal/routes/providers/relay.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.js +194 -110
- package/dist/internal/routes/providers/relay.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.d.ts +4 -4
- package/dist/internal/routes/providers/rhino.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.js +10 -10
- package/dist/internal/routes/providers/rhino.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.d.ts +4 -4
- package/dist/internal/routes/providers/squid.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.js +14 -14
- package/dist/internal/routes/providers/squid.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/stargate.d.ts +46 -18
- package/dist/internal/routes/providers/stargate.d.ts.map +1 -0
- package/dist/internal/routes/providers/stargate.js +898 -0
- package/dist/internal/routes/providers/stargate.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.d.ts +4 -4
- package/dist/internal/routes/providers/symbiosis.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.js +30 -20
- package/dist/internal/routes/providers/symbiosis.js.map +1 -0
- package/dist/internal/webhookDestinations/slack.js +12 -12
- package/dist/internal/webhookDestinations/slack.js.map +1 -1
- package/dist/providers/index.d.ts +12 -12
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +12 -12
- package/dist/providers/index.js.map +1 -1
- package/dist/server.d.ts +19 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +19 -0
- package/dist/server.js.map +1 -0
- package/package.json +15 -4
- package/src/ApiKey.ts +1 -1
- package/src/ApiKeys.test.ts +1033 -3
- package/src/ApiKeys.ts +489 -48
- package/src/App.test-d.ts +1 -1
- package/src/App.test.ts +216 -25
- package/src/App.ts +334 -31
- package/src/Assets.test.ts +2 -2
- package/src/Assets.ts +3 -1
- package/src/Auth.test-d.ts +1 -1
- package/src/Client.test-d.ts +539 -110
- package/src/Handler.ts +0 -1
- package/src/OpenApi.contract.test.ts +195 -0
- package/src/Scope.ts +17 -5
- package/src/Webhooks.ts +1 -1
- package/src/admin/App.test.ts +30 -2
- package/src/admin/App.ts +42 -6
- package/src/admin/apps/api-keys.test.ts +267 -5
- package/src/admin/apps/api-keys.ts +100 -50
- package/src/admin/apps/earn-vaults.test.ts +158 -0
- package/src/admin/apps/earn-vaults.ts +679 -6
- package/src/admin/apps/organizations.test.ts +306 -17
- package/src/admin/apps/organizations.ts +299 -24
- package/src/admin/apps/routes-support.test.ts +200 -0
- package/src/admin/apps/routes-support.ts +201 -0
- package/src/admin/apps/routes.test.ts +450 -0
- package/src/admin/apps/routes.ts +896 -0
- package/src/admin/apps/scopes.test.ts +15 -5
- package/src/admin/apps/subsidies.test.ts +306 -0
- package/src/admin/apps/subsidies.ts +457 -0
- package/src/admin/apps/verified-tokens.test.ts +40 -3
- package/src/admin/apps/verified-tokens.ts +33 -7
- package/src/admin/ui/plugin.ts +1 -2
- package/src/admin/ui/src/components/RewardCampaignForm.tsx +1009 -0
- package/src/admin/ui/src/lib/config.ts +11 -2
- package/src/admin/ui/src/lib/earn-vaults.ts +2 -2
- package/src/admin/ui/src/lib/organizations.test.ts +83 -50
- package/src/admin/ui/src/lib/organizations.ts +106 -25
- package/src/admin/ui/src/lib/query-client.ts +1 -1
- package/src/admin/ui/src/lib/reward-campaigns.ts +136 -0
- package/src/admin/ui/src/lib/routes.test.ts +88 -0
- package/src/admin/ui/src/lib/routes.ts +304 -0
- package/src/admin/ui/src/lib/subsidies.ts +75 -0
- package/src/admin/ui/src/lib/verified-tokens.ts +24 -9
- package/src/admin/ui/src/routeTree.gen.ts +63 -0
- package/src/admin/ui/src/routes/__root.tsx +13 -2
- package/src/admin/ui/src/routes/api-keys.tsx +196 -84
- package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +105 -70
- package/src/admin/ui/src/routes/organizations.tsx +34 -4
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +239 -23
- package/src/admin/ui/src/routes/routes.tsx +1615 -0
- package/src/admin/ui/src/routes/routes_.support.tsx +248 -0
- package/src/admin/ui/src/routes/subsidies.tsx +799 -0
- package/src/admin/ui/src/routes/verified-tokens.tsx +64 -20
- package/src/admin/ui.generated.ts +202 -188
- package/src/analytics/Analytics.test.ts +108 -18
- package/src/analytics/Analytics.ts +38 -6
- package/src/analytics/tables/requestEvents.test.ts +100 -0
- package/src/analytics/tables/requestEvents.ts +10 -1
- package/src/analytics/tables/routesLifecycleIntervals.ts +140 -0
- package/src/apps/Zones.test.ts +15 -0
- package/src/apps/Zones.ts +52 -5
- package/src/apps/composition.test.ts +68 -60
- package/src/apps/data/App.test.ts +180 -2
- package/src/apps/data/App.ts +88 -28
- package/src/apps/data/routes/activities.test.ts +419 -7
- package/src/apps/data/routes/activities.ts +683 -216
- package/src/apps/data/routes/balances.test.ts +2 -2
- package/src/apps/data/routes/blocks.test.ts +46 -1
- package/src/apps/data/routes/coingecko.test.ts +419 -1
- package/src/apps/data/routes/coingecko.ts +309 -253
- package/src/apps/data/routes/earn.discovery.test.ts +274 -0
- package/src/apps/data/routes/earn.test.ts +1294 -17
- package/src/apps/data/routes/earn.ts +1838 -321
- package/src/apps/data/routes/exchanges.test.ts +12 -15
- package/src/apps/data/routes/fee-amm.test.ts +243 -0
- package/src/apps/data/routes/fee-amm.ts +201 -162
- package/src/apps/data/routes/indexer.test.ts +389 -0
- package/src/apps/data/routes/indexer.ts +165 -69
- package/src/apps/data/routes/receipts.test.ts +1 -1
- package/src/apps/data/routes/rpc.test.ts +384 -8
- package/src/apps/data/routes/rpc.ts +452 -227
- package/src/apps/data/routes/rpc.zone.test.ts +340 -0
- package/src/apps/data/routes/tokenlist.test.ts +285 -0
- package/src/apps/data/routes/tokenlist.ts +173 -88
- package/src/apps/data/routes/tokens.test.ts +93 -3
- package/src/apps/data/routes/tokens.ts +39 -23
- package/src/apps/data/routes/transactions.test.ts +1 -1
- package/src/apps/data/routes/transfers.test.ts +56 -24
- package/src/apps/data/routes/transfers.ts +19 -8
- package/src/apps/data/routes/valuation.test.ts +1 -1
- package/src/apps/data/routes/verified-tokens.test.ts +345 -0
- package/src/apps/data/routes/verified-tokens.ts +99 -29
- package/src/apps/data/routes/webhooks.scan.test.ts +29 -0
- package/src/apps/data/routes/webhooks.test.ts +651 -83
- package/src/apps/data/routes/webhooks.ts +1113 -868
- package/src/apps/data/routes/zones.test.ts +148 -71
- package/src/apps/data/routes/zones.ts +71 -55
- package/src/apps/docs/reference.ts +2 -2
- package/src/apps/index.ts +1 -1
- package/src/apps/management/App.ts +9 -51
- package/src/apps/management/Billing.test.ts +375 -14
- package/src/apps/management/Billing.ts +265 -29
- package/src/apps/management/routes/api-keys.test.ts +269 -7
- package/src/apps/management/routes/api-keys.ts +61 -20
- package/src/apps/management/routes/billing.test.ts +477 -15
- package/src/apps/management/routes/billing.ts +377 -50
- package/src/apps/management/routes/faucet.test.ts +1 -1
- package/src/apps/management/routes/faucet.ts +1 -1
- package/src/apps/management/routes/invitations.test.ts +270 -3
- package/src/apps/management/routes/invitations.ts +185 -15
- package/src/apps/management/routes/invoicePreview.test.ts +549 -0
- package/src/apps/management/routes/me.test.ts +246 -5
- package/src/apps/management/routes/me.ts +7 -2
- package/src/apps/management/routes/members.test.ts +108 -0
- package/src/apps/management/routes/orgs.test.ts +191 -3
- package/src/apps/management/routes/orgs.ts +58 -11
- package/src/apps/management/routes/projects.test.ts +33 -3
- package/src/apps/management/routes/projects.ts +6 -1
- package/src/apps/management/routes/scopes.test.ts +30 -2
- package/src/apps/management/routes/scopes.ts +4 -1
- package/src/apps/management/routes/usage.test.ts +32 -0
- package/src/apps/management/routes/usage.ts +22 -4
- package/src/apps/management/routes/verified-token-requests.test.ts +16 -2
- package/src/apps/management/routes/verified-token-requests.ts +7 -10
- package/src/apps/management/routes/webhooks.test.ts +49 -26
- package/src/apps/management/routes/webhooks.ts +78 -22
- package/src/apps/mcp.test.ts +113 -30
- package/src/apps/mcp.ts +22 -10
- package/src/apps/mpp/App.ts +37 -7
- package/src/apps/mpp/Mpp.test.ts +49 -8
- package/src/apps/mpp/Mpp.zone.test.ts +219 -0
- package/src/apps/mpp/internal/Adapter.ts +34 -0
- package/src/apps/mpp/internal/Policy.test.ts +86 -31
- package/src/apps/mpp/internal/Policy.ts +49 -7
- package/src/apps/mpp/internal/Sponsorship.test.ts +207 -0
- package/src/apps/mpp/internal/Sponsorship.ts +9 -3
- package/src/apps/relay/App.test.ts +839 -64
- package/src/apps/relay/App.ts +148 -81
- package/src/apps/relay/App.zone-billing.test.ts +257 -0
- package/src/apps/relay/Sponsorships.test.ts +67 -4
- package/src/apps/relay/Sponsorships.ts +233 -32
- package/src/apps/relay/Sponsorships.zone.test.ts +102 -0
- package/src/apps/{funding → routes}/Access.ts +6 -6
- package/src/apps/routes/App.test.ts +165 -0
- package/src/apps/routes/App.ts +96 -0
- package/src/apps/{funding → routes}/Inventory.ts +2 -2
- package/src/apps/routes/index.ts +1 -0
- package/src/apps/{funding → routes}/routes/chains.test.ts +66 -66
- package/src/apps/{funding → routes}/routes/chains.ts +23 -23
- package/src/apps/{funding → routes}/routes/deposit-addresses.test.ts +1358 -458
- package/src/apps/{funding → routes}/routes/deposit-addresses.ts +566 -246
- package/src/apps/{funding → routes}/routes/providers.test.ts +27 -33
- package/src/apps/{funding → routes}/routes/providers.ts +23 -23
- package/src/apps/{funding → routes}/routes/quotes.test.ts +298 -41
- package/src/apps/{funding → routes}/routes/quotes.ts +57 -40
- package/src/apps/{funding → routes}/routes/transfers.test.ts +1100 -353
- package/src/apps/routes/routes/transfers.ts +1332 -0
- package/src/cli/Cli.test.ts +1 -1
- package/src/cli/commands/admin.test.ts +748 -1
- package/src/cli/commands/admin.ts +278 -0
- package/src/cloudflare.ts +52 -47
- package/src/db/Db.test.ts +245 -2
- package/src/db/Db.ts +1485 -34
- package/src/db/Schema.ts +729 -228
- package/src/db/tables/apiKeyAdmissionBootstraps.ts +4 -0
- package/src/db/tables/apiKeyAdmissions.ts +218 -0
- package/src/db/tables/apiKeyOwnerAdmissions.ts +4 -0
- package/src/db/tables/apiKeyOwnerTombstones.ts +81 -0
- package/src/db/tables/apiKeyRevocations.test.ts +74 -0
- package/src/db/tables/apiKeyRevocations.ts +121 -0
- package/src/db/tables/authAccounts.ts +105 -0
- package/src/db/tables/authSessions.ts +13 -0
- package/src/db/tables/authVerifications.ts +13 -0
- package/src/db/tables/invitations.ts +142 -45
- package/src/db/tables/memberships.ts +79 -3
- package/src/db/tables/organizations.test.ts +690 -13
- package/src/db/tables/organizations.ts +139 -55
- package/src/db/tables/projects.test.ts +16 -0
- package/src/db/tables/projects.ts +13 -3
- package/src/db/tables/requestUsage.ts +4 -1
- package/src/db/tables/rewardAccounts.ts +178 -0
- package/src/db/tables/rewardCampaignDistributors.ts +68 -0
- package/src/db/tables/rewardCampaigns.test.ts +1388 -0
- package/src/db/tables/rewardCampaigns.ts +647 -0
- package/src/db/tables/rewardCredits.ts +110 -0
- package/src/db/tables/rewardEligibilityAssociations.test.ts +271 -0
- package/src/db/tables/rewardEligibilityAssociations.ts +184 -0
- package/src/db/tables/rewardRuns.ts +514 -0
- package/src/db/tables/rewardTransactionAttempts.ts +272 -0
- package/src/db/tables/routesCatalog.test.ts +185 -0
- package/src/db/tables/routesCatalog.ts +163 -0
- package/src/db/tables/routesDepositAddresses.test.ts +1048 -0
- package/src/db/tables/routesDepositAddresses.ts +1008 -0
- package/src/db/tables/{fundingDepositRequestObservations.test.ts → routesDepositRequestObservations.test.ts} +13 -14
- package/src/db/tables/{fundingDepositRequestObservations.ts → routesDepositRequestObservations.ts} +10 -10
- package/src/db/tables/{fundingDeposits.test.ts → routesDeposits.test.ts} +388 -46
- package/src/db/tables/routesDeposits.ts +1062 -0
- package/src/db/tables/routesIdempotency.test.ts +796 -0
- package/src/db/tables/routesIdempotency.ts +496 -0
- package/src/db/tables/routesSubsidies.test.ts +120 -0
- package/src/db/tables/routesSubsidies.ts +71 -0
- package/src/db/tables/{fundingTransferEvents.ts → routesTransferEvents.ts} +4 -4
- package/src/db/tables/routesTransferSubsidies.ts +38 -0
- package/src/db/tables/routesTransferSubsidyNonces.ts +124 -0
- package/src/db/tables/routesTransferTransactions.test.ts +195 -0
- package/src/db/tables/{fundingTransferTransactions.ts → routesTransferTransactions.ts} +63 -18
- package/src/db/tables/routesTransfers.test.ts +338 -0
- package/src/db/tables/routesTransfers.ts +662 -0
- package/src/db/tables/sponsoredTransactions.test.ts +269 -45
- package/src/db/tables/sponsoredTransactions.ts +225 -65
- package/src/db/tables/sponsorshipAttributions.test.ts +160 -0
- package/src/db/tables/sponsorshipAttributions.ts +168 -0
- package/src/db/tables/sponsorshipReconciliationCursors.test.ts +115 -0
- package/src/db/tables/sponsorshipReconciliationCursors.ts +67 -0
- package/src/db/tables/stripeCustomers.test.ts +85 -0
- package/src/db/tables/stripeCustomers.ts +24 -0
- package/src/db/tables/users.test.ts +129 -0
- package/src/db/tables/users.ts +49 -3
- package/src/db/tables/verifiedTokenRequests.test.ts +39 -20
- package/src/db/tables/verifiedTokenRequests.ts +80 -44
- package/src/db/tables/webhookQueueEvents.ts +8 -1
- package/src/db/tables/webhookSubscriptions.ts +95 -20
- package/src/handlers/internal/executionError.ts +3 -4
- package/src/handlers/internal/multisig.ts +13 -816
- package/src/handlers/internal/sponsorship.ts +26 -10
- package/src/handlers/relay.test-d.ts +9 -1
- package/src/handlers/relay.test.ts +823 -3
- package/src/handlers/relay.ts +127 -107
- package/src/index.test-d.ts +7 -0
- package/src/index.ts +0 -17
- package/src/internal/AssetResponse.ts +26 -0
- package/src/internal/Auth.test.ts +1656 -9
- package/src/internal/Auth.ts +880 -244
- package/src/internal/BetterAuth.test.ts +242 -0
- package/src/internal/BetterAuth.ts +349 -0
- package/src/internal/Cache.ts +2 -0
- package/src/internal/EarnRates.test.ts +17 -0
- package/src/internal/EarnRates.ts +124 -31
- package/src/internal/EarnSharePrices.test.ts +182 -0
- package/src/internal/EarnSharePrices.ts +313 -0
- package/src/internal/EarnVaults.test.ts +21 -0
- package/src/internal/EarnVaults.ts +33 -11
- package/src/internal/Email.ts +54 -0
- package/src/internal/Idempotency.test.ts +2 -2
- package/src/internal/Log.test-d.ts +8 -7
- package/src/internal/Log.test.ts +114 -16
- package/src/internal/Log.ts +53 -40
- package/src/internal/MetricSink.test.ts +313 -26
- package/src/internal/MetricSink.ts +73 -8
- package/src/internal/Mpp.test.ts +31 -0
- package/src/internal/Mpp.ts +21 -24
- package/src/internal/OpenApi.ts +45 -12
- package/src/internal/Provider.test.ts +1 -1
- package/src/internal/Provider.ts +1 -1
- package/src/internal/RateLimit.test.ts +21 -3
- package/src/internal/RateLimit.ts +12 -1
- package/src/internal/Store.test-d.ts +1 -1
- package/src/internal/Store.test.ts +151 -8
- package/src/internal/Store.ts +76 -9
- package/src/internal/Tidx.test.ts +59 -8
- package/src/internal/Tidx.ts +86 -14
- package/src/internal/Timing.test.ts +77 -0
- package/src/internal/Timing.ts +83 -6
- package/src/internal/VercelOidc.test.ts +188 -0
- package/src/internal/VercelOidc.ts +193 -0
- package/src/internal/VerifiedTokens.test.ts +60 -6
- package/src/internal/VerifiedTokens.ts +21 -24
- package/src/internal/Viem.batch.test.ts +80 -0
- package/src/internal/Viem.test.ts +201 -2
- package/src/internal/Viem.ts +221 -25
- package/src/internal/Webhooks.test.ts +85 -6
- package/src/internal/Webhooks.ts +22 -4
- package/src/internal/ZoneRpc.ts +50 -0
- package/src/internal/exchange/Provider.test.ts +2 -2
- package/src/internal/index.test.ts +3 -1
- package/src/internal/index.ts +3 -1
- package/src/internal/rewards/Audit.ts +231 -0
- package/src/internal/rewards/Campaigns.test.ts +1234 -0
- package/src/internal/rewards/Campaigns.ts +1205 -0
- package/src/internal/rewards/Credits.ts +165 -0
- package/src/internal/rewards/Events.local.test.ts +113 -0
- package/src/internal/rewards/Events.test.ts +152 -0
- package/src/internal/rewards/Events.ts +468 -0
- package/src/internal/rewards/Projection.test.ts +681 -0
- package/src/internal/rewards/Projection.ts +987 -0
- package/src/internal/rewards/Rates.test.ts +171 -0
- package/src/internal/rewards/Rates.ts +110 -0
- package/src/internal/rewards/Read.test.ts +501 -0
- package/src/internal/rewards/Read.ts +476 -0
- package/src/internal/rewards/Runner.checkpoint.test.ts +80 -0
- package/src/internal/rewards/Runner.states.test.ts +188 -0
- package/src/internal/rewards/Runner.test.ts +90 -0
- package/src/internal/rewards/Runner.ts +2229 -0
- package/src/internal/rewards/Signer.test.ts +79 -0
- package/src/internal/rewards/Signer.ts +180 -0
- package/src/internal/rewards/index.ts +14 -0
- package/src/internal/{funding → routes}/Action.test.ts +63 -14
- package/src/internal/{funding → routes}/Action.ts +35 -8
- package/src/internal/{funding → routes}/Catalog.test.ts +3 -3
- package/src/internal/{funding → routes}/Catalog.ts +39 -39
- package/src/internal/{funding → routes}/Chain.test.ts +1 -1
- package/src/internal/{funding → routes}/Chain.ts +11 -11
- package/src/internal/{funding → routes}/Deposit.test.ts +1 -1
- package/src/internal/{funding → routes}/Deposit.ts +93 -45
- package/src/internal/{funding → routes}/DepositAddress.test.ts +11 -3
- package/src/internal/{funding → routes}/DepositAddress.ts +132 -53
- package/src/internal/{funding → routes}/DepositWebhook.test.ts +61 -18
- package/src/internal/{funding → routes}/DepositWebhook.ts +9 -9
- package/src/internal/routes/Economics.test.ts +42 -0
- package/src/internal/routes/Economics.ts +47 -0
- package/src/internal/{funding → routes}/Evidence.test.ts +6 -6
- package/src/internal/{funding → routes}/Evidence.ts +9 -9
- package/src/internal/routes/Observability.test.ts +636 -0
- package/src/internal/routes/Observability.ts +668 -0
- package/src/internal/{funding → routes}/Provider.test.ts +489 -153
- package/src/internal/{funding → routes}/Provider.ts +489 -186
- package/src/internal/{funding → routes}/Reconciliation.local.test.ts +84 -12
- package/src/internal/{funding → routes}/Reconciliation.test.ts +1213 -279
- package/src/internal/{funding → routes}/Reconciliation.ts +501 -203
- package/src/internal/routes/Reconciliation.unattributed.test.ts +250 -0
- package/src/internal/{funding → routes}/Route.ts +7 -7
- package/src/internal/{funding → routes}/SourceObservation.test.ts +13 -14
- package/src/internal/{funding → routes}/SourceObservation.ts +13 -13
- package/src/internal/{funding → routes}/Subsidy.local.test.ts +7 -7
- package/src/internal/routes/Subsidy.test.ts +169 -0
- package/src/internal/{funding → routes}/Subsidy.ts +86 -6
- package/src/internal/{funding → routes}/Token.test.ts +1 -1
- package/src/internal/{funding → routes}/Token.ts +5 -5
- package/src/internal/routes/Transfer.test.ts +1199 -0
- package/src/internal/routes/Transfer.ts +1206 -0
- package/src/internal/routes/TransferReconciliation.test.ts +731 -0
- package/src/internal/routes/TransferReconciliation.ts +527 -0
- package/src/internal/routes/TransferSubsidy.test.ts +172 -0
- package/src/internal/routes/TransferSubsidy.ts +447 -0
- package/src/internal/{funding → routes}/TransferWebhook.test.ts +13 -13
- package/src/internal/{funding → routes}/TransferWebhook.ts +7 -7
- package/src/internal/{funding → routes}/index.test.ts +5 -3
- package/src/internal/{funding → routes}/index.ts +2 -0
- package/src/internal/{funding → routes}/providers/across.ts +16 -16
- package/src/internal/{funding → routes}/providers/index.test.ts +157 -44
- package/src/internal/{funding → routes}/providers/relay.test.ts +224 -32
- package/src/internal/{funding → routes}/providers/relay.ts +228 -121
- package/src/internal/{funding → routes}/providers/rhino.ts +16 -16
- package/src/internal/{funding → routes}/providers/squid.ts +17 -17
- package/src/internal/routes/providers/stargate.test.ts +728 -0
- package/src/internal/routes/providers/stargate.ts +1276 -0
- package/src/internal/{funding → routes}/providers/symbiosis.ts +64 -24
- package/src/internal/webhookDestinations/slack.ts +10 -10
- package/src/providers/index.ts +13 -13
- package/src/server.ts +18 -0
- package/dist/apps/funding/Access.d.ts.map +0 -1
- package/dist/apps/funding/Access.js.map +0 -1
- package/dist/apps/funding/App.js.map +0 -1
- package/dist/apps/funding/Inventory.d.ts.map +0 -1
- package/dist/apps/funding/Inventory.js.map +0 -1
- package/dist/apps/funding/ProviderAttempts.d.ts +0 -5
- package/dist/apps/funding/ProviderAttempts.d.ts.map +0 -1
- package/dist/apps/funding/ProviderAttempts.js +0 -24
- package/dist/apps/funding/ProviderAttempts.js.map +0 -1
- package/dist/apps/funding/index.d.ts +0 -2
- package/dist/apps/funding/index.d.ts.map +0 -1
- package/dist/apps/funding/index.js +0 -2
- package/dist/apps/funding/index.js.map +0 -1
- package/dist/apps/funding/routes/chains.d.ts.map +0 -1
- package/dist/apps/funding/routes/chains.js.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.d.ts.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.js.map +0 -1
- package/dist/apps/funding/routes/providers.d.ts.map +0 -1
- package/dist/apps/funding/routes/providers.js +0 -57
- package/dist/apps/funding/routes/providers.js.map +0 -1
- package/dist/apps/funding/routes/quotes.d.ts.map +0 -1
- package/dist/apps/funding/routes/quotes.js.map +0 -1
- package/dist/apps/funding/routes/transfers.d.ts.map +0 -1
- package/dist/apps/funding/routes/transfers.js +0 -828
- package/dist/apps/funding/routes/transfers.js.map +0 -1
- package/dist/db/tables/fundingCatalog.d.ts +0 -58
- package/dist/db/tables/fundingCatalog.d.ts.map +0 -1
- package/dist/db/tables/fundingCatalog.js.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.d.ts +0 -192
- package/dist/db/tables/fundingDepositAddresses.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.js +0 -235
- package/dist/db/tables/fundingDepositAddresses.js.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.js.map +0 -1
- package/dist/db/tables/fundingDeposits.d.ts.map +0 -1
- package/dist/db/tables/fundingDeposits.js +0 -295
- package/dist/db/tables/fundingDeposits.js.map +0 -1
- package/dist/db/tables/fundingIdempotency.d.ts +0 -91
- package/dist/db/tables/fundingIdempotency.d.ts.map +0 -1
- package/dist/db/tables/fundingIdempotency.js +0 -103
- package/dist/db/tables/fundingIdempotency.js.map +0 -1
- package/dist/db/tables/fundingTransferEvents.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferEvents.js.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.d.ts +0 -53
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.js.map +0 -1
- package/dist/db/tables/fundingTransfers.d.ts +0 -99
- package/dist/db/tables/fundingTransfers.d.ts.map +0 -1
- package/dist/db/tables/fundingTransfers.js +0 -110
- package/dist/db/tables/fundingTransfers.js.map +0 -1
- package/dist/internal/funding/Action.d.ts.map +0 -1
- package/dist/internal/funding/Action.js.map +0 -1
- package/dist/internal/funding/Catalog.d.ts.map +0 -1
- package/dist/internal/funding/Catalog.js.map +0 -1
- package/dist/internal/funding/Chain.d.ts.map +0 -1
- package/dist/internal/funding/Chain.js.map +0 -1
- package/dist/internal/funding/Deposit.d.ts.map +0 -1
- package/dist/internal/funding/Deposit.js.map +0 -1
- package/dist/internal/funding/DepositAddress.d.ts.map +0 -1
- package/dist/internal/funding/DepositAddress.js.map +0 -1
- package/dist/internal/funding/DepositWebhook.d.ts.map +0 -1
- package/dist/internal/funding/DepositWebhook.js.map +0 -1
- package/dist/internal/funding/Evidence.d.ts.map +0 -1
- package/dist/internal/funding/Evidence.js.map +0 -1
- package/dist/internal/funding/Provider.d.ts.map +0 -1
- package/dist/internal/funding/Provider.js.map +0 -1
- package/dist/internal/funding/Reconciliation.d.ts.map +0 -1
- package/dist/internal/funding/Reconciliation.js.map +0 -1
- package/dist/internal/funding/Route.d.ts +0 -21
- package/dist/internal/funding/Route.d.ts.map +0 -1
- package/dist/internal/funding/Route.js.map +0 -1
- package/dist/internal/funding/SourceObservation.d.ts.map +0 -1
- package/dist/internal/funding/SourceObservation.js.map +0 -1
- package/dist/internal/funding/Subsidy.d.ts.map +0 -1
- package/dist/internal/funding/Subsidy.js.map +0 -1
- package/dist/internal/funding/Token.d.ts.map +0 -1
- package/dist/internal/funding/Token.js.map +0 -1
- package/dist/internal/funding/Transfer.d.ts.map +0 -1
- package/dist/internal/funding/Transfer.js +0 -462
- package/dist/internal/funding/Transfer.js.map +0 -1
- package/dist/internal/funding/TransferReconciliation.d.ts.map +0 -1
- package/dist/internal/funding/TransferReconciliation.js +0 -192
- package/dist/internal/funding/TransferReconciliation.js.map +0 -1
- package/dist/internal/funding/TransferWebhook.d.ts.map +0 -1
- package/dist/internal/funding/TransferWebhook.js.map +0 -1
- package/dist/internal/funding/index.d.ts.map +0 -1
- package/dist/internal/funding/index.js.map +0 -1
- package/dist/internal/funding/providers/across.d.ts.map +0 -1
- package/dist/internal/funding/providers/across.js.map +0 -1
- package/dist/internal/funding/providers/relay.d.ts.map +0 -1
- package/dist/internal/funding/providers/relay.js.map +0 -1
- package/dist/internal/funding/providers/rhino.d.ts.map +0 -1
- package/dist/internal/funding/providers/rhino.js.map +0 -1
- package/dist/internal/funding/providers/squid.d.ts.map +0 -1
- package/dist/internal/funding/providers/squid.js.map +0 -1
- package/dist/internal/funding/providers/stargate.d.ts.map +0 -1
- package/dist/internal/funding/providers/stargate.js +0 -579
- package/dist/internal/funding/providers/stargate.js.map +0 -1
- package/dist/internal/funding/providers/symbiosis.d.ts.map +0 -1
- package/dist/internal/funding/providers/symbiosis.js.map +0 -1
- package/src/apps/funding/App.test.ts +0 -78
- package/src/apps/funding/App.ts +0 -88
- package/src/apps/funding/ProviderAttempts.ts +0 -26
- package/src/apps/funding/index.ts +0 -1
- package/src/apps/funding/routes/transfers.ts +0 -987
- package/src/db/tables/fundingCatalog.test.ts +0 -122
- package/src/db/tables/fundingCatalog.ts +0 -163
- package/src/db/tables/fundingDepositAddresses.test.ts +0 -608
- package/src/db/tables/fundingDepositAddresses.ts +0 -443
- package/src/db/tables/fundingDeposits.ts +0 -572
- package/src/db/tables/fundingIdempotency.test.ts +0 -182
- package/src/db/tables/fundingIdempotency.ts +0 -180
- package/src/db/tables/fundingTransferTransactions.test.ts +0 -112
- package/src/db/tables/fundingTransfers.test.ts +0 -115
- package/src/db/tables/fundingTransfers.ts +0 -189
- package/src/handlers/internal/multisig.test.ts +0 -818
- package/src/internal/funding/Subsidy.test.ts +0 -75
- package/src/internal/funding/Transfer.test.ts +0 -524
- package/src/internal/funding/Transfer.ts +0 -762
- package/src/internal/funding/TransferReconciliation.test.ts +0 -147
- package/src/internal/funding/TransferReconciliation.ts +0 -264
- package/src/internal/funding/providers/stargate.test.ts +0 -328
- package/src/internal/funding/providers/stargate.ts +0 -856
- /package/dist/apps/{funding → routes}/Inventory.d.ts +0 -0
- /package/src/internal/{funding → routes}/Route.test.ts +0 -0
|
@@ -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,207 @@ 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(
|
|
912
|
+
'Zero to four log topics; non-anonymous events start with the event signature hash.',
|
|
913
|
+
),
|
|
914
|
+
z.meta({
|
|
915
|
+
examples: [
|
|
916
|
+
[],
|
|
917
|
+
[
|
|
918
|
+
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
|
|
919
|
+
'0x000000000000000000000000e7687128b0a808c2831ff94d4f7b2fb35c65af38',
|
|
920
|
+
],
|
|
862
921
|
],
|
|
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] }),
|
|
922
|
+
}),
|
|
893
923
|
),
|
|
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'] }),
|
|
924
|
+
transactionHash: Schema.Hash.check(
|
|
925
|
+
z.describe('Hash of the transaction that emitted the log.'),
|
|
926
|
+
z.meta({
|
|
927
|
+
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
928
|
+
}),
|
|
914
929
|
),
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
930
|
+
transactionIndex: z
|
|
931
|
+
.number()
|
|
932
|
+
.check(
|
|
933
|
+
z.int(),
|
|
934
|
+
z.nonnegative(),
|
|
935
|
+
z.describe('Index of the transaction within its block.'),
|
|
936
|
+
z.meta({ examples: [0] }),
|
|
937
|
+
),
|
|
938
|
+
})
|
|
939
|
+
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).')),
|
|
940
|
+
'WebhookLogEvent',
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
944
|
+
export const BlockEvent = OpenApi.component(
|
|
945
|
+
z
|
|
946
|
+
.object({
|
|
947
|
+
number: z
|
|
948
|
+
.number()
|
|
949
|
+
.check(
|
|
950
|
+
z.int(),
|
|
951
|
+
z.nonnegative(),
|
|
952
|
+
z.describe('Block height, starting from genesis block 0.'),
|
|
953
|
+
z.meta({ examples: [1000002] }),
|
|
954
|
+
),
|
|
955
|
+
hash: Schema.Hash.check(
|
|
956
|
+
z.describe('Hash that identifies this block.'),
|
|
957
|
+
z.meta({
|
|
958
|
+
examples: ['0x3fe7d9e595f3d8215ec840c6ef55ac0bead58933e96fc2ead0f2aaf79715f45d'],
|
|
959
|
+
}),
|
|
923
960
|
),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
z.describe('Maximum gas available for all transactions in this block.'),
|
|
930
|
-
z.meta({ examples: [500000000] }),
|
|
961
|
+
parentHash: Schema.Hash.check(
|
|
962
|
+
z.describe('Hash of the previous block in the chain.'),
|
|
963
|
+
z.meta({
|
|
964
|
+
examples: ['0xa406dff9c51cc2abbef3a811f0499e99a568bf781019f129ab45dca1df0e43e5'],
|
|
965
|
+
}),
|
|
931
966
|
),
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
z.int(),
|
|
936
|
-
z.nonnegative(),
|
|
937
|
-
z.describe('Number of transactions included in this block.'),
|
|
938
|
-
z.meta({ examples: [3] }),
|
|
967
|
+
miner: Schema.Address.check(
|
|
968
|
+
z.describe('Address of the block producer (miner/proposer).'),
|
|
969
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
939
970
|
),
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
971
|
+
proposer: z.optional(
|
|
972
|
+
Schema.Address.check(
|
|
973
|
+
z.describe('Consensus proposer of the block, when the chain records one.'),
|
|
974
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
975
|
+
),
|
|
945
976
|
),
|
|
946
|
-
|
|
947
|
-
|
|
977
|
+
gasUsed: z
|
|
978
|
+
.number()
|
|
979
|
+
.check(
|
|
980
|
+
z.int(),
|
|
981
|
+
z.nonnegative(),
|
|
982
|
+
z.describe('Total gas used by every transaction in this block.'),
|
|
983
|
+
z.meta({ examples: [4340281] }),
|
|
984
|
+
),
|
|
985
|
+
gasLimit: z
|
|
986
|
+
.number()
|
|
987
|
+
.check(
|
|
988
|
+
z.int(),
|
|
989
|
+
z.nonnegative(),
|
|
990
|
+
z.describe('Maximum gas available for all transactions in this block.'),
|
|
991
|
+
z.meta({ examples: [500000000] }),
|
|
992
|
+
),
|
|
993
|
+
transactionCount: z
|
|
994
|
+
.number()
|
|
995
|
+
.check(
|
|
996
|
+
z.int(),
|
|
997
|
+
z.nonnegative(),
|
|
998
|
+
z.describe('Number of transactions included in this block.'),
|
|
999
|
+
z.meta({ examples: [3] }),
|
|
1000
|
+
),
|
|
1001
|
+
timestamp: z.iso
|
|
1002
|
+
.datetime()
|
|
1003
|
+
.check(
|
|
1004
|
+
z.describe('When the block was produced, as an ISO 8601 timestamp.'),
|
|
1005
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
1006
|
+
),
|
|
1007
|
+
})
|
|
1008
|
+
.check(z.describe('Payload for a `block:created` event (a new block header).')),
|
|
1009
|
+
'WebhookBlockEvent',
|
|
1010
|
+
)
|
|
948
1011
|
|
|
949
|
-
/** Public
|
|
950
|
-
export const
|
|
1012
|
+
/** Public route deposit after a committed material change. */
|
|
1013
|
+
export const RoutesDepositEvent = RoutesDeposit.schema.RoutesDeposit
|
|
951
1014
|
|
|
952
|
-
/** Public
|
|
953
|
-
export const
|
|
1015
|
+
/** Public route transfer after a committed material change. */
|
|
1016
|
+
export const RoutesTransferEvent = RoutesTransfer.schema.RoutesTransfer
|
|
954
1017
|
|
|
955
1018
|
/** A `ping` (synthetic test-delivery) payload, sent by `POST /webhooks/:id/ping`. */
|
|
956
|
-
export const PingEvent =
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1019
|
+
export const PingEvent = OpenApi.component(
|
|
1020
|
+
z
|
|
1021
|
+
.object({
|
|
1022
|
+
ping: z
|
|
1023
|
+
.literal(true)
|
|
1024
|
+
.check(
|
|
1025
|
+
z.describe('Marks this payload as a synthetic ping test.'),
|
|
1026
|
+
z.meta({ examples: [true] }),
|
|
1027
|
+
),
|
|
1028
|
+
})
|
|
1029
|
+
.check(z.describe('Payload for a webhook ping test delivery.')),
|
|
1030
|
+
'WebhookPingEvent',
|
|
1031
|
+
)
|
|
961
1032
|
|
|
962
1033
|
/** Fields common to every delivery envelope. */
|
|
963
1034
|
const envelopeBase = {
|
|
964
1035
|
chainId: Schema.ChainId,
|
|
965
|
-
context: z
|
|
1036
|
+
context: z
|
|
1037
|
+
.optional(Context)
|
|
1038
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
966
1039
|
createdAt: z.iso
|
|
967
1040
|
.datetime()
|
|
968
1041
|
.check(
|
|
@@ -992,176 +1065,254 @@ export namespace schema {
|
|
|
992
1065
|
* variant selector — without per-variant titles, inline `oneOf` members render
|
|
993
1066
|
* as a single (first) collapsed schema.
|
|
994
1067
|
*/
|
|
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', [
|
|
1068
|
+
export const Envelope = OpenApi.component(
|
|
1069
|
+
z
|
|
1070
|
+
.discriminatedUnion('type', [
|
|
1064
1071
|
z
|
|
1065
1072
|
.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),
|
|
1073
|
+
...envelopeBase,
|
|
1074
|
+
data: TransferEvent,
|
|
1075
|
+
type: z.literal('token:transfer').check(z.meta({ examples: ['token:transfer'] })),
|
|
1076
1076
|
})
|
|
1077
|
-
.check(z.meta({ title: 'Transfer
|
|
1077
|
+
.check(z.meta({ title: 'Transfer event' })),
|
|
1078
1078
|
z
|
|
1079
1079
|
.object({
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
eventType: z
|
|
1080
|
+
...envelopeBase,
|
|
1081
|
+
data: TransactionEvent,
|
|
1082
|
+
type: z
|
|
1084
1083
|
.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),
|
|
1084
|
+
.check(z.meta({ examples: ['transaction:included'] })),
|
|
1090
1085
|
})
|
|
1091
|
-
.check(z.meta({ title: 'Included
|
|
1086
|
+
.check(z.meta({ title: 'Included transaction event' })),
|
|
1092
1087
|
z
|
|
1093
1088
|
.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,
|
|
1089
|
+
...envelopeBase,
|
|
1090
|
+
data: LogEvent,
|
|
1091
|
+
type: z.literal('log:emitted').check(z.meta({ examples: ['log:emitted'] })),
|
|
1104
1092
|
})
|
|
1105
|
-
.check(z.meta({ title: 'Log
|
|
1093
|
+
.check(z.meta({ title: 'Log event' })),
|
|
1106
1094
|
z
|
|
1107
1095
|
.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),
|
|
1096
|
+
...envelopeBase,
|
|
1097
|
+
data: BlockEvent,
|
|
1098
|
+
type: z.literal('block:created').check(z.meta({ examples: ['block:created'] })),
|
|
1118
1099
|
})
|
|
1119
|
-
.check(z.meta({ title: 'Block
|
|
1100
|
+
.check(z.meta({ title: 'Block event' })),
|
|
1120
1101
|
z
|
|
1121
1102
|
.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),
|
|
1103
|
+
...envelopeBase,
|
|
1104
|
+
data: RoutesDepositEvent,
|
|
1105
|
+
type: z
|
|
1106
|
+
.literal('routes:deposit.updated')
|
|
1107
|
+
.check(z.meta({ examples: ['routes:deposit.updated'] })),
|
|
1132
1108
|
})
|
|
1133
|
-
.check(z.meta({ title: '
|
|
1109
|
+
.check(z.meta({ title: 'Route deposit updated event' })),
|
|
1134
1110
|
z
|
|
1135
1111
|
.object({
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
.
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1112
|
+
...envelopeBase,
|
|
1113
|
+
data: RoutesTransferEvent,
|
|
1114
|
+
type: z
|
|
1115
|
+
.literal('routes:transfer.updated')
|
|
1116
|
+
.check(z.meta({ examples: ['routes:transfer.updated'] })),
|
|
1117
|
+
})
|
|
1118
|
+
.check(z.meta({ title: 'Route transfer updated event' })),
|
|
1119
|
+
z
|
|
1120
|
+
.object({
|
|
1121
|
+
...envelopeBase,
|
|
1122
|
+
data: PingEvent,
|
|
1123
|
+
type: z.literal('ping').check(z.meta({ examples: ['ping'] })),
|
|
1146
1124
|
})
|
|
1147
|
-
.check(z.meta({ title: '
|
|
1125
|
+
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
1148
1126
|
])
|
|
1149
|
-
.check(z.describe('
|
|
1127
|
+
.check(z.describe('The signed JSON payload Tempo POSTs to a webhook destination.')),
|
|
1128
|
+
'WebhookEventEnvelope',
|
|
1129
|
+
)
|
|
1150
1130
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
'
|
|
1131
|
+
/** Schemas for the getWebhookEventTypes operation. */
|
|
1132
|
+
export namespace getWebhookEventTypes {
|
|
1133
|
+
const EventTypeEntry = OpenApi.component(
|
|
1134
|
+
z
|
|
1135
|
+
.object({
|
|
1136
|
+
description: z
|
|
1137
|
+
.string()
|
|
1138
|
+
.check(
|
|
1139
|
+
z.describe('Plain-English description of the event type.'),
|
|
1140
|
+
z.meta({ examples: ['TIP-20 token transfer event.'] }),
|
|
1160
1141
|
),
|
|
1161
|
-
|
|
1142
|
+
type: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
1143
|
+
})
|
|
1144
|
+
.check(z.describe('One webhook event type available for subscription.')),
|
|
1145
|
+
'WebhookEventType',
|
|
1146
|
+
)
|
|
1147
|
+
|
|
1148
|
+
export const Response = OpenApi.component(
|
|
1149
|
+
z
|
|
1150
|
+
.object({
|
|
1151
|
+
data: z.array(EventTypeEntry).check(
|
|
1152
|
+
z.describe('Webhook event types available for subscription.'),
|
|
1153
|
+
z.meta({
|
|
1154
|
+
examples: [[{ description: 'TIP-20 token transfer event.', type: 'token:transfer' }]],
|
|
1155
|
+
}),
|
|
1162
1156
|
),
|
|
1163
|
-
|
|
1164
|
-
|
|
1157
|
+
})
|
|
1158
|
+
.check(z.describe('List of webhook event types Tempo can send.')),
|
|
1159
|
+
'WebhookEventTypeList',
|
|
1160
|
+
)
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/** Schemas for the createWebhook operation. */
|
|
1164
|
+
export namespace createWebhook {
|
|
1165
|
+
/** Request variant for TIP-20 transfer subscriptions. */
|
|
1166
|
+
export const TransferBody = OpenApi.component(
|
|
1167
|
+
z
|
|
1168
|
+
.object({
|
|
1169
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1170
|
+
context: z.optional(Context),
|
|
1171
|
+
destination: Destination,
|
|
1172
|
+
eventType: z
|
|
1173
|
+
.literal('token:transfer')
|
|
1174
|
+
.check(
|
|
1175
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1176
|
+
z.meta({ examples: ['token:transfer'] }),
|
|
1177
|
+
),
|
|
1178
|
+
filters: z.optional(TransferFilters),
|
|
1179
|
+
})
|
|
1180
|
+
.check(z.meta({ title: 'Transfer subscription' })),
|
|
1181
|
+
'CreateWebhookTransferRequest',
|
|
1182
|
+
)
|
|
1183
|
+
|
|
1184
|
+
/** Request variant for included transaction subscriptions. */
|
|
1185
|
+
export const TransactionBody = OpenApi.component(
|
|
1186
|
+
z
|
|
1187
|
+
.object({
|
|
1188
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1189
|
+
context: z.optional(Context),
|
|
1190
|
+
destination: Destination,
|
|
1191
|
+
eventType: z
|
|
1192
|
+
.literal('transaction:included')
|
|
1193
|
+
.check(
|
|
1194
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1195
|
+
z.meta({ examples: ['transaction:included'] }),
|
|
1196
|
+
),
|
|
1197
|
+
filters: z.optional(TxFilters),
|
|
1198
|
+
})
|
|
1199
|
+
.check(z.meta({ title: 'Included-transaction subscription' })),
|
|
1200
|
+
'CreateWebhookTransactionRequest',
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
/** Request variant for emitted log subscriptions. */
|
|
1204
|
+
export const LogBody = OpenApi.component(
|
|
1205
|
+
z
|
|
1206
|
+
.object({
|
|
1207
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1208
|
+
context: z.optional(Context),
|
|
1209
|
+
destination: Destination,
|
|
1210
|
+
eventType: z
|
|
1211
|
+
.literal('log:emitted')
|
|
1212
|
+
.check(
|
|
1213
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1214
|
+
z.meta({ examples: ['log:emitted'] }),
|
|
1215
|
+
),
|
|
1216
|
+
filters: LogFilters,
|
|
1217
|
+
})
|
|
1218
|
+
.check(z.meta({ title: 'Log subscription' })),
|
|
1219
|
+
'CreateWebhookLogRequest',
|
|
1220
|
+
)
|
|
1221
|
+
|
|
1222
|
+
/** Request variant for created block subscriptions. */
|
|
1223
|
+
export const BlockBody = OpenApi.component(
|
|
1224
|
+
z
|
|
1225
|
+
.object({
|
|
1226
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1227
|
+
context: z.optional(Context),
|
|
1228
|
+
destination: Destination,
|
|
1229
|
+
eventType: z
|
|
1230
|
+
.literal('block:created')
|
|
1231
|
+
.check(
|
|
1232
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1233
|
+
z.meta({ examples: ['block:created'] }),
|
|
1234
|
+
),
|
|
1235
|
+
filters: z.optional(BlockFilters),
|
|
1236
|
+
})
|
|
1237
|
+
.check(z.meta({ title: 'Block subscription' })),
|
|
1238
|
+
'CreateWebhookBlockRequest',
|
|
1239
|
+
)
|
|
1240
|
+
|
|
1241
|
+
/** Request variant for route deposit subscriptions. */
|
|
1242
|
+
export const RoutesDepositBody = OpenApi.component(
|
|
1243
|
+
z
|
|
1244
|
+
.object({
|
|
1245
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1246
|
+
context: z.optional(Context),
|
|
1247
|
+
destination: Destination,
|
|
1248
|
+
eventType: z
|
|
1249
|
+
.literal('routes:deposit.updated')
|
|
1250
|
+
.check(
|
|
1251
|
+
z.describe('Event type for committed route deposit changes.'),
|
|
1252
|
+
z.meta({ examples: ['routes:deposit.updated'] }),
|
|
1253
|
+
),
|
|
1254
|
+
filters: z.optional(RoutesDepositFilters),
|
|
1255
|
+
})
|
|
1256
|
+
.check(z.meta({ title: 'Route deposit subscription' })),
|
|
1257
|
+
'CreateWebhookRoutesDepositRequest',
|
|
1258
|
+
)
|
|
1259
|
+
|
|
1260
|
+
/** Request variant for route transfer subscriptions. */
|
|
1261
|
+
export const RoutesTransferBody = OpenApi.component(
|
|
1262
|
+
z
|
|
1263
|
+
.object({
|
|
1264
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1265
|
+
context: z.optional(Context),
|
|
1266
|
+
destination: Destination,
|
|
1267
|
+
eventType: z
|
|
1268
|
+
.literal('routes:transfer.updated')
|
|
1269
|
+
.check(
|
|
1270
|
+
z.describe('Event type for committed route transfer changes.'),
|
|
1271
|
+
z.meta({ examples: ['routes:transfer.updated'] }),
|
|
1272
|
+
),
|
|
1273
|
+
filters: z.optional(RoutesTransferFilters),
|
|
1274
|
+
})
|
|
1275
|
+
.check(z.meta({ title: 'Route transfer subscription' })),
|
|
1276
|
+
'CreateWebhookRoutesTransferRequest',
|
|
1277
|
+
)
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* Discriminated on `eventType` so each variant carries its own typed
|
|
1281
|
+
* `filters` object — this is what lets the docs render the valid filter
|
|
1282
|
+
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
1283
|
+
* doc renderer's selector (see {@link schema.Envelope}).
|
|
1284
|
+
*/
|
|
1285
|
+
export const Body = OpenApi.component(
|
|
1286
|
+
z
|
|
1287
|
+
.discriminatedUnion('eventType', [
|
|
1288
|
+
TransferBody,
|
|
1289
|
+
TransactionBody,
|
|
1290
|
+
LogBody,
|
|
1291
|
+
BlockBody,
|
|
1292
|
+
RoutesDepositBody,
|
|
1293
|
+
RoutesTransferBody,
|
|
1294
|
+
])
|
|
1295
|
+
.check(z.describe('Details for creating a webhook subscription.')),
|
|
1296
|
+
'CreateWebhookRequest',
|
|
1297
|
+
)
|
|
1298
|
+
|
|
1299
|
+
export const Response = OpenApi.component(
|
|
1300
|
+
z
|
|
1301
|
+
.object({
|
|
1302
|
+
...Subscription.shape,
|
|
1303
|
+
destination: Destination,
|
|
1304
|
+
secret: z
|
|
1305
|
+
.string()
|
|
1306
|
+
.check(
|
|
1307
|
+
z.describe(
|
|
1308
|
+
'HMAC signing secret (`whsec_…`) used to verify Tempo webhook signatures. It is shown once when you create the webhook, so store it now.',
|
|
1309
|
+
),
|
|
1310
|
+
z.meta({ examples: ['whsec_abc123'] }),
|
|
1311
|
+
),
|
|
1312
|
+
})
|
|
1313
|
+
.check(z.describe('The new webhook subscription, including the one-time signing secret.')),
|
|
1314
|
+
'CreateWebhookResponse',
|
|
1315
|
+
)
|
|
1165
1316
|
}
|
|
1166
1317
|
|
|
1167
1318
|
/** Schemas for the listWebhooks operation. */
|
|
@@ -1178,15 +1329,23 @@ export namespace schema {
|
|
|
1178
1329
|
z.describe('Query parameters for listing your webhook subscriptions.'),
|
|
1179
1330
|
)
|
|
1180
1331
|
|
|
1181
|
-
export const Response =
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1332
|
+
export const Response = OpenApi.component(
|
|
1333
|
+
z
|
|
1334
|
+
.object({
|
|
1335
|
+
data: z
|
|
1336
|
+
.array(Subscription)
|
|
1337
|
+
.check(z.describe('Webhook subscriptions on this page.'), z.meta({ examples: [[]] })),
|
|
1338
|
+
meta: z
|
|
1339
|
+
.optional(Schema.CountMeta)
|
|
1340
|
+
.check(
|
|
1341
|
+
z.describe('Extra response metadata requested with `include`.'),
|
|
1342
|
+
z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] }),
|
|
1343
|
+
),
|
|
1344
|
+
nextCursor: Schema.NextCursor,
|
|
1345
|
+
})
|
|
1346
|
+
.check(z.describe('A page of webhook subscriptions.')),
|
|
1347
|
+
'WebhookList',
|
|
1348
|
+
)
|
|
1190
1349
|
}
|
|
1191
1350
|
|
|
1192
1351
|
/** Schemas for the getWebhook operation. */
|
|
@@ -1221,55 +1380,69 @@ export namespace schema {
|
|
|
1221
1380
|
z.describe('Query parameters for listing webhook delivery attempts.'),
|
|
1222
1381
|
)
|
|
1223
1382
|
|
|
1224
|
-
export const Response =
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1383
|
+
export const Response = OpenApi.component(
|
|
1384
|
+
z
|
|
1385
|
+
.object({
|
|
1386
|
+
data: z
|
|
1387
|
+
.array(Delivery)
|
|
1388
|
+
.check(
|
|
1389
|
+
z.describe('Webhook delivery attempts on this page.'),
|
|
1390
|
+
z.meta({ examples: [[]] }),
|
|
1391
|
+
),
|
|
1392
|
+
meta: z
|
|
1393
|
+
.optional(Schema.CountMeta)
|
|
1394
|
+
.check(
|
|
1395
|
+
z.describe('Extra response metadata requested with `include`.'),
|
|
1396
|
+
z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] }),
|
|
1397
|
+
),
|
|
1398
|
+
nextCursor: Schema.NextCursor,
|
|
1399
|
+
})
|
|
1400
|
+
.check(z.describe('A page of webhook delivery attempts.')),
|
|
1401
|
+
'WebhookDeliveryList',
|
|
1402
|
+
)
|
|
1233
1403
|
}
|
|
1234
1404
|
|
|
1235
1405
|
/** Schemas for the pingWebhook operation. */
|
|
1236
1406
|
export namespace pingWebhook {
|
|
1237
1407
|
export const Params = getWebhook.Params
|
|
1238
1408
|
|
|
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
|
-
|
|
1409
|
+
export const Response = OpenApi.component(
|
|
1410
|
+
z
|
|
1411
|
+
.object({
|
|
1412
|
+
delivered: z
|
|
1413
|
+
.boolean()
|
|
1414
|
+
.check(
|
|
1415
|
+
z.describe('Whether your endpoint returned a 2xx response.'),
|
|
1416
|
+
z.meta({ examples: [true] }),
|
|
1417
|
+
),
|
|
1418
|
+
error: z
|
|
1419
|
+
.optional(z.string())
|
|
1420
|
+
.check(
|
|
1421
|
+
z.describe('Why the delivery failed, present when `delivered` is `false`.'),
|
|
1422
|
+
z.meta({ examples: ['Connection timed out'] }),
|
|
1423
|
+
),
|
|
1424
|
+
eventId: z
|
|
1425
|
+
.string()
|
|
1426
|
+
.check(
|
|
1427
|
+
z.describe('Synthetic event ID (`evt_…`) Tempo sent for this ping.'),
|
|
1428
|
+
z.meta({ examples: ['evt_abc123'] }),
|
|
1429
|
+
),
|
|
1430
|
+
responseMs: z
|
|
1431
|
+
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
1432
|
+
.check(
|
|
1433
|
+
z.describe('Round-trip delivery time in milliseconds, when the request completed.'),
|
|
1434
|
+
z.meta({ examples: [12] }),
|
|
1435
|
+
),
|
|
1436
|
+
responseStatus: z
|
|
1437
|
+
.optional(z.number().check(z.int()))
|
|
1438
|
+
.check(
|
|
1439
|
+
z.describe('HTTP status your endpoint returned, when Tempo received a response.'),
|
|
1440
|
+
z.meta({ examples: [200] }),
|
|
1441
|
+
),
|
|
1442
|
+
})
|
|
1443
|
+
.check(z.describe('Result of sending a synthetic ping event to a webhook destination.')),
|
|
1444
|
+
'PingWebhookResponse',
|
|
1445
|
+
)
|
|
1273
1446
|
}
|
|
1274
1447
|
|
|
1275
1448
|
/** Schemas for the retryWebhookDelivery operation. */
|
|
@@ -1291,32 +1464,37 @@ export namespace schema {
|
|
|
1291
1464
|
})
|
|
1292
1465
|
.check(z.describe('Path parameters for retrying a webhook delivery.'))
|
|
1293
1466
|
|
|
1294
|
-
export const Response = pingWebhook.Response
|
|
1467
|
+
export const Response = OpenApi.component(pingWebhook.Response, 'RetryWebhookDeliveryResponse')
|
|
1295
1468
|
}
|
|
1296
1469
|
|
|
1297
1470
|
/** Schemas for the updateWebhook operation. */
|
|
1298
1471
|
export namespace updateWebhook {
|
|
1299
1472
|
export const Params = getWebhook.Params
|
|
1300
1473
|
|
|
1301
|
-
export const Body =
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1474
|
+
export const Body = OpenApi.component(
|
|
1475
|
+
z
|
|
1476
|
+
.object({
|
|
1477
|
+
context: z
|
|
1478
|
+
.optional(z.nullable(Context))
|
|
1479
|
+
.check(z.describe('New human context, or `null` to clear it.')),
|
|
1480
|
+
destination: z
|
|
1481
|
+
.optional(Destination)
|
|
1482
|
+
.check(
|
|
1483
|
+
z.describe('New delivery destination for future events (URL or Slack channel).'),
|
|
1484
|
+
),
|
|
1485
|
+
filters: z
|
|
1486
|
+
.optional(Filters)
|
|
1487
|
+
.check(
|
|
1488
|
+
z.describe('New filters to apply to future webhook events.'),
|
|
1489
|
+
z.meta({ examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }] }),
|
|
1490
|
+
),
|
|
1491
|
+
status: z
|
|
1492
|
+
.optional(Status)
|
|
1493
|
+
.check(z.describe('New lifecycle status, such as pausing or resuming delivery.')),
|
|
1494
|
+
})
|
|
1495
|
+
.check(z.describe('Fields to update on the webhook subscription.')),
|
|
1496
|
+
'UpdateWebhookRequest',
|
|
1497
|
+
)
|
|
1320
1498
|
|
|
1321
1499
|
export const Response = Subscription
|
|
1322
1500
|
}
|
|
@@ -1325,16 +1503,19 @@ export namespace schema {
|
|
|
1325
1503
|
export namespace deleteWebhook {
|
|
1326
1504
|
export const Params = getWebhook.Params
|
|
1327
1505
|
|
|
1328
|
-
export const Response =
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1506
|
+
export const Response = OpenApi.component(
|
|
1507
|
+
z
|
|
1508
|
+
.object({
|
|
1509
|
+
id: z
|
|
1510
|
+
.string()
|
|
1511
|
+
.check(
|
|
1512
|
+
z.describe('ID of the webhook subscription that was deleted.'),
|
|
1513
|
+
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
1514
|
+
),
|
|
1515
|
+
})
|
|
1516
|
+
.check(z.describe('Confirmation that the webhook subscription was deleted.')),
|
|
1517
|
+
'DeleteWebhookResponse',
|
|
1518
|
+
)
|
|
1338
1519
|
}
|
|
1339
1520
|
}
|
|
1340
1521
|
|
|
@@ -1349,8 +1530,7 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1349
1530
|
const hidden = !options.enabled
|
|
1350
1531
|
const availableEventTypes = eventTypeDescriptions.filter(
|
|
1351
1532
|
(eventType) =>
|
|
1352
|
-
!
|
|
1353
|
-
options.applicationEventTypes?.includes(eventType.type),
|
|
1533
|
+
!isRoutesEventType(eventType.type) || options.applicationEventTypes?.includes(eventType.type),
|
|
1354
1534
|
)
|
|
1355
1535
|
const availableEventTypeSet = new Set(availableEventTypes.map((eventType) => eventType.type))
|
|
1356
1536
|
// Gate the whole resource on a configured state store. Without it the
|
|
@@ -1378,6 +1558,16 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1378
1558
|
hide: hidden,
|
|
1379
1559
|
operationId: 'getWebhookEventTypes',
|
|
1380
1560
|
responses: OpenApi.responses({
|
|
1561
|
+
errors: {
|
|
1562
|
+
400: {
|
|
1563
|
+
codes: [],
|
|
1564
|
+
description: 'The API key credential is malformed.',
|
|
1565
|
+
},
|
|
1566
|
+
404: {
|
|
1567
|
+
codes: ['webhooks_not_enabled'],
|
|
1568
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1569
|
+
},
|
|
1570
|
+
},
|
|
1381
1571
|
success: {
|
|
1382
1572
|
description: 'Webhook event types available for subscription.',
|
|
1383
1573
|
schema: schema.getWebhookEventTypes.Response,
|
|
@@ -1432,7 +1622,12 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1432
1622
|
},
|
|
1433
1623
|
403: {
|
|
1434
1624
|
codes: ['api_key_forbidden', 'limit_exceeded'],
|
|
1435
|
-
description:
|
|
1625
|
+
description:
|
|
1626
|
+
'The API key lacks access or its creator-shared subscription limit was reached.',
|
|
1627
|
+
},
|
|
1628
|
+
404: {
|
|
1629
|
+
codes: ['webhooks_not_enabled'],
|
|
1630
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1436
1631
|
},
|
|
1437
1632
|
},
|
|
1438
1633
|
success: {
|
|
@@ -1466,11 +1661,11 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1466
1661
|
message: 'Webhook event type is not available in this deployment',
|
|
1467
1662
|
status: 400,
|
|
1468
1663
|
})
|
|
1469
|
-
if (
|
|
1664
|
+
if (isRoutesEventType(body.eventType)) {
|
|
1470
1665
|
if (principal?.type !== 'api_key') return unauthorized(c)
|
|
1471
1666
|
if (
|
|
1472
1667
|
!principal.apiKey.scopes.some(
|
|
1473
|
-
(scope) => scope === Scope.wildcard || scope === '
|
|
1668
|
+
(scope) => scope === Scope.wildcard || scope === 'routes:read',
|
|
1474
1669
|
)
|
|
1475
1670
|
)
|
|
1476
1671
|
return Response.error(c, {
|
|
@@ -1488,9 +1683,9 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1488
1683
|
// Preserve destination errors before the creation-time RPC dependency.
|
|
1489
1684
|
WebhookDestination.assertDestination(body.destination)
|
|
1490
1685
|
const maxPerOwner = webhook.maxPerOwner ?? defaultMaxPerOwner
|
|
1491
|
-
if ((await Webhooks.
|
|
1686
|
+
if ((await Webhooks.countSubscriptionsForLimit(db, { owner })) >= maxPerOwner)
|
|
1492
1687
|
throw new Webhooks.LimitExceededError(maxPerOwner)
|
|
1493
|
-
const startBlockNumber =
|
|
1688
|
+
const startBlockNumber = isRoutesEventType(body.eventType)
|
|
1494
1689
|
? undefined
|
|
1495
1690
|
: await getRpcHead(c.get('getClient')(chainId))
|
|
1496
1691
|
const subscription = await Webhooks.createSubscription(
|
|
@@ -1538,6 +1733,16 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1538
1733
|
hide: hidden,
|
|
1539
1734
|
operationId: 'listWebhooks',
|
|
1540
1735
|
responses: OpenApi.responses({
|
|
1736
|
+
errors: {
|
|
1737
|
+
400: {
|
|
1738
|
+
codes: ['query_invalid'],
|
|
1739
|
+
description: 'The query parameters are invalid.',
|
|
1740
|
+
},
|
|
1741
|
+
404: {
|
|
1742
|
+
codes: ['webhooks_not_enabled'],
|
|
1743
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1744
|
+
},
|
|
1745
|
+
},
|
|
1541
1746
|
success: {
|
|
1542
1747
|
description: 'A page of webhook subscriptions.',
|
|
1543
1748
|
schema: schema.listWebhooks.Response,
|
|
@@ -1615,9 +1820,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1615
1820
|
operationId: 'getWebhook',
|
|
1616
1821
|
responses: OpenApi.responses({
|
|
1617
1822
|
errors: {
|
|
1823
|
+
400: {
|
|
1824
|
+
codes: ['param_invalid'],
|
|
1825
|
+
description: 'The webhook ID is invalid.',
|
|
1826
|
+
},
|
|
1618
1827
|
404: {
|
|
1619
1828
|
description: 'No webhook subscription was found for that ID.',
|
|
1620
|
-
codes: ['webhook_not_found'],
|
|
1829
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1621
1830
|
},
|
|
1622
1831
|
},
|
|
1623
1832
|
success: {
|
|
@@ -1672,9 +1881,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1672
1881
|
operationId: 'listWebhookDeliveries',
|
|
1673
1882
|
responses: OpenApi.responses({
|
|
1674
1883
|
errors: {
|
|
1884
|
+
400: {
|
|
1885
|
+
codes: ['param_invalid', 'query_invalid'],
|
|
1886
|
+
description: 'The webhook ID or query parameters are invalid.',
|
|
1887
|
+
},
|
|
1675
1888
|
404: {
|
|
1676
1889
|
description: 'No webhook subscription was found for that ID.',
|
|
1677
|
-
codes: ['webhook_not_found'],
|
|
1890
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1678
1891
|
},
|
|
1679
1892
|
},
|
|
1680
1893
|
success: {
|
|
@@ -1761,9 +1974,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1761
1974
|
operationId: 'pingWebhook',
|
|
1762
1975
|
responses: OpenApi.responses({
|
|
1763
1976
|
errors: {
|
|
1977
|
+
400: {
|
|
1978
|
+
codes: ['param_invalid'],
|
|
1979
|
+
description: 'The webhook ID is invalid.',
|
|
1980
|
+
},
|
|
1764
1981
|
404: {
|
|
1765
1982
|
description: 'No webhook subscription was found for that ID.',
|
|
1766
|
-
codes: ['webhook_not_found'],
|
|
1983
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1767
1984
|
},
|
|
1768
1985
|
},
|
|
1769
1986
|
success: {
|
|
@@ -1826,9 +2043,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1826
2043
|
operationId: 'retryWebhookDelivery',
|
|
1827
2044
|
responses: OpenApi.responses({
|
|
1828
2045
|
errors: {
|
|
2046
|
+
400: {
|
|
2047
|
+
codes: ['param_invalid'],
|
|
2048
|
+
description: 'The webhook or delivery ID is invalid.',
|
|
2049
|
+
},
|
|
1829
2050
|
404: {
|
|
1830
2051
|
description: 'No webhook subscription or delivery was found for those IDs.',
|
|
1831
|
-
codes: ['webhook_not_found', 'delivery_not_found'],
|
|
2052
|
+
codes: ['webhook_not_found', 'delivery_not_found', 'webhooks_not_enabled'],
|
|
1832
2053
|
},
|
|
1833
2054
|
},
|
|
1834
2055
|
success: {
|
|
@@ -1914,7 +2135,7 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1914
2135
|
},
|
|
1915
2136
|
404: {
|
|
1916
2137
|
description: 'No webhook subscription was found for that ID.',
|
|
1917
|
-
codes: ['webhook_not_found'],
|
|
2138
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1918
2139
|
},
|
|
1919
2140
|
},
|
|
1920
2141
|
success: {
|
|
@@ -1981,9 +2202,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1981
2202
|
operationId: 'deleteWebhook',
|
|
1982
2203
|
responses: OpenApi.responses({
|
|
1983
2204
|
errors: {
|
|
2205
|
+
400: {
|
|
2206
|
+
codes: ['param_invalid'],
|
|
2207
|
+
description: 'The webhook ID is invalid.',
|
|
2208
|
+
},
|
|
1984
2209
|
404: {
|
|
1985
2210
|
description: 'No webhook subscription was found for that ID.',
|
|
1986
|
-
codes: ['webhook_not_found'],
|
|
2211
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1987
2212
|
},
|
|
1988
2213
|
},
|
|
1989
2214
|
success: {
|
|
@@ -2143,8 +2368,8 @@ export async function getRpcHead(client: Viem.getClient.ReturnType): Promise<num
|
|
|
2143
2368
|
|
|
2144
2369
|
const filterSchemas = {
|
|
2145
2370
|
'block:created': schema.BlockFilters,
|
|
2146
|
-
'
|
|
2147
|
-
'
|
|
2371
|
+
'routes:deposit.updated': schema.RoutesDepositFilters,
|
|
2372
|
+
'routes:transfer.updated': schema.RoutesTransferFilters,
|
|
2148
2373
|
'log:emitted': schema.LogFilters,
|
|
2149
2374
|
'token:transfer': schema.TransferFilters,
|
|
2150
2375
|
'transaction:included': schema.TxFilters,
|
|
@@ -2199,10 +2424,14 @@ function serializeArgs(value: unknown): unknown {
|
|
|
2199
2424
|
const toBig = (value: unknown) => BigInt(String(value))
|
|
2200
2425
|
|
|
2201
2426
|
/** Case-insensitive equality for string fields; bigint equality for numeric. */
|
|
2202
|
-
function operandEquals(
|
|
2427
|
+
function operandEquals(
|
|
2428
|
+
value: bigint | number | string,
|
|
2429
|
+
target: unknown,
|
|
2430
|
+
kind: 'number' | 'string',
|
|
2431
|
+
): boolean {
|
|
2203
2432
|
return kind === 'number'
|
|
2204
2433
|
? toBig(value) === toBig(target)
|
|
2205
|
-
: value.toLowerCase() === String(target).toLowerCase()
|
|
2434
|
+
: String(value).toLowerCase() === String(target).toLowerCase()
|
|
2206
2435
|
}
|
|
2207
2436
|
|
|
2208
2437
|
/**
|
|
@@ -2220,17 +2449,18 @@ function operandEquals(value: string, target: unknown, kind: 'number' | 'string'
|
|
|
2220
2449
|
* - `{ startsWith }` → hex prefix
|
|
2221
2450
|
*/
|
|
2222
2451
|
export function matchesOperator(
|
|
2223
|
-
value: string | undefined,
|
|
2452
|
+
value: bigint | number | string | undefined,
|
|
2224
2453
|
op: unknown,
|
|
2225
2454
|
kind: 'number' | 'string' = 'string',
|
|
2226
2455
|
): boolean {
|
|
2227
2456
|
if (value === undefined) return false
|
|
2228
2457
|
if (typeof op !== 'object' || op === null) return operandEquals(value, op, kind)
|
|
2229
2458
|
const o = op as Record<string, unknown>
|
|
2459
|
+
const value_string = String(value)
|
|
2230
2460
|
if ('selector' in o)
|
|
2231
|
-
return
|
|
2461
|
+
return value_string.slice(0, 10).toLowerCase() === String(o['selector']).toLowerCase()
|
|
2232
2462
|
if ('startsWith' in o)
|
|
2233
|
-
return
|
|
2463
|
+
return value_string.toLowerCase().startsWith(String(o['startsWith']).toLowerCase())
|
|
2234
2464
|
if ('in' in o) return (o['in'] as readonly unknown[]).some((v) => operandEquals(value, v, kind))
|
|
2235
2465
|
if ('not' in o) return !operandEquals(value, o['not'], kind)
|
|
2236
2466
|
if ('eq' in o && kind === 'string') return operandEquals(value, o['eq'], kind)
|
|
@@ -2313,13 +2543,12 @@ function toLogEvent(
|
|
|
2313
2543
|
const blockNumber = log.blockNumber === null ? undefined : Number(log.blockNumber)
|
|
2314
2544
|
const logIndex = log.logIndex ?? undefined
|
|
2315
2545
|
const transactionIndex = log.transactionIndex ?? undefined
|
|
2316
|
-
const topics = log.topics
|
|
2317
|
-
const topic0 = Schema.Hash.safeParse(topics[0])
|
|
2546
|
+
const topics = z.array(Schema.Hash).safeParse(log.topics)
|
|
2318
2547
|
const data = typeof log.data === 'string' ? log.data : '0x'
|
|
2319
2548
|
if (
|
|
2320
2549
|
!address.success ||
|
|
2321
2550
|
!transactionHash.success ||
|
|
2322
|
-
!
|
|
2551
|
+
!topics.success ||
|
|
2323
2552
|
blockNumber === undefined ||
|
|
2324
2553
|
logIndex === undefined ||
|
|
2325
2554
|
transactionIndex === undefined ||
|
|
@@ -2333,15 +2562,17 @@ function toLogEvent(
|
|
|
2333
2562
|
data,
|
|
2334
2563
|
logIndex,
|
|
2335
2564
|
timestamp,
|
|
2336
|
-
topics,
|
|
2565
|
+
topics: topics.data,
|
|
2337
2566
|
transactionHash: transactionHash.data,
|
|
2338
2567
|
transactionIndex,
|
|
2339
2568
|
}
|
|
2340
2569
|
if (!signature || !event || log.args === undefined) return base
|
|
2570
|
+
const topic0 = topics.data[0]
|
|
2571
|
+
if (!topic0) return undefined
|
|
2341
2572
|
return {
|
|
2342
2573
|
...base,
|
|
2343
2574
|
args: serializeArgs(log.args) as Record<string, unknown>,
|
|
2344
|
-
event: { name: event.name, signature, topic0
|
|
2575
|
+
event: { name: event.name, signature, topic0 },
|
|
2345
2576
|
}
|
|
2346
2577
|
}
|
|
2347
2578
|
|
|
@@ -2396,8 +2627,18 @@ function pushEventArgs(args: Record<string, unknown> | undefined, event: AbiEven
|
|
|
2396
2627
|
return pushed
|
|
2397
2628
|
}
|
|
2398
2629
|
|
|
2630
|
+
type LogPushdownFilters = {
|
|
2631
|
+
address?: unknown
|
|
2632
|
+
args?: Record<string, unknown> | undefined
|
|
2633
|
+
signature?: string | undefined
|
|
2634
|
+
topic0?: unknown
|
|
2635
|
+
topic1?: unknown
|
|
2636
|
+
topic2?: unknown
|
|
2637
|
+
topic3?: unknown
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2399
2640
|
/** Checks that the accepted filter carries a selective anchor rather than matching every log. */
|
|
2400
|
-
function hasLogPushdown(f:
|
|
2641
|
+
function hasLogPushdown(f: LogPushdownFilters): boolean {
|
|
2401
2642
|
if (pushAddress(f.address) !== undefined) return true
|
|
2402
2643
|
|
|
2403
2644
|
const secondaryTopic = [f.topic1, f.topic2, f.topic3].some(
|
|
@@ -2504,7 +2745,11 @@ function matchesLog(
|
|
|
2504
2745
|
const numeric = /^u?int/.test(input.type)
|
|
2505
2746
|
const value = args[name]
|
|
2506
2747
|
const normalized = input.type === 'address' ? lowercaseLeaves(op) : op
|
|
2507
|
-
|
|
2748
|
+
const operand =
|
|
2749
|
+
typeof value === 'bigint' || typeof value === 'number' || typeof value === 'string'
|
|
2750
|
+
? value
|
|
2751
|
+
: undefined
|
|
2752
|
+
if (!matchesOperator(operand, normalized, numeric ? 'number' : 'string')) return false
|
|
2508
2753
|
}
|
|
2509
2754
|
}
|
|
2510
2755
|
return true
|
|
@@ -2667,7 +2912,7 @@ function toPublic(subscription: Webhooks.Subscription) {
|
|
|
2667
2912
|
...(subscription.context === undefined ? {} : { context: subscription.context }),
|
|
2668
2913
|
createdAt: subscription.createdAt,
|
|
2669
2914
|
destination: redactDestination(subscription.destination),
|
|
2670
|
-
...(
|
|
2915
|
+
...(isRoutesEventType(subscription.eventType) && subscription.environment !== undefined
|
|
2671
2916
|
? { environment: subscription.environment }
|
|
2672
2917
|
: {}),
|
|
2673
2918
|
eventType: subscription.eventType,
|