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
package/src/db/Schema.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as z from 'zod/mini'
|
|
2
|
+
import type { Hex } from 'ox'
|
|
2
3
|
import type { Address } from 'viem'
|
|
3
4
|
|
|
4
5
|
import type * as EarnVaults from '../internal/EarnVaults.js'
|
|
5
|
-
import type * as
|
|
6
|
-
import type * as
|
|
7
|
-
import type * as
|
|
8
|
-
import type * as
|
|
9
|
-
import type * as
|
|
6
|
+
import type * as Campaigns from '../internal/rewards/Campaigns.js'
|
|
7
|
+
import type * as routes_Catalog from '../internal/routes/Catalog.js'
|
|
8
|
+
import type * as routes_Deposit from '../internal/routes/Deposit.js'
|
|
9
|
+
import type * as routes_DepositAddress from '../internal/routes/DepositAddress.js'
|
|
10
|
+
import type * as routes_Provider from '../internal/routes/Provider.js'
|
|
11
|
+
import type * as routes_Transfer from '../internal/routes/Transfer.js'
|
|
12
|
+
import type * as routes_TransferSubsidy from '../internal/routes/TransferSubsidy.js'
|
|
10
13
|
import type * as internal_Schema from '../internal/Schema.js'
|
|
11
14
|
import type * as Webhooks from '../internal/Webhooks.js'
|
|
12
15
|
|
|
@@ -29,11 +32,111 @@ export const AdminAuditLog = z.object({
|
|
|
29
32
|
/** Columns of the `admin_audit_logs` table. */
|
|
30
33
|
export type AdminAuditLog = z.output<typeof AdminAuditLog>
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/** A durable fence for API keys attributed to a deleted organization or project. */
|
|
36
|
+
export const ApiKeyOwnerTombstone = z.object({
|
|
37
|
+
createdAt: z.string().check(z.describe('When the owner deletion committed (ISO 8601).')),
|
|
38
|
+
id: z.string().check(z.describe('Deterministic organization or project owner key.')),
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
/** Columns of the `api_key_owner_tombstones` table. */
|
|
42
|
+
export type ApiKeyOwnerTombstone = z.output<typeof ApiKeyOwnerTombstone>
|
|
43
|
+
|
|
44
|
+
/** Legacy aggregate API-key admission count retained for migration compatibility. */
|
|
45
|
+
export const ApiKeyOwnerAdmission = z.object({
|
|
46
|
+
liveKeys: z.number().check(z.int(), z.nonnegative()),
|
|
47
|
+
orgId: z.string(),
|
|
48
|
+
updatedAt: z.string(),
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
/** Columns of the `api_key_owner_admissions` table. */
|
|
52
|
+
export type ApiKeyOwnerAdmission = z.output<typeof ApiKeyOwnerAdmission>
|
|
53
|
+
|
|
54
|
+
/** One API key counted toward its organization's live-key admission limit. */
|
|
55
|
+
export const ApiKeyAdmission = z.object({
|
|
56
|
+
expiresAt: z.nullable(z.string()),
|
|
57
|
+
id: z.string(),
|
|
58
|
+
orgId: z.string(),
|
|
59
|
+
projectId: z.nullable(z.string()),
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
/** Columns of the `api_key_admissions` table. */
|
|
63
|
+
export type ApiKeyAdmission = z.output<typeof ApiKeyAdmission>
|
|
64
|
+
|
|
65
|
+
/** Records an organization's latest bounded legacy-key admission reconciliation. */
|
|
66
|
+
export const ApiKeyAdmissionBootstrap = z.object({
|
|
67
|
+
bootstrappedAt: z.string(),
|
|
68
|
+
orgId: z.string(),
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
/** Columns of the `api_key_admission_bootstraps` table. */
|
|
72
|
+
export type ApiKeyAdmissionBootstrap = z.output<typeof ApiKeyAdmissionBootstrap>
|
|
73
|
+
|
|
74
|
+
/** A retained revocation fence for one stable API-key id. */
|
|
75
|
+
export const ApiKeyRevocation = z.object({
|
|
76
|
+
expiresAt: z.string(),
|
|
77
|
+
id: z.string(),
|
|
78
|
+
orgId: z.nullable(z.string()),
|
|
79
|
+
revokedAt: z.string(),
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
/** Columns of the `api_key_revocations` table. */
|
|
83
|
+
export type ApiKeyRevocation = z.output<typeof ApiKeyRevocation>
|
|
84
|
+
|
|
85
|
+
/** A Better Auth login method linked to a Tempo user. */
|
|
86
|
+
export const AuthAccount = z.object({
|
|
87
|
+
accessToken: z.nullable(z.string()).check(z.describe('OAuth access token, or null.')),
|
|
88
|
+
accessTokenExpiresAt: z
|
|
89
|
+
.nullable(z.date())
|
|
90
|
+
.check(z.describe('When the OAuth access token expires, or null.')),
|
|
91
|
+
accountId: z.string().check(z.describe('Provider-side account identifier.')),
|
|
92
|
+
createdAt: z.date().check(z.describe('When Better Auth created the account.')),
|
|
93
|
+
id: z.string().check(z.describe('Better Auth account row id.')),
|
|
94
|
+
idToken: z.nullable(z.string()).check(z.describe('OpenID Connect identity token, or null.')),
|
|
95
|
+
issuer: z.string().check(z.describe('Issuer namespace for the provider account.')),
|
|
96
|
+
password: z.nullable(z.string()).check(z.describe('Credential password hash, or null.')),
|
|
97
|
+
providerId: z.string().check(z.describe('Authentication provider identifier.')),
|
|
98
|
+
refreshToken: z.nullable(z.string()).check(z.describe('OAuth refresh token, or null.')),
|
|
99
|
+
refreshTokenExpiresAt: z
|
|
100
|
+
.nullable(z.date())
|
|
101
|
+
.check(z.describe('When the OAuth refresh token expires, or null.')),
|
|
102
|
+
scope: z.nullable(z.string()).check(z.describe('Granted OAuth scopes, or null.')),
|
|
103
|
+
updatedAt: z.date().check(z.describe('When Better Auth last changed the account.')),
|
|
104
|
+
userId: z.string().check(z.describe('Tempo user id that owns the login method.')),
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
/** Columns of the `auth_accounts` table. */
|
|
108
|
+
export type AuthAccount = z.output<typeof AuthAccount>
|
|
109
|
+
|
|
110
|
+
/** A Better Auth session row for the pinned package schema. */
|
|
111
|
+
export const AuthSession = z.object({
|
|
112
|
+
createdAt: z.date().check(z.describe('When Better Auth created the session.')),
|
|
113
|
+
expiresAt: z.date().check(z.describe('When the Better Auth session expires.')),
|
|
114
|
+
id: z.string().check(z.describe('Better Auth session row id.')),
|
|
115
|
+
ipAddress: z.nullable(z.string()).check(z.describe('Client IP address, or null.')),
|
|
116
|
+
provider: z
|
|
117
|
+
.nullable(z.string())
|
|
118
|
+
.check(z.describe('Authentication provider that established the session, or null.')),
|
|
119
|
+
token: z.string().check(z.describe('Opaque Better Auth session token.')),
|
|
120
|
+
updatedAt: z.date().check(z.describe('When Better Auth last changed the session.')),
|
|
121
|
+
userAgent: z.nullable(z.string()).check(z.describe('Client user agent, or null.')),
|
|
122
|
+
userId: z.string().check(z.describe('Owning Better Auth user id.')),
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
/** Columns of the `auth_sessions` table. */
|
|
126
|
+
export type AuthSession = z.output<typeof AuthSession>
|
|
127
|
+
|
|
128
|
+
/** A Better Auth verification row for the pinned package schema. */
|
|
129
|
+
export const AuthVerification = z.object({
|
|
130
|
+
createdAt: z.date().check(z.describe('When Better Auth created the verification.')),
|
|
131
|
+
expiresAt: z.date().check(z.describe('When the verification expires.')),
|
|
132
|
+
id: z.string().check(z.describe('Better Auth verification row id.')),
|
|
133
|
+
identifier: z.string().check(z.describe('Lookup key for the verification purpose.')),
|
|
134
|
+
updatedAt: z.date().check(z.describe('When Better Auth last changed the verification.')),
|
|
135
|
+
value: z.string().check(z.describe('Stored verification credential.')),
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
/** Columns of the `auth_verifications` table. */
|
|
139
|
+
export type AuthVerification = z.output<typeof AuthVerification>
|
|
37
140
|
|
|
38
141
|
/** An organization's billing configuration; source-agnostic (limits apply to any billing source). */
|
|
39
142
|
export const BillingSettings = z.object({
|
|
@@ -74,21 +177,6 @@ export const EarlyAccessEntry = z.object({
|
|
|
74
177
|
/** Columns of the `early_access` table. */
|
|
75
178
|
export type EarlyAccessEntry = z.output<typeof EarlyAccessEntry>
|
|
76
179
|
|
|
77
|
-
/** One billing-source type enabled for an organization. */
|
|
78
|
-
export const EnabledBillingSource = z.object({
|
|
79
|
-
createdAt: z.string().check(z.describe('When the billing source was enabled (ISO 8601).')),
|
|
80
|
-
createdBy: z
|
|
81
|
-
.string()
|
|
82
|
-
.check(z.describe('Identity that enabled the source, or `migration` for backfilled rows.')),
|
|
83
|
-
orgId: z.string().check(z.describe('Organization id (`org_…`) this source is enabled for.')),
|
|
84
|
-
source: z
|
|
85
|
-
.enum(['stripe', 'tempo'])
|
|
86
|
-
.check(z.describe('Enabled billing-source type; `stripe` or `tempo`.')),
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
/** Columns of the `enabled_billing_sources` table. */
|
|
90
|
-
export type EnabledBillingSource = z.output<typeof EnabledBillingSource>
|
|
91
|
-
|
|
92
180
|
/** One curated Earn vault. */
|
|
93
181
|
export const EarnVault = z
|
|
94
182
|
.object({
|
|
@@ -116,6 +204,21 @@ export const EarnVault = z
|
|
|
116
204
|
/** Columns of the `earn_vaults` table. */
|
|
117
205
|
export type EarnVault = z.output<typeof EarnVault>
|
|
118
206
|
|
|
207
|
+
/** One billing-source type enabled for an organization. */
|
|
208
|
+
export const EnabledBillingSource = z.object({
|
|
209
|
+
createdAt: z.string().check(z.describe('When the billing source was enabled (ISO 8601).')),
|
|
210
|
+
createdBy: z
|
|
211
|
+
.string()
|
|
212
|
+
.check(z.describe('Identity that enabled the source, or `migration` for backfilled rows.')),
|
|
213
|
+
orgId: z.string().check(z.describe('Organization id (`org_…`) this source is enabled for.')),
|
|
214
|
+
source: z
|
|
215
|
+
.enum(['stripe', 'tempo'])
|
|
216
|
+
.check(z.describe('Enabled billing-source type; `stripe` or `tempo`.')),
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
/** Columns of the `enabled_billing_sources` table. */
|
|
220
|
+
export type EnabledBillingSource = z.output<typeof EnabledBillingSource>
|
|
221
|
+
|
|
119
222
|
/** A pending, expiring offer of organization membership. */
|
|
120
223
|
export const Invitation = z.object({
|
|
121
224
|
acceptedAt: z
|
|
@@ -219,6 +322,15 @@ export const Organization = z.object({
|
|
|
219
322
|
name: z
|
|
220
323
|
.string()
|
|
221
324
|
.check(z.describe('Human-readable organization name.'), z.meta({ examples: ['Acme, Inc.'] })),
|
|
325
|
+
sponsorshipSubsidyDurationDays: z
|
|
326
|
+
.nullable(z.number().check(z.int(), z.positive()))
|
|
327
|
+
.check(z.describe('Promotional sponsorship duration in days, or null when disabled.')),
|
|
328
|
+
// The persisted column name predates attribution-scoped promotion limits.
|
|
329
|
+
sponsorshipSubsidyProjectSpendLimit: z
|
|
330
|
+
.nullable(z.string())
|
|
331
|
+
.check(
|
|
332
|
+
z.describe('Per-attribution promotional spend cap in decimal USD, or null when disabled.'),
|
|
333
|
+
),
|
|
222
334
|
updatedAt: z.string().check(z.describe('When the organization was last updated (ISO 8601).')),
|
|
223
335
|
userId: z
|
|
224
336
|
.nullable(z.string())
|
|
@@ -230,6 +342,21 @@ export const Organization = z.object({
|
|
|
230
342
|
/** Columns of the `organizations` table. */
|
|
231
343
|
export type Organization = z.output<typeof Organization>
|
|
232
344
|
|
|
345
|
+
/** An organization Routes subsidy policy. */
|
|
346
|
+
export const RoutesSubsidy = z.object({
|
|
347
|
+
createdAt: z.string().check(z.describe('When the Routes subsidy policy was created (ISO 8601).')),
|
|
348
|
+
enabled: z.boolean().check(z.describe('Whether the organization enables Routes subsidies.')),
|
|
349
|
+
frequency: z.literal('tx').check(z.describe('Interval over which the subsidy limit applies.')),
|
|
350
|
+
maxAmount: z
|
|
351
|
+
.nullable(z.string())
|
|
352
|
+
.check(z.describe('Maximum Routes subsidy gap in decimal USD, or null when disabled.')),
|
|
353
|
+
orgId: z.string().check(z.describe('Organization id (`org_…`).')),
|
|
354
|
+
updatedAt: z.string().check(z.describe('When the Routes subsidy policy was updated (ISO 8601).')),
|
|
355
|
+
})
|
|
356
|
+
|
|
357
|
+
/** Columns of the `routes_subsidies` table. */
|
|
358
|
+
export type RoutesSubsidy = z.output<typeof RoutesSubsidy>
|
|
359
|
+
|
|
233
360
|
/** A project: an app or integration within an organization. */
|
|
234
361
|
export const Project = z.object({
|
|
235
362
|
createdAt: z.string().check(z.describe('When the project was created (ISO 8601).')),
|
|
@@ -243,15 +370,298 @@ export const Project = z.object({
|
|
|
243
370
|
.string()
|
|
244
371
|
.check(z.describe('Human-readable project name.'), z.meta({ examples: ['Checkout'] })),
|
|
245
372
|
orgId: z.string().check(z.describe('Owning organization id (`org_…`).')),
|
|
373
|
+
sponsorshipSubsidyStartsAt: z
|
|
374
|
+
.nullable(z.string())
|
|
375
|
+
.check(z.describe('When the project first activated promotional sponsorship, or null.')),
|
|
376
|
+
sponsorshipSubsidyEndsAt: z
|
|
377
|
+
.nullable(z.string())
|
|
378
|
+
.check(z.describe('When the project promotional sponsorship ends, or null.')),
|
|
379
|
+
sponsorshipSpendLimit: z
|
|
380
|
+
.nullable(z.string())
|
|
381
|
+
.check(z.describe('Promotional spend cap in fee-token base units, or null.')),
|
|
246
382
|
updatedAt: z.string().check(z.describe('When the project was last updated (ISO 8601).')),
|
|
247
383
|
})
|
|
248
384
|
|
|
249
385
|
/** Columns of the `projects` table. */
|
|
250
386
|
export type Project = z.output<typeof Project>
|
|
251
387
|
|
|
388
|
+
/** A per-hour request-count watermark: the running total already reported to the meter. */
|
|
389
|
+
export const RequestUsageBucket = z.object({
|
|
390
|
+
bucketStart: z.string().check(z.describe('UTC hour start this bucket covers (ISO 8601).')),
|
|
391
|
+
environment: z
|
|
392
|
+
.enum(['production', 'sandbox'])
|
|
393
|
+
.check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
|
|
394
|
+
orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
|
|
395
|
+
reportedCount: z
|
|
396
|
+
.number()
|
|
397
|
+
.check(z.describe('Cumulative request count already reported to the meter for this bucket.')),
|
|
398
|
+
updatedAt: z.string().check(z.describe('When the watermark last advanced (ISO 8601).')),
|
|
399
|
+
})
|
|
400
|
+
|
|
401
|
+
/** Columns of the `request_usage_buckets` table. */
|
|
402
|
+
export type RequestUsageBucket = z.output<typeof RequestUsageBucket>
|
|
403
|
+
|
|
404
|
+
/** One request-count meter event: a frozen additive delta with its exactly-once state. */
|
|
405
|
+
export const RequestUsageMeterEvent = z.object({
|
|
406
|
+
bucketStart: z.string().check(z.describe('UTC hour start this event bills for (ISO 8601).')),
|
|
407
|
+
deltaCount: z
|
|
408
|
+
.number()
|
|
409
|
+
.check(z.describe('Frozen request count this event bills; a positive additive delta.')),
|
|
410
|
+
environment: z
|
|
411
|
+
.enum(['production', 'sandbox'])
|
|
412
|
+
.check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
|
|
413
|
+
error: z.nullable(z.string()).check(z.describe('Last failure detail while `pending`, or null.')),
|
|
414
|
+
firstAttemptedAt: z.string().check(z.describe('When this event was first claimed (ISO 8601).')),
|
|
415
|
+
identifier: z
|
|
416
|
+
.string()
|
|
417
|
+
.check(z.describe('Deterministic id; also the Stripe meter-event identifier and idempotency key.')), // prettier-ignore
|
|
418
|
+
orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
|
|
419
|
+
reason: z
|
|
420
|
+
.nullable(z.string())
|
|
421
|
+
.check(z.describe('Skip reason when `state` is `skipped` (`no_customer` | `customer_canceled`), or null.')), // prettier-ignore
|
|
422
|
+
reportedAt: z
|
|
423
|
+
.nullable(z.string())
|
|
424
|
+
.check(z.describe('When Stripe acknowledged the event (ISO 8601), or null.')),
|
|
425
|
+
sequence: z
|
|
426
|
+
.number()
|
|
427
|
+
.check(z.describe('Reported-count watermark observed when this delta was claimed.')),
|
|
428
|
+
state: z
|
|
429
|
+
.enum(['pending', 'reported', 'skipped'])
|
|
430
|
+
.check(z.describe('Exactly-once state: `pending` retries, `reported` is done, `skipped` is audited.')), // prettier-ignore
|
|
431
|
+
stripeCustomerId: z.string().check(z.describe('Stripe customer id the event bills against.')),
|
|
432
|
+
})
|
|
433
|
+
|
|
434
|
+
/** Columns of the `request_usage_meter_events` table. */
|
|
435
|
+
export type RequestUsageMeterEvent = z.output<typeof RequestUsageMeterEvent>
|
|
436
|
+
|
|
437
|
+
/** One reward campaign bound to a verified Earn vault. */
|
|
438
|
+
export const RewardCampaign = z.object({
|
|
439
|
+
assetAddress: z.custom<Address>().check(z.describe('Vault base-asset address (lowercase).')),
|
|
440
|
+
assetDecimals: z
|
|
441
|
+
.number()
|
|
442
|
+
.check(z.int(), z.nonnegative(), z.lte(255), z.describe('Vault base-asset decimals.')),
|
|
443
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
|
|
444
|
+
config: z.custom<Campaigns.Config>().check(z.describe('Active campaign configuration.')),
|
|
445
|
+
controllerAddress: z
|
|
446
|
+
.nullable(z.custom<Address>())
|
|
447
|
+
.check(z.describe('Target-yield controller, or null.')),
|
|
448
|
+
createdAt: z.string().check(z.describe('When the campaign was created (ISO 8601).')),
|
|
449
|
+
deliveredThrough: z.string().check(z.regex(/^\d+$/), z.describe('Last delivered Unix boundary.')),
|
|
450
|
+
distributorAddress: z
|
|
451
|
+
.nullable(z.custom<Address>())
|
|
452
|
+
.check(z.describe('Merkle distributor, or null.')),
|
|
453
|
+
earnShareAddress: z.custom<Address>().check(z.describe('Vault EarnShare address (lowercase).')),
|
|
454
|
+
earnShareDecimals: z
|
|
455
|
+
.number()
|
|
456
|
+
.check(z.int(), z.nonnegative(), z.lte(255), z.describe('Vault EarnShare decimals.')),
|
|
457
|
+
eventCursor: z
|
|
458
|
+
.nullable(z.custom<Campaigns.EventCursor>())
|
|
459
|
+
.check(z.describe('Last applied TIDX event, or null.')),
|
|
460
|
+
paused: z.boolean().check(z.describe('Whether new campaign work is paused.')),
|
|
461
|
+
pendingConfig: z
|
|
462
|
+
.nullable(z.custom<Campaigns.Config>())
|
|
463
|
+
.check(z.describe('Future configuration, or null.')),
|
|
464
|
+
pendingEffectiveAt: z.nullable(z.string()).check(z.describe('Pending Unix boundary, or null.')),
|
|
465
|
+
provisioningError: z
|
|
466
|
+
.nullable(z.string())
|
|
467
|
+
.check(z.describe('Actionable provisioning error, or null.')),
|
|
468
|
+
signerAddress: z
|
|
469
|
+
.nullable(z.custom<Address>())
|
|
470
|
+
.check(z.describe('Signer permanently bound when reward periphery is first provisioned.')),
|
|
471
|
+
updatedAt: z.string().check(z.describe('When campaign state last changed (ISO 8601).')),
|
|
472
|
+
vaultAddress: z.custom<Address>().check(z.describe('Verified EarnVault address (lowercase).')),
|
|
473
|
+
})
|
|
474
|
+
|
|
475
|
+
/** Columns of the `reward_campaigns` table. */
|
|
476
|
+
export type RewardCampaign = z.output<typeof RewardCampaign>
|
|
477
|
+
|
|
478
|
+
/** One verified reward distributor retained for historical payout recognition. */
|
|
479
|
+
export const RewardCampaignDistributor = z.object({
|
|
480
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
|
|
481
|
+
createdAt: z.string().check(z.describe('When the distributor was first recorded (ISO 8601).')),
|
|
482
|
+
distributorAddress: z.custom<Address>().check(z.describe('Verified reward distributor address.')),
|
|
483
|
+
vaultAddress: z.custom<Address>().check(z.describe('Verified EarnVault address (lowercase).')),
|
|
484
|
+
})
|
|
485
|
+
|
|
486
|
+
/** Columns of the `reward_campaign_distributors` table. */
|
|
487
|
+
export type RewardCampaignDistributor = z.output<typeof RewardCampaignDistributor>
|
|
488
|
+
|
|
489
|
+
/** One current delivered recipient projection. */
|
|
490
|
+
export const RewardAccount = z.object({
|
|
491
|
+
accrualRemainder: z
|
|
492
|
+
.string()
|
|
493
|
+
.check(z.regex(/^\d+$/), z.describe('Carried reward arithmetic remainder.')),
|
|
494
|
+
allocatedPrincipalAssets: z
|
|
495
|
+
.string()
|
|
496
|
+
.check(z.regex(/^\d+$/), z.describe('Principal allocated against campaign caps.')),
|
|
497
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
|
|
498
|
+
cumulativeEntitlement: z
|
|
499
|
+
.string()
|
|
500
|
+
.check(z.regex(/^\d+$/), z.describe('Cumulative EarnShare entitlement.')),
|
|
501
|
+
cumulativePaid: z.string().check(z.regex(/^\d+$/), z.describe('Cumulative EarnShare paid.')),
|
|
502
|
+
deferral: z.nullable(z.string()).check(z.describe('Current payout deferral reason, or null.')),
|
|
503
|
+
eligibilityRegisteredAt: z
|
|
504
|
+
.nullable(z.string())
|
|
505
|
+
.check(z.describe('Eligibility registration version consumed by this projection.')),
|
|
506
|
+
lots: z
|
|
507
|
+
.array(z.custom<Campaigns.DepositLot>())
|
|
508
|
+
.check(z.describe('Surviving qualified deposit lots.')),
|
|
509
|
+
pendingRewardAssets: z
|
|
510
|
+
.string()
|
|
511
|
+
.check(z.regex(/^\d+$/), z.describe('Unsettled base-asset reward units.')),
|
|
512
|
+
publicEarnShares: z
|
|
513
|
+
.string()
|
|
514
|
+
.check(z.regex(/^\d+$/), z.describe('Current attributable public EarnShare balance.')),
|
|
515
|
+
qualifiedEarnShares: z
|
|
516
|
+
.string()
|
|
517
|
+
.check(z.regex(/^\d+$/), z.describe('Current qualified EarnShare balance.')),
|
|
518
|
+
recipient: z.custom<Address>().check(z.describe('Registered reward recipient (lowercase).')),
|
|
519
|
+
registrationOrder: z
|
|
520
|
+
.string()
|
|
521
|
+
.check(z.regex(/^\d+$/), z.describe('Eligibility registration order.')),
|
|
522
|
+
updatedAt: z.string().check(z.describe('When delivered account state last changed (ISO 8601).')),
|
|
523
|
+
vaultAddress: z.custom<Address>().check(z.describe('EarnVault address (lowercase).')),
|
|
524
|
+
})
|
|
525
|
+
|
|
526
|
+
/** Columns of the `reward_accounts` table. */
|
|
527
|
+
export type RewardAccount = z.output<typeof RewardAccount>
|
|
528
|
+
|
|
529
|
+
/** One run-once manual reward credit added to a recipient's pending rewards. */
|
|
530
|
+
export const RewardCredit = z.object({
|
|
531
|
+
assets: z.string().check(z.regex(/^\d+$/), z.describe('Credited base-asset reward units.')),
|
|
532
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
|
|
533
|
+
createdAt: z.string().check(z.describe('When the credit was applied (ISO 8601).')),
|
|
534
|
+
recipient: z.custom<Address>().check(z.describe('Credited reward recipient (lowercase).')),
|
|
535
|
+
reference: z
|
|
536
|
+
.string()
|
|
537
|
+
.check(z.describe('Operator reference identifying the credit batch; unique per recipient.')),
|
|
538
|
+
vaultAddress: z.custom<Address>().check(z.describe('EarnVault address (lowercase).')),
|
|
539
|
+
})
|
|
540
|
+
|
|
541
|
+
/** Columns of the `reward_credits` table. */
|
|
542
|
+
export type RewardCredit = z.output<typeof RewardCredit>
|
|
543
|
+
|
|
544
|
+
/** One durable reward execution. */
|
|
545
|
+
export const RewardRun = z.object({
|
|
546
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
|
|
547
|
+
config: z
|
|
548
|
+
.custom<Campaigns.Config>()
|
|
549
|
+
.check(z.describe('Configuration snapshot consumed by the run.')),
|
|
550
|
+
createdAt: z.string().check(z.describe('When the run was created (ISO 8601).')),
|
|
551
|
+
endsAt: z.string().check(z.regex(/^\d+$/), z.describe('Exclusive final Unix boundary.')),
|
|
552
|
+
error: z.nullable(z.string()).check(z.describe('Actionable run error, or null.')),
|
|
553
|
+
evidence: z
|
|
554
|
+
.nullable(z.custom<Campaigns.RunEvidence>())
|
|
555
|
+
.check(z.describe('Resumable or completed calculation evidence, or null.')),
|
|
556
|
+
fence: z.string().check(z.regex(/^\d+$/), z.describe('Monotonic lease fencing token.')),
|
|
557
|
+
fundedAssets: z
|
|
558
|
+
.nullable(z.string())
|
|
559
|
+
.check(z.describe('Base assets pulled for boost settlement, or null.')),
|
|
560
|
+
id: z.string().check(z.describe('Opaque reward run id (`rrn_…`).')),
|
|
561
|
+
leaseExpiresAt: z
|
|
562
|
+
.nullable(z.string())
|
|
563
|
+
.check(z.describe('Worker lease expiry (ISO 8601), or null.')),
|
|
564
|
+
liability: z
|
|
565
|
+
.nullable(z.string())
|
|
566
|
+
.check(z.describe('Published cumulative EarnShare liability, or null.')),
|
|
567
|
+
mintedEarnShares: z.nullable(z.string()).check(z.describe('Measured EarnShare mint, or null.')),
|
|
568
|
+
phase: z
|
|
569
|
+
.enum([
|
|
570
|
+
'indexing',
|
|
571
|
+
'calculating',
|
|
572
|
+
'targetYield',
|
|
573
|
+
'statement',
|
|
574
|
+
'settling',
|
|
575
|
+
'publishing',
|
|
576
|
+
'paying',
|
|
577
|
+
'delivered',
|
|
578
|
+
'failed',
|
|
579
|
+
])
|
|
580
|
+
.check(z.describe('Recoverable execution phase.')),
|
|
581
|
+
root: z.nullable(z.custom<Hex.Hex>()).check(z.describe('Published Merkle root, or null.')),
|
|
582
|
+
rootVersion: z.nullable(z.string()).check(z.describe('Published root version, or null.')),
|
|
583
|
+
startsAfter: z
|
|
584
|
+
.string()
|
|
585
|
+
.check(z.regex(/^\d+$/), z.describe('Previously delivered Unix boundary.')),
|
|
586
|
+
statement: z
|
|
587
|
+
.nullable(z.custom<Campaigns.Statement>())
|
|
588
|
+
.check(z.describe('Latest cumulative statement, or null.')),
|
|
589
|
+
statementHash: z
|
|
590
|
+
.nullable(z.custom<Hex.Hex>())
|
|
591
|
+
.check(z.describe('Statement content hash, or null.')),
|
|
592
|
+
updatedAt: z.string().check(z.describe('When run state last changed (ISO 8601).')),
|
|
593
|
+
vaultAddress: z.custom<Address>().check(z.describe('EarnVault address (lowercase).')),
|
|
594
|
+
})
|
|
595
|
+
|
|
596
|
+
/** Columns of the `reward_runs` table. */
|
|
597
|
+
export type RewardRun = z.output<typeof RewardRun>
|
|
598
|
+
|
|
599
|
+
/** One append-only signed reward transaction attempt. */
|
|
600
|
+
export const RewardTransactionAttempt = z.object({
|
|
601
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain receiving the transaction.')),
|
|
602
|
+
confirmedBlockHash: z
|
|
603
|
+
.nullable(z.custom<Hex.Hex>())
|
|
604
|
+
.check(z.describe('Confirmed canonical block hash, or null.')),
|
|
605
|
+
createdAt: z.string().check(z.describe('When the attempt was created (ISO 8601).')),
|
|
606
|
+
expiresAt: z
|
|
607
|
+
.nullable(z.string())
|
|
608
|
+
.check(z.describe('Expiring nonce deadline (ISO 8601), or null.')),
|
|
609
|
+
id: z.string().check(z.describe('Opaque transaction attempt id (`rat_…`).')),
|
|
610
|
+
intent: z.custom<Campaigns.TransactionIntent>().check(z.describe('Typed signer intent.')),
|
|
611
|
+
intentId: z.custom<Hex.Hex>().check(z.describe('Deterministic typed intent id.')),
|
|
612
|
+
nonce: z.nullable(z.string()).check(z.describe('Signer nonce, or null before signing.')),
|
|
613
|
+
receipt: z
|
|
614
|
+
.nullable(z.custom<Campaigns.TransactionReceipt>())
|
|
615
|
+
.check(z.describe('Canonical receipt, or null.')),
|
|
616
|
+
replacementOf: z.nullable(z.string()).check(z.describe('Replaced attempt id, or null.')),
|
|
617
|
+
runId: z
|
|
618
|
+
.nullable(z.string())
|
|
619
|
+
.check(z.describe('Owning reward run id, or null for provisioning.')),
|
|
620
|
+
signedBytes: z
|
|
621
|
+
.nullable(z.custom<Hex.Hex>())
|
|
622
|
+
.check(z.describe('Exact signed transaction bytes, or null.')),
|
|
623
|
+
signer: z.custom<Address>().check(z.describe('Signing account (lowercase).')),
|
|
624
|
+
state: z
|
|
625
|
+
.enum(['created', 'signed', 'broadcast', 'confirmed', 'expired', 'ineffective', 'reverted'])
|
|
626
|
+
.check(z.describe('Attempt lifecycle state.')),
|
|
627
|
+
transactionHash: z.nullable(z.custom<Hex.Hex>()).check(z.describe('Transaction hash, or null.')),
|
|
628
|
+
updatedAt: z.string().check(z.describe('When attempt state last changed (ISO 8601).')),
|
|
629
|
+
vaultAddress: z.custom<Address>().check(z.describe('Bound EarnVault address (lowercase).')),
|
|
630
|
+
})
|
|
631
|
+
|
|
632
|
+
/** Columns of the `reward_transaction_attempts` table. */
|
|
633
|
+
export type RewardTransactionAttempt = z.output<typeof RewardTransactionAttempt>
|
|
634
|
+
|
|
635
|
+
/** One wallet and Earn vault association eligible for rewards. */
|
|
636
|
+
export const RewardEligibilityAssociation = z
|
|
637
|
+
.object({
|
|
638
|
+
chainId: z.number().check(z.int(), z.positive(), z.describe('Chain containing the vault.')),
|
|
639
|
+
firstRegisteredAt: z
|
|
640
|
+
.string()
|
|
641
|
+
.check(z.describe('When the association was first registered (ISO 8601).')),
|
|
642
|
+
latestRegisteredAt: z
|
|
643
|
+
.string()
|
|
644
|
+
.check(z.describe('When the association was most recently registered (ISO 8601).')),
|
|
645
|
+
registrationOrder: z
|
|
646
|
+
.string()
|
|
647
|
+
.check(z.regex(/^\d+$/), z.describe('Monotonic registration order.')),
|
|
648
|
+
transactionHash: z.optional(
|
|
649
|
+
z.custom<Hex.Hex>().check(z.describe('Latest registration transaction hash.')),
|
|
650
|
+
),
|
|
651
|
+
vaultAddress: z.custom<Address>().check(z.describe('Earn vault address (lowercase).')),
|
|
652
|
+
walletAddress: z.custom<Address>().check(z.describe('Eligible wallet address (lowercase).')),
|
|
653
|
+
})
|
|
654
|
+
.check(z.describe('One persisted reward eligibility association.'))
|
|
655
|
+
|
|
656
|
+
/** Columns of the `reward_eligibility_associations` table. */
|
|
657
|
+
export type RewardEligibilityAssociation = z.output<typeof RewardEligibilityAssociation>
|
|
658
|
+
|
|
252
659
|
/** A transaction sponsored by the managed fee payer — the billable unit of fee payer spend. */
|
|
253
660
|
export const SponsoredTransaction = z.object({
|
|
254
661
|
apiKeyId: z.string().check(z.describe('API key id (`key_…`) that requested sponsorship.')),
|
|
662
|
+
sponsorshipAttributionId: z
|
|
663
|
+
.nullable(z.string())
|
|
664
|
+
.check(z.describe('Canonical sponsorship attribution id snapshotted at sponsorship, or null.')),
|
|
255
665
|
billable: z
|
|
256
666
|
.boolean()
|
|
257
667
|
.check(z.describe('Whether the sponsorship accrues billable spend; false for sandbox.')),
|
|
@@ -272,6 +682,9 @@ export const SponsoredTransaction = z.object({
|
|
|
272
682
|
feeToken: z
|
|
273
683
|
.nullable(z.string())
|
|
274
684
|
.check(z.describe('Fee token address, or null when the chain default applied.')),
|
|
685
|
+
finalizationAttemptedAt: z
|
|
686
|
+
.nullable(z.string())
|
|
687
|
+
.check(z.describe('When finalization last claimed this pending row (ISO 8601), or null.')),
|
|
275
688
|
finalizedAt: z
|
|
276
689
|
.nullable(z.string())
|
|
277
690
|
.check(z.describe('When the sponsorship reached a terminal status (ISO 8601), or null.')),
|
|
@@ -305,54 +718,51 @@ export const SponsoredTransaction = z.object({
|
|
|
305
718
|
/** Columns of the `sponsored_transactions` table. */
|
|
306
719
|
export type SponsoredTransaction = z.output<typeof SponsoredTransaction>
|
|
307
720
|
|
|
308
|
-
/**
|
|
309
|
-
export const
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
.
|
|
314
|
-
|
|
315
|
-
|
|
721
|
+
/** Durable position for failed sponsorship reconciliation. */
|
|
722
|
+
export const SponsorshipReconciliationCursor = z.object({
|
|
723
|
+
blockNumber: z.string().check(z.regex(/^\d+$/), z.describe('Last scanned block number.')),
|
|
724
|
+
chainId: z.number().check(z.int(), z.describe('Chain whose fee-payer transactions are scanned.')),
|
|
725
|
+
complete: z
|
|
726
|
+
.boolean()
|
|
727
|
+
.check(z.describe('Whether the next scan starts from the newest candidate.')),
|
|
728
|
+
feePayer: z.custom<Address>().check(z.describe('Lowercase managed fee-payer address.')),
|
|
729
|
+
retryCount: z
|
|
316
730
|
.number()
|
|
317
|
-
.check(z.describe('
|
|
318
|
-
|
|
731
|
+
.check(z.int(), z.nonnegative(), z.describe('Failed attempts for the blocked candidate.')),
|
|
732
|
+
retryKey: z
|
|
733
|
+
.nullable(z.string())
|
|
734
|
+
.check(z.describe('Blocked candidate block number and transaction index.')),
|
|
735
|
+
revision: z.string().check(z.describe('Revision fencing overlapping reconciliation passes.')),
|
|
736
|
+
transactionIndex: z.number().check(z.int(), z.nonnegative(), z.describe('Last scanned transaction index.')), // prettier-ignore
|
|
737
|
+
updatedAt: z.string().check(z.describe('When reconciliation saved this position (ISO 8601).')),
|
|
319
738
|
})
|
|
320
739
|
|
|
321
|
-
/** Columns of the `
|
|
322
|
-
export type
|
|
740
|
+
/** Columns of the `sponsorship_reconciliation_cursors` table. */
|
|
741
|
+
export type SponsorshipReconciliationCursor = z.output<typeof SponsorshipReconciliationCursor>
|
|
323
742
|
|
|
324
|
-
/**
|
|
325
|
-
export const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
.number()
|
|
329
|
-
.check(z.describe('Frozen request count this event bills; a positive additive delta.')),
|
|
330
|
-
environment: z
|
|
331
|
-
.enum(['production', 'sandbox'])
|
|
332
|
-
.check(z.describe('Environment the requests were served under; `production` or `sandbox`.')),
|
|
333
|
-
error: z.nullable(z.string()).check(z.describe('Last failure detail while `pending`, or null.')),
|
|
334
|
-
firstAttemptedAt: z.string().check(z.describe('When this event was first claimed (ISO 8601).')),
|
|
335
|
-
identifier: z
|
|
336
|
-
.string()
|
|
337
|
-
.check(z.describe('Deterministic id; also the Stripe meter-event identifier and idempotency key.')), // prettier-ignore
|
|
338
|
-
orgId: z.string().check(z.describe('Organization id (`org_…`) the requests attribute to.')),
|
|
339
|
-
reason: z
|
|
743
|
+
/** A canonical sponsorship attribution resolved from an external id or Tempo Project. */
|
|
744
|
+
export const SponsorshipAttribution = z.object({
|
|
745
|
+
createdAt: z.string().check(z.describe('When the attribution was created (ISO 8601).')),
|
|
746
|
+
endsAt: z
|
|
340
747
|
.nullable(z.string())
|
|
341
|
-
.check(z.describe('
|
|
342
|
-
|
|
748
|
+
.check(z.describe('When promotional sponsorship ends (ISO 8601), or null before activation.')),
|
|
749
|
+
externalId: z.nullable(z.string()).check(z.describe('External partner attribution id, or null.')),
|
|
750
|
+
id: z.string().check(z.describe('Sponsorship attribution id (`sat_…`).')),
|
|
751
|
+
orgId: z.string().check(z.describe('Owning Tempo organization id (`org_…`).')),
|
|
752
|
+
projectId: z.nullable(z.string()).check(z.describe('Tempo Project id (`prj_…`), or null.')),
|
|
753
|
+
spendLimit: z
|
|
343
754
|
.nullable(z.string())
|
|
344
|
-
.check(z.describe('
|
|
345
|
-
|
|
346
|
-
.
|
|
347
|
-
.check(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
stripeCustomerId: z.string().check(z.describe('Stripe customer id the event bills against.')),
|
|
755
|
+
.check(z.describe('Promotional spend cap in fee-token base units, or null.')),
|
|
756
|
+
startsAt: z
|
|
757
|
+
.nullable(z.string())
|
|
758
|
+
.check(
|
|
759
|
+
z.describe('When promotional sponsorship started (ISO 8601), or null before activation.'),
|
|
760
|
+
),
|
|
761
|
+
updatedAt: z.string().check(z.describe('When the attribution was last updated (ISO 8601).')),
|
|
352
762
|
})
|
|
353
763
|
|
|
354
|
-
/** Columns of the `
|
|
355
|
-
export type
|
|
764
|
+
/** Columns of the `sponsorship_attributions` table. */
|
|
765
|
+
export type SponsorshipAttribution = z.output<typeof SponsorshipAttribution>
|
|
356
766
|
|
|
357
767
|
/** An organization's Stripe billing source: the customer link and derived status. */
|
|
358
768
|
export const StripeCustomer = z.object({
|
|
@@ -385,106 +795,111 @@ export const User = z.object({
|
|
|
385
795
|
createdAt: z.string().check(z.describe('When the user was created (ISO 8601).')),
|
|
386
796
|
email: z
|
|
387
797
|
.nullable(z.string())
|
|
388
|
-
.check(z.describe('
|
|
798
|
+
.check(z.describe('Normalized verified email, or null for a wallet-only identity.')),
|
|
799
|
+
emailVerified: z.boolean().check(z.describe('Whether the email was verified.')),
|
|
389
800
|
id: z
|
|
390
801
|
.string()
|
|
391
802
|
.check(
|
|
392
803
|
z.describe('Opaque user id (`usr_…`).'),
|
|
393
804
|
z.meta({ examples: ['usr_1a2b3c4d5e6f7g8h9j0k1m2n'] }),
|
|
394
805
|
),
|
|
806
|
+
image: z.nullable(z.string()).check(z.describe('Profile image URL, or null.')),
|
|
807
|
+
name: z.string().check(z.describe('Display name.')),
|
|
395
808
|
updatedAt: z.string().check(z.describe('When the user was last updated (ISO 8601).')),
|
|
396
809
|
})
|
|
397
810
|
|
|
398
811
|
/** Columns of the `users` table. */
|
|
399
812
|
export type User = z.output<typeof User>
|
|
400
813
|
|
|
401
|
-
/** Metadata for the current
|
|
402
|
-
export const
|
|
403
|
-
id: z.string().check(z.describe('Singleton
|
|
404
|
-
updatedAt: z.string().check(z.describe('When the
|
|
405
|
-
version: z.string().check(z.describe('Opaque
|
|
814
|
+
/** Metadata for the current route catalog snapshot. */
|
|
815
|
+
export const RoutesCatalog = z.object({
|
|
816
|
+
id: z.string().check(z.describe('Singleton route catalog id.')),
|
|
817
|
+
updatedAt: z.string().check(z.describe('When the route catalog was last published.')),
|
|
818
|
+
version: z.string().check(z.describe('Opaque route catalog version.')),
|
|
406
819
|
})
|
|
407
820
|
|
|
408
|
-
/** Columns of the `
|
|
409
|
-
export type
|
|
821
|
+
/** Columns of the `routes_catalogs` table. */
|
|
822
|
+
export type RoutesCatalog = z.output<typeof RoutesCatalog>
|
|
410
823
|
|
|
411
|
-
/** One chain available to the
|
|
412
|
-
export const
|
|
824
|
+
/** One chain available to the route catalog. */
|
|
825
|
+
export const RoutesChain = z.object({
|
|
413
826
|
aliases: z
|
|
414
827
|
.readonly(z.array(z.string()))
|
|
415
|
-
.check(z.describe('Caller-facing aliases accepted for the
|
|
416
|
-
id: z.string().check(z.describe('CAIP-2
|
|
417
|
-
name: z.string().check(z.describe('Human-readable
|
|
828
|
+
.check(z.describe('Caller-facing aliases accepted for the route chain.')),
|
|
829
|
+
id: z.string().check(z.describe('CAIP-2 route chain identifier.')),
|
|
830
|
+
name: z.string().check(z.describe('Human-readable route chain name.')),
|
|
418
831
|
parentChainId: z
|
|
419
832
|
.nullable(z.string())
|
|
420
|
-
.check(z.describe('Parent
|
|
833
|
+
.check(z.describe('Parent route chain identifier for a Zone, or null.')),
|
|
421
834
|
rpcUrls: z
|
|
422
835
|
._default(z.readonly(z.array(z.url())), [])
|
|
423
|
-
.check(z.describe('Public RPC endpoints used for
|
|
424
|
-
slug: z.string().check(z.describe('Stable
|
|
836
|
+
.check(z.describe('Public RPC endpoints used for routes-chain evidence.')),
|
|
837
|
+
slug: z.string().check(z.describe('Stable route chain slug.')),
|
|
425
838
|
})
|
|
426
839
|
|
|
427
|
-
/** Columns of the `
|
|
428
|
-
export type
|
|
840
|
+
/** Columns of the `routes_chains` table. */
|
|
841
|
+
export type RoutesChain = z.output<typeof RoutesChain>
|
|
429
842
|
|
|
430
|
-
/** One token available to the
|
|
431
|
-
export const
|
|
843
|
+
/** One token available to the route catalog. */
|
|
844
|
+
export const RoutesToken = z.object({
|
|
432
845
|
currency: z.string().check(z.describe('Monetary denomination represented by the token.')),
|
|
433
|
-
id: z.string().check(z.describe('Stable
|
|
434
|
-
name: z.string().check(z.describe('Human-readable
|
|
435
|
-
symbol: z.string().check(z.describe('
|
|
846
|
+
id: z.string().check(z.describe('Stable route token identifier.')),
|
|
847
|
+
name: z.string().check(z.describe('Human-readable route token name.')),
|
|
848
|
+
symbol: z.string().check(z.describe('Route token ticker symbol.')),
|
|
436
849
|
})
|
|
437
850
|
|
|
438
|
-
/** Columns of the `
|
|
439
|
-
export type
|
|
851
|
+
/** Columns of the `routes_tokens` table. */
|
|
852
|
+
export type RoutesToken = z.output<typeof RoutesToken>
|
|
440
853
|
|
|
441
|
-
/** Chain-specific metadata for one
|
|
442
|
-
export const
|
|
443
|
-
address: z.string().check(z.describe('Token address on the
|
|
444
|
-
chainId: z.string().check(z.describe('CAIP-2 identifier of the
|
|
854
|
+
/** Chain-specific metadata for one route token. */
|
|
855
|
+
export const RoutesChainToken = z.object({
|
|
856
|
+
address: z.string().check(z.describe('Token address on the route chain.')),
|
|
857
|
+
chainId: z.string().check(z.describe('CAIP-2 identifier of the route chain.')),
|
|
445
858
|
decimals: z.number().check(z.int(), z.nonnegative(), z.describe('Token decimal precision.')),
|
|
446
859
|
name: z.nullable(z.string()).check(z.describe('Chain-specific token name override, or null.')),
|
|
447
|
-
standard: z.string().check(z.describe('Token standard on the
|
|
448
|
-
tokenId: z.string().check(z.describe('Stable
|
|
860
|
+
standard: z.string().check(z.describe('Token standard on the route chain.')),
|
|
861
|
+
tokenId: z.string().check(z.describe('Stable route token identifier.')),
|
|
449
862
|
})
|
|
450
863
|
|
|
451
|
-
/** Columns of the `
|
|
452
|
-
export type
|
|
864
|
+
/** Columns of the `routes_chain_tokens` table. */
|
|
865
|
+
export type RoutesChainToken = z.output<typeof RoutesChainToken>
|
|
453
866
|
|
|
454
|
-
/** One source-to-destination route supported by a
|
|
455
|
-
export const
|
|
867
|
+
/** One source-to-destination route supported by a route provider. */
|
|
868
|
+
export const RoutesRoute = z.object({
|
|
456
869
|
capabilities: z
|
|
457
|
-
.nullable(z.custom<
|
|
870
|
+
.nullable(z.custom<routes_Catalog.Capabilities>())
|
|
458
871
|
.check(z.describe('Executable capability (`jsonb`), or null for indicative-only routes.')),
|
|
459
872
|
configuration: z
|
|
460
|
-
.nullable(z.custom<
|
|
873
|
+
.nullable(z.custom<routes_Catalog.Configuration>())
|
|
461
874
|
.check(z.describe('Provider-specific route configuration (`jsonb`), or null.')),
|
|
462
|
-
destinationChainId: z.string().check(z.describe('Destination
|
|
463
|
-
destinationTokenId: z.string().check(z.describe('Destination
|
|
464
|
-
providerId: z.string().check(z.describe('
|
|
465
|
-
sourceChainId: z.string().check(z.describe('Source
|
|
466
|
-
sourceTokenId: z.string().check(z.describe('Source
|
|
875
|
+
destinationChainId: z.string().check(z.describe('Destination route chain identifier.')),
|
|
876
|
+
destinationTokenId: z.string().check(z.describe('Destination route token identifier.')),
|
|
877
|
+
providerId: z.string().check(z.describe('Route provider identifier.')),
|
|
878
|
+
sourceChainId: z.string().check(z.describe('Source route chain identifier.')),
|
|
879
|
+
sourceTokenId: z.string().check(z.describe('Source route token identifier.')),
|
|
467
880
|
})
|
|
468
881
|
|
|
469
|
-
/** Columns of the `
|
|
470
|
-
export type
|
|
882
|
+
/** Columns of the `routes_routes` table. */
|
|
883
|
+
export type RoutesRoute = z.output<typeof RoutesRoute>
|
|
471
884
|
|
|
472
885
|
/**
|
|
473
|
-
* A reusable
|
|
886
|
+
* A reusable route deposit address. Public route fields live in `snapshot`;
|
|
474
887
|
* provider routing and correlation remain private.
|
|
475
888
|
*/
|
|
476
|
-
export const
|
|
889
|
+
export const RoutesDepositAddress = z.object({
|
|
477
890
|
address: z.string().check(z.describe('Reusable source-chain deposit address.')),
|
|
478
|
-
apiKeyId: z.string().check(z.describe('API key id (`key_…`) that provisioned the address.')),
|
|
479
891
|
createdAt: z.string().check(z.describe('When the address was created (ISO 8601).')),
|
|
892
|
+
creatorUserId: z
|
|
893
|
+
.nullable(z.string())
|
|
894
|
+
.check(z.describe('Canonical creator user retained after organization deletion, or null.')),
|
|
480
895
|
deliveryStrategy: z
|
|
481
|
-
.custom<
|
|
896
|
+
.custom<routes_DepositAddress.DeliveryStrategy>()
|
|
482
897
|
.check(z.describe('Whether the provider or Tempo delivers the requested destination token.')),
|
|
483
898
|
destinationTokenKey: z.string().check(z.describe('Customer destination token key.')),
|
|
484
899
|
environment: z
|
|
485
900
|
.enum(['production', 'sandbox'])
|
|
486
901
|
.check(z.describe('Key environment the address belongs to.')),
|
|
487
|
-
id: z.string().check(z.describe('
|
|
902
|
+
id: z.string().check(z.describe('Route deposit address id (`rda_…`).')),
|
|
488
903
|
lastPolledAt: z
|
|
489
904
|
.nullable(z.string())
|
|
490
905
|
.check(z.describe('When provider reconciliation last completed successfully, or null.')),
|
|
@@ -499,34 +914,37 @@ export const FundingDepositAddress = z.object({
|
|
|
499
914
|
.check(z.int(), z.describe('Fencing token for reconciliation leases.')),
|
|
500
915
|
projectId: z.nullable(z.string()).check(z.describe('Attributed project id (`prj_…`), or null.')),
|
|
501
916
|
providerOutputToken: z
|
|
502
|
-
.custom<
|
|
917
|
+
.custom<routes_Provider.TokenRef>()
|
|
503
918
|
.check(z.describe('Token that the provider outputs on Tempo (`jsonb`).')),
|
|
504
|
-
providerId: z.string().check(z.describe('Selected
|
|
919
|
+
providerId: z.string().check(z.describe('Selected route provider id.')),
|
|
505
920
|
providerRequestIds: z
|
|
506
921
|
.readonly(z.array(z.string()))
|
|
507
922
|
.check(z.describe('Private provider request identifiers (`jsonb`).')),
|
|
508
923
|
providerState: z
|
|
509
|
-
.nullable(z.custom<
|
|
924
|
+
.nullable(z.custom<routes_DepositAddress.ProviderState>())
|
|
510
925
|
.check(z.describe('Bounded private provider state (`jsonb`), or null.')),
|
|
511
926
|
recipient: z.string().check(z.describe('Tempo account that receives completed deposits.')),
|
|
512
927
|
refundAddress: z.string().check(z.describe('Source-chain refund address.')),
|
|
513
928
|
snapshot: z
|
|
514
|
-
.custom<
|
|
929
|
+
.custom<routes_DepositAddress.Snapshot>()
|
|
515
930
|
.check(z.describe('Public address fields (`jsonb`).')),
|
|
516
931
|
sourceChainId: z.string().check(z.describe('Source chain CAIP-2 id.')),
|
|
517
932
|
sourceTokenKey: z.string().check(z.describe('Source token key.')),
|
|
518
|
-
status: z.custom<
|
|
933
|
+
status: z.custom<routes_DepositAddress.Status>().check(z.describe('Lifecycle status.')),
|
|
934
|
+
statusUpdatedAt: z
|
|
935
|
+
.nullable(z.string())
|
|
936
|
+
.check(z.describe('When the address entered its current status, or null for legacy rows.')),
|
|
519
937
|
subsidize: z.boolean().check(z.describe('Whether Tempo guarantees normalized 1:1 delivery.')),
|
|
520
938
|
updatedAt: z.string().check(z.describe('When the address last materially changed (ISO 8601).')),
|
|
521
939
|
version: z.number().check(z.int(), z.describe('Material version used to guard updates.')),
|
|
522
940
|
})
|
|
523
941
|
|
|
524
|
-
/** Columns of the `
|
|
525
|
-
export type
|
|
942
|
+
/** Columns of the `routes_deposit_addresses` table. */
|
|
943
|
+
export type RoutesDepositAddress = z.output<typeof RoutesDepositAddress>
|
|
526
944
|
|
|
527
945
|
/** First Tempo observations of one provider request through polling and webhooks. */
|
|
528
|
-
export const
|
|
529
|
-
depositAddressId: z.string().check(z.describe('
|
|
946
|
+
export const RoutesDepositRequestObservation = z.object({
|
|
947
|
+
depositAddressId: z.string().check(z.describe('Route deposit address id (`rda_…`).')),
|
|
530
948
|
pollObservedAt: z
|
|
531
949
|
.nullable(z.string())
|
|
532
950
|
.check(z.describe('When polling first observed the provider request, or null.')),
|
|
@@ -536,33 +954,36 @@ export const FundingDepositRequestObservation = z.object({
|
|
|
536
954
|
.check(z.describe('When Tempo first received an authenticated webhook, or null.')),
|
|
537
955
|
})
|
|
538
956
|
|
|
539
|
-
/** Columns of the `
|
|
540
|
-
export type
|
|
957
|
+
/** Columns of the `routes_deposit_request_observations` table. */
|
|
958
|
+
export type RoutesDepositRequestObservation = z.output<typeof RoutesDepositRequestObservation>
|
|
541
959
|
|
|
542
960
|
/**
|
|
543
961
|
* One provider-observed deposit. Public route and evidence live in `snapshot`;
|
|
544
962
|
* reconciliation and settlement state is private.
|
|
545
963
|
*/
|
|
546
|
-
export const
|
|
964
|
+
export const RoutesDeposit = z.object({
|
|
547
965
|
createdAt: z.string().check(z.describe('When the deposit was detected (ISO 8601).')),
|
|
548
|
-
depositAddressId: z.string().check(z.describe('
|
|
966
|
+
depositAddressId: z.string().check(z.describe('Route deposit address id (`rda_…`).')),
|
|
549
967
|
detectionTrigger: z
|
|
550
|
-
.nullable(z.custom<
|
|
968
|
+
.nullable(z.custom<routes_Deposit.DetectionTrigger>())
|
|
551
969
|
.check(z.describe('Mechanism that first detected the deposit, or null for legacy rows.')),
|
|
552
970
|
environment: z
|
|
553
971
|
.enum(['production', 'sandbox'])
|
|
554
972
|
.check(z.describe('Key environment inherited from the deposit address.')),
|
|
555
|
-
id: z.string().check(z.describe('
|
|
973
|
+
id: z.string().check(z.describe('Route deposit id (`rdp_…`).')),
|
|
556
974
|
orgId: z.string().check(z.describe('Owning organization id (`org_…`).')),
|
|
557
975
|
pollObservedAt: z
|
|
558
976
|
.nullable(z.string())
|
|
559
977
|
.check(z.describe('When polling first observed the provider request, or null.')),
|
|
560
978
|
projectId: z.nullable(z.string()).check(z.describe('Attributed project id (`prj_…`), or null.')),
|
|
979
|
+
providerDeliveredAt: z
|
|
980
|
+
.nullable(z.string())
|
|
981
|
+
.check(z.describe('When provider delivery was first verified, or null.')),
|
|
561
982
|
providerOutputAmount: z
|
|
562
983
|
.nullable(z.custom<z.output<typeof internal_Schema.TokenAmount>>())
|
|
563
984
|
.check(z.describe('Provider output amount verified on Tempo (`jsonb`), or null.')),
|
|
564
985
|
providerOutputToken: z
|
|
565
|
-
.custom<
|
|
986
|
+
.custom<routes_Provider.TokenRef>()
|
|
566
987
|
.check(z.describe('Token output by the provider on Tempo (`jsonb`).')),
|
|
567
988
|
providerRequestId: z
|
|
568
989
|
.nullable(z.string())
|
|
@@ -571,8 +992,11 @@ export const FundingDeposit = z.object({
|
|
|
571
992
|
.readonly(z.array(z.string()))
|
|
572
993
|
.check(z.describe('Private provider request identifiers (`jsonb`).')),
|
|
573
994
|
providerState: z
|
|
574
|
-
.nullable(z.custom<
|
|
995
|
+
.nullable(z.custom<routes_Deposit.PrivateState>())
|
|
575
996
|
.check(z.describe('Bounded private provider state (`jsonb`), or null.')),
|
|
997
|
+
providerSubsidy: z
|
|
998
|
+
.nullable(z.custom<routes_Provider.Subsidy>())
|
|
999
|
+
.check(z.describe('Provider-paid subsidy amount and token (`jsonb`), or null.')),
|
|
576
1000
|
providerTransactionHashes: z
|
|
577
1001
|
.readonly(z.array(z.string()))
|
|
578
1002
|
.check(z.describe('Private provider-leg transaction references (`jsonb`).')),
|
|
@@ -580,7 +1004,7 @@ export const FundingDeposit = z.object({
|
|
|
580
1004
|
.number()
|
|
581
1005
|
.check(z.int(), z.nonnegative(), z.describe('Deposit position within the provider request.')),
|
|
582
1006
|
retryState: z
|
|
583
|
-
.nullable(z.custom<
|
|
1007
|
+
.nullable(z.custom<routes_Deposit.PrivateState>())
|
|
584
1008
|
.check(z.describe('Bounded private retry state (`jsonb`), or null.')),
|
|
585
1009
|
settlementTransaction: z
|
|
586
1010
|
.nullable(z.string())
|
|
@@ -589,7 +1013,7 @@ export const FundingDeposit = z.object({
|
|
|
589
1013
|
.nullable(z.string())
|
|
590
1014
|
.check(z.describe('Persisted settlement transaction hash, or null.')),
|
|
591
1015
|
snapshot: z
|
|
592
|
-
.custom<
|
|
1016
|
+
.custom<routes_Deposit.Snapshot>()
|
|
593
1017
|
.check(z.describe('Public deposit fields (`jsonb`).')),
|
|
594
1018
|
sourceChainId: z.string().check(z.describe('Source chain CAIP-2 id.')),
|
|
595
1019
|
sourceTransactionHash: z
|
|
@@ -598,13 +1022,19 @@ export const FundingDeposit = z.object({
|
|
|
598
1022
|
sourceTransferIndex: z
|
|
599
1023
|
.nullable(z.number().check(z.int()))
|
|
600
1024
|
.check(z.describe('Verified transfer position in the source transaction, or null.')),
|
|
601
|
-
status: z.custom<
|
|
1025
|
+
status: z.custom<routes_Deposit.Status>().check(z.describe('Lifecycle status.')),
|
|
602
1026
|
statusReason: z
|
|
603
|
-
.nullable(z.custom<
|
|
1027
|
+
.nullable(z.custom<routes_Deposit.StatusReason>())
|
|
604
1028
|
.check(z.describe('Customer-safe status reason (`jsonb`), or null.')),
|
|
1029
|
+
statusUpdatedAt: z
|
|
1030
|
+
.nullable(z.string())
|
|
1031
|
+
.check(z.describe('When the deposit entered its current status, or null for legacy rows.')),
|
|
605
1032
|
subsidyAmount: z
|
|
606
1033
|
.nullable(z.custom<z.output<typeof internal_Schema.TokenAmount>>())
|
|
607
1034
|
.check(z.describe('Destination token amount supplied by Tempo (`jsonb`), or null.')),
|
|
1035
|
+
subsidyMeterReportedAt: z
|
|
1036
|
+
.nullable(z.string())
|
|
1037
|
+
.check(z.describe('Effective Stripe meter-event time, or null before acknowledgement.')),
|
|
608
1038
|
tempoGasPaid: z.nullable(z.string()).check(z.describe('Tempo gas paid for settlement, or null.')),
|
|
609
1039
|
updatedAt: z.string().check(z.describe('When the deposit last materially changed (ISO 8601).')),
|
|
610
1040
|
version: z.number().check(z.int(), z.describe('Material version used to guard updates.')),
|
|
@@ -613,93 +1043,179 @@ export const FundingDeposit = z.object({
|
|
|
613
1043
|
.check(z.describe('When Tempo first received an authenticated provider webhook, or null.')),
|
|
614
1044
|
})
|
|
615
1045
|
|
|
616
|
-
/** Columns of the `
|
|
617
|
-
export type
|
|
1046
|
+
/** Columns of the `routes_deposits` table. */
|
|
1047
|
+
export type RoutesDeposit = z.output<typeof RoutesDeposit>
|
|
618
1048
|
|
|
619
1049
|
/**
|
|
620
|
-
* A durable
|
|
1050
|
+
* A durable route transfer. Lifecycle state lives in typed columns; the
|
|
621
1051
|
* public quote terms and reconciled fields live in the `snapshot` jsonb and
|
|
622
1052
|
* merge in at serialization (`Transfer.toPublic`).
|
|
623
1053
|
*/
|
|
624
|
-
export const
|
|
1054
|
+
export const RoutesTransfer = z.object({
|
|
625
1055
|
apiKeyId: z.string().check(z.describe('API key id (`key_…`) that created the transfer.')),
|
|
626
1056
|
createdAt: z.string().check(z.describe('When the transfer was created (ISO 8601).')),
|
|
627
1057
|
environment: z
|
|
628
1058
|
.enum(['production', 'sandbox'])
|
|
629
1059
|
.check(z.describe('Key environment the transfer belongs to.')),
|
|
630
|
-
id: z.string().check(z.describe('Transfer id (`
|
|
1060
|
+
id: z.string().check(z.describe('Transfer id (`rtr_…`, lexically time-ordered).')),
|
|
631
1061
|
method: z
|
|
632
|
-
.custom<
|
|
633
|
-
.check(z.describe('
|
|
1062
|
+
.custom<routes_Transfer.Snapshot['method']>()
|
|
1063
|
+
.check(z.describe('Route method selected at creation.')),
|
|
634
1064
|
mode: z
|
|
635
|
-
.custom<
|
|
1065
|
+
.custom<routes_Transfer.Snapshot['mode']>()
|
|
636
1066
|
.check(z.describe('Amount mode selected at creation.')),
|
|
637
1067
|
orgId: z.string().check(z.describe('Owning organization id (`org_…`).')),
|
|
638
1068
|
projectId: z
|
|
639
1069
|
.nullable(z.string())
|
|
640
1070
|
.check(z.describe('Attributed project id (`prj_…`), or null for organization-attributed keys.')), // prettier-ignore
|
|
641
|
-
|
|
1071
|
+
providerDeliveredAt: z
|
|
1072
|
+
.nullable(z.string())
|
|
1073
|
+
.check(z.describe('When destination provider delivery was first verified, or null.')),
|
|
1074
|
+
providerId: z.string().check(z.describe('Selected route provider id.')),
|
|
642
1075
|
providerState: z
|
|
643
|
-
.nullable(z.custom<
|
|
644
|
-
.check(z.describe('Private provider
|
|
1076
|
+
.nullable(z.custom<routes_Transfer.ProviderState>())
|
|
1077
|
+
.check(z.describe('Private provider state (`jsonb`), or null. Never serialized publicly.')), // prettier-ignore
|
|
645
1078
|
quoteExpiresAt: z
|
|
646
1079
|
.string()
|
|
647
1080
|
.check(z.describe('When the quoted terms stop being executable (ISO 8601).')),
|
|
648
1081
|
snapshot: z
|
|
649
|
-
.custom<
|
|
1082
|
+
.custom<routes_Transfer.Snapshot>()
|
|
650
1083
|
.check(z.describe('Public quote terms and reconciled fields (`jsonb`).')),
|
|
651
|
-
status: z.custom<
|
|
1084
|
+
status: z.custom<routes_Transfer.Status>().check(z.describe('Lifecycle status.')),
|
|
652
1085
|
statusReason: z
|
|
653
|
-
.nullable(z.custom<
|
|
1086
|
+
.nullable(z.custom<routes_Transfer.StatusReason>())
|
|
654
1087
|
.check(z.describe('Customer-safe status reason (`jsonb`), or null.')),
|
|
1088
|
+
statusUpdatedAt: z
|
|
1089
|
+
.nullable(z.string())
|
|
1090
|
+
.check(z.describe('When the transfer entered its current status, or null for legacy rows.')),
|
|
1091
|
+
subsidyAccount: z
|
|
1092
|
+
.nullable(z.string())
|
|
1093
|
+
.check(z.describe('Destination subsidy signer address, or null before reservation.')),
|
|
1094
|
+
subsidyAmount: z
|
|
1095
|
+
.nullable(z.custom<z.output<typeof internal_Schema.TokenAmount>>())
|
|
1096
|
+
.check(z.describe('Destination token amount supplied by Tempo (`jsonb`), or null.')),
|
|
1097
|
+
subsidyChainId: z
|
|
1098
|
+
.nullable(z.string())
|
|
1099
|
+
.check(z.describe('Destination subsidy chain id, or null before reservation.')),
|
|
1100
|
+
subsidyCommitmentAmount: z
|
|
1101
|
+
.nullable(z.custom<z.output<typeof internal_Schema.TokenAmount>>())
|
|
1102
|
+
.check(z.describe('Maximum destination subsidy authorized at action creation, or null.')),
|
|
1103
|
+
subsidyMeterReportedAt: z
|
|
1104
|
+
.nullable(z.string())
|
|
1105
|
+
.check(z.describe('Effective Stripe meter-event time, or null before acknowledgement.')),
|
|
1106
|
+
subsidyNativeAmount: z
|
|
1107
|
+
.nullable(z.string())
|
|
1108
|
+
.check(z.describe('Native gas amount reserved by the signed transaction, or null.')),
|
|
1109
|
+
subsidyTokenAddress: z
|
|
1110
|
+
.nullable(z.string())
|
|
1111
|
+
.check(z.describe('Destination subsidy token address, or null before reservation.')),
|
|
1112
|
+
subsidyTransactionHash: z
|
|
1113
|
+
.nullable(z.string())
|
|
1114
|
+
.check(z.describe('Persisted destination subsidy transaction hash, or null.')),
|
|
655
1115
|
updatedAt: z.string().check(z.describe('When the transfer last materially changed (ISO 8601).')),
|
|
656
1116
|
version: z
|
|
657
1117
|
.number()
|
|
658
1118
|
.check(z.int(), z.describe('Increments on every material change; guards transitions.')),
|
|
659
1119
|
})
|
|
660
1120
|
|
|
661
|
-
/** Columns of the `
|
|
662
|
-
export type
|
|
1121
|
+
/** Columns of the `routes_transfers` table. */
|
|
1122
|
+
export type RoutesTransfer = z.output<typeof RoutesTransfer>
|
|
663
1123
|
|
|
664
|
-
/** One immutable public snapshot of a
|
|
665
|
-
export const
|
|
1124
|
+
/** One immutable public snapshot of a route transfer at a material version. */
|
|
1125
|
+
export const RoutesTransferEvent = z.object({
|
|
666
1126
|
createdAt: z.string().check(z.describe('When the version was committed (ISO 8601).')),
|
|
667
1127
|
snapshot: z
|
|
668
|
-
.custom<
|
|
1128
|
+
.custom<routes_Transfer.Public>()
|
|
669
1129
|
.check(z.describe('The complete public transfer at this version (`jsonb`).')),
|
|
670
|
-
status: z.custom<
|
|
671
|
-
transferId: z.string().check(z.describe('Transfer id (`
|
|
1130
|
+
status: z.custom<routes_Transfer.Status>().check(z.describe('Status at this version.')),
|
|
1131
|
+
transferId: z.string().check(z.describe('Transfer id (`rtr_…`) the event belongs to.')),
|
|
672
1132
|
version: z.number().check(z.int(), z.describe('Material version the event records.')),
|
|
673
1133
|
})
|
|
674
1134
|
|
|
675
|
-
/** Columns of the `
|
|
676
|
-
export type
|
|
1135
|
+
/** Columns of the `routes_transfer_events` table. */
|
|
1136
|
+
export type RoutesTransferEvent = z.output<typeof RoutesTransferEvent>
|
|
677
1137
|
|
|
678
|
-
/** One verified transaction reference associated with a
|
|
679
|
-
export const
|
|
1138
|
+
/** One verified transaction reference associated with a route transfer. */
|
|
1139
|
+
export const RoutesTransferTransaction = z.object({
|
|
680
1140
|
chainId: z.string().check(z.describe('CAIP-2 chain the transaction executed on.')),
|
|
681
1141
|
createdAt: z.string().check(z.describe('When the reference was accepted (ISO 8601).')),
|
|
1142
|
+
environment: z.string().check(z.describe('Environment derived from the owning transfer.')),
|
|
1143
|
+
orgId: z.string().check(z.describe('Organization derived from the owning transfer.')),
|
|
1144
|
+
projectId: z.nullable(z.string()).check(z.describe('Project derived from the owning transfer.')),
|
|
682
1145
|
role: z
|
|
683
|
-
.custom<
|
|
1146
|
+
.custom<routes_Transfer.TransactionRole>()
|
|
684
1147
|
.check(z.describe('What the transaction evidences: `source`, `destination`, or `refund`.')),
|
|
685
1148
|
transactionRef: z
|
|
686
1149
|
.string()
|
|
687
1150
|
.check(z.describe('EVM transaction hash or case-sensitive Solana signature.')),
|
|
688
|
-
transferId: z.string().check(z.describe('Transfer id (`
|
|
1151
|
+
transferId: z.string().check(z.describe('Transfer id (`rtr_…`) the reference belongs to.')),
|
|
1152
|
+
})
|
|
1153
|
+
|
|
1154
|
+
/** Columns of the `routes_transfer_transactions` table. */
|
|
1155
|
+
export type RoutesTransferTransaction = z.output<typeof RoutesTransferTransaction>
|
|
1156
|
+
|
|
1157
|
+
/** One globally deduplicated destination subsidy for a verified source transaction. */
|
|
1158
|
+
export const RoutesTransferSubsidy = z.object({
|
|
1159
|
+
createdAt: z.string().check(z.describe('When the signed subsidy was persisted (ISO 8601).')),
|
|
1160
|
+
destinationChainId: z
|
|
1161
|
+
.string()
|
|
1162
|
+
.check(z.describe('Destination CAIP-2 chain receiving the subsidy.')),
|
|
1163
|
+
recipient: z.string().check(z.describe('Lowercase destination recipient address.')),
|
|
1164
|
+
sourceChainId: z
|
|
1165
|
+
.string()
|
|
1166
|
+
.check(z.describe('Source CAIP-2 chain containing the verified payment.')),
|
|
1167
|
+
tokenAddress: z.string().check(z.describe('Lowercase destination token address.')),
|
|
1168
|
+
transaction: z
|
|
1169
|
+
.custom<routes_TransferSubsidy.Transaction>()
|
|
1170
|
+
.check(z.describe('Signed subsidy retained for replay, including after transfer deletion.')),
|
|
1171
|
+
transactionRef: z.string().check(z.describe('Canonical source execution transaction reference.')),
|
|
1172
|
+
transferId: z
|
|
1173
|
+
.string()
|
|
1174
|
+
.check(z.describe('Transfer responsible for this subsidy and its billing.')),
|
|
1175
|
+
})
|
|
1176
|
+
|
|
1177
|
+
/** Columns of the `routes_transfer_subsidies` table. */
|
|
1178
|
+
export type RoutesTransferSubsidy = z.output<typeof RoutesTransferSubsidy>
|
|
1179
|
+
|
|
1180
|
+
/** One durable next nonce for a destination subsidy signer on an EVM chain. */
|
|
1181
|
+
export const RoutesTransferSubsidyNonce = z.object({
|
|
1182
|
+
account: z.string().check(z.describe('Lowercase destination subsidy signer address.')),
|
|
1183
|
+
blockedAt: z
|
|
1184
|
+
.nullable(z.string())
|
|
1185
|
+
.check(z.describe('When this signer lane became blocked, or null.')),
|
|
1186
|
+
blockedReason: z
|
|
1187
|
+
.nullable(z.literal('broadcast_rejected'))
|
|
1188
|
+
.check(z.describe('Bounded reason this signer lane is blocked, or null.')),
|
|
1189
|
+
blockedTransferId: z
|
|
1190
|
+
.nullable(z.string())
|
|
1191
|
+
.check(z.describe('Transfer holding the blocked signer nonce, or null.')),
|
|
1192
|
+
chainId: z.string().check(z.describe('Destination EVM chain CAIP-2 id.')),
|
|
1193
|
+
nextNonce: z.string().check(z.regex(/^\d+$/), z.describe('Next unreserved EOA nonce.')),
|
|
1194
|
+
updatedAt: z.string().check(z.describe('When the nonce was last reserved (ISO 8601).')),
|
|
689
1195
|
})
|
|
690
1196
|
|
|
691
|
-
/** Columns of the `
|
|
692
|
-
export type
|
|
1197
|
+
/** Columns of the `routes_transfer_subsidy_nonces` table. */
|
|
1198
|
+
export type RoutesTransferSubsidyNonce = z.output<typeof RoutesTransferSubsidyNonce>
|
|
693
1199
|
|
|
694
1200
|
/**
|
|
695
|
-
* An API-key-scoped idempotency claim for
|
|
1201
|
+
* An API-key-scoped idempotency claim for route resource creation. The row
|
|
696
1202
|
* retains recovery checkpoints and completed responses until `expiresAt`.
|
|
697
1203
|
*/
|
|
698
|
-
export const
|
|
1204
|
+
export const RoutesIdempotencyRequest = z.object({
|
|
699
1205
|
apiKeyId: z.string().check(z.describe('API key id (`key_…`) the claim is scoped to.')),
|
|
700
1206
|
createdAt: z.string().check(z.describe('When the claim was taken (ISO 8601).')),
|
|
701
|
-
expiresAt: z.string().check(z.describe('
|
|
1207
|
+
expiresAt: z.string().check(z.describe('Scheduled claim replay expiry (ISO 8601).')),
|
|
1208
|
+
irrevocable: z.boolean().check(z.describe('Whether provider success creates durable liability.')),
|
|
702
1209
|
keyHash: z.string().check(z.describe('SHA-256 of the caller Idempotency-Key.')),
|
|
1210
|
+
matchHash: z
|
|
1211
|
+
.nullable(z.string())
|
|
1212
|
+
.check(z.describe('Canonical reusable deposit-address identity, or null before selection.')),
|
|
1213
|
+
operation: z
|
|
1214
|
+
.nullable(z.union([z.literal('deposit_address'), z.literal('transfer')]))
|
|
1215
|
+
.check(z.describe('Route creation operation owning the claim, or null for legacy rows.')),
|
|
1216
|
+
orgId: z
|
|
1217
|
+
.nullable(z.string())
|
|
1218
|
+
.check(z.describe('Organization reserving deposit-address capacity, or null.')),
|
|
703
1219
|
requestHash: z.string().check(z.describe('SHA-256 fingerprint of the canonical request.')),
|
|
704
1220
|
response: z
|
|
705
1221
|
.nullable(z.string())
|
|
@@ -709,11 +1225,11 @@ export const FundingIdempotencyRequest = z.object({
|
|
|
709
1225
|
.check(z.describe('Claim state for execution, recovery, or replay.')),
|
|
710
1226
|
transferId: z
|
|
711
1227
|
.nullable(z.string())
|
|
712
|
-
.check(z.describe('Transfer id (`
|
|
1228
|
+
.check(z.describe('Transfer id (`rtr_…`) the completed claim created, or null.')),
|
|
713
1229
|
})
|
|
714
1230
|
|
|
715
|
-
/** Columns of the `
|
|
716
|
-
export type
|
|
1231
|
+
/** Columns of the `routes_idempotency_requests` table. */
|
|
1232
|
+
export type RoutesIdempotencyRequest = z.output<typeof RoutesIdempotencyRequest>
|
|
717
1233
|
|
|
718
1234
|
/**
|
|
719
1235
|
* A verified token: one row per curated token, ordered by `position` (list
|
|
@@ -785,64 +1301,6 @@ export const VerifiedTokenRequest = z.object({
|
|
|
785
1301
|
/** Columns of the `verified_token_requests` table. */
|
|
786
1302
|
export type VerifiedTokenRequest = z.output<typeof VerifiedTokenRequest>
|
|
787
1303
|
|
|
788
|
-
/**
|
|
789
|
-
* A webhook subscription. The `Webhooks.Owner` union maps to (`ownerType`,
|
|
790
|
-
* `ownerId`); jsonb object columns round-trip as parsed values. `pollerCursor`
|
|
791
|
-
* replaces the old per-subscription cursor key.
|
|
792
|
-
*/
|
|
793
|
-
export const WebhookSubscription = z.object({
|
|
794
|
-
chainId: z.number().check(z.int(), z.describe('Chain the subscription listens on.')),
|
|
795
|
-
context: z
|
|
796
|
-
.nullable(z.custom<Webhooks.Context>())
|
|
797
|
-
.check(z.describe('Human context (`jsonb`), or null.')),
|
|
798
|
-
createdAt: z.string().check(z.describe('ISO timestamp of creation.')),
|
|
799
|
-
destination: z
|
|
800
|
-
.custom<Webhooks.Destination>()
|
|
801
|
-
.check(z.describe('Delivery destination (`jsonb`).')),
|
|
802
|
-
environment: z
|
|
803
|
-
.nullable(z.enum(['production', 'sandbox']))
|
|
804
|
-
.check(z.describe('API-key environment for private resource events, or null.')),
|
|
805
|
-
eventType: z
|
|
806
|
-
.custom<Webhooks.EventType>()
|
|
807
|
-
.check(z.describe('Event type the subscription listens to.')),
|
|
808
|
-
expiresAt: z
|
|
809
|
-
.nullable(z.string())
|
|
810
|
-
.check(z.describe('ISO expiry timestamp (MPP-owned subscriptions), or null.')),
|
|
811
|
-
failureCount: z
|
|
812
|
-
.number()
|
|
813
|
-
.check(z.int(), z.describe('Consecutive delivery failures; drives auto-disable.')),
|
|
814
|
-
filters: z
|
|
815
|
-
.custom<Webhooks.Subscription['filters']>()
|
|
816
|
-
.check(z.describe('Event-type-specific filter predicates (`jsonb`).')),
|
|
817
|
-
id: z
|
|
818
|
-
.string()
|
|
819
|
-
.check(
|
|
820
|
-
z.describe('Subscription id (`wh_…`, lexically time-ordered).'),
|
|
821
|
-
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
822
|
-
),
|
|
823
|
-
lastDeliveryAt: z
|
|
824
|
-
.nullable(z.string())
|
|
825
|
-
.check(z.describe('ISO timestamp of the last successful delivery, or null.')),
|
|
826
|
-
ownerId: z
|
|
827
|
-
.string()
|
|
828
|
-
.check(z.describe('Owner identifier: `orgId` for `api_key` owners, `payer` for `mpp`.')),
|
|
829
|
-
ownerType: z.custom<Webhooks.Owner['type']>().check(z.describe('Owner kind.')),
|
|
830
|
-
pollerCursor: z
|
|
831
|
-
.nullable(z.string())
|
|
832
|
-
.check(z.describe('Poller keyset cursor, or null before the first tick.')),
|
|
833
|
-
projectId: z
|
|
834
|
-
.nullable(z.string())
|
|
835
|
-
.check(z.describe('API-key project attribution for private resource events, or null.')),
|
|
836
|
-
secret: z.string().check(z.describe('HMAC signing secret.')),
|
|
837
|
-
status: z.custom<Webhooks.Status>().check(z.describe('Lifecycle status.')),
|
|
838
|
-
updatedAt: z
|
|
839
|
-
.string()
|
|
840
|
-
.check(z.describe('ISO timestamp of the last mutation (`pollerCursor` writes excluded).')),
|
|
841
|
-
})
|
|
842
|
-
|
|
843
|
-
/** Columns of the `webhook_subscriptions` table. */
|
|
844
|
-
export type WebhookSubscription = z.output<typeof WebhookSubscription>
|
|
845
|
-
|
|
846
1304
|
/**
|
|
847
1305
|
* A webhook delivery attempt. Rows are invisible past `expiresAt` (the
|
|
848
1306
|
* retention deadline that replaces the old store TTL) and pruned by the
|
|
@@ -947,3 +1405,61 @@ export const WebhookQueueEvent = z.object({
|
|
|
947
1405
|
|
|
948
1406
|
/** Columns of the `webhook_queue_events` table. */
|
|
949
1407
|
export type WebhookQueueEvent = z.output<typeof WebhookQueueEvent>
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* A webhook subscription. The `Webhooks.Owner` union maps to (`ownerType`,
|
|
1411
|
+
* `ownerId`); jsonb object columns round-trip as parsed values. `pollerCursor`
|
|
1412
|
+
* replaces the old per-subscription cursor key.
|
|
1413
|
+
*/
|
|
1414
|
+
export const WebhookSubscription = z.object({
|
|
1415
|
+
chainId: z.number().check(z.int(), z.describe('Chain the subscription listens on.')),
|
|
1416
|
+
context: z
|
|
1417
|
+
.nullable(z.custom<Webhooks.Context>())
|
|
1418
|
+
.check(z.describe('Human context (`jsonb`), or null.')),
|
|
1419
|
+
createdAt: z.string().check(z.describe('ISO timestamp of creation.')),
|
|
1420
|
+
destination: z
|
|
1421
|
+
.custom<Webhooks.Destination>()
|
|
1422
|
+
.check(z.describe('Delivery destination (`jsonb`).')),
|
|
1423
|
+
environment: z
|
|
1424
|
+
.nullable(z.enum(['production', 'sandbox']))
|
|
1425
|
+
.check(z.describe('API-key environment for private resource events, or null.')),
|
|
1426
|
+
eventType: z
|
|
1427
|
+
.custom<Webhooks.EventType>()
|
|
1428
|
+
.check(z.describe('Event type the subscription listens to.')),
|
|
1429
|
+
expiresAt: z
|
|
1430
|
+
.nullable(z.string())
|
|
1431
|
+
.check(z.describe('ISO expiry timestamp (MPP-owned subscriptions), or null.')),
|
|
1432
|
+
failureCount: z
|
|
1433
|
+
.number()
|
|
1434
|
+
.check(z.int(), z.describe('Consecutive delivery failures; drives auto-disable.')),
|
|
1435
|
+
filters: z
|
|
1436
|
+
.custom<Webhooks.Subscription['filters']>()
|
|
1437
|
+
.check(z.describe('Event-type-specific filter predicates (`jsonb`).')),
|
|
1438
|
+
id: z
|
|
1439
|
+
.string()
|
|
1440
|
+
.check(
|
|
1441
|
+
z.describe('Subscription id (`wh_…`, lexically time-ordered).'),
|
|
1442
|
+
z.meta({ examples: ['wh_001718668800000_2ZPE2gvateYEQ0dQslgvkhjx'] }),
|
|
1443
|
+
),
|
|
1444
|
+
lastDeliveryAt: z
|
|
1445
|
+
.nullable(z.string())
|
|
1446
|
+
.check(z.describe('ISO timestamp of the last successful delivery, or null.')),
|
|
1447
|
+
ownerId: z
|
|
1448
|
+
.string()
|
|
1449
|
+
.check(z.describe('Owner identifier: `orgId` for `api_key` owners, `payer` for `mpp`.')),
|
|
1450
|
+
ownerType: z.custom<Webhooks.Owner['type']>().check(z.describe('Owner kind.')),
|
|
1451
|
+
pollerCursor: z
|
|
1452
|
+
.nullable(z.string())
|
|
1453
|
+
.check(z.describe('Poller keyset cursor, or null before the first tick.')),
|
|
1454
|
+
projectId: z
|
|
1455
|
+
.nullable(z.string())
|
|
1456
|
+
.check(z.describe('API-key project attribution for private resource events, or null.')),
|
|
1457
|
+
secret: z.string().check(z.describe('HMAC signing secret.')),
|
|
1458
|
+
status: z.custom<Webhooks.Status>().check(z.describe('Lifecycle status.')),
|
|
1459
|
+
updatedAt: z
|
|
1460
|
+
.string()
|
|
1461
|
+
.check(z.describe('ISO timestamp of the last mutation (`pollerCursor` writes excluded).')),
|
|
1462
|
+
})
|
|
1463
|
+
|
|
1464
|
+
/** Columns of the `webhook_subscriptions` table. */
|
|
1465
|
+
export type WebhookSubscription = z.output<typeof WebhookSubscription>
|