tapimo 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/ApiKey.js +1 -1
- package/dist/ApiKey.js.map +1 -1
- package/dist/ApiKeys.d.ts +95 -14
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +360 -49
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +21383 -18056
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +301 -22
- package/dist/App.js.map +1 -1
- package/dist/Assets.d.ts.map +1 -1
- package/dist/Assets.js +2 -1
- package/dist/Assets.js.map +1 -1
- package/dist/Handler.d.ts +0 -1
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js +0 -1
- package/dist/Handler.js.map +1 -1
- package/dist/Scope.d.ts +13 -5
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +16 -5
- package/dist/Scope.js.map +1 -1
- package/dist/Webhooks.js +2 -2
- package/dist/Webhooks.js.map +1 -1
- package/dist/admin/App.d.ts +3936 -1337
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/App.js +26 -5
- package/dist/admin/App.js.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +159 -7
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +95 -43
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +1446 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.js +465 -8
- package/dist/admin/apps/earn-vaults.js.map +1 -1
- package/dist/admin/apps/organizations.d.ts +344 -3
- package/dist/admin/apps/organizations.d.ts.map +1 -1
- package/dist/admin/apps/organizations.js +288 -10
- package/dist/admin/apps/organizations.js.map +1 -1
- package/dist/admin/apps/routes-support.d.ts +95 -0
- package/dist/admin/apps/routes-support.d.ts.map +1 -0
- package/dist/admin/apps/routes-support.js +151 -0
- package/dist/admin/apps/routes-support.js.map +1 -0
- package/dist/admin/apps/routes.d.ts +2764 -0
- package/dist/admin/apps/routes.d.ts.map +1 -0
- package/dist/admin/apps/routes.js +728 -0
- package/dist/admin/apps/routes.js.map +1 -0
- package/dist/admin/apps/subsidies.d.ts +501 -0
- package/dist/admin/apps/subsidies.d.ts.map +1 -0
- package/dist/admin/apps/subsidies.js +384 -0
- package/dist/admin/apps/subsidies.js.map +1 -0
- package/dist/admin/apps/verified-tokens.d.ts +16 -16
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
- package/dist/admin/apps/verified-tokens.js +3 -3
- package/dist/admin/apps/verified-tokens.js.map +1 -1
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +129 -69
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +5 -2
- package/dist/analytics/Analytics.d.ts.map +1 -1
- package/dist/analytics/Analytics.js +31 -1
- package/dist/analytics/Analytics.js.map +1 -1
- package/dist/analytics/tables/requestEvents.d.ts +2 -1
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
- package/dist/analytics/tables/requestEvents.js +10 -1
- package/dist/analytics/tables/requestEvents.js.map +1 -1
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts +72 -0
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts.map +1 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js +56 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js.map +1 -0
- package/dist/apps/Zones.d.ts +21 -12526
- package/dist/apps/Zones.d.ts.map +1 -1
- package/dist/apps/Zones.js +40 -8
- package/dist/apps/Zones.js.map +1 -1
- package/dist/apps/data/App.d.ts +4310 -2548
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +86 -26
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +364 -34
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +495 -190
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +94 -22
- package/dist/apps/data/routes/addresses.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +37 -37
- package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
- package/dist/apps/data/routes/coingecko.js +47 -21
- package/dist/apps/data/routes/coingecko.js.map +1 -1
- package/dist/apps/data/routes/earn.d.ts +1641 -352
- package/dist/apps/data/routes/earn.d.ts.map +1 -1
- package/dist/apps/data/routes/earn.js +1561 -120
- package/dist/apps/data/routes/earn.js.map +1 -1
- package/dist/apps/data/routes/exchanges.d.ts +15 -0
- package/dist/apps/data/routes/exchanges.d.ts.map +1 -1
- package/dist/apps/data/routes/exchanges.js +180 -114
- package/dist/apps/data/routes/exchanges.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts +5 -0
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +49 -38
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +125 -0
- package/dist/apps/data/routes/indexer.d.ts.map +1 -1
- package/dist/apps/data/routes/indexer.js +83 -27
- package/dist/apps/data/routes/indexer.js.map +1 -1
- package/dist/apps/data/routes/rpc.d.ts +507 -33
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +266 -156
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +47 -15
- package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
- package/dist/apps/data/routes/tokenlist.js +68 -11
- package/dist/apps/data/routes/tokenlist.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +95 -93
- package/dist/apps/data/routes/tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/tokens.js +26 -14
- package/dist/apps/data/routes/tokens.js.map +1 -1
- package/dist/apps/data/routes/transfers.d.ts +16 -0
- package/dist/apps/data/routes/transfers.d.ts.map +1 -1
- package/dist/apps/data/routes/transfers.js +9 -7
- package/dist/apps/data/routes/transfers.js.map +1 -1
- package/dist/apps/data/routes/verified-tokens.d.ts +4 -4
- package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/verified-tokens.js +64 -20
- package/dist/apps/data/routes/verified-tokens.js.map +1 -1
- package/dist/apps/data/routes/webhooks.d.ts +1210 -70
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +301 -163
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/data/routes/zones.d.ts.map +1 -1
- package/dist/apps/data/routes/zones.js +20 -12
- package/dist/apps/data/routes/zones.js.map +1 -1
- package/dist/apps/docs/reference.js +2 -2
- package/dist/apps/docs/reference.js.map +1 -1
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/management/App.d.ts +4119 -3297
- package/dist/apps/management/App.d.ts.map +1 -1
- package/dist/apps/management/App.js +5 -14
- package/dist/apps/management/App.js.map +1 -1
- package/dist/apps/management/Billing.d.ts +49 -8
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +221 -26
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +174 -72
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.js +43 -15
- package/dist/apps/management/routes/api-keys.js.map +1 -1
- package/dist/apps/management/routes/billing.d.ts +364 -78
- package/dist/apps/management/routes/billing.d.ts.map +1 -1
- package/dist/apps/management/routes/billing.js +274 -49
- package/dist/apps/management/routes/billing.js.map +1 -1
- package/dist/apps/management/routes/faucet.d.ts +6 -6
- package/dist/apps/management/routes/faucet.js +1 -1
- package/dist/apps/management/routes/faucet.js.map +1 -1
- package/dist/apps/management/routes/invitations.d.ts +99 -24
- package/dist/apps/management/routes/invitations.d.ts.map +1 -1
- package/dist/apps/management/routes/invitations.js +117 -13
- package/dist/apps/management/routes/invitations.js.map +1 -1
- package/dist/apps/management/routes/invite-links.d.ts +42 -42
- package/dist/apps/management/routes/me.d.ts.map +1 -1
- package/dist/apps/management/routes/me.js +6 -2
- package/dist/apps/management/routes/me.js.map +1 -1
- package/dist/apps/management/routes/members.d.ts +16 -16
- package/dist/apps/management/routes/orgs.d.ts +36 -20
- package/dist/apps/management/routes/orgs.d.ts.map +1 -1
- package/dist/apps/management/routes/orgs.js +52 -12
- package/dist/apps/management/routes/orgs.js.map +1 -1
- package/dist/apps/management/routes/projects.d.ts +40 -40
- package/dist/apps/management/routes/projects.d.ts.map +1 -1
- package/dist/apps/management/routes/projects.js +6 -1
- package/dist/apps/management/routes/projects.js.map +1 -1
- package/dist/apps/management/routes/scopes.d.ts.map +1 -1
- package/dist/apps/management/routes/scopes.js +4 -1
- package/dist/apps/management/routes/scopes.js.map +1 -1
- package/dist/apps/management/routes/usage.d.ts +8 -8
- package/dist/apps/management/routes/usage.js +21 -4
- package/dist/apps/management/routes/usage.js.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.d.ts +16 -16
- package/dist/apps/management/routes/webhooks.d.ts +931 -215
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +71 -25
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/mcp.d.ts +1 -1
- package/dist/apps/mcp.js +7 -7
- package/dist/apps/mcp.js.map +1 -1
- package/dist/apps/mpp/App.d.ts.map +1 -1
- package/dist/apps/mpp/App.js +35 -7
- package/dist/apps/mpp/App.js.map +1 -1
- package/dist/apps/mpp/internal/Adapter.d.ts +2 -0
- package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Adapter.js +30 -1
- package/dist/apps/mpp/internal/Adapter.js.map +1 -1
- package/dist/apps/mpp/internal/Policy.d.ts +22 -4
- package/dist/apps/mpp/internal/Policy.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Policy.js +24 -6
- package/dist/apps/mpp/internal/Policy.js.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.d.ts +3 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.js +6 -3
- package/dist/apps/mpp/internal/Sponsorship.js.map +1 -1
- package/dist/apps/relay/App.d.ts +2 -0
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +177 -26
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts +5 -3
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +232 -25
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/apps/{funding → routes}/Access.d.ts +4 -4
- package/dist/apps/routes/Access.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Access.js +4 -4
- package/dist/apps/routes/Access.js.map +1 -0
- package/dist/apps/{funding → routes}/App.d.ts +841 -136
- package/dist/apps/{funding → routes}/App.d.ts.map +1 -1
- package/dist/apps/{funding → routes}/App.js +17 -17
- package/dist/apps/routes/App.js.map +1 -0
- package/dist/apps/routes/Inventory.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Inventory.js +2 -2
- package/dist/apps/routes/Inventory.js.map +1 -0
- package/dist/apps/routes/index.d.ts +2 -0
- package/dist/apps/routes/index.d.ts.map +1 -0
- package/dist/apps/routes/index.js +2 -0
- package/dist/apps/routes/index.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.d.ts +7 -7
- package/dist/apps/routes/routes/chains.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.js +25 -25
- package/dist/apps/routes/routes/chains.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.d.ts +123 -59
- package/dist/apps/routes/routes/deposit-addresses.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.js +498 -223
- package/dist/apps/routes/routes/deposit-addresses.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/providers.d.ts +8 -8
- package/dist/apps/routes/routes/providers.d.ts.map +1 -0
- package/dist/apps/routes/routes/providers.js +57 -0
- package/dist/apps/routes/routes/providers.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.d.ts +19 -16
- package/dist/apps/routes/routes/quotes.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.js +55 -38
- package/dist/apps/routes/routes/quotes.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/transfers.d.ts +957 -71
- package/dist/apps/routes/routes/transfers.d.ts.map +1 -0
- package/dist/apps/routes/routes/transfers.js +1140 -0
- package/dist/apps/routes/routes/transfers.js.map +1 -0
- package/dist/cli/Cli.d.ts +30 -0
- package/dist/cli/Cli.d.ts.map +1 -1
- package/dist/cli/commands/admin.d.ts +36 -0
- package/dist/cli/commands/admin.d.ts.map +1 -1
- package/dist/cli/commands/admin.js +273 -0
- package/dist/cli/commands/admin.js.map +1 -1
- package/dist/cloudflare.d.ts +16 -14
- package/dist/cloudflare.d.ts.map +1 -1
- package/dist/cloudflare.js +26 -21
- package/dist/cloudflare.js.map +1 -1
- package/dist/db/Db.d.ts +63 -21
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +1052 -15
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +785 -133
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +590 -162
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts +4 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js +2 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts +73 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.js +142 -0
- package/dist/db/tables/apiKeyAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts +4 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js +2 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts +20 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js +57 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js.map +1 -0
- package/dist/db/tables/apiKeyRevocations.d.ts +21 -0
- package/dist/db/tables/apiKeyRevocations.d.ts.map +1 -0
- package/dist/db/tables/apiKeyRevocations.js +98 -0
- package/dist/db/tables/apiKeyRevocations.js.map +1 -0
- package/dist/db/tables/authAccounts.d.ts +47 -0
- package/dist/db/tables/authAccounts.d.ts.map +1 -0
- package/dist/db/tables/authAccounts.js +72 -0
- package/dist/db/tables/authAccounts.js.map +1 -0
- package/dist/db/tables/authSessions.d.ts +12 -0
- package/dist/db/tables/authSessions.d.ts.map +1 -0
- package/dist/db/tables/authSessions.js +2 -0
- package/dist/db/tables/authSessions.js.map +1 -0
- package/dist/db/tables/authVerifications.d.ts +12 -0
- package/dist/db/tables/authVerifications.d.ts.map +1 -0
- package/dist/db/tables/authVerifications.js +2 -0
- package/dist/db/tables/authVerifications.js.map +1 -0
- package/dist/db/tables/invitations.d.ts +17 -1
- package/dist/db/tables/invitations.d.ts.map +1 -1
- package/dist/db/tables/invitations.js +123 -43
- package/dist/db/tables/invitations.js.map +1 -1
- package/dist/db/tables/memberships.d.ts +8 -0
- package/dist/db/tables/memberships.d.ts.map +1 -1
- package/dist/db/tables/memberships.js +51 -2
- package/dist/db/tables/memberships.js.map +1 -1
- package/dist/db/tables/organizations.d.ts +51 -5
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +135 -47
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +27 -1
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +38 -3
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/requestUsage.d.ts.map +1 -1
- package/dist/db/tables/requestUsage.js.map +1 -1
- package/dist/db/tables/rewardAccounts.d.ts +86 -0
- package/dist/db/tables/rewardAccounts.d.ts.map +1 -0
- package/dist/db/tables/rewardAccounts.js +88 -0
- package/dist/db/tables/rewardAccounts.js.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts +36 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.js +30 -0
- package/dist/db/tables/rewardCampaignDistributors.js.map +1 -0
- package/dist/db/tables/rewardCampaigns.d.ts +171 -0
- package/dist/db/tables/rewardCampaigns.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaigns.js +392 -0
- package/dist/db/tables/rewardCampaigns.js.map +1 -0
- package/dist/db/tables/rewardCredits.d.ts +53 -0
- package/dist/db/tables/rewardCredits.d.ts.map +1 -0
- package/dist/db/tables/rewardCredits.js +63 -0
- package/dist/db/tables/rewardCredits.js.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts +61 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.js +103 -0
- package/dist/db/tables/rewardEligibilityAssociations.js.map +1 -0
- package/dist/db/tables/rewardRuns.d.ts +188 -0
- package/dist/db/tables/rewardRuns.d.ts.map +1 -0
- package/dist/db/tables/rewardRuns.js +278 -0
- package/dist/db/tables/rewardRuns.js.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts +100 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.js +163 -0
- package/dist/db/tables/rewardTransactionAttempts.js.map +1 -0
- package/dist/db/tables/routesCatalog.d.ts +58 -0
- package/dist/db/tables/routesCatalog.d.ts.map +1 -0
- package/dist/db/tables/{fundingCatalog.js → routesCatalog.js} +19 -19
- package/dist/db/tables/routesCatalog.js.map +1 -0
- package/dist/db/tables/routesDepositAddresses.d.ts +476 -0
- package/dist/db/tables/routesDepositAddresses.d.ts.map +1 -0
- package/dist/db/tables/routesDepositAddresses.js +587 -0
- package/dist/db/tables/routesDepositAddresses.js.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.d.ts → routesDepositRequestObservations.d.ts} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.d.ts.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.js → routesDepositRequestObservations.js} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.js.map +1 -0
- package/dist/db/tables/{fundingDeposits.d.ts → routesDeposits.d.ts} +210 -22
- package/dist/db/tables/routesDeposits.d.ts.map +1 -0
- package/dist/db/tables/routesDeposits.js +576 -0
- package/dist/db/tables/routesDeposits.js.map +1 -0
- package/dist/db/tables/routesIdempotency.d.ts +166 -0
- package/dist/db/tables/routesIdempotency.d.ts.map +1 -0
- package/dist/db/tables/routesIdempotency.js +330 -0
- package/dist/db/tables/routesIdempotency.js.map +1 -0
- package/dist/db/tables/routesSubsidies.d.ts +27 -0
- package/dist/db/tables/routesSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesSubsidies.js +45 -0
- package/dist/db/tables/routesSubsidies.js.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.d.ts → routesTransferEvents.d.ts} +3 -3
- package/dist/db/tables/routesTransferEvents.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.js → routesTransferEvents.js} +3 -3
- package/dist/db/tables/routesTransferEvents.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts +19 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.js +17 -0
- package/dist/db/tables/routesTransferSubsidies.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts +51 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js +82 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js.map +1 -0
- package/dist/db/tables/routesTransferTransactions.d.ts +77 -0
- package/dist/db/tables/routesTransferTransactions.d.ts.map +1 -0
- package/dist/db/tables/routesTransferTransactions.js +86 -0
- package/dist/db/tables/routesTransferTransactions.js.map +1 -0
- package/dist/db/tables/routesTransfers.d.ts +319 -0
- package/dist/db/tables/routesTransfers.d.ts.map +1 -0
- package/dist/db/tables/routesTransfers.js +372 -0
- package/dist/db/tables/routesTransfers.js.map +1 -0
- package/dist/db/tables/sponsoredTransactions.d.ts +112 -13
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +241 -38
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/sponsorshipAttributions.d.ts +69 -0
- package/dist/db/tables/sponsorshipAttributions.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipAttributions.js +77 -0
- package/dist/db/tables/sponsorshipAttributions.js.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts +22 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js +45 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js.map +1 -0
- package/dist/db/tables/stripeCustomers.d.ts +11 -0
- package/dist/db/tables/stripeCustomers.d.ts.map +1 -1
- package/dist/db/tables/stripeCustomers.js +13 -0
- package/dist/db/tables/stripeCustomers.js.map +1 -1
- package/dist/db/tables/users.d.ts +17 -1
- package/dist/db/tables/users.d.ts.map +1 -1
- package/dist/db/tables/users.js +47 -2
- package/dist/db/tables/users.js.map +1 -1
- package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
- package/dist/db/tables/webhookQueueEvents.js +5 -1
- package/dist/db/tables/webhookQueueEvents.js.map +1 -1
- package/dist/db/tables/webhookSubscriptions.d.ts +22 -10
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +50 -15
- package/dist/db/tables/webhookSubscriptions.js.map +1 -1
- package/dist/handlers/internal/executionError.d.ts +2 -2
- package/dist/handlers/internal/executionError.d.ts.map +1 -1
- package/dist/handlers/internal/executionError.js +1 -2
- package/dist/handlers/internal/executionError.js.map +1 -1
- package/dist/handlers/internal/multisig.d.ts +4 -232
- package/dist/handlers/internal/multisig.d.ts.map +1 -1
- package/dist/handlers/internal/multisig.js +11 -537
- package/dist/handlers/internal/multisig.js.map +1 -1
- package/dist/handlers/internal/sponsorship.d.ts +19 -8
- package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
- package/dist/handlers/internal/sponsorship.js +13 -9
- package/dist/handlers/internal/sponsorship.js.map +1 -1
- package/dist/handlers/relay.d.ts +9 -12
- package/dist/handlers/relay.d.ts.map +1 -1
- package/dist/handlers/relay.js +81 -85
- package/dist/handlers/relay.js.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/AssetResponse.d.ts +12 -0
- package/dist/internal/AssetResponse.d.ts.map +1 -0
- package/dist/internal/AssetResponse.js +21 -0
- package/dist/internal/AssetResponse.js.map +1 -0
- package/dist/internal/Auth.d.ts +48 -12
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +603 -175
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/BetterAuth.d.ts +1488 -0
- package/dist/internal/BetterAuth.d.ts.map +1 -0
- package/dist/internal/BetterAuth.js +253 -0
- package/dist/internal/BetterAuth.js.map +1 -0
- package/dist/internal/Cache.d.ts +2 -0
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +2 -0
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/EarnRates.d.ts +26 -3
- package/dist/internal/EarnRates.d.ts.map +1 -1
- package/dist/internal/EarnRates.js +84 -19
- package/dist/internal/EarnRates.js.map +1 -1
- package/dist/internal/EarnSharePrices.d.ts +120 -0
- package/dist/internal/EarnSharePrices.d.ts.map +1 -0
- package/dist/internal/EarnSharePrices.js +179 -0
- package/dist/internal/EarnSharePrices.js.map +1 -0
- package/dist/internal/EarnVaults.d.ts +4 -0
- package/dist/internal/EarnVaults.d.ts.map +1 -1
- package/dist/internal/EarnVaults.js +31 -14
- package/dist/internal/EarnVaults.js.map +1 -1
- package/dist/internal/Email.d.ts +37 -0
- package/dist/internal/Email.d.ts.map +1 -0
- package/dist/internal/Email.js +16 -0
- package/dist/internal/Email.js.map +1 -0
- package/dist/internal/Log.d.ts +32 -28
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +18 -11
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/MetricSink.d.ts +3 -0
- package/dist/internal/MetricSink.d.ts.map +1 -1
- package/dist/internal/MetricSink.js +67 -8
- package/dist/internal/MetricSink.js.map +1 -1
- package/dist/internal/Mpp.d.ts.map +1 -1
- package/dist/internal/Mpp.js +20 -25
- package/dist/internal/Mpp.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +26 -3
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +25 -10
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/Provider.d.ts +1 -1
- package/dist/internal/Provider.d.ts.map +1 -1
- package/dist/internal/RateLimit.d.ts.map +1 -1
- package/dist/internal/RateLimit.js +13 -1
- package/dist/internal/RateLimit.js.map +1 -1
- package/dist/internal/Store.d.ts +16 -0
- package/dist/internal/Store.d.ts.map +1 -1
- package/dist/internal/Store.js +59 -8
- package/dist/internal/Store.js.map +1 -1
- package/dist/internal/Tidx.d.ts +9 -2
- package/dist/internal/Tidx.d.ts.map +1 -1
- package/dist/internal/Tidx.js +78 -11
- package/dist/internal/Tidx.js.map +1 -1
- package/dist/internal/Timing.d.ts +26 -0
- package/dist/internal/Timing.d.ts.map +1 -1
- package/dist/internal/Timing.js +63 -5
- package/dist/internal/Timing.js.map +1 -1
- package/dist/internal/VercelOidc.d.ts +94 -0
- package/dist/internal/VercelOidc.d.ts.map +1 -0
- package/dist/internal/VercelOidc.js +128 -0
- package/dist/internal/VercelOidc.js.map +1 -0
- package/dist/internal/VerifiedTokens.d.ts +2 -8
- package/dist/internal/VerifiedTokens.d.ts.map +1 -1
- package/dist/internal/VerifiedTokens.js +24 -24
- package/dist/internal/VerifiedTokens.js.map +1 -1
- package/dist/internal/Viem.d.ts +46 -2068
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +171 -11
- package/dist/internal/Viem.js.map +1 -1
- package/dist/internal/Webhooks.d.ts +12 -4
- package/dist/internal/Webhooks.d.ts.map +1 -1
- package/dist/internal/Webhooks.js +9 -3
- package/dist/internal/Webhooks.js.map +1 -1
- package/dist/internal/ZoneRpc.d.ts +7 -0
- package/dist/internal/ZoneRpc.d.ts.map +1 -0
- package/dist/internal/ZoneRpc.js +49 -0
- package/dist/internal/ZoneRpc.js.map +1 -0
- package/dist/internal/index.d.ts +3 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +3 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/rewards/Audit.d.ts +88 -0
- package/dist/internal/rewards/Audit.d.ts.map +1 -0
- package/dist/internal/rewards/Audit.js +134 -0
- package/dist/internal/rewards/Audit.js.map +1 -0
- package/dist/internal/rewards/Campaigns.d.ts +572 -0
- package/dist/internal/rewards/Campaigns.d.ts.map +1 -0
- package/dist/internal/rewards/Campaigns.js +531 -0
- package/dist/internal/rewards/Campaigns.js.map +1 -0
- package/dist/internal/rewards/Credits.d.ts +76 -0
- package/dist/internal/rewards/Credits.d.ts.map +1 -0
- package/dist/internal/rewards/Credits.js +95 -0
- package/dist/internal/rewards/Credits.js.map +1 -0
- package/dist/internal/rewards/Events.d.ts +100 -0
- package/dist/internal/rewards/Events.d.ts.map +1 -0
- package/dist/internal/rewards/Events.js +340 -0
- package/dist/internal/rewards/Events.js.map +1 -0
- package/dist/internal/rewards/Projection.d.ts +237 -0
- package/dist/internal/rewards/Projection.d.ts.map +1 -0
- package/dist/internal/rewards/Projection.js +616 -0
- package/dist/internal/rewards/Projection.js.map +1 -0
- package/dist/internal/rewards/Rates.d.ts +44 -0
- package/dist/internal/rewards/Rates.d.ts.map +1 -0
- package/dist/internal/rewards/Rates.js +60 -0
- package/dist/internal/rewards/Rates.js.map +1 -0
- package/dist/internal/rewards/Read.d.ts +158 -0
- package/dist/internal/rewards/Read.d.ts.map +1 -0
- package/dist/internal/rewards/Read.js +292 -0
- package/dist/internal/rewards/Read.js.map +1 -0
- package/dist/internal/rewards/Runner.d.ts +164 -0
- package/dist/internal/rewards/Runner.d.ts.map +1 -0
- package/dist/internal/rewards/Runner.js +1778 -0
- package/dist/internal/rewards/Runner.js.map +1 -0
- package/dist/internal/rewards/Signer.d.ts +224 -0
- package/dist/internal/rewards/Signer.d.ts.map +1 -0
- package/dist/internal/rewards/Signer.js +135 -0
- package/dist/internal/rewards/Signer.js.map +1 -0
- package/dist/internal/rewards/index.d.ts +15 -0
- package/dist/internal/rewards/index.d.ts.map +1 -0
- package/dist/internal/rewards/index.js +15 -0
- package/dist/internal/rewards/index.js.map +1 -0
- package/dist/internal/{funding → routes}/Action.d.ts +12 -1
- package/dist/internal/routes/Action.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Action.js +17 -9
- package/dist/internal/routes/Action.js.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.d.ts +20 -20
- package/dist/internal/routes/Catalog.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.js +29 -29
- package/dist/internal/routes/Catalog.js.map +1 -0
- package/dist/internal/{funding → routes}/Chain.d.ts +10 -10
- package/dist/internal/routes/Chain.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Chain.js +3 -3
- package/dist/internal/routes/Chain.js.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.d.ts +45 -23
- package/dist/internal/routes/Deposit.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.js +60 -27
- package/dist/internal/routes/Deposit.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.d.ts +56 -27
- package/dist/internal/routes/DepositAddress.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.js +95 -33
- package/dist/internal/routes/DepositAddress.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.d.ts +4 -4
- package/dist/internal/routes/DepositWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.js +4 -3
- package/dist/internal/routes/DepositWebhook.js.map +1 -0
- package/dist/internal/routes/Economics.d.ts +25 -0
- package/dist/internal/routes/Economics.d.ts.map +1 -0
- package/dist/internal/routes/Economics.js +28 -0
- package/dist/internal/routes/Economics.js.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.d.ts +3 -3
- package/dist/internal/routes/Evidence.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.js +9 -17
- package/dist/internal/routes/Evidence.js.map +1 -0
- package/dist/internal/routes/Observability.d.ts +154 -0
- package/dist/internal/routes/Observability.d.ts.map +1 -0
- package/dist/internal/routes/Observability.js +389 -0
- package/dist/internal/routes/Observability.js.map +1 -0
- package/dist/internal/{funding → routes}/Provider.d.ts +350 -104
- package/dist/internal/routes/Provider.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Provider.js +233 -97
- package/dist/internal/routes/Provider.js.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.d.ts +11 -6
- package/dist/internal/routes/Reconciliation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.js +408 -158
- package/dist/internal/routes/Reconciliation.js.map +1 -0
- package/dist/internal/routes/Route.d.ts +21 -0
- package/dist/internal/routes/Route.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Route.js +1 -1
- package/dist/internal/routes/Route.js.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.d.ts +6 -6
- package/dist/internal/routes/SourceObservation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.js +13 -15
- package/dist/internal/routes/SourceObservation.js.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.d.ts +48 -3
- package/dist/internal/routes/Subsidy.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.js +43 -3
- package/dist/internal/routes/Subsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/Token.d.ts +4 -4
- package/dist/internal/routes/Token.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Token.js +3 -3
- package/dist/internal/routes/Token.js.map +1 -0
- package/dist/internal/{funding → routes}/Transfer.d.ts +324 -34
- package/dist/internal/routes/Transfer.d.ts.map +1 -0
- package/dist/internal/routes/Transfer.js +728 -0
- package/dist/internal/routes/Transfer.js.map +1 -0
- package/dist/internal/routes/TransferReconciliation.d.ts +55 -0
- package/dist/internal/routes/TransferReconciliation.d.ts.map +1 -0
- package/dist/internal/routes/TransferReconciliation.js +422 -0
- package/dist/internal/routes/TransferReconciliation.js.map +1 -0
- package/dist/internal/routes/TransferSubsidy.d.ts +201 -0
- package/dist/internal/routes/TransferSubsidy.d.ts.map +1 -0
- package/dist/internal/routes/TransferSubsidy.js +256 -0
- package/dist/internal/routes/TransferSubsidy.js.map +1 -0
- package/dist/internal/routes/TransferWebhook.d.ts +21 -0
- package/dist/internal/routes/TransferWebhook.d.ts.map +1 -0
- package/dist/internal/routes/TransferWebhook.js +43 -0
- package/dist/internal/routes/TransferWebhook.js.map +1 -0
- package/dist/internal/{funding → routes}/index.d.ts +3 -0
- package/dist/internal/routes/index.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/index.js +3 -0
- package/dist/internal/routes/index.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.d.ts +4 -4
- package/dist/internal/routes/providers/across.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.js +13 -13
- package/dist/internal/routes/providers/across.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.d.ts +21 -12
- package/dist/internal/routes/providers/relay.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.js +197 -122
- package/dist/internal/routes/providers/relay.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.d.ts +4 -4
- package/dist/internal/routes/providers/rhino.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.js +10 -10
- package/dist/internal/routes/providers/rhino.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.d.ts +4 -4
- package/dist/internal/routes/providers/squid.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.js +14 -14
- package/dist/internal/routes/providers/squid.js.map +1 -0
- package/dist/internal/routes/providers/stargate.d.ts +165 -0
- package/dist/internal/routes/providers/stargate.d.ts.map +1 -0
- package/dist/internal/routes/providers/stargate.js +898 -0
- package/dist/internal/routes/providers/stargate.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.d.ts +4 -4
- package/dist/internal/routes/providers/symbiosis.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.js +30 -20
- package/dist/internal/routes/providers/symbiosis.js.map +1 -0
- package/dist/internal/webhookDestinations/slack.d.ts.map +1 -1
- package/dist/internal/webhookDestinations/slack.js +22 -6
- package/dist/internal/webhookDestinations/slack.js.map +1 -1
- package/dist/providers/index.d.ts +12 -12
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +12 -12
- package/dist/providers/index.js.map +1 -1
- package/dist/server.d.ts +19 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +19 -0
- package/dist/server.js.map +1 -0
- package/package.json +15 -4
- package/src/ApiKey.ts +1 -1
- package/src/ApiKeys.test.ts +1033 -3
- package/src/ApiKeys.ts +489 -48
- package/src/App.test-d.ts +1 -1
- package/src/App.test.ts +216 -25
- package/src/App.ts +335 -31
- package/src/Assets.test.ts +2 -2
- package/src/Assets.ts +3 -1
- package/src/Auth.test-d.ts +1 -1
- package/src/Client.test-d.ts +611 -101
- package/src/Handler.ts +0 -1
- package/src/OpenApi.contract.test.ts +195 -0
- package/src/Scope.ts +17 -5
- package/src/Webhooks.ts +2 -2
- package/src/admin/App.test.ts +30 -2
- package/src/admin/App.ts +42 -6
- package/src/admin/apps/api-keys.test.ts +267 -5
- package/src/admin/apps/api-keys.ts +100 -50
- package/src/admin/apps/earn-vaults.test.ts +158 -0
- package/src/admin/apps/earn-vaults.ts +681 -7
- package/src/admin/apps/organizations.test.ts +342 -1
- package/src/admin/apps/organizations.ts +368 -8
- package/src/admin/apps/routes-support.test.ts +200 -0
- package/src/admin/apps/routes-support.ts +201 -0
- package/src/admin/apps/routes.test.ts +450 -0
- package/src/admin/apps/routes.ts +896 -0
- package/src/admin/apps/scopes.test.ts +15 -5
- package/src/admin/apps/subsidies.test.ts +306 -0
- package/src/admin/apps/subsidies.ts +457 -0
- package/src/admin/apps/verified-tokens.test.ts +8 -3
- package/src/admin/apps/verified-tokens.ts +3 -3
- package/src/admin/ui/plugin.ts +1 -2
- package/src/admin/ui/src/components/RewardCampaignForm.tsx +1009 -0
- package/src/admin/ui/src/lib/config.ts +11 -2
- package/src/admin/ui/src/lib/earn-vaults.ts +2 -2
- package/src/admin/ui/src/lib/organizations.test.ts +147 -3
- package/src/admin/ui/src/lib/organizations.ts +136 -0
- package/src/admin/ui/src/lib/query-client.ts +1 -1
- package/src/admin/ui/src/lib/reward-campaigns.ts +136 -0
- package/src/admin/ui/src/lib/routes.test.ts +88 -0
- package/src/admin/ui/src/lib/routes.ts +304 -0
- package/src/admin/ui/src/lib/subsidies.ts +75 -0
- package/src/admin/ui/src/routeTree.gen.ts +63 -0
- package/src/admin/ui/src/routes/__root.tsx +12 -1
- package/src/admin/ui/src/routes/api-keys.tsx +196 -84
- package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +105 -70
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +334 -2
- package/src/admin/ui/src/routes/routes.tsx +1615 -0
- package/src/admin/ui/src/routes/routes_.support.tsx +248 -0
- package/src/admin/ui/src/routes/subsidies.tsx +799 -0
- package/src/admin/ui.generated.ts +144 -69
- package/src/analytics/Analytics.test.ts +108 -18
- package/src/analytics/Analytics.ts +38 -6
- package/src/analytics/tables/requestEvents.test.ts +100 -0
- package/src/analytics/tables/requestEvents.ts +10 -1
- package/src/analytics/tables/routesLifecycleIntervals.ts +140 -0
- package/src/apps/Zones.test.ts +18 -3
- package/src/apps/Zones.ts +55 -8
- package/src/apps/composition.test.ts +68 -59
- package/src/apps/data/App.test.ts +154 -2
- package/src/apps/data/App.ts +102 -33
- package/src/apps/data/routes/activities.test.ts +419 -7
- package/src/apps/data/routes/activities.ts +683 -216
- package/src/apps/data/routes/balances.test.ts +2 -2
- package/src/apps/data/routes/blocks.test.ts +46 -1
- package/src/apps/data/routes/coingecko.test.ts +419 -1
- package/src/apps/data/routes/coingecko.ts +309 -253
- package/src/apps/data/routes/earn.discovery.test.ts +274 -0
- package/src/apps/data/routes/earn.test.ts +1661 -29
- package/src/apps/data/routes/earn.ts +2314 -328
- package/src/apps/data/routes/exchanges.test.ts +752 -30
- package/src/apps/data/routes/exchanges.ts +954 -753
- package/src/apps/data/routes/fee-amm.test.ts +224 -0
- package/src/apps/data/routes/fee-amm.ts +208 -178
- package/src/apps/data/routes/indexer.test.ts +389 -0
- package/src/apps/data/routes/indexer.ts +165 -69
- package/src/apps/data/routes/receipts.test.ts +1 -1
- package/src/apps/data/routes/rpc.test.ts +352 -8
- package/src/apps/data/routes/rpc.ts +407 -219
- package/src/apps/data/routes/rpc.zone.test.ts +340 -0
- package/src/apps/data/routes/tokenlist.test.ts +285 -0
- package/src/apps/data/routes/tokenlist.ts +173 -88
- package/src/apps/data/routes/tokens.test.ts +93 -3
- package/src/apps/data/routes/tokens.ts +39 -23
- package/src/apps/data/routes/transactions.test.ts +1 -1
- package/src/apps/data/routes/transfers.test.ts +56 -24
- package/src/apps/data/routes/transfers.ts +19 -8
- package/src/apps/data/routes/valuation.test.ts +1 -1
- package/src/apps/data/routes/verified-tokens.test.ts +345 -0
- package/src/apps/data/routes/verified-tokens.ts +99 -29
- package/src/apps/data/routes/webhooks.test.ts +659 -81
- package/src/apps/data/routes/webhooks.ts +1104 -817
- package/src/apps/data/routes/zones.test.ts +148 -71
- package/src/apps/data/routes/zones.ts +71 -55
- package/src/apps/docs/reference.ts +2 -2
- package/src/apps/index.ts +1 -1
- package/src/apps/management/App.ts +9 -51
- package/src/apps/management/Billing.test.ts +375 -14
- package/src/apps/management/Billing.ts +283 -34
- package/src/apps/management/routes/api-keys.test.ts +269 -7
- package/src/apps/management/routes/api-keys.ts +61 -20
- package/src/apps/management/routes/billing.test.ts +477 -15
- package/src/apps/management/routes/billing.ts +377 -50
- package/src/apps/management/routes/faucet.test.ts +1 -1
- package/src/apps/management/routes/faucet.ts +1 -1
- package/src/apps/management/routes/invitations.test.ts +270 -3
- package/src/apps/management/routes/invitations.ts +185 -15
- package/src/apps/management/routes/invoicePreview.test.ts +549 -0
- package/src/apps/management/routes/me.test.ts +246 -5
- package/src/apps/management/routes/me.ts +7 -2
- package/src/apps/management/routes/members.test.ts +108 -0
- package/src/apps/management/routes/orgs.test.ts +191 -3
- package/src/apps/management/routes/orgs.ts +58 -11
- package/src/apps/management/routes/projects.test.ts +33 -3
- package/src/apps/management/routes/projects.ts +6 -1
- package/src/apps/management/routes/scopes.test.ts +30 -2
- package/src/apps/management/routes/scopes.ts +4 -1
- package/src/apps/management/routes/usage.test.ts +32 -0
- package/src/apps/management/routes/usage.ts +22 -4
- package/src/apps/management/routes/webhooks.test.ts +49 -26
- package/src/apps/management/routes/webhooks.ts +93 -38
- package/src/apps/mcp.test.ts +6 -6
- package/src/apps/mcp.ts +7 -7
- package/src/apps/mpp/App.ts +37 -7
- package/src/apps/mpp/Mpp.test.ts +49 -8
- package/src/apps/mpp/Mpp.zone.test.ts +219 -0
- package/src/apps/mpp/internal/Adapter.ts +34 -0
- package/src/apps/mpp/internal/Policy.test.ts +86 -31
- package/src/apps/mpp/internal/Policy.ts +49 -7
- package/src/apps/mpp/internal/Sponsorship.test.ts +207 -0
- package/src/apps/mpp/internal/Sponsorship.ts +9 -3
- package/src/apps/relay/App.test.ts +1024 -38
- package/src/apps/relay/App.ts +228 -32
- package/src/apps/relay/App.zone-billing.test.ts +257 -0
- package/src/apps/relay/Sponsorships.test.ts +67 -4
- package/src/apps/relay/Sponsorships.ts +253 -29
- package/src/apps/relay/Sponsorships.zone.test.ts +102 -0
- package/src/apps/{funding → routes}/Access.ts +6 -6
- package/src/apps/routes/App.test.ts +165 -0
- package/src/apps/routes/App.ts +96 -0
- package/src/apps/{funding → routes}/Inventory.ts +2 -2
- package/src/apps/routes/index.ts +1 -0
- package/src/apps/{funding → routes}/routes/chains.test.ts +66 -66
- package/src/apps/{funding → routes}/routes/chains.ts +23 -23
- package/src/apps/{funding → routes}/routes/deposit-addresses.test.ts +1362 -462
- package/src/apps/{funding → routes}/routes/deposit-addresses.ts +568 -248
- package/src/apps/{funding → routes}/routes/providers.test.ts +27 -33
- package/src/apps/{funding → routes}/routes/providers.ts +23 -23
- package/src/apps/{funding → routes}/routes/quotes.test.ts +298 -41
- package/src/apps/{funding → routes}/routes/quotes.ts +57 -40
- package/src/apps/routes/routes/transfers.test.ts +2876 -0
- package/src/apps/routes/routes/transfers.ts +1332 -0
- package/src/cli/Cli.test.ts +1 -1
- package/src/cli/commands/admin.test.ts +748 -1
- package/src/cli/commands/admin.ts +278 -0
- package/src/cloudflare.ts +52 -47
- package/src/db/Db.test.ts +245 -2
- package/src/db/Db.ts +1511 -34
- package/src/db/Schema.ts +744 -228
- package/src/db/tables/apiKeyAdmissionBootstraps.ts +4 -0
- package/src/db/tables/apiKeyAdmissions.ts +218 -0
- package/src/db/tables/apiKeyOwnerAdmissions.ts +4 -0
- package/src/db/tables/apiKeyOwnerTombstones.ts +81 -0
- package/src/db/tables/apiKeyRevocations.test.ts +74 -0
- package/src/db/tables/apiKeyRevocations.ts +121 -0
- package/src/db/tables/authAccounts.ts +105 -0
- package/src/db/tables/authSessions.ts +13 -0
- package/src/db/tables/authVerifications.ts +13 -0
- package/src/db/tables/invitations.ts +142 -45
- package/src/db/tables/memberships.ts +79 -3
- package/src/db/tables/organizations.test.ts +725 -7
- package/src/db/tables/organizations.ts +182 -49
- package/src/db/tables/projects.test.ts +71 -0
- package/src/db/tables/projects.ts +59 -4
- package/src/db/tables/requestUsage.ts +4 -1
- package/src/db/tables/rewardAccounts.ts +178 -0
- package/src/db/tables/rewardCampaignDistributors.ts +68 -0
- package/src/db/tables/rewardCampaigns.test.ts +1388 -0
- package/src/db/tables/rewardCampaigns.ts +647 -0
- package/src/db/tables/rewardCredits.ts +110 -0
- package/src/db/tables/rewardEligibilityAssociations.test.ts +271 -0
- package/src/db/tables/rewardEligibilityAssociations.ts +184 -0
- package/src/db/tables/rewardRuns.ts +514 -0
- package/src/db/tables/rewardTransactionAttempts.ts +272 -0
- package/src/db/tables/routesCatalog.test.ts +185 -0
- package/src/db/tables/routesCatalog.ts +163 -0
- package/src/db/tables/routesDepositAddresses.test.ts +1048 -0
- package/src/db/tables/routesDepositAddresses.ts +1008 -0
- package/src/db/tables/{fundingDepositRequestObservations.test.ts → routesDepositRequestObservations.test.ts} +13 -14
- package/src/db/tables/{fundingDepositRequestObservations.ts → routesDepositRequestObservations.ts} +10 -10
- package/src/db/tables/{fundingDeposits.test.ts → routesDeposits.test.ts} +316 -46
- package/src/db/tables/routesDeposits.ts +1062 -0
- package/src/db/tables/routesIdempotency.test.ts +796 -0
- package/src/db/tables/routesIdempotency.ts +496 -0
- package/src/db/tables/routesSubsidies.test.ts +120 -0
- package/src/db/tables/routesSubsidies.ts +71 -0
- package/src/db/tables/{fundingTransferEvents.ts → routesTransferEvents.ts} +4 -4
- package/src/db/tables/routesTransferSubsidies.ts +38 -0
- package/src/db/tables/routesTransferSubsidyNonces.ts +124 -0
- package/src/db/tables/routesTransferTransactions.test.ts +195 -0
- package/src/db/tables/routesTransferTransactions.ts +158 -0
- package/src/db/tables/routesTransfers.test.ts +338 -0
- package/src/db/tables/routesTransfers.ts +662 -0
- package/src/db/tables/sponsoredTransactions.test.ts +563 -1
- package/src/db/tables/sponsoredTransactions.ts +386 -42
- package/src/db/tables/sponsorshipAttributions.test.ts +160 -0
- package/src/db/tables/sponsorshipAttributions.ts +168 -0
- package/src/db/tables/sponsorshipReconciliationCursors.test.ts +115 -0
- package/src/db/tables/sponsorshipReconciliationCursors.ts +67 -0
- package/src/db/tables/stripeCustomers.test.ts +85 -0
- package/src/db/tables/stripeCustomers.ts +24 -0
- package/src/db/tables/users.test.ts +129 -0
- package/src/db/tables/users.ts +49 -3
- package/src/db/tables/webhookQueueEvents.ts +8 -1
- package/src/db/tables/webhookSubscriptions.ts +103 -21
- package/src/handlers/internal/executionError.ts +3 -4
- package/src/handlers/internal/multisig.ts +13 -816
- package/src/handlers/internal/sponsorship.ts +26 -10
- package/src/handlers/relay.test-d.ts +9 -1
- package/src/handlers/relay.test.ts +823 -3
- package/src/handlers/relay.ts +127 -107
- package/src/index.test-d.ts +7 -0
- package/src/index.ts +0 -17
- package/src/internal/AssetResponse.ts +26 -0
- package/src/internal/Auth.test.ts +1564 -9
- package/src/internal/Auth.ts +833 -239
- package/src/internal/BetterAuth.test.ts +242 -0
- package/src/internal/BetterAuth.ts +349 -0
- package/src/internal/Cache.ts +2 -0
- package/src/internal/EarnRates.test.ts +17 -0
- package/src/internal/EarnRates.ts +124 -31
- package/src/internal/EarnSharePrices.test.ts +182 -0
- package/src/internal/EarnSharePrices.ts +313 -0
- package/src/internal/EarnVaults.test.ts +21 -0
- package/src/internal/EarnVaults.ts +37 -15
- package/src/internal/Email.ts +54 -0
- package/src/internal/Idempotency.test.ts +2 -2
- package/src/internal/Log.test-d.ts +10 -7
- package/src/internal/Log.test.ts +114 -16
- package/src/internal/Log.ts +55 -40
- package/src/internal/MetricSink.test.ts +313 -26
- package/src/internal/MetricSink.ts +73 -8
- package/src/internal/Mpp.test.ts +31 -0
- package/src/internal/Mpp.ts +21 -24
- package/src/internal/OpenApi.ts +45 -12
- package/src/internal/Provider.test.ts +1 -1
- package/src/internal/Provider.ts +1 -1
- package/src/internal/RateLimit.test.ts +21 -3
- package/src/internal/RateLimit.ts +12 -1
- package/src/internal/Store.test-d.ts +1 -1
- package/src/internal/Store.test.ts +151 -8
- package/src/internal/Store.ts +76 -9
- package/src/internal/Tidx.test.ts +59 -8
- package/src/internal/Tidx.ts +86 -14
- package/src/internal/Timing.test.ts +77 -0
- package/src/internal/Timing.ts +83 -6
- package/src/internal/VercelOidc.test.ts +188 -0
- package/src/internal/VercelOidc.ts +193 -0
- package/src/internal/VerifiedTokens.test.ts +60 -6
- package/src/internal/VerifiedTokens.ts +21 -24
- package/src/internal/Viem.batch.test.ts +80 -0
- package/src/internal/Viem.test.ts +201 -2
- package/src/internal/Viem.ts +249 -17
- package/src/internal/Webhooks.test.ts +125 -1
- package/src/internal/Webhooks.ts +22 -4
- package/src/internal/ZoneRpc.ts +50 -0
- package/src/internal/exchange/Provider.test.ts +2 -2
- package/src/internal/index.test.ts +3 -1
- package/src/internal/index.ts +3 -1
- package/src/internal/rewards/Audit.ts +231 -0
- package/src/internal/rewards/Campaigns.test.ts +1234 -0
- package/src/internal/rewards/Campaigns.ts +1205 -0
- package/src/internal/rewards/Credits.ts +165 -0
- package/src/internal/rewards/Events.local.test.ts +113 -0
- package/src/internal/rewards/Events.test.ts +152 -0
- package/src/internal/rewards/Events.ts +468 -0
- package/src/internal/rewards/Projection.test.ts +681 -0
- package/src/internal/rewards/Projection.ts +987 -0
- package/src/internal/rewards/Rates.test.ts +171 -0
- package/src/internal/rewards/Rates.ts +110 -0
- package/src/internal/rewards/Read.test.ts +501 -0
- package/src/internal/rewards/Read.ts +476 -0
- package/src/internal/rewards/Runner.checkpoint.test.ts +80 -0
- package/src/internal/rewards/Runner.states.test.ts +188 -0
- package/src/internal/rewards/Runner.test.ts +90 -0
- package/src/internal/rewards/Runner.ts +2229 -0
- package/src/internal/rewards/Signer.test.ts +79 -0
- package/src/internal/rewards/Signer.ts +180 -0
- package/src/internal/rewards/index.ts +14 -0
- package/src/internal/{funding → routes}/Action.test.ts +63 -14
- package/src/internal/{funding → routes}/Action.ts +35 -8
- package/src/internal/{funding → routes}/Catalog.test.ts +3 -3
- package/src/internal/{funding → routes}/Catalog.ts +39 -39
- package/src/internal/{funding → routes}/Chain.test.ts +1 -1
- package/src/internal/{funding → routes}/Chain.ts +11 -11
- package/src/internal/{funding → routes}/Deposit.test.ts +1 -1
- package/src/internal/{funding → routes}/Deposit.ts +93 -45
- package/src/internal/{funding → routes}/DepositAddress.test.ts +11 -3
- package/src/internal/{funding → routes}/DepositAddress.ts +132 -53
- package/src/internal/{funding → routes}/DepositWebhook.test.ts +61 -18
- package/src/internal/{funding → routes}/DepositWebhook.ts +9 -8
- package/src/internal/routes/Economics.test.ts +42 -0
- package/src/internal/routes/Economics.ts +47 -0
- package/src/internal/{funding → routes}/Evidence.test.ts +6 -6
- package/src/internal/{funding → routes}/Evidence.ts +11 -22
- package/src/internal/routes/Observability.test.ts +636 -0
- package/src/internal/routes/Observability.ts +668 -0
- package/src/internal/{funding → routes}/Provider.test.ts +489 -153
- package/src/internal/{funding → routes}/Provider.ts +531 -185
- package/src/internal/{funding → routes}/Reconciliation.local.test.ts +84 -12
- package/src/internal/{funding → routes}/Reconciliation.test.ts +1213 -279
- package/src/internal/{funding → routes}/Reconciliation.ts +501 -203
- package/src/internal/routes/Reconciliation.unattributed.test.ts +250 -0
- package/src/internal/{funding → routes}/Route.ts +7 -7
- package/src/internal/{funding → routes}/SourceObservation.test.ts +13 -14
- package/src/internal/{funding → routes}/SourceObservation.ts +18 -22
- package/src/internal/{funding → routes}/Subsidy.local.test.ts +7 -7
- package/src/internal/routes/Subsidy.test.ts +169 -0
- package/src/internal/{funding → routes}/Subsidy.ts +86 -6
- package/src/internal/{funding → routes}/Token.test.ts +1 -1
- package/src/internal/{funding → routes}/Token.ts +5 -5
- package/src/internal/routes/Transfer.test.ts +1199 -0
- package/src/internal/routes/Transfer.ts +1206 -0
- package/src/internal/routes/TransferReconciliation.test.ts +731 -0
- package/src/internal/routes/TransferReconciliation.ts +527 -0
- package/src/internal/routes/TransferSubsidy.test.ts +172 -0
- package/src/internal/routes/TransferSubsidy.ts +447 -0
- package/src/internal/routes/TransferWebhook.test.ts +128 -0
- package/src/internal/routes/TransferWebhook.ts +67 -0
- package/src/internal/{funding → routes}/index.test.ts +6 -3
- package/src/internal/{funding → routes}/index.ts +3 -0
- package/src/internal/{funding → routes}/providers/across.ts +16 -16
- package/src/internal/{funding → routes}/providers/index.test.ts +157 -44
- package/src/internal/{funding → routes}/providers/relay.test.ts +165 -32
- package/src/internal/{funding → routes}/providers/relay.ts +231 -136
- package/src/internal/{funding → routes}/providers/rhino.ts +16 -16
- package/src/internal/{funding → routes}/providers/squid.ts +17 -17
- package/src/internal/routes/providers/stargate.test.ts +728 -0
- package/src/internal/routes/providers/stargate.ts +1276 -0
- package/src/internal/{funding → routes}/providers/symbiosis.ts +64 -24
- package/src/internal/webhookDestinations/slack.ts +20 -5
- package/src/providers/index.ts +13 -13
- package/src/server.ts +18 -0
- package/dist/apps/funding/Access.d.ts.map +0 -1
- package/dist/apps/funding/Access.js.map +0 -1
- package/dist/apps/funding/App.js.map +0 -1
- package/dist/apps/funding/Inventory.d.ts.map +0 -1
- package/dist/apps/funding/Inventory.js.map +0 -1
- package/dist/apps/funding/ProviderAttempts.d.ts +0 -5
- package/dist/apps/funding/ProviderAttempts.d.ts.map +0 -1
- package/dist/apps/funding/ProviderAttempts.js +0 -24
- package/dist/apps/funding/ProviderAttempts.js.map +0 -1
- package/dist/apps/funding/index.d.ts +0 -2
- package/dist/apps/funding/index.d.ts.map +0 -1
- package/dist/apps/funding/index.js +0 -2
- package/dist/apps/funding/index.js.map +0 -1
- package/dist/apps/funding/routes/chains.d.ts.map +0 -1
- package/dist/apps/funding/routes/chains.js.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.d.ts.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.js.map +0 -1
- package/dist/apps/funding/routes/providers.d.ts.map +0 -1
- package/dist/apps/funding/routes/providers.js +0 -57
- package/dist/apps/funding/routes/providers.js.map +0 -1
- package/dist/apps/funding/routes/quotes.d.ts.map +0 -1
- package/dist/apps/funding/routes/quotes.js.map +0 -1
- package/dist/apps/funding/routes/transfers.d.ts.map +0 -1
- package/dist/apps/funding/routes/transfers.js +0 -622
- package/dist/apps/funding/routes/transfers.js.map +0 -1
- package/dist/db/tables/fundingCatalog.d.ts +0 -58
- package/dist/db/tables/fundingCatalog.d.ts.map +0 -1
- package/dist/db/tables/fundingCatalog.js.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.d.ts +0 -192
- package/dist/db/tables/fundingDepositAddresses.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.js +0 -235
- package/dist/db/tables/fundingDepositAddresses.js.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.js.map +0 -1
- package/dist/db/tables/fundingDeposits.d.ts.map +0 -1
- package/dist/db/tables/fundingDeposits.js +0 -295
- package/dist/db/tables/fundingDeposits.js.map +0 -1
- package/dist/db/tables/fundingIdempotency.d.ts +0 -91
- package/dist/db/tables/fundingIdempotency.d.ts.map +0 -1
- package/dist/db/tables/fundingIdempotency.js +0 -103
- package/dist/db/tables/fundingIdempotency.js.map +0 -1
- package/dist/db/tables/fundingTransferEvents.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferEvents.js.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.d.ts +0 -15
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.js +0 -27
- package/dist/db/tables/fundingTransferTransactions.js.map +0 -1
- package/dist/db/tables/fundingTransfers.d.ts +0 -82
- package/dist/db/tables/fundingTransfers.d.ts.map +0 -1
- package/dist/db/tables/fundingTransfers.js +0 -89
- package/dist/db/tables/fundingTransfers.js.map +0 -1
- package/dist/internal/funding/Action.d.ts.map +0 -1
- package/dist/internal/funding/Action.js.map +0 -1
- package/dist/internal/funding/Catalog.d.ts.map +0 -1
- package/dist/internal/funding/Catalog.js.map +0 -1
- package/dist/internal/funding/Chain.d.ts.map +0 -1
- package/dist/internal/funding/Chain.js.map +0 -1
- package/dist/internal/funding/Deposit.d.ts.map +0 -1
- package/dist/internal/funding/Deposit.js.map +0 -1
- package/dist/internal/funding/DepositAddress.d.ts.map +0 -1
- package/dist/internal/funding/DepositAddress.js.map +0 -1
- package/dist/internal/funding/DepositWebhook.d.ts.map +0 -1
- package/dist/internal/funding/DepositWebhook.js.map +0 -1
- package/dist/internal/funding/Evidence.d.ts.map +0 -1
- package/dist/internal/funding/Evidence.js.map +0 -1
- package/dist/internal/funding/Provider.d.ts.map +0 -1
- package/dist/internal/funding/Provider.js.map +0 -1
- package/dist/internal/funding/Reconciliation.d.ts.map +0 -1
- package/dist/internal/funding/Reconciliation.js.map +0 -1
- package/dist/internal/funding/Route.d.ts +0 -21
- package/dist/internal/funding/Route.d.ts.map +0 -1
- package/dist/internal/funding/Route.js.map +0 -1
- package/dist/internal/funding/SourceObservation.d.ts.map +0 -1
- package/dist/internal/funding/SourceObservation.js.map +0 -1
- package/dist/internal/funding/Subsidy.d.ts.map +0 -1
- package/dist/internal/funding/Subsidy.js.map +0 -1
- package/dist/internal/funding/Token.d.ts.map +0 -1
- package/dist/internal/funding/Token.js.map +0 -1
- package/dist/internal/funding/Transfer.d.ts.map +0 -1
- package/dist/internal/funding/Transfer.js +0 -334
- package/dist/internal/funding/Transfer.js.map +0 -1
- package/dist/internal/funding/index.d.ts.map +0 -1
- package/dist/internal/funding/index.js.map +0 -1
- package/dist/internal/funding/providers/across.d.ts.map +0 -1
- package/dist/internal/funding/providers/across.js.map +0 -1
- package/dist/internal/funding/providers/relay.d.ts.map +0 -1
- package/dist/internal/funding/providers/relay.js.map +0 -1
- package/dist/internal/funding/providers/rhino.d.ts.map +0 -1
- package/dist/internal/funding/providers/rhino.js.map +0 -1
- package/dist/internal/funding/providers/squid.d.ts.map +0 -1
- package/dist/internal/funding/providers/squid.js.map +0 -1
- package/dist/internal/funding/providers/stargate.d.ts +0 -38
- package/dist/internal/funding/providers/stargate.d.ts.map +0 -1
- package/dist/internal/funding/providers/stargate.js +0 -277
- package/dist/internal/funding/providers/stargate.js.map +0 -1
- package/dist/internal/funding/providers/symbiosis.d.ts.map +0 -1
- package/dist/internal/funding/providers/symbiosis.js.map +0 -1
- package/src/apps/funding/App.test.ts +0 -78
- package/src/apps/funding/App.ts +0 -78
- package/src/apps/funding/ProviderAttempts.ts +0 -26
- package/src/apps/funding/index.ts +0 -1
- package/src/apps/funding/routes/transfers.test.ts +0 -1638
- package/src/apps/funding/routes/transfers.ts +0 -721
- package/src/db/tables/fundingCatalog.test.ts +0 -122
- package/src/db/tables/fundingCatalog.ts +0 -163
- package/src/db/tables/fundingDepositAddresses.test.ts +0 -608
- package/src/db/tables/fundingDepositAddresses.ts +0 -443
- package/src/db/tables/fundingDeposits.ts +0 -572
- package/src/db/tables/fundingIdempotency.test.ts +0 -182
- package/src/db/tables/fundingIdempotency.ts +0 -180
- package/src/db/tables/fundingTransferTransactions.test.ts +0 -69
- package/src/db/tables/fundingTransferTransactions.ts +0 -37
- package/src/db/tables/fundingTransfers.test.ts +0 -89
- package/src/db/tables/fundingTransfers.ts +0 -153
- package/src/handlers/internal/multisig.test.ts +0 -818
- package/src/internal/funding/Subsidy.test.ts +0 -75
- package/src/internal/funding/Transfer.test.ts +0 -369
- package/src/internal/funding/Transfer.ts +0 -545
- package/src/internal/funding/providers/stargate.test.ts +0 -163
- package/src/internal/funding/providers/stargate.ts +0 -409
- /package/dist/apps/{funding → routes}/Inventory.d.ts +0 -0
- /package/src/internal/{funding → routes}/Route.test.ts +0 -0
|
@@ -17,7 +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
|
|
20
|
+
import * as RoutesDeposit from '../../../internal/routes/Deposit.js'
|
|
21
|
+
import * as RoutesTransfer from '../../../internal/routes/Transfer.js'
|
|
21
22
|
import * as Transactions from './transactions.js'
|
|
22
23
|
import * as Transfers from './transfers.js'
|
|
23
24
|
|
|
@@ -41,7 +42,8 @@ const redactedSlackUrl = 'https://hooks.slack.com/…'
|
|
|
41
42
|
*/
|
|
42
43
|
export const eventTypes = [
|
|
43
44
|
'block:created',
|
|
44
|
-
'
|
|
45
|
+
'routes:deposit.updated',
|
|
46
|
+
'routes:transfer.updated',
|
|
45
47
|
'log:emitted',
|
|
46
48
|
'token:transfer',
|
|
47
49
|
'transaction:included',
|
|
@@ -50,6 +52,20 @@ export const eventTypes = [
|
|
|
50
52
|
/** Event types a subscription can listen to. Derived from {@link eventTypes}. */
|
|
51
53
|
export type EventType = (typeof eventTypes)[number]
|
|
52
54
|
|
|
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
|
+
] as const satisfies readonly EventType[]
|
|
60
|
+
|
|
61
|
+
/** Event type carrying an owner-scoped route resource. */
|
|
62
|
+
export type RoutesEventType = (typeof routesEventTypes)[number]
|
|
63
|
+
|
|
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
|
+
}
|
|
68
|
+
|
|
53
69
|
/** Subscribable event types surfaced by `GET /webhooks/event-types`. */
|
|
54
70
|
const eventTypeDescriptions = [
|
|
55
71
|
{
|
|
@@ -59,8 +75,13 @@ const eventTypeDescriptions = [
|
|
|
59
75
|
},
|
|
60
76
|
{
|
|
61
77
|
description:
|
|
62
|
-
'A
|
|
63
|
-
type: '
|
|
78
|
+
'A route deposit materially changed after verified reconciliation, filterable by deposit address, recipient, or status.',
|
|
79
|
+
type: 'routes:deposit.updated',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
description:
|
|
83
|
+
'A route transfer materially changed, filterable by transfer ID or lifecycle status.',
|
|
84
|
+
type: 'routes:transfer.updated',
|
|
64
85
|
},
|
|
65
86
|
{
|
|
66
87
|
description:
|
|
@@ -81,7 +102,10 @@ const eventTypeDescriptions = [
|
|
|
81
102
|
/** Zod schemas owned by the webhooks resource. */
|
|
82
103
|
export namespace schema {
|
|
83
104
|
/** Subscribable event type. */
|
|
84
|
-
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
|
+
)
|
|
85
109
|
|
|
86
110
|
/** Subscription lifecycle status. */
|
|
87
111
|
export const Status = z
|
|
@@ -137,19 +161,19 @@ export namespace schema {
|
|
|
137
161
|
* your Slack incoming-webhook URL), or a `betterstack` destination (a structured
|
|
138
162
|
* log event POSTed to a Better Stack source with a bearer source token).
|
|
139
163
|
*/
|
|
140
|
-
const
|
|
164
|
+
const DestinationSchema = z
|
|
141
165
|
.discriminatedUnion('type', [
|
|
142
166
|
z.object({
|
|
143
|
-
type: z.literal('url'),
|
|
167
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
144
168
|
url: Url,
|
|
145
169
|
}),
|
|
146
170
|
z.object({
|
|
147
|
-
type: z.literal('slack'),
|
|
171
|
+
type: z.literal('slack').check(z.meta({ examples: ['slack'] })),
|
|
148
172
|
url: SlackUrl,
|
|
149
173
|
}),
|
|
150
174
|
z.object({
|
|
151
175
|
token: BetterstackToken,
|
|
152
|
-
type: z.literal('betterstack'),
|
|
176
|
+
type: z.literal('betterstack').check(z.meta({ examples: ['betterstack'] })),
|
|
153
177
|
url: BetterstackUrl,
|
|
154
178
|
}),
|
|
155
179
|
])
|
|
@@ -157,27 +181,41 @@ export namespace schema {
|
|
|
157
181
|
z.describe(
|
|
158
182
|
'Delivery destination: an HTTPS URL, a Slack incoming-webhook URL, or a Better Stack source.',
|
|
159
183
|
),
|
|
184
|
+
z.meta({ examples: [{ type: 'url', url: 'https://example.com/webhooks' }] }),
|
|
160
185
|
)
|
|
186
|
+
const Destination = OpenApi.component(DestinationSchema, 'WebhookDestination')
|
|
161
187
|
|
|
162
|
-
const
|
|
188
|
+
const PublicDestinationSchema = z
|
|
163
189
|
.discriminatedUnion('type', [
|
|
164
190
|
z.object({
|
|
165
|
-
type: z.literal('url'),
|
|
191
|
+
type: z.literal('url').check(z.meta({ examples: ['url'] })),
|
|
166
192
|
url: Url,
|
|
167
193
|
}),
|
|
168
194
|
z.object({
|
|
169
|
-
type: z.literal('slack'),
|
|
170
|
-
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
|
+
),
|
|
171
202
|
}),
|
|
172
203
|
z.object({
|
|
173
204
|
token: z
|
|
174
205
|
.literal(redactedBetterstackToken)
|
|
175
|
-
.check(
|
|
176
|
-
|
|
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'] })),
|
|
177
211
|
url: BetterstackUrl,
|
|
178
212
|
}),
|
|
179
213
|
])
|
|
180
|
-
.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')
|
|
181
219
|
|
|
182
220
|
/**
|
|
183
221
|
* Equality / membership operator for a filterable field. A consumer can pass a
|
|
@@ -212,7 +250,10 @@ export namespace schema {
|
|
|
212
250
|
lt: z.optional(Schema.Quantity),
|
|
213
251
|
lte: z.optional(Schema.Quantity),
|
|
214
252
|
})
|
|
215
|
-
.check(
|
|
253
|
+
.check(
|
|
254
|
+
z.refine((c) => Object.keys(c).length > 0, { error: 'Comparison cannot be empty.' }),
|
|
255
|
+
z.meta({ examples: [{ gte: '0x1' }] }),
|
|
256
|
+
),
|
|
216
257
|
])
|
|
217
258
|
|
|
218
259
|
/**
|
|
@@ -232,9 +273,11 @@ export namespace schema {
|
|
|
232
273
|
* drift. All are optional and AND-combined; omit every field to subscribe to
|
|
233
274
|
* the full stream.
|
|
234
275
|
*/
|
|
235
|
-
export const TransferFilters =
|
|
236
|
-
|
|
237
|
-
|
|
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',
|
|
238
281
|
)
|
|
239
282
|
|
|
240
283
|
/**
|
|
@@ -246,80 +289,88 @@ export namespace schema {
|
|
|
246
289
|
* `address` matches either side (`from` OR `to`); when `includeCalls` is set
|
|
247
290
|
* (default), `to`/`address` also match an inner call target (`calls[].to`).
|
|
248
291
|
*/
|
|
249
|
-
export const TxFilters =
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
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
|
+
),
|
|
257
299
|
),
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
to: z.optional(
|
|
263
|
-
eq(Schema.Address).check(
|
|
264
|
-
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
|
+
),
|
|
265
304
|
),
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
.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(
|
|
271
326
|
z.describe(
|
|
272
|
-
'
|
|
327
|
+
'Match top-level calldata by 4-byte `selector`, hex `startsWith`, or exact.',
|
|
273
328
|
),
|
|
274
|
-
z.meta({ examples: [true] }),
|
|
275
329
|
),
|
|
276
|
-
),
|
|
277
|
-
value: z.optional(compare.check(z.describe('Match the transaction value (wei) bounds.'))),
|
|
278
|
-
input: z.optional(
|
|
279
|
-
bytes.check(
|
|
280
|
-
z.describe('Match top-level calldata by 4-byte `selector`, hex `startsWith`, or exact.'),
|
|
281
330
|
),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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
|
+
),
|
|
291
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).'),
|
|
292
348
|
),
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
})
|
|
319
|
-
.check(
|
|
320
|
-
z.describe('Filters that narrow which included transactions trigger this webhook.'),
|
|
321
|
-
z.meta({ title: 'Included-transaction filters' }),
|
|
322
|
-
)
|
|
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
|
+
)
|
|
323
374
|
|
|
324
375
|
/** A 32-byte log topic (lowercased hex). */
|
|
325
376
|
const topic = Schema.Hash
|
|
@@ -332,87 +383,92 @@ export namespace schema {
|
|
|
332
383
|
* firehose), and an addressless filter must still be selective — an event
|
|
333
384
|
* anchor (`signature`/`topic0`) plus at least one indexed topic or argument.
|
|
334
385
|
*/
|
|
335
|
-
export const LogFilters =
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
+
),
|
|
341
394
|
),
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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
|
+
}),
|
|
347
403
|
),
|
|
348
|
-
z.meta({
|
|
349
|
-
examples: ['event Transfer(address indexed from, address indexed to, uint256 value)'],
|
|
350
|
-
}),
|
|
351
404
|
),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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
|
+
),
|
|
359
412
|
),
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
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
|
+
),
|
|
367
420
|
),
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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
|
+
),
|
|
375
428
|
),
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
+
),
|
|
383
436
|
),
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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' }] }),
|
|
391
445
|
),
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
+
}),
|
|
397
469
|
),
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
z.describe('Filters that narrow which contract event logs trigger this webhook.'),
|
|
401
|
-
z.meta({ title: 'Log filters' }),
|
|
402
|
-
z.refine((f) => Object.keys(f).length > 0, {
|
|
403
|
-
error: 'At least one log filter is required.',
|
|
404
|
-
}),
|
|
405
|
-
z.refine((f) => !(f.signature && f.topic0), {
|
|
406
|
-
error: 'Pass `signature` or `topic0`, not both.',
|
|
407
|
-
}),
|
|
408
|
-
z.refine((f) => !f.args || f.signature, {
|
|
409
|
-
error: '`args` requires `signature` to decode the event.',
|
|
410
|
-
}),
|
|
411
|
-
z.refine((f) => hasLogPushdown(f), {
|
|
412
|
-
error:
|
|
413
|
-
'Log filters must include a pushdown-capable address or an event/topic0 anchor plus an indexed topic or argument.',
|
|
414
|
-
}),
|
|
415
|
-
)
|
|
470
|
+
'WebhookLogFilters',
|
|
471
|
+
)
|
|
416
472
|
|
|
417
473
|
/**
|
|
418
474
|
* `block:created` subscription filters. All optional and AND-combined; unlike
|
|
@@ -420,166 +476,187 @@ export namespace schema {
|
|
|
420
476
|
* non-abusive heartbeat feed. Block-level metadata only (no transaction
|
|
421
477
|
* predicates; use `transaction:included` for those).
|
|
422
478
|
*/
|
|
423
|
-
export const BlockFilters =
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
miner: z.optional(
|
|
429
|
-
eq(Schema.Address).check(
|
|
430
|
-
z.describe('Only match blocks produced by this address (the miner/producer).'),
|
|
431
|
-
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.')),
|
|
432
484
|
),
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
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
|
+
),
|
|
437
490
|
),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
gasLimit: z.optional(
|
|
443
|
-
compare.check(z.describe('Only match blocks whose gas limit is within these bounds.')),
|
|
444
|
-
),
|
|
445
|
-
timestamp: z.optional(
|
|
446
|
-
compare.check(
|
|
447
|
-
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
|
+
),
|
|
448
495
|
),
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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
|
+
)
|
|
455
513
|
|
|
456
|
-
/** `
|
|
457
|
-
export const
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
z.describe('Filters that narrow which
|
|
465
|
-
|
|
466
|
-
|
|
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
|
+
)
|
|
525
|
+
|
|
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
|
+
)
|
|
467
536
|
|
|
468
537
|
/**
|
|
469
538
|
* Optional human context describing what a subscription is for. Surfaced by
|
|
470
539
|
* destinations (Slack header + description, Better Stack log fields) and echoed
|
|
471
540
|
* on every delivered event envelope.
|
|
472
541
|
*/
|
|
473
|
-
export const Context =
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
z
|
|
477
|
-
|
|
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()
|
|
478
597
|
.check(
|
|
479
|
-
z.
|
|
480
|
-
z.
|
|
481
|
-
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'] }),
|
|
482
600
|
),
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
.
|
|
487
|
-
z.
|
|
488
|
-
z.
|
|
489
|
-
)
|
|
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())
|
|
490
611
|
.check(
|
|
491
|
-
z.refine((m) => Object.keys(m).length <= 20, {
|
|
492
|
-
error: 'At most 20 metadata entries are allowed.',
|
|
493
|
-
}),
|
|
494
612
|
z.describe(
|
|
495
|
-
'
|
|
613
|
+
'When the subscription expires, as an ISO 8601 timestamp. Only MPP-paid subscriptions expire.',
|
|
496
614
|
),
|
|
497
|
-
z.meta({ examples: [
|
|
615
|
+
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
498
616
|
),
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
z
|
|
502
|
-
.string()
|
|
617
|
+
failureCount: z
|
|
618
|
+
.number()
|
|
503
619
|
.check(
|
|
504
|
-
z.
|
|
505
|
-
z.
|
|
506
|
-
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] }),
|
|
507
626
|
),
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Public subscription representation. Never includes the signing `secret`
|
|
514
|
-
* (returned once by `POST /webhooks`) or the internal owner.
|
|
515
|
-
*/
|
|
516
|
-
export const Subscription = z
|
|
517
|
-
.object({
|
|
518
|
-
chainId: chainIdResponse,
|
|
519
|
-
context: z.optional(Context),
|
|
520
|
-
createdAt: z.iso
|
|
521
|
-
.datetime()
|
|
522
|
-
.check(
|
|
523
|
-
z.describe('When the subscription was created, as an ISO 8601 timestamp.'),
|
|
524
|
-
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
525
|
-
),
|
|
526
|
-
destination: PublicDestination,
|
|
527
|
-
environment: z
|
|
528
|
-
.optional(z.enum(['production', 'sandbox']))
|
|
529
|
-
.check(
|
|
530
|
-
z.describe('API-key environment for private resource events, when applicable.'),
|
|
531
|
-
z.meta({ examples: ['production'] }),
|
|
627
|
+
filters: Filters.check(
|
|
628
|
+
z.describe('Filters applied to this event type.'),
|
|
629
|
+
z.meta({ examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }] }),
|
|
532
630
|
),
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
'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'] }),
|
|
539
636
|
),
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
z.describe(
|
|
548
|
-
'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'] }),
|
|
549
644
|
),
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
id: z
|
|
557
|
-
.string()
|
|
558
|
-
.check(
|
|
559
|
-
z.describe('Webhook subscription ID (`wh_…`).'),
|
|
560
|
-
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
561
|
-
),
|
|
562
|
-
lastDeliveryAt: z
|
|
563
|
-
.optional(z.iso.datetime())
|
|
564
|
-
.check(
|
|
565
|
-
z.describe(
|
|
566
|
-
'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'] }),
|
|
567
651
|
),
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
.datetime()
|
|
573
|
-
.check(
|
|
574
|
-
z.describe('When the subscription was last changed, as an ISO 8601 timestamp.'),
|
|
575
|
-
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.',
|
|
576
656
|
),
|
|
577
|
-
})
|
|
578
|
-
.check(
|
|
579
|
-
z.describe(
|
|
580
|
-
'A webhook subscription that tells Tempo which onchain events to send to your destination.',
|
|
581
657
|
),
|
|
582
|
-
|
|
658
|
+
'Webhook',
|
|
659
|
+
)
|
|
583
660
|
|
|
584
661
|
/** Outcome of a single delivery attempt. */
|
|
585
662
|
export const DeliveryStatus = z
|
|
@@ -590,69 +667,72 @@ export namespace schema {
|
|
|
590
667
|
)
|
|
591
668
|
|
|
592
669
|
/** A logged delivery attempt for a subscription. */
|
|
593
|
-
export const Delivery =
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
createdAt: z.iso
|
|
604
|
-
.datetime()
|
|
605
|
-
.check(
|
|
606
|
-
z.describe('When this delivery attempt was created, as an ISO 8601 timestamp.'),
|
|
607
|
-
z.meta({ examples: ['2024-01-01T00:00:00Z'] }),
|
|
608
|
-
),
|
|
609
|
-
error: z
|
|
610
|
-
.optional(z.string())
|
|
611
|
-
.check(
|
|
612
|
-
z.describe('Why delivery failed, present when `status` is `failed`.'),
|
|
613
|
-
z.meta({ examples: ['Connection timed out'] }),
|
|
614
|
-
),
|
|
615
|
-
eventId: z
|
|
616
|
-
.string()
|
|
617
|
-
.check(
|
|
618
|
-
z.describe('Stable event ID (`evt_…`) you can use to dedupe webhook deliveries.'),
|
|
619
|
-
z.meta({ examples: ['evt_abc123'] }),
|
|
620
|
-
),
|
|
621
|
-
id: z
|
|
622
|
-
.string()
|
|
623
|
-
.check(
|
|
624
|
-
z.describe('Webhook delivery ID (`whd_…`).'),
|
|
625
|
-
z.meta({ examples: ['whd_001718668800000_C1yJkk7CuML98HFthEDk9PsY'] }),
|
|
626
|
-
),
|
|
627
|
-
requestUrl: z
|
|
628
|
-
.string()
|
|
629
|
-
.check(
|
|
630
|
-
z.describe('Your callback URL that Tempo attempted to deliver to.'),
|
|
631
|
-
z.meta({ examples: ['https://example.com/webhooks'] }),
|
|
632
|
-
),
|
|
633
|
-
responseMs: z
|
|
634
|
-
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
635
|
-
.check(
|
|
636
|
-
z.describe(
|
|
637
|
-
'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] }),
|
|
638
680
|
),
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
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
|
+
)
|
|
656
736
|
|
|
657
737
|
/**
|
|
658
738
|
* A `transfer` event payload: the decoded TIP-20 `Transfer` row. Mirrors a
|
|
@@ -660,88 +740,94 @@ export namespace schema {
|
|
|
660
740
|
* read endpoint adds (webhook delivery does not perform per-event token
|
|
661
741
|
* lookups).
|
|
662
742
|
*/
|
|
663
|
-
export const TransferEvent =
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
amount: z
|
|
670
|
-
.string()
|
|
671
|
-
.check(
|
|
672
|
-
z.describe('Amount transferred, as a decimal integer string in the token base unit.'),
|
|
673
|
-
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'] }),
|
|
674
749
|
),
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
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'] }),
|
|
682
767
|
),
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
),
|
|
687
|
-
sender: Schema.Address.check(
|
|
688
|
-
z.describe('Address that sent the transfer.'),
|
|
689
|
-
z.meta({ examples: ['0xe7687128b0a808c2831ff94d4f7b2fb35c65af38'] }),
|
|
690
|
-
),
|
|
691
|
-
timestamp: z.iso
|
|
692
|
-
.datetime()
|
|
693
|
-
.check(
|
|
694
|
-
z.describe('Block timestamp as an ISO 8601 string.'),
|
|
695
|
-
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'] }),
|
|
696
771
|
),
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
.object({
|
|
700
|
-
decimals: z
|
|
701
|
-
.number()
|
|
702
|
-
.check(
|
|
703
|
-
z.int(),
|
|
704
|
-
z.nonnegative(),
|
|
705
|
-
z.describe('Number of decimals the token uses.'),
|
|
706
|
-
z.meta({ examples: [6] }),
|
|
707
|
-
),
|
|
708
|
-
symbol: z
|
|
709
|
-
.string()
|
|
710
|
-
.check(z.describe('Token symbol (e.g. `USDC`).'), z.meta({ examples: ['USDC'] })),
|
|
711
|
-
})
|
|
772
|
+
timestamp: z.iso
|
|
773
|
+
.datetime()
|
|
712
774
|
.check(
|
|
713
|
-
z.describe(
|
|
714
|
-
|
|
715
|
-
),
|
|
775
|
+
z.describe('Block timestamp as an ISO 8601 string.'),
|
|
776
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
716
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.'),
|
|
717
808
|
),
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
z.meta({
|
|
721
|
-
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
722
|
-
}),
|
|
723
|
-
),
|
|
724
|
-
})
|
|
725
|
-
.check(
|
|
726
|
-
z.describe('Payload for a `token:transfer` event, decoded from a TIP-20 `Transfer` log.'),
|
|
727
|
-
)
|
|
809
|
+
'WebhookTransferEvent',
|
|
810
|
+
)
|
|
728
811
|
|
|
729
812
|
/**
|
|
730
813
|
* A `transaction` event payload using the humanized transaction shape without
|
|
731
814
|
* opt-in read resources such as receipts.
|
|
732
815
|
*/
|
|
733
|
-
export const TransactionEvent =
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
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
|
+
)
|
|
745
831
|
|
|
746
832
|
/**
|
|
747
833
|
* A `log:emitted` event payload: the raw contract event log. When a
|
|
@@ -749,185 +835,204 @@ export namespace schema {
|
|
|
749
835
|
* `event`/`args` fields carry the decoded event name and arguments (large
|
|
750
836
|
* integers as decimal strings).
|
|
751
837
|
*/
|
|
752
|
-
export const LogEvent =
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
args: z.optional(
|
|
759
|
-
z
|
|
760
|
-
.record(z.string(), z.unknown())
|
|
761
|
-
.check(
|
|
762
|
-
z.describe(
|
|
763
|
-
'Decoded event arguments, present only when a `signature` filter was supplied and decoding succeeded.',
|
|
764
|
-
),
|
|
765
|
-
z.meta({ examples: [{ from: '0xe768…', to: '0x9e39…', value: '10000' }] }),
|
|
766
|
-
),
|
|
767
|
-
),
|
|
768
|
-
blockNumber: z
|
|
769
|
-
.number()
|
|
770
|
-
.check(
|
|
771
|
-
z.int(),
|
|
772
|
-
z.nonnegative(),
|
|
773
|
-
z.describe('Block number the log was included in.'),
|
|
774
|
-
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'] }),
|
|
775
844
|
),
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
.object({
|
|
785
|
-
name: z
|
|
786
|
-
.string()
|
|
787
|
-
.check(z.describe('Decoded event name.'), z.meta({ examples: ['Transfer'] })),
|
|
788
|
-
signature: z.string().check(
|
|
789
|
-
z.describe('Human-readable event signature used to decode the log.'),
|
|
790
|
-
z.meta({
|
|
791
|
-
examples: [
|
|
792
|
-
'event Transfer(address indexed from, address indexed to, uint256 value)',
|
|
793
|
-
],
|
|
794
|
-
}),
|
|
795
|
-
),
|
|
796
|
-
topic0: Schema.Hash.check(
|
|
797
|
-
z.describe('Event signature hash (topic 0).'),
|
|
798
|
-
z.meta({
|
|
799
|
-
examples: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'],
|
|
800
|
-
}),
|
|
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' }] }),
|
|
801
853
|
),
|
|
802
|
-
|
|
854
|
+
),
|
|
855
|
+
blockNumber: z
|
|
856
|
+
.number()
|
|
803
857
|
.check(
|
|
804
|
-
z.
|
|
805
|
-
|
|
806
|
-
),
|
|
858
|
+
z.int(),
|
|
859
|
+
z.nonnegative(),
|
|
860
|
+
z.describe('Block number the log was included in.'),
|
|
861
|
+
z.meta({ examples: [1000002] }),
|
|
807
862
|
),
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
z.nonnegative(),
|
|
814
|
-
z.describe('Index of the log within its block.'),
|
|
815
|
-
z.meta({ examples: [0] }),
|
|
863
|
+
data: Schema.Hex.check(
|
|
864
|
+
z.describe('Unindexed log data (ABI-encoded).'),
|
|
865
|
+
z.meta({
|
|
866
|
+
examples: ['0x0000000000000000000000000000000000000000000000000000000000002710'],
|
|
867
|
+
}),
|
|
816
868
|
),
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
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
|
+
),
|
|
822
895
|
),
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
896
|
+
logIndex: z
|
|
897
|
+
.number()
|
|
898
|
+
.check(
|
|
899
|
+
z.int(),
|
|
900
|
+
z.nonnegative(),
|
|
901
|
+
z.describe('Index of the log within its block.'),
|
|
902
|
+
z.meta({ examples: [0] }),
|
|
903
|
+
),
|
|
904
|
+
timestamp: z.iso
|
|
905
|
+
.datetime()
|
|
906
|
+
.check(
|
|
907
|
+
z.describe('When the block was produced, as an ISO 8601 timestamp.'),
|
|
908
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
909
|
+
),
|
|
910
|
+
topics: z.array(Schema.Hash).check(
|
|
911
|
+
z.describe('Log topics, starting with the event signature hash (topic 0).'),
|
|
912
|
+
z.meta({
|
|
913
|
+
examples: [
|
|
914
|
+
[
|
|
915
|
+
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
|
|
916
|
+
'0x000000000000000000000000e7687128b0a808c2831ff94d4f7b2fb35c65af38',
|
|
917
|
+
],
|
|
830
918
|
],
|
|
831
|
-
|
|
832
|
-
}),
|
|
833
|
-
),
|
|
834
|
-
transactionHash: Schema.Hash.check(
|
|
835
|
-
z.describe('Hash of the transaction that emitted the log.'),
|
|
836
|
-
z.meta({
|
|
837
|
-
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
838
|
-
}),
|
|
839
|
-
),
|
|
840
|
-
transactionIndex: z
|
|
841
|
-
.number()
|
|
842
|
-
.check(
|
|
843
|
-
z.int(),
|
|
844
|
-
z.nonnegative(),
|
|
845
|
-
z.describe('Index of the transaction within its block.'),
|
|
846
|
-
z.meta({ examples: [0] }),
|
|
847
|
-
),
|
|
848
|
-
})
|
|
849
|
-
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).'))
|
|
850
|
-
|
|
851
|
-
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
852
|
-
export const BlockEvent = z
|
|
853
|
-
.object({
|
|
854
|
-
number: z
|
|
855
|
-
.number()
|
|
856
|
-
.check(
|
|
857
|
-
z.int(),
|
|
858
|
-
z.nonnegative(),
|
|
859
|
-
z.describe('Block height, starting from genesis block 0.'),
|
|
860
|
-
z.meta({ examples: [1000002] }),
|
|
919
|
+
}),
|
|
861
920
|
),
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
),
|
|
868
|
-
parentHash: Schema.Hash.check(
|
|
869
|
-
z.describe('Hash of the previous block in the chain.'),
|
|
870
|
-
z.meta({
|
|
871
|
-
examples: ['0xa406dff9c51cc2abbef3a811f0499e99a568bf781019f129ab45dca1df0e43e5'],
|
|
872
|
-
}),
|
|
873
|
-
),
|
|
874
|
-
miner: Schema.Address.check(
|
|
875
|
-
z.describe('Address of the block producer (miner/proposer).'),
|
|
876
|
-
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
877
|
-
),
|
|
878
|
-
proposer: z.optional(
|
|
879
|
-
Schema.Address.check(
|
|
880
|
-
z.describe('Consensus proposer of the block, when the chain records one.'),
|
|
881
|
-
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
921
|
+
transactionHash: Schema.Hash.check(
|
|
922
|
+
z.describe('Hash of the transaction that emitted the log.'),
|
|
923
|
+
z.meta({
|
|
924
|
+
examples: ['0x3d24a706cc2f6f4c96620bef1f61ddb23040ff77c22c8db42918c7c424bbf9d3'],
|
|
925
|
+
}),
|
|
882
926
|
),
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
927
|
+
transactionIndex: z
|
|
928
|
+
.number()
|
|
929
|
+
.check(
|
|
930
|
+
z.int(),
|
|
931
|
+
z.nonnegative(),
|
|
932
|
+
z.describe('Index of the transaction within its block.'),
|
|
933
|
+
z.meta({ examples: [0] }),
|
|
934
|
+
),
|
|
935
|
+
})
|
|
936
|
+
.check(z.describe('Payload for a `log:emitted` event (a raw contract event log).')),
|
|
937
|
+
'WebhookLogEvent',
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
/** Payload for a `block:created` event (an RPC-derived block header). */
|
|
941
|
+
export const BlockEvent = OpenApi.component(
|
|
942
|
+
z
|
|
943
|
+
.object({
|
|
944
|
+
number: z
|
|
945
|
+
.number()
|
|
946
|
+
.check(
|
|
947
|
+
z.int(),
|
|
948
|
+
z.nonnegative(),
|
|
949
|
+
z.describe('Block height, starting from genesis block 0.'),
|
|
950
|
+
z.meta({ examples: [1000002] }),
|
|
951
|
+
),
|
|
952
|
+
hash: Schema.Hash.check(
|
|
953
|
+
z.describe('Hash that identifies this block.'),
|
|
954
|
+
z.meta({
|
|
955
|
+
examples: ['0x3fe7d9e595f3d8215ec840c6ef55ac0bead58933e96fc2ead0f2aaf79715f45d'],
|
|
956
|
+
}),
|
|
891
957
|
),
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
z.describe('Maximum gas available for all transactions in this block.'),
|
|
898
|
-
z.meta({ examples: [500000000] }),
|
|
958
|
+
parentHash: Schema.Hash.check(
|
|
959
|
+
z.describe('Hash of the previous block in the chain.'),
|
|
960
|
+
z.meta({
|
|
961
|
+
examples: ['0xa406dff9c51cc2abbef3a811f0499e99a568bf781019f129ab45dca1df0e43e5'],
|
|
962
|
+
}),
|
|
899
963
|
),
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
z.int(),
|
|
904
|
-
z.nonnegative(),
|
|
905
|
-
z.describe('Number of transactions included in this block.'),
|
|
906
|
-
z.meta({ examples: [3] }),
|
|
964
|
+
miner: Schema.Address.check(
|
|
965
|
+
z.describe('Address of the block producer (miner/proposer).'),
|
|
966
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
907
967
|
),
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
968
|
+
proposer: z.optional(
|
|
969
|
+
Schema.Address.check(
|
|
970
|
+
z.describe('Consensus proposer of the block, when the chain records one.'),
|
|
971
|
+
z.meta({ examples: ['0x0000000000000000000000000000000000000000'] }),
|
|
972
|
+
),
|
|
913
973
|
),
|
|
914
|
-
|
|
915
|
-
|
|
974
|
+
gasUsed: z
|
|
975
|
+
.number()
|
|
976
|
+
.check(
|
|
977
|
+
z.int(),
|
|
978
|
+
z.nonnegative(),
|
|
979
|
+
z.describe('Total gas used by every transaction in this block.'),
|
|
980
|
+
z.meta({ examples: [4340281] }),
|
|
981
|
+
),
|
|
982
|
+
gasLimit: z
|
|
983
|
+
.number()
|
|
984
|
+
.check(
|
|
985
|
+
z.int(),
|
|
986
|
+
z.nonnegative(),
|
|
987
|
+
z.describe('Maximum gas available for all transactions in this block.'),
|
|
988
|
+
z.meta({ examples: [500000000] }),
|
|
989
|
+
),
|
|
990
|
+
transactionCount: z
|
|
991
|
+
.number()
|
|
992
|
+
.check(
|
|
993
|
+
z.int(),
|
|
994
|
+
z.nonnegative(),
|
|
995
|
+
z.describe('Number of transactions included in this block.'),
|
|
996
|
+
z.meta({ examples: [3] }),
|
|
997
|
+
),
|
|
998
|
+
timestamp: z.iso
|
|
999
|
+
.datetime()
|
|
1000
|
+
.check(
|
|
1001
|
+
z.describe('When the block was produced, as an ISO 8601 timestamp.'),
|
|
1002
|
+
z.meta({ examples: ['2026-01-14T18:38:03.685Z'] }),
|
|
1003
|
+
),
|
|
1004
|
+
})
|
|
1005
|
+
.check(z.describe('Payload for a `block:created` event (a new block header).')),
|
|
1006
|
+
'WebhookBlockEvent',
|
|
1007
|
+
)
|
|
916
1008
|
|
|
917
|
-
/** Public
|
|
918
|
-
export const
|
|
1009
|
+
/** Public route deposit after a committed material change. */
|
|
1010
|
+
export const RoutesDepositEvent = RoutesDeposit.schema.RoutesDeposit
|
|
1011
|
+
|
|
1012
|
+
/** Public route transfer after a committed material change. */
|
|
1013
|
+
export const RoutesTransferEvent = RoutesTransfer.schema.RoutesTransfer
|
|
919
1014
|
|
|
920
1015
|
/** A `ping` (synthetic test-delivery) payload, sent by `POST /webhooks/:id/ping`. */
|
|
921
|
-
export const PingEvent =
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1016
|
+
export const PingEvent = OpenApi.component(
|
|
1017
|
+
z
|
|
1018
|
+
.object({
|
|
1019
|
+
ping: z
|
|
1020
|
+
.literal(true)
|
|
1021
|
+
.check(
|
|
1022
|
+
z.describe('Marks this payload as a synthetic ping test.'),
|
|
1023
|
+
z.meta({ examples: [true] }),
|
|
1024
|
+
),
|
|
1025
|
+
})
|
|
1026
|
+
.check(z.describe('Payload for a webhook ping test delivery.')),
|
|
1027
|
+
'WebhookPingEvent',
|
|
1028
|
+
)
|
|
926
1029
|
|
|
927
1030
|
/** Fields common to every delivery envelope. */
|
|
928
1031
|
const envelopeBase = {
|
|
929
1032
|
chainId: Schema.ChainId,
|
|
930
|
-
context: z
|
|
1033
|
+
context: z
|
|
1034
|
+
.optional(Context)
|
|
1035
|
+
.check(z.meta({ examples: [{ title: 'Prod USDC large transfers' }] })),
|
|
931
1036
|
createdAt: z.iso
|
|
932
1037
|
.datetime()
|
|
933
1038
|
.check(
|
|
@@ -957,155 +1062,254 @@ export namespace schema {
|
|
|
957
1062
|
* variant selector — without per-variant titles, inline `oneOf` members render
|
|
958
1063
|
* as a single (first) collapsed schema.
|
|
959
1064
|
*/
|
|
960
|
-
export const Envelope =
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
.object({ ...envelopeBase, data: TransferEvent, type: z.literal('token:transfer') })
|
|
964
|
-
.check(z.meta({ title: 'Transfer event' })),
|
|
965
|
-
z
|
|
966
|
-
.object({
|
|
967
|
-
...envelopeBase,
|
|
968
|
-
data: TransactionEvent,
|
|
969
|
-
type: z.literal('transaction:included'),
|
|
970
|
-
})
|
|
971
|
-
.check(z.meta({ title: 'Included transaction event' })),
|
|
972
|
-
z
|
|
973
|
-
.object({ ...envelopeBase, data: LogEvent, type: z.literal('log:emitted') })
|
|
974
|
-
.check(z.meta({ title: 'Log event' })),
|
|
975
|
-
z
|
|
976
|
-
.object({ ...envelopeBase, data: BlockEvent, type: z.literal('block:created') })
|
|
977
|
-
.check(z.meta({ title: 'Block event' })),
|
|
978
|
-
z
|
|
979
|
-
.object({
|
|
980
|
-
...envelopeBase,
|
|
981
|
-
data: FundingDepositEvent,
|
|
982
|
-
type: z.literal('funding:deposit.updated'),
|
|
983
|
-
})
|
|
984
|
-
.check(z.meta({ title: 'Funding deposit updated event' })),
|
|
985
|
-
z
|
|
986
|
-
.object({ ...envelopeBase, data: PingEvent, type: z.literal('ping') })
|
|
987
|
-
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
988
|
-
])
|
|
989
|
-
.check(z.describe('The signed JSON payload Tempo POSTs to your webhook URL.'))
|
|
990
|
-
|
|
991
|
-
/** Schemas for the getWebhookEventTypes operation. */
|
|
992
|
-
export namespace getWebhookEventTypes {
|
|
993
|
-
export const Response = z
|
|
994
|
-
.object({
|
|
995
|
-
data: z
|
|
996
|
-
.array(
|
|
997
|
-
z.object({
|
|
998
|
-
description: z
|
|
999
|
-
.string()
|
|
1000
|
-
.check(
|
|
1001
|
-
z.describe('Plain-English description of the event type.'),
|
|
1002
|
-
z.meta({ examples: ['TIP-20 token transfer event.'] }),
|
|
1003
|
-
),
|
|
1004
|
-
type: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
1005
|
-
}),
|
|
1006
|
-
)
|
|
1007
|
-
.check(z.describe('Webhook event types available for subscription.')),
|
|
1008
|
-
})
|
|
1009
|
-
.check(z.describe('List of webhook event types Tempo can send.'))
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
/** Schemas for the createWebhook operation. */
|
|
1013
|
-
export namespace createWebhook {
|
|
1014
|
-
/**
|
|
1015
|
-
* Discriminated on `eventType` so each variant carries its own typed
|
|
1016
|
-
* `filters` object — this is what lets the docs render the valid filter
|
|
1017
|
-
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
1018
|
-
* doc renderer's selector (see {@link schema.Envelope}).
|
|
1019
|
-
*/
|
|
1020
|
-
export const Body = z
|
|
1021
|
-
.discriminatedUnion('eventType', [
|
|
1065
|
+
export const Envelope = OpenApi.component(
|
|
1066
|
+
z
|
|
1067
|
+
.discriminatedUnion('type', [
|
|
1022
1068
|
z
|
|
1023
1069
|
.object({
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
eventType: z
|
|
1028
|
-
.literal('token:transfer')
|
|
1029
|
-
.check(
|
|
1030
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1031
|
-
z.meta({ examples: ['token:transfer'] }),
|
|
1032
|
-
),
|
|
1033
|
-
filters: z.optional(TransferFilters),
|
|
1070
|
+
...envelopeBase,
|
|
1071
|
+
data: TransferEvent,
|
|
1072
|
+
type: z.literal('token:transfer').check(z.meta({ examples: ['token:transfer'] })),
|
|
1034
1073
|
})
|
|
1035
|
-
.check(z.meta({ title: 'Transfer
|
|
1074
|
+
.check(z.meta({ title: 'Transfer event' })),
|
|
1036
1075
|
z
|
|
1037
1076
|
.object({
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
eventType: z
|
|
1077
|
+
...envelopeBase,
|
|
1078
|
+
data: TransactionEvent,
|
|
1079
|
+
type: z
|
|
1042
1080
|
.literal('transaction:included')
|
|
1043
|
-
.check(
|
|
1044
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1045
|
-
z.meta({ examples: ['transaction:included'] }),
|
|
1046
|
-
),
|
|
1047
|
-
filters: z.optional(TxFilters),
|
|
1081
|
+
.check(z.meta({ examples: ['transaction:included'] })),
|
|
1048
1082
|
})
|
|
1049
|
-
.check(z.meta({ title: 'Included
|
|
1083
|
+
.check(z.meta({ title: 'Included transaction event' })),
|
|
1050
1084
|
z
|
|
1051
1085
|
.object({
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
eventType: z
|
|
1056
|
-
.literal('log:emitted')
|
|
1057
|
-
.check(
|
|
1058
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1059
|
-
z.meta({ examples: ['log:emitted'] }),
|
|
1060
|
-
),
|
|
1061
|
-
filters: LogFilters,
|
|
1086
|
+
...envelopeBase,
|
|
1087
|
+
data: LogEvent,
|
|
1088
|
+
type: z.literal('log:emitted').check(z.meta({ examples: ['log:emitted'] })),
|
|
1062
1089
|
})
|
|
1063
|
-
.check(z.meta({ title: 'Log
|
|
1090
|
+
.check(z.meta({ title: 'Log event' })),
|
|
1064
1091
|
z
|
|
1065
1092
|
.object({
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
eventType: z
|
|
1070
|
-
.literal('block:created')
|
|
1071
|
-
.check(
|
|
1072
|
-
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1073
|
-
z.meta({ examples: ['block:created'] }),
|
|
1074
|
-
),
|
|
1075
|
-
filters: z.optional(BlockFilters),
|
|
1093
|
+
...envelopeBase,
|
|
1094
|
+
data: BlockEvent,
|
|
1095
|
+
type: z.literal('block:created').check(z.meta({ examples: ['block:created'] })),
|
|
1076
1096
|
})
|
|
1077
|
-
.check(z.meta({ title: 'Block
|
|
1097
|
+
.check(z.meta({ title: 'Block event' })),
|
|
1078
1098
|
z
|
|
1079
1099
|
.object({
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
.
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1100
|
+
...envelopeBase,
|
|
1101
|
+
data: RoutesDepositEvent,
|
|
1102
|
+
type: z
|
|
1103
|
+
.literal('routes:deposit.updated')
|
|
1104
|
+
.check(z.meta({ examples: ['routes:deposit.updated'] })),
|
|
1105
|
+
})
|
|
1106
|
+
.check(z.meta({ title: 'Route deposit updated event' })),
|
|
1107
|
+
z
|
|
1108
|
+
.object({
|
|
1109
|
+
...envelopeBase,
|
|
1110
|
+
data: RoutesTransferEvent,
|
|
1111
|
+
type: z
|
|
1112
|
+
.literal('routes:transfer.updated')
|
|
1113
|
+
.check(z.meta({ examples: ['routes:transfer.updated'] })),
|
|
1114
|
+
})
|
|
1115
|
+
.check(z.meta({ title: 'Route transfer updated event' })),
|
|
1116
|
+
z
|
|
1117
|
+
.object({
|
|
1118
|
+
...envelopeBase,
|
|
1119
|
+
data: PingEvent,
|
|
1120
|
+
type: z.literal('ping').check(z.meta({ examples: ['ping'] })),
|
|
1090
1121
|
})
|
|
1091
|
-
.check(z.meta({ title: '
|
|
1122
|
+
.check(z.meta({ title: 'Ping (test delivery)' })),
|
|
1092
1123
|
])
|
|
1093
|
-
.check(z.describe('
|
|
1124
|
+
.check(z.describe('The signed JSON payload Tempo POSTs to a webhook destination.')),
|
|
1125
|
+
'WebhookEventEnvelope',
|
|
1126
|
+
)
|
|
1094
1127
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
'
|
|
1128
|
+
/** Schemas for the getWebhookEventTypes operation. */
|
|
1129
|
+
export namespace getWebhookEventTypes {
|
|
1130
|
+
const EventTypeEntry = OpenApi.component(
|
|
1131
|
+
z
|
|
1132
|
+
.object({
|
|
1133
|
+
description: z
|
|
1134
|
+
.string()
|
|
1135
|
+
.check(
|
|
1136
|
+
z.describe('Plain-English description of the event type.'),
|
|
1137
|
+
z.meta({ examples: ['TIP-20 token transfer event.'] }),
|
|
1104
1138
|
),
|
|
1105
|
-
|
|
1139
|
+
type: EventType.check(z.meta({ examples: ['token:transfer'] })),
|
|
1140
|
+
})
|
|
1141
|
+
.check(z.describe('One webhook event type available for subscription.')),
|
|
1142
|
+
'WebhookEventType',
|
|
1143
|
+
)
|
|
1144
|
+
|
|
1145
|
+
export const Response = OpenApi.component(
|
|
1146
|
+
z
|
|
1147
|
+
.object({
|
|
1148
|
+
data: z.array(EventTypeEntry).check(
|
|
1149
|
+
z.describe('Webhook event types available for subscription.'),
|
|
1150
|
+
z.meta({
|
|
1151
|
+
examples: [[{ description: 'TIP-20 token transfer event.', type: 'token:transfer' }]],
|
|
1152
|
+
}),
|
|
1106
1153
|
),
|
|
1107
|
-
|
|
1108
|
-
|
|
1154
|
+
})
|
|
1155
|
+
.check(z.describe('List of webhook event types Tempo can send.')),
|
|
1156
|
+
'WebhookEventTypeList',
|
|
1157
|
+
)
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/** Schemas for the createWebhook operation. */
|
|
1161
|
+
export namespace createWebhook {
|
|
1162
|
+
/** Request variant for TIP-20 transfer subscriptions. */
|
|
1163
|
+
export const TransferBody = OpenApi.component(
|
|
1164
|
+
z
|
|
1165
|
+
.object({
|
|
1166
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1167
|
+
context: z.optional(Context),
|
|
1168
|
+
destination: Destination,
|
|
1169
|
+
eventType: z
|
|
1170
|
+
.literal('token:transfer')
|
|
1171
|
+
.check(
|
|
1172
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1173
|
+
z.meta({ examples: ['token:transfer'] }),
|
|
1174
|
+
),
|
|
1175
|
+
filters: z.optional(TransferFilters),
|
|
1176
|
+
})
|
|
1177
|
+
.check(z.meta({ title: 'Transfer subscription' })),
|
|
1178
|
+
'CreateWebhookTransferRequest',
|
|
1179
|
+
)
|
|
1180
|
+
|
|
1181
|
+
/** Request variant for included transaction subscriptions. */
|
|
1182
|
+
export const TransactionBody = OpenApi.component(
|
|
1183
|
+
z
|
|
1184
|
+
.object({
|
|
1185
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1186
|
+
context: z.optional(Context),
|
|
1187
|
+
destination: Destination,
|
|
1188
|
+
eventType: z
|
|
1189
|
+
.literal('transaction:included')
|
|
1190
|
+
.check(
|
|
1191
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1192
|
+
z.meta({ examples: ['transaction:included'] }),
|
|
1193
|
+
),
|
|
1194
|
+
filters: z.optional(TxFilters),
|
|
1195
|
+
})
|
|
1196
|
+
.check(z.meta({ title: 'Included-transaction subscription' })),
|
|
1197
|
+
'CreateWebhookTransactionRequest',
|
|
1198
|
+
)
|
|
1199
|
+
|
|
1200
|
+
/** Request variant for emitted log subscriptions. */
|
|
1201
|
+
export const LogBody = OpenApi.component(
|
|
1202
|
+
z
|
|
1203
|
+
.object({
|
|
1204
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1205
|
+
context: z.optional(Context),
|
|
1206
|
+
destination: Destination,
|
|
1207
|
+
eventType: z
|
|
1208
|
+
.literal('log:emitted')
|
|
1209
|
+
.check(
|
|
1210
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1211
|
+
z.meta({ examples: ['log:emitted'] }),
|
|
1212
|
+
),
|
|
1213
|
+
filters: LogFilters,
|
|
1214
|
+
})
|
|
1215
|
+
.check(z.meta({ title: 'Log subscription' })),
|
|
1216
|
+
'CreateWebhookLogRequest',
|
|
1217
|
+
)
|
|
1218
|
+
|
|
1219
|
+
/** Request variant for created block subscriptions. */
|
|
1220
|
+
export const BlockBody = OpenApi.component(
|
|
1221
|
+
z
|
|
1222
|
+
.object({
|
|
1223
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1224
|
+
context: z.optional(Context),
|
|
1225
|
+
destination: Destination,
|
|
1226
|
+
eventType: z
|
|
1227
|
+
.literal('block:created')
|
|
1228
|
+
.check(
|
|
1229
|
+
z.describe('Event type you want Tempo to send to your webhook URL.'),
|
|
1230
|
+
z.meta({ examples: ['block:created'] }),
|
|
1231
|
+
),
|
|
1232
|
+
filters: z.optional(BlockFilters),
|
|
1233
|
+
})
|
|
1234
|
+
.check(z.meta({ title: 'Block subscription' })),
|
|
1235
|
+
'CreateWebhookBlockRequest',
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
/** Request variant for route deposit subscriptions. */
|
|
1239
|
+
export const RoutesDepositBody = OpenApi.component(
|
|
1240
|
+
z
|
|
1241
|
+
.object({
|
|
1242
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1243
|
+
context: z.optional(Context),
|
|
1244
|
+
destination: Destination,
|
|
1245
|
+
eventType: z
|
|
1246
|
+
.literal('routes:deposit.updated')
|
|
1247
|
+
.check(
|
|
1248
|
+
z.describe('Event type for committed route deposit changes.'),
|
|
1249
|
+
z.meta({ examples: ['routes:deposit.updated'] }),
|
|
1250
|
+
),
|
|
1251
|
+
filters: z.optional(RoutesDepositFilters),
|
|
1252
|
+
})
|
|
1253
|
+
.check(z.meta({ title: 'Route deposit subscription' })),
|
|
1254
|
+
'CreateWebhookRoutesDepositRequest',
|
|
1255
|
+
)
|
|
1256
|
+
|
|
1257
|
+
/** Request variant for route transfer subscriptions. */
|
|
1258
|
+
export const RoutesTransferBody = OpenApi.component(
|
|
1259
|
+
z
|
|
1260
|
+
.object({
|
|
1261
|
+
chainId: z.optional(Schema.ChainId).check(z.meta({ examples: [4217] })),
|
|
1262
|
+
context: z.optional(Context),
|
|
1263
|
+
destination: Destination,
|
|
1264
|
+
eventType: z
|
|
1265
|
+
.literal('routes:transfer.updated')
|
|
1266
|
+
.check(
|
|
1267
|
+
z.describe('Event type for committed route transfer changes.'),
|
|
1268
|
+
z.meta({ examples: ['routes:transfer.updated'] }),
|
|
1269
|
+
),
|
|
1270
|
+
filters: z.optional(RoutesTransferFilters),
|
|
1271
|
+
})
|
|
1272
|
+
.check(z.meta({ title: 'Route transfer subscription' })),
|
|
1273
|
+
'CreateWebhookRoutesTransferRequest',
|
|
1274
|
+
)
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Discriminated on `eventType` so each variant carries its own typed
|
|
1278
|
+
* `filters` object — this is what lets the docs render the valid filter
|
|
1279
|
+
* fields per event type instead of an opaque map. Variant `title`s drive the
|
|
1280
|
+
* doc renderer's selector (see {@link schema.Envelope}).
|
|
1281
|
+
*/
|
|
1282
|
+
export const Body = OpenApi.component(
|
|
1283
|
+
z
|
|
1284
|
+
.discriminatedUnion('eventType', [
|
|
1285
|
+
TransferBody,
|
|
1286
|
+
TransactionBody,
|
|
1287
|
+
LogBody,
|
|
1288
|
+
BlockBody,
|
|
1289
|
+
RoutesDepositBody,
|
|
1290
|
+
RoutesTransferBody,
|
|
1291
|
+
])
|
|
1292
|
+
.check(z.describe('Details for creating a webhook subscription.')),
|
|
1293
|
+
'CreateWebhookRequest',
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
export const Response = OpenApi.component(
|
|
1297
|
+
z
|
|
1298
|
+
.object({
|
|
1299
|
+
...Subscription.shape,
|
|
1300
|
+
destination: Destination,
|
|
1301
|
+
secret: z
|
|
1302
|
+
.string()
|
|
1303
|
+
.check(
|
|
1304
|
+
z.describe(
|
|
1305
|
+
'HMAC signing secret (`whsec_…`) used to verify Tempo webhook signatures. It is shown once when you create the webhook, so store it now.',
|
|
1306
|
+
),
|
|
1307
|
+
z.meta({ examples: ['whsec_abc123'] }),
|
|
1308
|
+
),
|
|
1309
|
+
})
|
|
1310
|
+
.check(z.describe('The new webhook subscription, including the one-time signing secret.')),
|
|
1311
|
+
'CreateWebhookResponse',
|
|
1312
|
+
)
|
|
1109
1313
|
}
|
|
1110
1314
|
|
|
1111
1315
|
/** Schemas for the listWebhooks operation. */
|
|
@@ -1122,15 +1326,23 @@ export namespace schema {
|
|
|
1122
1326
|
z.describe('Query parameters for listing your webhook subscriptions.'),
|
|
1123
1327
|
)
|
|
1124
1328
|
|
|
1125
|
-
export const Response =
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1329
|
+
export const Response = OpenApi.component(
|
|
1330
|
+
z
|
|
1331
|
+
.object({
|
|
1332
|
+
data: z
|
|
1333
|
+
.array(Subscription)
|
|
1334
|
+
.check(z.describe('Webhook subscriptions on this page.'), z.meta({ examples: [[]] })),
|
|
1335
|
+
meta: z
|
|
1336
|
+
.optional(Schema.CountMeta)
|
|
1337
|
+
.check(
|
|
1338
|
+
z.describe('Extra response metadata requested with `include`.'),
|
|
1339
|
+
z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] }),
|
|
1340
|
+
),
|
|
1341
|
+
nextCursor: Schema.NextCursor,
|
|
1342
|
+
})
|
|
1343
|
+
.check(z.describe('A page of webhook subscriptions.')),
|
|
1344
|
+
'WebhookList',
|
|
1345
|
+
)
|
|
1134
1346
|
}
|
|
1135
1347
|
|
|
1136
1348
|
/** Schemas for the getWebhook operation. */
|
|
@@ -1165,55 +1377,69 @@ export namespace schema {
|
|
|
1165
1377
|
z.describe('Query parameters for listing webhook delivery attempts.'),
|
|
1166
1378
|
)
|
|
1167
1379
|
|
|
1168
|
-
export const Response =
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1380
|
+
export const Response = OpenApi.component(
|
|
1381
|
+
z
|
|
1382
|
+
.object({
|
|
1383
|
+
data: z
|
|
1384
|
+
.array(Delivery)
|
|
1385
|
+
.check(
|
|
1386
|
+
z.describe('Webhook delivery attempts on this page.'),
|
|
1387
|
+
z.meta({ examples: [[]] }),
|
|
1388
|
+
),
|
|
1389
|
+
meta: z
|
|
1390
|
+
.optional(Schema.CountMeta)
|
|
1391
|
+
.check(
|
|
1392
|
+
z.describe('Extra response metadata requested with `include`.'),
|
|
1393
|
+
z.meta({ examples: [{ totalCount: 1, totalCountCapped: false }] }),
|
|
1394
|
+
),
|
|
1395
|
+
nextCursor: Schema.NextCursor,
|
|
1396
|
+
})
|
|
1397
|
+
.check(z.describe('A page of webhook delivery attempts.')),
|
|
1398
|
+
'WebhookDeliveryList',
|
|
1399
|
+
)
|
|
1177
1400
|
}
|
|
1178
1401
|
|
|
1179
1402
|
/** Schemas for the pingWebhook operation. */
|
|
1180
1403
|
export namespace pingWebhook {
|
|
1181
1404
|
export const Params = getWebhook.Params
|
|
1182
1405
|
|
|
1183
|
-
export const Response =
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1406
|
+
export const Response = OpenApi.component(
|
|
1407
|
+
z
|
|
1408
|
+
.object({
|
|
1409
|
+
delivered: z
|
|
1410
|
+
.boolean()
|
|
1411
|
+
.check(
|
|
1412
|
+
z.describe('Whether your endpoint returned a 2xx response.'),
|
|
1413
|
+
z.meta({ examples: [true] }),
|
|
1414
|
+
),
|
|
1415
|
+
error: z
|
|
1416
|
+
.optional(z.string())
|
|
1417
|
+
.check(
|
|
1418
|
+
z.describe('Why the delivery failed, present when `delivered` is `false`.'),
|
|
1419
|
+
z.meta({ examples: ['Connection timed out'] }),
|
|
1420
|
+
),
|
|
1421
|
+
eventId: z
|
|
1422
|
+
.string()
|
|
1423
|
+
.check(
|
|
1424
|
+
z.describe('Synthetic event ID (`evt_…`) Tempo sent for this ping.'),
|
|
1425
|
+
z.meta({ examples: ['evt_abc123'] }),
|
|
1426
|
+
),
|
|
1427
|
+
responseMs: z
|
|
1428
|
+
.optional(z.number().check(z.int(), z.nonnegative()))
|
|
1429
|
+
.check(
|
|
1430
|
+
z.describe('Round-trip delivery time in milliseconds, when the request completed.'),
|
|
1431
|
+
z.meta({ examples: [12] }),
|
|
1432
|
+
),
|
|
1433
|
+
responseStatus: z
|
|
1434
|
+
.optional(z.number().check(z.int()))
|
|
1435
|
+
.check(
|
|
1436
|
+
z.describe('HTTP status your endpoint returned, when Tempo received a response.'),
|
|
1437
|
+
z.meta({ examples: [200] }),
|
|
1438
|
+
),
|
|
1439
|
+
})
|
|
1440
|
+
.check(z.describe('Result of sending a synthetic ping event to a webhook destination.')),
|
|
1441
|
+
'PingWebhookResponse',
|
|
1442
|
+
)
|
|
1217
1443
|
}
|
|
1218
1444
|
|
|
1219
1445
|
/** Schemas for the retryWebhookDelivery operation. */
|
|
@@ -1235,32 +1461,37 @@ export namespace schema {
|
|
|
1235
1461
|
})
|
|
1236
1462
|
.check(z.describe('Path parameters for retrying a webhook delivery.'))
|
|
1237
1463
|
|
|
1238
|
-
export const Response = pingWebhook.Response
|
|
1464
|
+
export const Response = OpenApi.component(pingWebhook.Response, 'RetryWebhookDeliveryResponse')
|
|
1239
1465
|
}
|
|
1240
1466
|
|
|
1241
1467
|
/** Schemas for the updateWebhook operation. */
|
|
1242
1468
|
export namespace updateWebhook {
|
|
1243
1469
|
export const Params = getWebhook.Params
|
|
1244
1470
|
|
|
1245
|
-
export const Body =
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1471
|
+
export const Body = OpenApi.component(
|
|
1472
|
+
z
|
|
1473
|
+
.object({
|
|
1474
|
+
context: z
|
|
1475
|
+
.optional(z.nullable(Context))
|
|
1476
|
+
.check(z.describe('New human context, or `null` to clear it.')),
|
|
1477
|
+
destination: z
|
|
1478
|
+
.optional(Destination)
|
|
1479
|
+
.check(
|
|
1480
|
+
z.describe('New delivery destination for future events (URL or Slack channel).'),
|
|
1481
|
+
),
|
|
1482
|
+
filters: z
|
|
1483
|
+
.optional(Filters)
|
|
1484
|
+
.check(
|
|
1485
|
+
z.describe('New filters to apply to future webhook events.'),
|
|
1486
|
+
z.meta({ examples: [{ address: '0x20c0000000000000000000008f5425160ebe5525' }] }),
|
|
1487
|
+
),
|
|
1488
|
+
status: z
|
|
1489
|
+
.optional(Status)
|
|
1490
|
+
.check(z.describe('New lifecycle status, such as pausing or resuming delivery.')),
|
|
1491
|
+
})
|
|
1492
|
+
.check(z.describe('Fields to update on the webhook subscription.')),
|
|
1493
|
+
'UpdateWebhookRequest',
|
|
1494
|
+
)
|
|
1264
1495
|
|
|
1265
1496
|
export const Response = Subscription
|
|
1266
1497
|
}
|
|
@@ -1269,16 +1500,19 @@ export namespace schema {
|
|
|
1269
1500
|
export namespace deleteWebhook {
|
|
1270
1501
|
export const Params = getWebhook.Params
|
|
1271
1502
|
|
|
1272
|
-
export const Response =
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1503
|
+
export const Response = OpenApi.component(
|
|
1504
|
+
z
|
|
1505
|
+
.object({
|
|
1506
|
+
id: z
|
|
1507
|
+
.string()
|
|
1508
|
+
.check(
|
|
1509
|
+
z.describe('ID of the webhook subscription that was deleted.'),
|
|
1510
|
+
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
1511
|
+
),
|
|
1512
|
+
})
|
|
1513
|
+
.check(z.describe('Confirmation that the webhook subscription was deleted.')),
|
|
1514
|
+
'DeleteWebhookResponse',
|
|
1515
|
+
)
|
|
1282
1516
|
}
|
|
1283
1517
|
}
|
|
1284
1518
|
|
|
@@ -1293,8 +1527,7 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1293
1527
|
const hidden = !options.enabled
|
|
1294
1528
|
const availableEventTypes = eventTypeDescriptions.filter(
|
|
1295
1529
|
(eventType) =>
|
|
1296
|
-
eventType.type
|
|
1297
|
-
options.applicationEventTypes?.includes(eventType.type),
|
|
1530
|
+
!isRoutesEventType(eventType.type) || options.applicationEventTypes?.includes(eventType.type),
|
|
1298
1531
|
)
|
|
1299
1532
|
const availableEventTypeSet = new Set(availableEventTypes.map((eventType) => eventType.type))
|
|
1300
1533
|
// Gate the whole resource on a configured state store. Without it the
|
|
@@ -1322,6 +1555,16 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1322
1555
|
hide: hidden,
|
|
1323
1556
|
operationId: 'getWebhookEventTypes',
|
|
1324
1557
|
responses: OpenApi.responses({
|
|
1558
|
+
errors: {
|
|
1559
|
+
400: {
|
|
1560
|
+
codes: [],
|
|
1561
|
+
description: 'The API key credential is malformed.',
|
|
1562
|
+
},
|
|
1563
|
+
404: {
|
|
1564
|
+
codes: ['webhooks_not_enabled'],
|
|
1565
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1566
|
+
},
|
|
1567
|
+
},
|
|
1325
1568
|
success: {
|
|
1326
1569
|
description: 'Webhook event types available for subscription.',
|
|
1327
1570
|
schema: schema.getWebhookEventTypes.Response,
|
|
@@ -1376,7 +1619,12 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1376
1619
|
},
|
|
1377
1620
|
403: {
|
|
1378
1621
|
codes: ['api_key_forbidden', 'limit_exceeded'],
|
|
1379
|
-
description:
|
|
1622
|
+
description:
|
|
1623
|
+
'The API key lacks access or its creator-shared subscription limit was reached.',
|
|
1624
|
+
},
|
|
1625
|
+
404: {
|
|
1626
|
+
codes: ['webhooks_not_enabled'],
|
|
1627
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1380
1628
|
},
|
|
1381
1629
|
},
|
|
1382
1630
|
success: {
|
|
@@ -1410,11 +1658,11 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1410
1658
|
message: 'Webhook event type is not available in this deployment',
|
|
1411
1659
|
status: 400,
|
|
1412
1660
|
})
|
|
1413
|
-
if (body.eventType
|
|
1661
|
+
if (isRoutesEventType(body.eventType)) {
|
|
1414
1662
|
if (principal?.type !== 'api_key') return unauthorized(c)
|
|
1415
1663
|
if (
|
|
1416
1664
|
!principal.apiKey.scopes.some(
|
|
1417
|
-
(scope) => scope === Scope.wildcard || scope === '
|
|
1665
|
+
(scope) => scope === Scope.wildcard || scope === 'routes:read',
|
|
1418
1666
|
)
|
|
1419
1667
|
)
|
|
1420
1668
|
return Response.error(c, {
|
|
@@ -1432,12 +1680,11 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1432
1680
|
// Preserve destination errors before the creation-time RPC dependency.
|
|
1433
1681
|
WebhookDestination.assertDestination(body.destination)
|
|
1434
1682
|
const maxPerOwner = webhook.maxPerOwner ?? defaultMaxPerOwner
|
|
1435
|
-
if ((await Webhooks.
|
|
1683
|
+
if ((await Webhooks.countSubscriptionsForLimit(db, { owner })) >= maxPerOwner)
|
|
1436
1684
|
throw new Webhooks.LimitExceededError(maxPerOwner)
|
|
1437
|
-
const startBlockNumber =
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
: await getRpcHead(c.get('getClient')(chainId))
|
|
1685
|
+
const startBlockNumber = isRoutesEventType(body.eventType)
|
|
1686
|
+
? undefined
|
|
1687
|
+
: await getRpcHead(c.get('getClient')(chainId))
|
|
1441
1688
|
const subscription = await Webhooks.createSubscription(
|
|
1442
1689
|
db,
|
|
1443
1690
|
{
|
|
@@ -1483,6 +1730,16 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1483
1730
|
hide: hidden,
|
|
1484
1731
|
operationId: 'listWebhooks',
|
|
1485
1732
|
responses: OpenApi.responses({
|
|
1733
|
+
errors: {
|
|
1734
|
+
400: {
|
|
1735
|
+
codes: ['query_invalid'],
|
|
1736
|
+
description: 'The query parameters are invalid.',
|
|
1737
|
+
},
|
|
1738
|
+
404: {
|
|
1739
|
+
codes: ['webhooks_not_enabled'],
|
|
1740
|
+
description: 'Webhooks are not enabled for this API deployment.',
|
|
1741
|
+
},
|
|
1742
|
+
},
|
|
1486
1743
|
success: {
|
|
1487
1744
|
description: 'A page of webhook subscriptions.',
|
|
1488
1745
|
schema: schema.listWebhooks.Response,
|
|
@@ -1560,9 +1817,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1560
1817
|
operationId: 'getWebhook',
|
|
1561
1818
|
responses: OpenApi.responses({
|
|
1562
1819
|
errors: {
|
|
1820
|
+
400: {
|
|
1821
|
+
codes: ['param_invalid'],
|
|
1822
|
+
description: 'The webhook ID is invalid.',
|
|
1823
|
+
},
|
|
1563
1824
|
404: {
|
|
1564
1825
|
description: 'No webhook subscription was found for that ID.',
|
|
1565
|
-
codes: ['webhook_not_found'],
|
|
1826
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1566
1827
|
},
|
|
1567
1828
|
},
|
|
1568
1829
|
success: {
|
|
@@ -1617,9 +1878,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1617
1878
|
operationId: 'listWebhookDeliveries',
|
|
1618
1879
|
responses: OpenApi.responses({
|
|
1619
1880
|
errors: {
|
|
1881
|
+
400: {
|
|
1882
|
+
codes: ['param_invalid', 'query_invalid'],
|
|
1883
|
+
description: 'The webhook ID or query parameters are invalid.',
|
|
1884
|
+
},
|
|
1620
1885
|
404: {
|
|
1621
1886
|
description: 'No webhook subscription was found for that ID.',
|
|
1622
|
-
codes: ['webhook_not_found'],
|
|
1887
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1623
1888
|
},
|
|
1624
1889
|
},
|
|
1625
1890
|
success: {
|
|
@@ -1706,9 +1971,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1706
1971
|
operationId: 'pingWebhook',
|
|
1707
1972
|
responses: OpenApi.responses({
|
|
1708
1973
|
errors: {
|
|
1974
|
+
400: {
|
|
1975
|
+
codes: ['param_invalid'],
|
|
1976
|
+
description: 'The webhook ID is invalid.',
|
|
1977
|
+
},
|
|
1709
1978
|
404: {
|
|
1710
1979
|
description: 'No webhook subscription was found for that ID.',
|
|
1711
|
-
codes: ['webhook_not_found'],
|
|
1980
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1712
1981
|
},
|
|
1713
1982
|
},
|
|
1714
1983
|
success: {
|
|
@@ -1771,9 +2040,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1771
2040
|
operationId: 'retryWebhookDelivery',
|
|
1772
2041
|
responses: OpenApi.responses({
|
|
1773
2042
|
errors: {
|
|
2043
|
+
400: {
|
|
2044
|
+
codes: ['param_invalid'],
|
|
2045
|
+
description: 'The webhook or delivery ID is invalid.',
|
|
2046
|
+
},
|
|
1774
2047
|
404: {
|
|
1775
2048
|
description: 'No webhook subscription or delivery was found for those IDs.',
|
|
1776
|
-
codes: ['webhook_not_found', 'delivery_not_found'],
|
|
2049
|
+
codes: ['webhook_not_found', 'delivery_not_found', 'webhooks_not_enabled'],
|
|
1777
2050
|
},
|
|
1778
2051
|
},
|
|
1779
2052
|
success: {
|
|
@@ -1859,7 +2132,7 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1859
2132
|
},
|
|
1860
2133
|
404: {
|
|
1861
2134
|
description: 'No webhook subscription was found for that ID.',
|
|
1862
|
-
codes: ['webhook_not_found'],
|
|
2135
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1863
2136
|
},
|
|
1864
2137
|
},
|
|
1865
2138
|
success: {
|
|
@@ -1926,9 +2199,13 @@ export function webhooks(options: webhooks.Options = {}) {
|
|
|
1926
2199
|
operationId: 'deleteWebhook',
|
|
1927
2200
|
responses: OpenApi.responses({
|
|
1928
2201
|
errors: {
|
|
2202
|
+
400: {
|
|
2203
|
+
codes: ['param_invalid'],
|
|
2204
|
+
description: 'The webhook ID is invalid.',
|
|
2205
|
+
},
|
|
1929
2206
|
404: {
|
|
1930
2207
|
description: 'No webhook subscription was found for that ID.',
|
|
1931
|
-
codes: ['webhook_not_found'],
|
|
2208
|
+
codes: ['webhook_not_found', 'webhooks_not_enabled'],
|
|
1932
2209
|
},
|
|
1933
2210
|
},
|
|
1934
2211
|
success: {
|
|
@@ -2088,7 +2365,8 @@ export async function getRpcHead(client: Viem.getClient.ReturnType): Promise<num
|
|
|
2088
2365
|
|
|
2089
2366
|
const filterSchemas = {
|
|
2090
2367
|
'block:created': schema.BlockFilters,
|
|
2091
|
-
'
|
|
2368
|
+
'routes:deposit.updated': schema.RoutesDepositFilters,
|
|
2369
|
+
'routes:transfer.updated': schema.RoutesTransferFilters,
|
|
2092
2370
|
'log:emitted': schema.LogFilters,
|
|
2093
2371
|
'token:transfer': schema.TransferFilters,
|
|
2094
2372
|
'transaction:included': schema.TxFilters,
|
|
@@ -2340,8 +2618,18 @@ function pushEventArgs(args: Record<string, unknown> | undefined, event: AbiEven
|
|
|
2340
2618
|
return pushed
|
|
2341
2619
|
}
|
|
2342
2620
|
|
|
2621
|
+
type LogPushdownFilters = {
|
|
2622
|
+
address?: unknown
|
|
2623
|
+
args?: Record<string, unknown> | undefined
|
|
2624
|
+
signature?: string | undefined
|
|
2625
|
+
topic0?: unknown
|
|
2626
|
+
topic1?: unknown
|
|
2627
|
+
topic2?: unknown
|
|
2628
|
+
topic3?: unknown
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2343
2631
|
/** Checks that the accepted filter carries a selective anchor rather than matching every log. */
|
|
2344
|
-
function hasLogPushdown(f:
|
|
2632
|
+
function hasLogPushdown(f: LogPushdownFilters): boolean {
|
|
2345
2633
|
if (pushAddress(f.address) !== undefined) return true
|
|
2346
2634
|
|
|
2347
2635
|
const secondaryTopic = [f.topic1, f.topic2, f.topic3].some(
|
|
@@ -2611,8 +2899,7 @@ function toPublic(subscription: Webhooks.Subscription) {
|
|
|
2611
2899
|
...(subscription.context === undefined ? {} : { context: subscription.context }),
|
|
2612
2900
|
createdAt: subscription.createdAt,
|
|
2613
2901
|
destination: redactDestination(subscription.destination),
|
|
2614
|
-
...(subscription.eventType
|
|
2615
|
-
subscription.environment !== undefined
|
|
2902
|
+
...(isRoutesEventType(subscription.eventType) && subscription.environment !== undefined
|
|
2616
2903
|
? { environment: subscription.environment }
|
|
2617
2904
|
: {}),
|
|
2618
2905
|
eventType: subscription.eventType,
|