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/Client.test-d.ts
CHANGED
|
@@ -8,15 +8,14 @@ import * as Balances from './apps/data/routes/balances.js'
|
|
|
8
8
|
import * as Billing from './apps/management/routes/billing.js'
|
|
9
9
|
import * as Blocks from './apps/data/routes/blocks.js'
|
|
10
10
|
import * as Earn from './apps/data/routes/earn.js'
|
|
11
|
-
import type * as EarnRates from './internal/EarnRates.js'
|
|
12
11
|
import * as Exchanges from './apps/data/routes/exchanges.js'
|
|
13
12
|
import * as Faucet from './apps/management/routes/faucet.js'
|
|
14
13
|
import * as FeeAmm from './apps/data/routes/fee-amm.js'
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import type * as
|
|
14
|
+
import * as RoutesChains from './apps/routes/routes/chains.js'
|
|
15
|
+
import * as RoutesDepositAddresses from './apps/routes/routes/deposit-addresses.js'
|
|
16
|
+
import * as RoutesQuotes from './apps/routes/routes/quotes.js'
|
|
17
|
+
import * as RoutesTransfers from './apps/routes/routes/transfers.js'
|
|
18
|
+
import type * as RoutesDepositAddress from './internal/routes/DepositAddress.js'
|
|
20
19
|
import * as Indexer from './apps/data/routes/indexer.js'
|
|
21
20
|
import * as InviteLinks from './apps/management/routes/invite-links.js'
|
|
22
21
|
import * as Me from './apps/management/routes/me.js'
|
|
@@ -26,6 +25,7 @@ import * as OrgWebhooks from './apps/management/routes/webhooks.js'
|
|
|
26
25
|
import * as Receipts from './apps/data/routes/receipts.js'
|
|
27
26
|
import * as Rpc from './apps/data/routes/rpc.js'
|
|
28
27
|
import * as Scopes from './apps/management/routes/scopes.js'
|
|
28
|
+
import * as Tokenlist from './apps/data/routes/tokenlist.js'
|
|
29
29
|
import * as Tokens from './apps/data/routes/tokens.js'
|
|
30
30
|
import * as Transactions from './apps/data/routes/transactions.js'
|
|
31
31
|
import * as Transfers from './apps/data/routes/transfers.js'
|
|
@@ -83,6 +83,57 @@ test('returns typed client', async () => {
|
|
|
83
83
|
})
|
|
84
84
|
|
|
85
85
|
describe('narrows responses by status', () => {
|
|
86
|
+
test('POST /v1/earn/rewards/eligibility', async () => {
|
|
87
|
+
const client = Client.create()
|
|
88
|
+
const res = await client.v1.earn.rewards.eligibility.$post({
|
|
89
|
+
json: {
|
|
90
|
+
chainId: 4217,
|
|
91
|
+
vaultAddress: `0x${'11'.repeat(20)}`,
|
|
92
|
+
walletAddress: `0x${'22'.repeat(20)}`,
|
|
93
|
+
},
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 429>()
|
|
97
|
+
|
|
98
|
+
switch (res.status) {
|
|
99
|
+
case 200: {
|
|
100
|
+
const json = await res.json()
|
|
101
|
+
expectTypeOf(json).toEqualTypeOf<
|
|
102
|
+
z.output<typeof Earn.schema.registerRewardEligibility.Response>
|
|
103
|
+
>()
|
|
104
|
+
expectTypeOf(json.created).toEqualTypeOf<boolean>()
|
|
105
|
+
return
|
|
106
|
+
}
|
|
107
|
+
case 403: {
|
|
108
|
+
const json = await res.json()
|
|
109
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'api_key_forbidden' | 'api_key_ip_forbidden'>()
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
test('GET /v1/earn/rewards/eligibility', async () => {
|
|
116
|
+
const client = Client.create()
|
|
117
|
+
const res = await client.v1.earn.rewards.eligibility.$get({
|
|
118
|
+
query: {
|
|
119
|
+
chainId: '4217',
|
|
120
|
+
limit: '10',
|
|
121
|
+
vaultAddress: `0x${'11'.repeat(20)}`,
|
|
122
|
+
},
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | PublicAccessStatus>()
|
|
126
|
+
|
|
127
|
+
if (res.status === 200) {
|
|
128
|
+
const json = await res.json()
|
|
129
|
+
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getRewardEligibility.Response>>()
|
|
130
|
+
expectTypeOf(json.chainId).toEqualTypeOf<number>()
|
|
131
|
+
expectTypeOf(json.data).toEqualTypeOf<`0x${string}`[]>()
|
|
132
|
+
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
133
|
+
expectTypeOf(json.vaultAddress).toEqualTypeOf<`0x${string}`>()
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
|
|
86
137
|
test('POST /v1/orgs/:orgId/projects/:projectId/api-keys/:keyId/rotate', async () => {
|
|
87
138
|
const client = Client.create()
|
|
88
139
|
const res = await client.v1.orgs[':orgId{org_[A-Za-z0-9_-]+}'].projects[
|
|
@@ -91,7 +142,7 @@ describe('narrows responses by status', () => {
|
|
|
91
142
|
param: { keyId: 'key_test', orgId: 'org_test', projectId: 'prj_test' },
|
|
92
143
|
})
|
|
93
144
|
|
|
94
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 502>()
|
|
145
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 409 | 502>()
|
|
95
146
|
|
|
96
147
|
if (res.status === 200) {
|
|
97
148
|
const json = await res.json()
|
|
@@ -105,7 +156,7 @@ describe('narrows responses by status', () => {
|
|
|
105
156
|
':keyId{key_[A-Za-z0-9_-]+}'
|
|
106
157
|
].rotate.$post({ param: { keyId: 'key_test', orgId: 'org_test' } })
|
|
107
158
|
|
|
108
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 502>()
|
|
159
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 409 | 502>()
|
|
109
160
|
|
|
110
161
|
if (res.status === 200) {
|
|
111
162
|
const json = await res.json()
|
|
@@ -229,11 +280,11 @@ describe('narrows responses by status', () => {
|
|
|
229
280
|
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getEarnVaults.Response>>()
|
|
230
281
|
expectTypeOf(json.data[0]!.access?.status).toEqualTypeOf<'allowlisted' | 'open' | undefined>()
|
|
231
282
|
// `apy` and `tvl` are include-gated, so both are absent unless requested.
|
|
232
|
-
expectTypeOf(json.data[0]!.apy).toEqualTypeOf<EarnRates.Apy | null | undefined>()
|
|
233
283
|
expectTypeOf(json.data[0]!.apy?.methodology).toEqualTypeOf<
|
|
234
284
|
'share-price-growth-annualized:v1' | undefined
|
|
235
285
|
>()
|
|
236
286
|
expectTypeOf(json.data[0]!.apy?.net).toEqualTypeOf<string | undefined>()
|
|
287
|
+
expectTypeOf(json.data[0]!.apy?.vault).toEqualTypeOf<string | undefined>()
|
|
237
288
|
expectTypeOf(json.data[0]!.apy?.window).toEqualTypeOf<
|
|
238
289
|
'1h' | '1d' | '7d' | '30d' | undefined
|
|
239
290
|
>()
|
|
@@ -241,7 +292,20 @@ describe('narrows responses by status', () => {
|
|
|
241
292
|
expectTypeOf(json.data[0]!.capabilities?.deposit).toEqualTypeOf<boolean | undefined>()
|
|
242
293
|
expectTypeOf(json.data[0]!.engine.type).toEqualTypeOf<'erc4626' | 'veda' | null>()
|
|
243
294
|
expectTypeOf(json.data[0]!.instantLiquidity).toEqualTypeOf<string | null>()
|
|
295
|
+
expectTypeOf(json.data[0]!.instantLiquidityValue).toEqualTypeOf<
|
|
296
|
+
VaultValue | null | undefined
|
|
297
|
+
>()
|
|
244
298
|
expectTypeOf(json.data[0]!.sharePrice?.amount).toEqualTypeOf<string | undefined>()
|
|
299
|
+
expectTypeOf(json.data[0]!.apy?.rewards?.[0]?.apr).toEqualTypeOf<string | null | undefined>()
|
|
300
|
+
expectTypeOf(json.data[0]!.apy?.rewards?.[0]?.asset.address).toEqualTypeOf<
|
|
301
|
+
`0x${string}` | undefined
|
|
302
|
+
>()
|
|
303
|
+
expectTypeOf(json.data[0]!.apy?.rewards?.[0]?.calculatedThrough).toEqualTypeOf<
|
|
304
|
+
number | undefined
|
|
305
|
+
>()
|
|
306
|
+
expectTypeOf(json.data[0]!.apy?.rewards?.[0]?.targetTotalApr).toEqualTypeOf<
|
|
307
|
+
string | undefined
|
|
308
|
+
>()
|
|
245
309
|
expectTypeOf(json.data[0]!.slug).toEqualTypeOf<string | null>()
|
|
246
310
|
expectTypeOf(json.data[0]!.state.openRedeemRequestCount).toEqualTypeOf<number>()
|
|
247
311
|
expectTypeOf(json.data[0]!.state.totalAssets).toEqualTypeOf<string>()
|
|
@@ -258,7 +322,9 @@ describe('narrows responses by status', () => {
|
|
|
258
322
|
}
|
|
259
323
|
if (res.status === 400) {
|
|
260
324
|
const json = await res.json()
|
|
261
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
325
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
326
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid'>
|
|
327
|
+
>()
|
|
262
328
|
void json
|
|
263
329
|
return
|
|
264
330
|
}
|
|
@@ -286,6 +352,7 @@ describe('narrows responses by status', () => {
|
|
|
286
352
|
expectTypeOf(json).toEqualTypeOf<
|
|
287
353
|
z.output<typeof Earn.schema.getVerifiedEarnVaults.Response>
|
|
288
354
|
>()
|
|
355
|
+
expectTypeOf(json.data[0]!.apy?.vault).toEqualTypeOf<string | undefined>()
|
|
289
356
|
expectTypeOf(json.data[0]!.engine.type).toEqualTypeOf<'erc4626' | 'veda'>()
|
|
290
357
|
expectTypeOf(json.data[0]!.instantLiquidity).toEqualTypeOf<string | null>()
|
|
291
358
|
expectTypeOf(json.data[0]!.slug).toEqualTypeOf<string>()
|
|
@@ -300,7 +367,9 @@ describe('narrows responses by status', () => {
|
|
|
300
367
|
}
|
|
301
368
|
if (res.status === 400) {
|
|
302
369
|
const json = await res.json()
|
|
303
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
370
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
371
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid'>
|
|
372
|
+
>()
|
|
304
373
|
void json
|
|
305
374
|
return
|
|
306
375
|
}
|
|
@@ -316,7 +385,7 @@ describe('narrows responses by status', () => {
|
|
|
316
385
|
const client = Client.create()
|
|
317
386
|
const res = await client.v1.earn.addresses[':address'].positions.$get({
|
|
318
387
|
param: { address: `0x${'bb'.repeat(20)}` },
|
|
319
|
-
query: { 'valuation.currency': 'USD', verified: 'true' },
|
|
388
|
+
query: { include: 'earnings', 'valuation.currency': 'USD', verified: 'true' },
|
|
320
389
|
})
|
|
321
390
|
|
|
322
391
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 502 | PaidAccessStatus>()
|
|
@@ -330,7 +399,15 @@ describe('narrows responses by status', () => {
|
|
|
330
399
|
expectTypeOf(json.data[0]!.assetAmount.currency).toEqualTypeOf<string>()
|
|
331
400
|
expectTypeOf(json.data[0]!.assetToken.address).toEqualTypeOf<`0x${string}`>()
|
|
332
401
|
expectTypeOf(json.data[0]!.assetToken.decimals).toEqualTypeOf<number>()
|
|
402
|
+
expectTypeOf(json.data[0]!.chainId).toEqualTypeOf<number>()
|
|
333
403
|
expectTypeOf(json.data[0]!.id).toEqualTypeOf<`0x${string}`>()
|
|
404
|
+
expectTypeOf(json.data[0]!.lifetimeCashFlows?.status).toEqualTypeOf<
|
|
405
|
+
'complete' | 'incomplete_history' | undefined
|
|
406
|
+
>()
|
|
407
|
+
if (json.data[0]!.lifetimeCashFlows?.status === 'complete') {
|
|
408
|
+
expectTypeOf(json.data[0]!.lifetimeCashFlows.totalDeposited).toEqualTypeOf<string>()
|
|
409
|
+
expectTypeOf(json.data[0]!.lifetimeCashFlows.totalWithdrawn).toEqualTypeOf<string>()
|
|
410
|
+
}
|
|
334
411
|
expectTypeOf(json.data[0]!.shareAmount.amount).toEqualTypeOf<string>()
|
|
335
412
|
expectTypeOf(json.data[0]!.shareAmount.decimals).toEqualTypeOf<number>()
|
|
336
413
|
expectTypeOf(json.data[0]!.shareAmount.formatted).toEqualTypeOf<string>()
|
|
@@ -376,11 +453,13 @@ describe('narrows responses by status', () => {
|
|
|
376
453
|
const json = await res.json()
|
|
377
454
|
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getEarnVault.Response>>()
|
|
378
455
|
// `apy` and `tvl` are include-gated, so both are absent unless requested.
|
|
379
|
-
expectTypeOf(json.apy).toEqualTypeOf<EarnRates.Apy | null | undefined>()
|
|
380
456
|
expectTypeOf(json.apy?.asOf).toEqualTypeOf<string | undefined>()
|
|
457
|
+
expectTypeOf(json.apy?.net).toEqualTypeOf<string | undefined>()
|
|
458
|
+
expectTypeOf(json.apy?.vault).toEqualTypeOf<string | undefined>()
|
|
381
459
|
expectTypeOf(json.assetToken.address).toEqualTypeOf<`0x${string}`>()
|
|
382
460
|
expectTypeOf(json.engine.type).toEqualTypeOf<'erc4626' | 'veda' | null>()
|
|
383
461
|
expectTypeOf(json.instantLiquidity).toEqualTypeOf<string | null>()
|
|
462
|
+
expectTypeOf(json.instantLiquidityValue).toEqualTypeOf<VaultValue | null | undefined>()
|
|
384
463
|
expectTypeOf(json.label).toEqualTypeOf<string>()
|
|
385
464
|
expectTypeOf(json.meta?.valuation?.asOf).toEqualTypeOf<string | undefined>()
|
|
386
465
|
expectTypeOf(json.sharePrice?.decimals).toEqualTypeOf<number | undefined>()
|
|
@@ -394,7 +473,58 @@ describe('narrows responses by status', () => {
|
|
|
394
473
|
}
|
|
395
474
|
if (res.status === 400) {
|
|
396
475
|
const json = await res.json()
|
|
397
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
476
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
477
|
+
Access400<
|
|
478
|
+
'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid' | 'vault_id_invalid'
|
|
479
|
+
>
|
|
480
|
+
>()
|
|
481
|
+
void json
|
|
482
|
+
return
|
|
483
|
+
}
|
|
484
|
+
if (res.status === 404) {
|
|
485
|
+
const json = await res.json()
|
|
486
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'earn_vault_not_found'>()
|
|
487
|
+
void json
|
|
488
|
+
return
|
|
489
|
+
}
|
|
490
|
+
if (res.status === 502) {
|
|
491
|
+
const json = await res.json()
|
|
492
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'upstream_error'>()
|
|
493
|
+
void json
|
|
494
|
+
return
|
|
495
|
+
}
|
|
496
|
+
})
|
|
497
|
+
|
|
498
|
+
test('GET /v1/earn/vaults/:vaultId/share-prices', async () => {
|
|
499
|
+
const client = Client.create()
|
|
500
|
+
const res = await client.v1.earn.vaults[':vaultId']['share-prices'].$get({
|
|
501
|
+
param: { vaultId: `0x${'aa'.repeat(20)}` },
|
|
502
|
+
query: {
|
|
503
|
+
from: '2026-07-01T00:00:00.000Z',
|
|
504
|
+
to: '2026-07-31T00:00:00.000Z',
|
|
505
|
+
},
|
|
506
|
+
})
|
|
507
|
+
|
|
508
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PaidAccessStatus>()
|
|
509
|
+
|
|
510
|
+
if (res.status === 200) {
|
|
511
|
+
const json = await res.json()
|
|
512
|
+
expectTypeOf(json).toEqualTypeOf<
|
|
513
|
+
z.output<typeof Earn.schema.getEarnVaultSharePrices.Response>
|
|
514
|
+
>()
|
|
515
|
+
expectTypeOf(json.data[0]!.sharePrice.amount).toEqualTypeOf<string>()
|
|
516
|
+
expectTypeOf(json.data[0]!.sharePrice.decimals).toEqualTypeOf<number>()
|
|
517
|
+
expectTypeOf(json.data[0]!.timestamp).toEqualTypeOf<string>()
|
|
518
|
+
void json
|
|
519
|
+
return
|
|
520
|
+
}
|
|
521
|
+
if (res.status === 400) {
|
|
522
|
+
const json = await res.json()
|
|
523
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
524
|
+
Access400<
|
|
525
|
+
'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid' | 'vault_id_invalid'
|
|
526
|
+
>
|
|
527
|
+
>()
|
|
398
528
|
void json
|
|
399
529
|
return
|
|
400
530
|
}
|
|
@@ -419,6 +549,7 @@ describe('narrows responses by status', () => {
|
|
|
419
549
|
address: `0x${'bb'.repeat(20)}`,
|
|
420
550
|
vaultId: `0x${'aa'.repeat(20)}`,
|
|
421
551
|
},
|
|
552
|
+
query: { asOf: '2026-07-21T09:00:00.000Z' },
|
|
422
553
|
})
|
|
423
554
|
|
|
424
555
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PaidAccessStatus>()
|
|
@@ -427,9 +558,23 @@ describe('narrows responses by status', () => {
|
|
|
427
558
|
const json = await res.json()
|
|
428
559
|
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getEarnVaultPosition.Response>>()
|
|
429
560
|
expectTypeOf(json.account).toEqualTypeOf<`0x${string}`>()
|
|
561
|
+
expectTypeOf(json.apy?.breakdown[0]?.assetAmount.baseUnits).toEqualTypeOf<
|
|
562
|
+
string | undefined
|
|
563
|
+
>()
|
|
564
|
+
expectTypeOf(json.apy?.breakdown[0]?.assetAmount.decimals).toEqualTypeOf<number | undefined>()
|
|
565
|
+
expectTypeOf(json.apy?.breakdown[0]?.assetAmount.formatted).toEqualTypeOf<
|
|
566
|
+
string | undefined
|
|
567
|
+
>()
|
|
568
|
+
expectTypeOf(json.apy?.breakdown[0]?.net).toEqualTypeOf<string | undefined>()
|
|
569
|
+
expectTypeOf(json.apy?.breakdown[0]?.type).toEqualTypeOf<'base' | 'boost' | undefined>()
|
|
570
|
+
expectTypeOf(json.apy?.net).toEqualTypeOf<string | undefined>()
|
|
430
571
|
expectTypeOf(json.assetAllowance).toEqualTypeOf<string>()
|
|
431
572
|
expectTypeOf(json.assetBalance).toEqualTypeOf<string>()
|
|
432
573
|
expectTypeOf(json.assetToken).toEqualTypeOf<`0x${string}`>()
|
|
574
|
+
expectTypeOf(json.asOf).toEqualTypeOf<string | undefined>()
|
|
575
|
+
expectTypeOf(json.block?.number).toEqualTypeOf<number | undefined>()
|
|
576
|
+
expectTypeOf(json.block?.timestamp).toEqualTypeOf<string | undefined>()
|
|
577
|
+
expectTypeOf(json.chainId).toEqualTypeOf<number>()
|
|
433
578
|
expectTypeOf(json.id).toEqualTypeOf<`0x${string}`>()
|
|
434
579
|
expectTypeOf(json.shareAllowance).toEqualTypeOf<string>()
|
|
435
580
|
expectTypeOf(json.shareBalance).toEqualTypeOf<string>()
|
|
@@ -462,6 +607,58 @@ describe('narrows responses by status', () => {
|
|
|
462
607
|
}
|
|
463
608
|
})
|
|
464
609
|
|
|
610
|
+
test('GET /v1/earn/vaults/:vaultId/positions/:address with reward proof', async () => {
|
|
611
|
+
const client = Client.create()
|
|
612
|
+
const res = await client.v1.earn.vaults[':vaultId'].positions[':address'].$get({
|
|
613
|
+
param: {
|
|
614
|
+
address: `0x${'bb'.repeat(20)}`,
|
|
615
|
+
vaultId: `0x${'aa'.repeat(20)}`,
|
|
616
|
+
},
|
|
617
|
+
query: { include: ['rewards.proof'] },
|
|
618
|
+
})
|
|
619
|
+
|
|
620
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PaidAccessStatus>()
|
|
621
|
+
|
|
622
|
+
if (res.status === 200) {
|
|
623
|
+
const json = await res.json()
|
|
624
|
+
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getEarnVaultPosition.Response>>()
|
|
625
|
+
expectTypeOf(json.rewards?.cumulativeEntitlement).toEqualTypeOf<string | undefined>()
|
|
626
|
+
expectTypeOf(json.rewards?.cumulativePaid).toEqualTypeOf<string | undefined>()
|
|
627
|
+
expectTypeOf(json.rewards?.pending).toEqualTypeOf<string | undefined>()
|
|
628
|
+
expectTypeOf(json.rewards?.proof?.cumulativeAmount).toEqualTypeOf<string | undefined>()
|
|
629
|
+
expectTypeOf(json.rewards?.proof?.distributorAddress).toEqualTypeOf<
|
|
630
|
+
`0x${string}` | undefined
|
|
631
|
+
>()
|
|
632
|
+
expectTypeOf(json.rewards?.proof?.proof).toEqualTypeOf<`0x${string}`[] | undefined>()
|
|
633
|
+
expectTypeOf(json.rewards?.proof?.rootVersion).toEqualTypeOf<string | undefined>()
|
|
634
|
+
expectTypeOf(json.rewards?.proof?.statementHash).toEqualTypeOf<`0x${string}` | undefined>()
|
|
635
|
+
void json
|
|
636
|
+
return
|
|
637
|
+
}
|
|
638
|
+
if (res.status === 400) {
|
|
639
|
+
const json = await res.json()
|
|
640
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
641
|
+
Access400<
|
|
642
|
+
'chain_id_invalid' | 'chain_id_unsupported' | 'position_invalid' | 'query_invalid'
|
|
643
|
+
>
|
|
644
|
+
>()
|
|
645
|
+
void json
|
|
646
|
+
return
|
|
647
|
+
}
|
|
648
|
+
if (res.status === 404) {
|
|
649
|
+
const json = await res.json()
|
|
650
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'earn_vault_not_found'>()
|
|
651
|
+
void json
|
|
652
|
+
return
|
|
653
|
+
}
|
|
654
|
+
if (res.status === 502) {
|
|
655
|
+
const json = await res.json()
|
|
656
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'upstream_error'>()
|
|
657
|
+
void json
|
|
658
|
+
return
|
|
659
|
+
}
|
|
660
|
+
})
|
|
661
|
+
|
|
465
662
|
test('GET /v1/earn/vaults/:vaultId/earnings/:address', async () => {
|
|
466
663
|
const client = Client.create()
|
|
467
664
|
const res = await client.v1.earn.vaults[':vaultId'].earnings[':address'].$get({
|
|
@@ -487,7 +684,23 @@ describe('narrows responses by status', () => {
|
|
|
487
684
|
if (json.status === 'complete' && json.period === 'active')
|
|
488
685
|
expectTypeOf(json.activeEarnings).toEqualTypeOf<string>()
|
|
489
686
|
if (json.status === 'complete' && json.period === 'lifetime')
|
|
490
|
-
expectTypeOf(
|
|
687
|
+
expectTypeOf({
|
|
688
|
+
lifetimeEarnings: json.lifetimeEarnings,
|
|
689
|
+
totalDeposited: json.totalDeposited,
|
|
690
|
+
totalWithdrawn: json.totalWithdrawn,
|
|
691
|
+
}).toEqualTypeOf<{
|
|
692
|
+
lifetimeEarnings: string
|
|
693
|
+
totalDeposited: string
|
|
694
|
+
totalWithdrawn: string
|
|
695
|
+
}>()
|
|
696
|
+
if (json.status === 'pending_redemption' && json.period === 'lifetime')
|
|
697
|
+
expectTypeOf({
|
|
698
|
+
totalDeposited: json.totalDeposited,
|
|
699
|
+
totalWithdrawn: json.totalWithdrawn,
|
|
700
|
+
}).toEqualTypeOf<{
|
|
701
|
+
totalDeposited: string
|
|
702
|
+
totalWithdrawn: string
|
|
703
|
+
}>()
|
|
491
704
|
if (json.status === 'complete' && json.period === '30d')
|
|
492
705
|
expectTypeOf(json.windowEarnings).toEqualTypeOf<string>()
|
|
493
706
|
void json
|
|
@@ -699,6 +912,42 @@ describe('narrows responses by status', () => {
|
|
|
699
912
|
}
|
|
700
913
|
})
|
|
701
914
|
|
|
915
|
+
test('GET /v1/orgs/:orgId/billing/invoice-preview', async () => {
|
|
916
|
+
const client = Client.create()
|
|
917
|
+
const res = await client.v1.orgs[':orgId{org_[A-Za-z0-9_-]+}'].billing['invoice-preview'].$get({
|
|
918
|
+
param: { orgId: 'org_test' },
|
|
919
|
+
})
|
|
920
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 404 | 501 | 502 | PublicAccessStatus>()
|
|
921
|
+
if (res.status === 200) {
|
|
922
|
+
const json = await res.json()
|
|
923
|
+
expectTypeOf(json).toEqualTypeOf<z.output<typeof Billing.schema.InvoicePreview>>()
|
|
924
|
+
if (json.status === 'ready') {
|
|
925
|
+
expectTypeOf(json.lineItems[0]!.amount).toEqualTypeOf<string>()
|
|
926
|
+
expectTypeOf(json.lineItems[0]!.description).toEqualTypeOf<string>()
|
|
927
|
+
expectTypeOf(json.lineItems[0]!.kind).toEqualTypeOf<
|
|
928
|
+
'apiRequests' | 'feePayerSpend' | 'routeSubsidy' | null
|
|
929
|
+
>()
|
|
930
|
+
expectTypeOf(json.lineItems[0]!.period).toEqualTypeOf<{ end: string; start: string }>()
|
|
931
|
+
expectTypeOf(json.lineItems[0]!.priceId).toEqualTypeOf<string | null>()
|
|
932
|
+
expectTypeOf(json.lineItems[0]!.product).toEqualTypeOf<{
|
|
933
|
+
id: string
|
|
934
|
+
name: string
|
|
935
|
+
} | null>()
|
|
936
|
+
expectTypeOf(json.lineItems[0]!.quantity).toEqualTypeOf<number | null>()
|
|
937
|
+
expectTypeOf(json.lineItems[0]!.unitAmount).toEqualTypeOf<string | null>()
|
|
938
|
+
expectTypeOf(json.billingCredits).toEqualTypeOf<string>()
|
|
939
|
+
expectTypeOf(json.exclusiveTax).toEqualTypeOf<string>()
|
|
940
|
+
expectTypeOf(json.startingBalance).toEqualTypeOf<string>()
|
|
941
|
+
expectTypeOf(json.total).toEqualTypeOf<string>()
|
|
942
|
+
expectTypeOf(json.currency).toEqualTypeOf<'usd'>()
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
if (res.status === 501) {
|
|
946
|
+
const json = await res.json()
|
|
947
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'billing_unconfigured'>()
|
|
948
|
+
}
|
|
949
|
+
})
|
|
950
|
+
|
|
702
951
|
test('PATCH /v1/orgs/:orgId/billing', async () => {
|
|
703
952
|
const client = Client.create()
|
|
704
953
|
const res = await client.v1.orgs[':orgId{org_[A-Za-z0-9_-]+}'].billing.$patch({
|
|
@@ -857,7 +1106,9 @@ describe('narrows responses by status', () => {
|
|
|
857
1106
|
}
|
|
858
1107
|
case 409: {
|
|
859
1108
|
const json = await res.json()
|
|
860
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1109
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1110
|
+
'routes_deposit_addresses_active' | 'sponsorships_unreported'
|
|
1111
|
+
>()
|
|
861
1112
|
void json
|
|
862
1113
|
return
|
|
863
1114
|
}
|
|
@@ -1055,7 +1306,9 @@ describe('narrows responses by status', () => {
|
|
|
1055
1306
|
}
|
|
1056
1307
|
case 409: {
|
|
1057
1308
|
const json = await res.json()
|
|
1058
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1309
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1310
|
+
'routes_deposit_addresses_active' | 'sponsorships_unreported'
|
|
1311
|
+
>()
|
|
1059
1312
|
void json
|
|
1060
1313
|
return
|
|
1061
1314
|
}
|
|
@@ -1071,7 +1324,7 @@ describe('narrows responses by status', () => {
|
|
|
1071
1324
|
param: { orgId: 'org_test', projectId: 'prj_test' },
|
|
1072
1325
|
})
|
|
1073
1326
|
|
|
1074
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 502>()
|
|
1327
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 409 | 502>()
|
|
1075
1328
|
|
|
1076
1329
|
switch (res.status) {
|
|
1077
1330
|
case 200: {
|
|
@@ -1095,7 +1348,7 @@ describe('narrows responses by status', () => {
|
|
|
1095
1348
|
const client = Client.create()
|
|
1096
1349
|
const res = await client.v1.orgs[':orgId{org_[A-Za-z0-9_-]+}']['api-keys'].$get({
|
|
1097
1350
|
// The environment filter is optional (defaults to production server-side).
|
|
1098
|
-
query: { environment: 'sandbox' },
|
|
1351
|
+
query: { environment: 'sandbox', include: '' },
|
|
1099
1352
|
param: { orgId: 'org_test' },
|
|
1100
1353
|
})
|
|
1101
1354
|
|
|
@@ -1329,6 +1582,12 @@ describe('narrows responses by status', () => {
|
|
|
1329
1582
|
void json
|
|
1330
1583
|
return
|
|
1331
1584
|
}
|
|
1585
|
+
case 429: {
|
|
1586
|
+
const json = await res.json()
|
|
1587
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'payment_required' | 'rate_limit_exceeded'>()
|
|
1588
|
+
void json
|
|
1589
|
+
return
|
|
1590
|
+
}
|
|
1332
1591
|
}
|
|
1333
1592
|
})
|
|
1334
1593
|
|
|
@@ -2227,10 +2486,12 @@ describe('narrows responses by status', () => {
|
|
|
2227
2486
|
}
|
|
2228
2487
|
})
|
|
2229
2488
|
|
|
2230
|
-
test('GET /v1/
|
|
2489
|
+
test('GET /v1/routes/quotes', async () => {
|
|
2231
2490
|
const client = Client.create()
|
|
2232
|
-
const res = await client.v1.
|
|
2491
|
+
const res = await client.v1.routes.quotes.$get({
|
|
2233
2492
|
query: {
|
|
2493
|
+
destinationChain: 'eip155:8453',
|
|
2494
|
+
destinationToken: 'USDC',
|
|
2234
2495
|
provider: 'across',
|
|
2235
2496
|
sourceAmount: '1000000',
|
|
2236
2497
|
sourceChain: 'base',
|
|
@@ -2259,14 +2520,16 @@ describe('narrows responses by status', () => {
|
|
|
2259
2520
|
| undefined
|
|
2260
2521
|
>()
|
|
2261
2522
|
expectTypeOf(json.data[0]!.sourceAmount).toEqualTypeOf<
|
|
2262
|
-
z.output<
|
|
2263
|
-
typeof FundingQuotes.schema.quoteFunding.Response
|
|
2264
|
-
>['data'][number]['sourceAmount']
|
|
2523
|
+
z.output<typeof RoutesQuotes.schema.quoteRoutes.Response>['data'][number]['sourceAmount']
|
|
2265
2524
|
>()
|
|
2266
2525
|
// @ts-expect-error token references do not contain quantities
|
|
2267
2526
|
void json.data[0]!.sourceToken.amount
|
|
2268
2527
|
// @ts-expect-error provider details no longer duplicate destination amounts
|
|
2269
2528
|
void json.data[0]!.quote.outputAmount
|
|
2529
|
+
// @ts-expect-error provider liquidity sources are private implementation details
|
|
2530
|
+
void json.data[0]!.quality.liquiditySource
|
|
2531
|
+
// @ts-expect-error provider endpoint details are private implementation details
|
|
2532
|
+
void json.data[0]!.quality.sourceDetail
|
|
2270
2533
|
expectTypeOf(json.data[0]!.provider.id).toEqualTypeOf<string>()
|
|
2271
2534
|
expectTypeOf(json.data[0]!.quote.expiresAt).toEqualTypeOf<string | undefined>()
|
|
2272
2535
|
expectTypeOf(json.data[0]!.destinationChain.addressFormat).toEqualTypeOf<
|
|
@@ -2295,9 +2558,9 @@ describe('narrows responses by status', () => {
|
|
|
2295
2558
|
}
|
|
2296
2559
|
})
|
|
2297
2560
|
|
|
2298
|
-
test('GET /v1/
|
|
2561
|
+
test('GET /v1/routes/chains', async () => {
|
|
2299
2562
|
const client = Client.create()
|
|
2300
|
-
const res = await client.v1.
|
|
2563
|
+
const res = await client.v1.routes.chains.$get()
|
|
2301
2564
|
|
|
2302
2565
|
expectTypeOf(res.status).toEqualTypeOf<200 | PaidAccessStatus>()
|
|
2303
2566
|
|
|
@@ -2306,7 +2569,7 @@ describe('narrows responses by status', () => {
|
|
|
2306
2569
|
const json = await res.json()
|
|
2307
2570
|
expectTypeOf(json.data[0]!.tokens[0]!.symbol).toEqualTypeOf<
|
|
2308
2571
|
z.output<
|
|
2309
|
-
typeof
|
|
2572
|
+
typeof RoutesChains.schema.getRoutesChains.Response
|
|
2310
2573
|
>['data'][number]['tokens'][number]['symbol']
|
|
2311
2574
|
>()
|
|
2312
2575
|
expectTypeOf(json.data[0]!.addressFormat).toEqualTypeOf<'base58' | 'base58check' | 'hex'>()
|
|
@@ -2323,9 +2586,9 @@ describe('narrows responses by status', () => {
|
|
|
2323
2586
|
}
|
|
2324
2587
|
})
|
|
2325
2588
|
|
|
2326
|
-
test('GET /v1/
|
|
2589
|
+
test('GET /v1/routes/providers', async () => {
|
|
2327
2590
|
const client = Client.create()
|
|
2328
|
-
const res = await client.v1.
|
|
2591
|
+
const res = await client.v1.routes.providers.$get()
|
|
2329
2592
|
|
|
2330
2593
|
expectTypeOf(res.status).toEqualTypeOf<200 | PaidAccessStatus>()
|
|
2331
2594
|
|
|
@@ -2348,7 +2611,7 @@ describe('narrows responses by status', () => {
|
|
|
2348
2611
|
}
|
|
2349
2612
|
})
|
|
2350
2613
|
|
|
2351
|
-
test('POST /v1/
|
|
2614
|
+
test('POST /v1/routes/deposit-addresses', async () => {
|
|
2352
2615
|
const client = Client.create()
|
|
2353
2616
|
const json = {
|
|
2354
2617
|
amount: '100000000',
|
|
@@ -2359,13 +2622,13 @@ describe('narrows responses by status', () => {
|
|
|
2359
2622
|
sourceToken: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
|
|
2360
2623
|
} as const
|
|
2361
2624
|
// @ts-expect-error `Idempotency-Key` is required for deposit-address creation.
|
|
2362
|
-
void client.v1.
|
|
2363
|
-
const res = await client.v1.
|
|
2364
|
-
header: { 'idempotency-key': '
|
|
2625
|
+
void client.v1.routes['deposit-addresses'].$post({ json })
|
|
2626
|
+
const res = await client.v1.routes['deposit-addresses'].$post({
|
|
2627
|
+
header: { 'idempotency-key': 'routes_01k1c5j8q8p0be6j5v9m6d1e4r' },
|
|
2365
2628
|
json,
|
|
2366
2629
|
})
|
|
2367
2630
|
|
|
2368
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 409 | 502 | PublicAccessStatus>()
|
|
2631
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 403 | 404 | 409 | 502 | PublicAccessStatus>()
|
|
2369
2632
|
|
|
2370
2633
|
switch (res.status) {
|
|
2371
2634
|
case 200: {
|
|
@@ -2373,14 +2636,14 @@ describe('narrows responses by status', () => {
|
|
|
2373
2636
|
expectTypeOf(json.id).toEqualTypeOf<string>()
|
|
2374
2637
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2375
2638
|
z.output<
|
|
2376
|
-
typeof
|
|
2639
|
+
typeof RoutesDepositAddresses.schema.createRoutesDepositAddress.Response
|
|
2377
2640
|
>['status']
|
|
2378
2641
|
>()
|
|
2379
2642
|
expectTypeOf(json.subsidize).toEqualTypeOf<boolean>()
|
|
2380
2643
|
if ('quote' in json) {
|
|
2381
2644
|
expectTypeOf(json.destinationAmount.baseUnits).toEqualTypeOf<string>()
|
|
2382
2645
|
expectTypeOf(json.fees).toEqualTypeOf<
|
|
2383
|
-
z.output<typeof
|
|
2646
|
+
z.output<typeof RoutesDepositAddress.schema.CreatedRoutesDepositAddress>['fees']
|
|
2384
2647
|
>()
|
|
2385
2648
|
expectTypeOf(json.quote.sampledAt).toEqualTypeOf<string>()
|
|
2386
2649
|
expectTypeOf(json.sourceAmount.baseUnits).toEqualTypeOf<string>()
|
|
@@ -2388,6 +2651,19 @@ describe('narrows responses by status', () => {
|
|
|
2388
2651
|
void json
|
|
2389
2652
|
return
|
|
2390
2653
|
}
|
|
2654
|
+
case 403: {
|
|
2655
|
+
const json = await res.json()
|
|
2656
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
2657
|
+
| 'api_key_forbidden'
|
|
2658
|
+
| 'api_key_ip_forbidden'
|
|
2659
|
+
| 'billing_past_due'
|
|
2660
|
+
| 'billing_required'
|
|
2661
|
+
| 'routes_deposit_address_limit_exceeded'
|
|
2662
|
+
| 'routes_subsidy_not_enabled'
|
|
2663
|
+
>()
|
|
2664
|
+
void json
|
|
2665
|
+
return
|
|
2666
|
+
}
|
|
2391
2667
|
case 404: {
|
|
2392
2668
|
const json = await res.json()
|
|
2393
2669
|
expectTypeOf(json.error.code).toEqualTypeOf<'deposit_address_not_available'>()
|
|
@@ -2405,10 +2681,10 @@ describe('narrows responses by status', () => {
|
|
|
2405
2681
|
}
|
|
2406
2682
|
})
|
|
2407
2683
|
|
|
2408
|
-
test('GET /v1/
|
|
2684
|
+
test('GET /v1/routes/deposit-addresses/:id', async () => {
|
|
2409
2685
|
const client = Client.create()
|
|
2410
|
-
const res = await client.v1.
|
|
2411
|
-
param: { id: '
|
|
2686
|
+
const res = await client.v1.routes['deposit-addresses'][':id{rda_[A-Za-z0-9_-]+}'].$get({
|
|
2687
|
+
param: { id: 'rda_test' },
|
|
2412
2688
|
})
|
|
2413
2689
|
|
|
2414
2690
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PublicAccessStatus>()
|
|
@@ -2417,7 +2693,7 @@ describe('narrows responses by status', () => {
|
|
|
2417
2693
|
case 200: {
|
|
2418
2694
|
const json = await res.json()
|
|
2419
2695
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2420
|
-
z.output<typeof
|
|
2696
|
+
z.output<typeof RoutesDepositAddresses.schema.DepositAddress>['status']
|
|
2421
2697
|
>()
|
|
2422
2698
|
expectTypeOf(json.sourceChain.kind).toEqualTypeOf<'evm' | 'solana' | 'tron'>()
|
|
2423
2699
|
expectTypeOf(json.subsidize).toEqualTypeOf<boolean>()
|
|
@@ -2428,16 +2704,16 @@ describe('narrows responses by status', () => {
|
|
|
2428
2704
|
}
|
|
2429
2705
|
case 404: {
|
|
2430
2706
|
const json = await res.json()
|
|
2431
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2707
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_address_not_found'>()
|
|
2432
2708
|
void json
|
|
2433
2709
|
return
|
|
2434
2710
|
}
|
|
2435
2711
|
}
|
|
2436
2712
|
})
|
|
2437
2713
|
|
|
2438
|
-
test('GET /v1/
|
|
2714
|
+
test('GET /v1/routes/deposit-addresses', async () => {
|
|
2439
2715
|
const client = Client.create()
|
|
2440
|
-
const res = await client.v1.
|
|
2716
|
+
const res = await client.v1.routes['deposit-addresses'].$get()
|
|
2441
2717
|
|
|
2442
2718
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 502 | PublicAccessStatus>()
|
|
2443
2719
|
|
|
@@ -2445,7 +2721,7 @@ describe('narrows responses by status', () => {
|
|
|
2445
2721
|
case 200: {
|
|
2446
2722
|
const json = await res.json()
|
|
2447
2723
|
expectTypeOf(json.data[0]!.status).toEqualTypeOf<
|
|
2448
|
-
z.output<typeof
|
|
2724
|
+
z.output<typeof RoutesDepositAddresses.schema.DepositAddress>['status']
|
|
2449
2725
|
>()
|
|
2450
2726
|
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
2451
2727
|
void json
|
|
@@ -2454,11 +2730,11 @@ describe('narrows responses by status', () => {
|
|
|
2454
2730
|
}
|
|
2455
2731
|
})
|
|
2456
2732
|
|
|
2457
|
-
test('POST /v1/
|
|
2733
|
+
test('POST /v1/routes/deposit-addresses/:id/reconcile', async () => {
|
|
2458
2734
|
const client = Client.create()
|
|
2459
|
-
const res = await client.v1.
|
|
2460
|
-
':id{
|
|
2461
|
-
].reconcile.$post({ param: { id: '
|
|
2735
|
+
const res = await client.v1.routes['deposit-addresses'][
|
|
2736
|
+
':id{rda_[A-Za-z0-9_-]+}'
|
|
2737
|
+
].reconcile.$post({ param: { id: 'rda_test' } })
|
|
2462
2738
|
|
|
2463
2739
|
expectTypeOf(res.status).toEqualTypeOf<202 | 400 | 401 | 403 | 404 | 409 | 429 | 501 | 502>()
|
|
2464
2740
|
|
|
@@ -2469,13 +2745,13 @@ describe('narrows responses by status', () => {
|
|
|
2469
2745
|
}
|
|
2470
2746
|
case 404: {
|
|
2471
2747
|
const json = await res.json()
|
|
2472
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2748
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_address_not_found'>()
|
|
2473
2749
|
void json
|
|
2474
2750
|
return
|
|
2475
2751
|
}
|
|
2476
2752
|
case 409: {
|
|
2477
2753
|
const json = await res.json()
|
|
2478
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2754
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_address_not_active'>()
|
|
2479
2755
|
void json
|
|
2480
2756
|
return
|
|
2481
2757
|
}
|
|
@@ -2494,13 +2770,13 @@ describe('narrows responses by status', () => {
|
|
|
2494
2770
|
}
|
|
2495
2771
|
})
|
|
2496
2772
|
|
|
2497
|
-
test('GET /v1/
|
|
2773
|
+
test('GET /v1/routes/deposits', async () => {
|
|
2498
2774
|
const client = Client.create()
|
|
2499
|
-
void client.v1.
|
|
2500
|
-
void client.v1.
|
|
2775
|
+
void client.v1.routes.deposits.$get()
|
|
2776
|
+
void client.v1.routes.deposits.$get({
|
|
2501
2777
|
query: { depositAddress: 'TJRabPrwbZy45sbavfcjinPJC18kjpRTv8' },
|
|
2502
2778
|
})
|
|
2503
|
-
const res = await client.v1.
|
|
2779
|
+
const res = await client.v1.routes.deposits.$get({
|
|
2504
2780
|
query: {
|
|
2505
2781
|
depositAddress: 'TJRabPrwbZy45sbavfcjinPJC18kjpRTv8',
|
|
2506
2782
|
destinationToken: 'usdt0',
|
|
@@ -2520,10 +2796,10 @@ describe('narrows responses by status', () => {
|
|
|
2520
2796
|
const json = await res.json()
|
|
2521
2797
|
expectTypeOf(json.data[0]!.recipient).toEqualTypeOf<string>()
|
|
2522
2798
|
expectTypeOf(json.data[0]!.status).toEqualTypeOf<
|
|
2523
|
-
z.output<typeof
|
|
2799
|
+
z.output<typeof RoutesDepositAddresses.schema.Deposit>['status']
|
|
2524
2800
|
>()
|
|
2525
2801
|
expectTypeOf(json.meta).toEqualTypeOf<
|
|
2526
|
-
z.output<typeof
|
|
2802
|
+
z.output<typeof RoutesDepositAddresses.schema.listRoutesDeposits.Response>['meta']
|
|
2527
2803
|
>()
|
|
2528
2804
|
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
2529
2805
|
void json
|
|
@@ -2532,10 +2808,10 @@ describe('narrows responses by status', () => {
|
|
|
2532
2808
|
}
|
|
2533
2809
|
})
|
|
2534
2810
|
|
|
2535
|
-
test('GET /v1/
|
|
2811
|
+
test('GET /v1/routes/deposits/:id', async () => {
|
|
2536
2812
|
const client = Client.create()
|
|
2537
|
-
const res = await client.v1.
|
|
2538
|
-
param: { id: '
|
|
2813
|
+
const res = await client.v1.routes.deposits[':id{rdp_[A-Za-z0-9_-]+}'].$get({
|
|
2814
|
+
param: { id: 'rdp_001785792060000_2ZPE2gvateYEQ0dQslgvkhjx' },
|
|
2539
2815
|
})
|
|
2540
2816
|
|
|
2541
2817
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PublicAccessStatus>()
|
|
@@ -2547,11 +2823,11 @@ describe('narrows responses by status', () => {
|
|
|
2547
2823
|
'chain' | 'manual' | 'poll' | 'webhook' | undefined
|
|
2548
2824
|
>()
|
|
2549
2825
|
expectTypeOf(json.destinationAmountRequired).toEqualTypeOf<
|
|
2550
|
-
z.output<typeof
|
|
2826
|
+
z.output<typeof RoutesDepositAddresses.schema.Deposit>['destinationAmountRequired']
|
|
2551
2827
|
>()
|
|
2552
2828
|
expectTypeOf(json.sourceTransferIndex).toEqualTypeOf<number | undefined>()
|
|
2553
2829
|
expectTypeOf(json.statusReason).toEqualTypeOf<
|
|
2554
|
-
z.output<typeof
|
|
2830
|
+
z.output<typeof RoutesDepositAddresses.schema.Deposit>['statusReason']
|
|
2555
2831
|
>()
|
|
2556
2832
|
// @ts-expect-error provider request identifiers remain private
|
|
2557
2833
|
void json.providerRequestIds
|
|
@@ -2560,16 +2836,16 @@ describe('narrows responses by status', () => {
|
|
|
2560
2836
|
}
|
|
2561
2837
|
case 404: {
|
|
2562
2838
|
const json = await res.json()
|
|
2563
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2839
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_not_found'>()
|
|
2564
2840
|
void json
|
|
2565
2841
|
return
|
|
2566
2842
|
}
|
|
2567
2843
|
}
|
|
2568
2844
|
})
|
|
2569
2845
|
|
|
2570
|
-
test('GET /v1/
|
|
2846
|
+
test('GET /v1/routes/transfers', async () => {
|
|
2571
2847
|
const client = Client.create()
|
|
2572
|
-
const res = await client.v1.
|
|
2848
|
+
const res = await client.v1.routes.transfers.$get({ query: {} })
|
|
2573
2849
|
|
|
2574
2850
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 502 | PublicAccessStatus>()
|
|
2575
2851
|
|
|
@@ -2578,7 +2854,7 @@ describe('narrows responses by status', () => {
|
|
|
2578
2854
|
const json = await res.json()
|
|
2579
2855
|
expectTypeOf(json.data[0]!.id).toEqualTypeOf<string>()
|
|
2580
2856
|
expectTypeOf(json.data[0]!.status).toEqualTypeOf<
|
|
2581
|
-
z.output<typeof
|
|
2857
|
+
z.output<typeof RoutesTransfers.schema.Transfer>['status']
|
|
2582
2858
|
>()
|
|
2583
2859
|
expectTypeOf(json.data[0]!.version).toEqualTypeOf<number>()
|
|
2584
2860
|
// Transfer reads never expose the executable action.
|
|
@@ -2586,7 +2862,7 @@ describe('narrows responses by status', () => {
|
|
|
2586
2862
|
void json.data[0]!.action
|
|
2587
2863
|
// `meta` (opt-in `include=totalCount` count) is optional.
|
|
2588
2864
|
expectTypeOf(json.meta).toEqualTypeOf<
|
|
2589
|
-
z.output<typeof
|
|
2865
|
+
z.output<typeof RoutesTransfers.schema.listRoutesTransfers.Response>['meta']
|
|
2590
2866
|
>()
|
|
2591
2867
|
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
2592
2868
|
void json
|
|
@@ -2602,10 +2878,11 @@ describe('narrows responses by status', () => {
|
|
|
2602
2878
|
}
|
|
2603
2879
|
})
|
|
2604
2880
|
|
|
2605
|
-
test('POST /v1/
|
|
2881
|
+
test('POST /v1/routes/transfers', async () => {
|
|
2606
2882
|
const client = Client.create()
|
|
2607
2883
|
const json = {
|
|
2608
2884
|
amount: '1000000',
|
|
2885
|
+
destinationChain: 'eip155:8453',
|
|
2609
2886
|
destinationToken: '0x20c000000000000000000000b9537d11c60e8b50',
|
|
2610
2887
|
mode: 'exactSource',
|
|
2611
2888
|
provider: 'stargate',
|
|
@@ -2614,14 +2891,16 @@ describe('narrows responses by status', () => {
|
|
|
2614
2891
|
sourceChain: 'eip155:8453',
|
|
2615
2892
|
sourceToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
2616
2893
|
} as const
|
|
2617
|
-
// @ts-expect-error `Idempotency-Key` is required for
|
|
2618
|
-
void client.v1.
|
|
2619
|
-
const res = await client.v1.
|
|
2620
|
-
header: { 'idempotency-key': '
|
|
2894
|
+
// @ts-expect-error `Idempotency-Key` is required for route transfer creation.
|
|
2895
|
+
void client.v1.routes.transfers.$post({ json })
|
|
2896
|
+
const res = await client.v1.routes.transfers.$post({
|
|
2897
|
+
header: { 'idempotency-key': 'routes_01k1c5j8q8p0be6j5v9m6d1e4r' },
|
|
2621
2898
|
json,
|
|
2622
2899
|
})
|
|
2623
2900
|
|
|
2624
|
-
expectTypeOf(res.status).toEqualTypeOf<
|
|
2901
|
+
expectTypeOf(res.status).toEqualTypeOf<
|
|
2902
|
+
200 | 400 | 403 | 404 | 409 | 501 | 502 | 503 | PublicAccessStatus
|
|
2903
|
+
>()
|
|
2625
2904
|
|
|
2626
2905
|
switch (res.status) {
|
|
2627
2906
|
case 200: {
|
|
@@ -2629,7 +2908,7 @@ describe('narrows responses by status', () => {
|
|
|
2629
2908
|
expectTypeOf(json.action.type).toEqualTypeOf<'evm:calls'>()
|
|
2630
2909
|
expectTypeOf(json.id).toEqualTypeOf<string>()
|
|
2631
2910
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2632
|
-
z.output<typeof
|
|
2911
|
+
z.output<typeof RoutesTransfers.schema.createRoutesTransfer.Response>['status']
|
|
2633
2912
|
>()
|
|
2634
2913
|
void json
|
|
2635
2914
|
return
|
|
@@ -2651,7 +2930,7 @@ describe('narrows responses by status', () => {
|
|
|
2651
2930
|
}
|
|
2652
2931
|
})
|
|
2653
2932
|
|
|
2654
|
-
test('POST /v1/
|
|
2933
|
+
test('POST /v1/routes/transfers/vault', async () => {
|
|
2655
2934
|
const client = Client.create()
|
|
2656
2935
|
const json = {
|
|
2657
2936
|
amount: '1000000',
|
|
@@ -2663,9 +2942,9 @@ describe('narrows responses by status', () => {
|
|
|
2663
2942
|
vaultAddress: `0x${'f4'.repeat(20)}`,
|
|
2664
2943
|
} as const
|
|
2665
2944
|
// @ts-expect-error `Idempotency-Key` is required for vault transfer creation.
|
|
2666
|
-
void client.v1.
|
|
2667
|
-
const res = await client.v1.
|
|
2668
|
-
header: { 'idempotency-key': '
|
|
2945
|
+
void client.v1.routes.transfers.vault.$post({ json })
|
|
2946
|
+
const res = await client.v1.routes.transfers.vault.$post({
|
|
2947
|
+
header: { 'idempotency-key': 'routes_vault_01k1c5j8q8p0be6j5v9m6d1e4r' },
|
|
2669
2948
|
json,
|
|
2670
2949
|
})
|
|
2671
2950
|
|
|
@@ -2677,7 +2956,7 @@ describe('narrows responses by status', () => {
|
|
|
2677
2956
|
}
|
|
2678
2957
|
})
|
|
2679
2958
|
|
|
2680
|
-
test('POST /v1/
|
|
2959
|
+
test('POST /v1/routes/transfers/zone', async () => {
|
|
2681
2960
|
const client = Client.create()
|
|
2682
2961
|
const json = {
|
|
2683
2962
|
amount: '1000000',
|
|
@@ -2691,9 +2970,9 @@ describe('narrows responses by status', () => {
|
|
|
2691
2970
|
sourceToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
2692
2971
|
} as const
|
|
2693
2972
|
// @ts-expect-error `Idempotency-Key` is required for Zone transfer creation.
|
|
2694
|
-
void client.v1.
|
|
2695
|
-
const res = await client.v1.
|
|
2696
|
-
header: { 'idempotency-key': '
|
|
2973
|
+
void client.v1.routes.transfers.zone.$post({ json })
|
|
2974
|
+
const res = await client.v1.routes.transfers.zone.$post({
|
|
2975
|
+
header: { 'idempotency-key': 'routes_zone_01k1c5j8q8p0be6j5v9m6d1e4r' },
|
|
2697
2976
|
json,
|
|
2698
2977
|
})
|
|
2699
2978
|
|
|
@@ -2705,10 +2984,10 @@ describe('narrows responses by status', () => {
|
|
|
2705
2984
|
}
|
|
2706
2985
|
})
|
|
2707
2986
|
|
|
2708
|
-
test('GET /v1/
|
|
2987
|
+
test('GET /v1/routes/transfers/:id', async () => {
|
|
2709
2988
|
const client = Client.create()
|
|
2710
|
-
const res = await client.v1.
|
|
2711
|
-
param: { id: '
|
|
2989
|
+
const res = await client.v1.routes.transfers[':id{rtr_[A-Za-z0-9_-]+}'].$get({
|
|
2990
|
+
param: { id: 'rtr_test' },
|
|
2712
2991
|
})
|
|
2713
2992
|
|
|
2714
2993
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PublicAccessStatus>()
|
|
@@ -2718,10 +2997,10 @@ describe('narrows responses by status', () => {
|
|
|
2718
2997
|
const json = await res.json()
|
|
2719
2998
|
expectTypeOf(json.id).toEqualTypeOf<string>()
|
|
2720
2999
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2721
|
-
z.output<typeof
|
|
3000
|
+
z.output<typeof RoutesTransfers.schema.getRoutesTransfer.Response>['status']
|
|
2722
3001
|
>()
|
|
2723
3002
|
expectTypeOf(json.statusReason).toEqualTypeOf<
|
|
2724
|
-
z.output<typeof
|
|
3003
|
+
z.output<typeof RoutesTransfers.schema.getRoutesTransfer.Response>['statusReason']
|
|
2725
3004
|
>()
|
|
2726
3005
|
// @ts-expect-error `action` is a creation-only field
|
|
2727
3006
|
void json.action
|
|
@@ -2730,7 +3009,7 @@ describe('narrows responses by status', () => {
|
|
|
2730
3009
|
}
|
|
2731
3010
|
case 404: {
|
|
2732
3011
|
const json = await res.json()
|
|
2733
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
3012
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_transfer_not_found'>()
|
|
2734
3013
|
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
2735
3014
|
void json
|
|
2736
3015
|
return
|
|
@@ -2738,6 +3017,46 @@ describe('narrows responses by status', () => {
|
|
|
2738
3017
|
}
|
|
2739
3018
|
})
|
|
2740
3019
|
|
|
3020
|
+
test('POST /v1/routes/transfers/:id/source-transactions', async () => {
|
|
3021
|
+
const client = Client.create()
|
|
3022
|
+
const sourceTransactions =
|
|
3023
|
+
client.v1.routes.transfers[':id{rtr_[A-Za-z0-9_-]+}']['source-transactions']
|
|
3024
|
+
const res = await sourceTransactions.$post({
|
|
3025
|
+
json: { transactionHashes: [`0x${'51'.repeat(32)}`, `0x${'52'.repeat(32)}`] },
|
|
3026
|
+
param: { id: 'rtr_test' },
|
|
3027
|
+
})
|
|
3028
|
+
void sourceTransactions.$post({
|
|
3029
|
+
json: { transactionHash: `0x${'51'.repeat(32)}` },
|
|
3030
|
+
param: { id: 'rtr_test' },
|
|
3031
|
+
})
|
|
3032
|
+
|
|
3033
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 409 | 501 | 502 | PublicAccessStatus>()
|
|
3034
|
+
|
|
3035
|
+
switch (res.status) {
|
|
3036
|
+
case 200: {
|
|
3037
|
+
const json = await res.json()
|
|
3038
|
+
expectTypeOf(json.sourceTransactionHashes).toEqualTypeOf<string[] | undefined>()
|
|
3039
|
+
expectTypeOf(json.status).toEqualTypeOf<
|
|
3040
|
+
z.output<
|
|
3041
|
+
typeof RoutesTransfers.schema.registerRoutesTransferSourceTransaction.Response
|
|
3042
|
+
>['status']
|
|
3043
|
+
>()
|
|
3044
|
+
void json
|
|
3045
|
+
return
|
|
3046
|
+
}
|
|
3047
|
+
case 409: {
|
|
3048
|
+
const json = await res.json()
|
|
3049
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3050
|
+
| 'routes_transfer_not_awaiting_source'
|
|
3051
|
+
| 'source_transaction_conflict'
|
|
3052
|
+
| 'source_transaction_pending'
|
|
3053
|
+
>()
|
|
3054
|
+
void json
|
|
3055
|
+
return
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
})
|
|
3059
|
+
|
|
2741
3060
|
test('GET /v1/exchange/swaps', async () => {
|
|
2742
3061
|
const client = Client.create()
|
|
2743
3062
|
const res = await client.v1.exchange.swaps.$get()
|
|
@@ -3315,6 +3634,9 @@ describe('narrows responses by status', () => {
|
|
|
3315
3634
|
expectTypeOf(json.data[0]!.address).toEqualTypeOf<
|
|
3316
3635
|
z.output<typeof VerifiedTokens.schema.Token>['address']
|
|
3317
3636
|
>()
|
|
3637
|
+
expectTypeOf(json.data[0]!.id).toEqualTypeOf<
|
|
3638
|
+
z.output<typeof VerifiedTokens.schema.Token>['id']
|
|
3639
|
+
>()
|
|
3318
3640
|
void json
|
|
3319
3641
|
return
|
|
3320
3642
|
}
|
|
@@ -3379,6 +3701,7 @@ describe('narrows responses by status', () => {
|
|
|
3379
3701
|
expectTypeOf(json.address).toEqualTypeOf<
|
|
3380
3702
|
z.output<typeof VerifiedTokens.schema.Token>['address']
|
|
3381
3703
|
>()
|
|
3704
|
+
expectTypeOf(json.id).toEqualTypeOf<z.output<typeof VerifiedTokens.schema.Token>['id']>()
|
|
3382
3705
|
void json
|
|
3383
3706
|
return
|
|
3384
3707
|
}
|
|
@@ -3408,13 +3731,48 @@ describe('narrows responses by status', () => {
|
|
|
3408
3731
|
}
|
|
3409
3732
|
})
|
|
3410
3733
|
|
|
3734
|
+
test('GET /v1/tokenlist', async () => {
|
|
3735
|
+
const client = Client.create()
|
|
3736
|
+
const res = await client.v1.tokenlist.$get({ query: {} })
|
|
3737
|
+
|
|
3738
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 502 | PaidAccessStatus>()
|
|
3739
|
+
|
|
3740
|
+
switch (res.status) {
|
|
3741
|
+
case 200: {
|
|
3742
|
+
const json = await res.json()
|
|
3743
|
+
expectTypeOf(json.tokens[0]!.address).toEqualTypeOf<
|
|
3744
|
+
z.output<typeof Tokenlist.schema.Token>['address']
|
|
3745
|
+
>()
|
|
3746
|
+
expectTypeOf(json.version).toEqualTypeOf<z.output<typeof Tokenlist.schema.Version>>()
|
|
3747
|
+
void json
|
|
3748
|
+
return
|
|
3749
|
+
}
|
|
3750
|
+
case 400: {
|
|
3751
|
+
const json = await res.json()
|
|
3752
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3753
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid'>
|
|
3754
|
+
>()
|
|
3755
|
+
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3756
|
+
void json
|
|
3757
|
+
return
|
|
3758
|
+
}
|
|
3759
|
+
case 502: {
|
|
3760
|
+
const json = await res.json()
|
|
3761
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'upstream_error'>()
|
|
3762
|
+
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3763
|
+
void json
|
|
3764
|
+
return
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
})
|
|
3768
|
+
|
|
3411
3769
|
test('GET /v1/indexer/query', async () => {
|
|
3412
3770
|
const client = Client.create()
|
|
3413
3771
|
const res = await client.v1.indexer.query.$get({
|
|
3414
3772
|
query: { chainId: '42431', sql: 'select 1' },
|
|
3415
3773
|
})
|
|
3416
3774
|
|
|
3417
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 422 | PaidAccessStatus>()
|
|
3775
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 422 | 502 | 504 | PaidAccessStatus>()
|
|
3418
3776
|
|
|
3419
3777
|
switch (res.status) {
|
|
3420
3778
|
case 200: {
|
|
@@ -3435,7 +3793,9 @@ describe('narrows responses by status', () => {
|
|
|
3435
3793
|
expectTypeOf(json.error).toEqualTypeOf<string>()
|
|
3436
3794
|
expectTypeOf(json.ok).toEqualTypeOf<false>()
|
|
3437
3795
|
} else {
|
|
3438
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3796
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3797
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported'>
|
|
3798
|
+
>()
|
|
3439
3799
|
}
|
|
3440
3800
|
void json
|
|
3441
3801
|
return
|
|
@@ -3447,6 +3807,37 @@ describe('narrows responses by status', () => {
|
|
|
3447
3807
|
void json
|
|
3448
3808
|
return
|
|
3449
3809
|
}
|
|
3810
|
+
case 502: {
|
|
3811
|
+
const json = await res.json()
|
|
3812
|
+
if ('ok' in json) {
|
|
3813
|
+
expectTypeOf(json.error).toEqualTypeOf<string>()
|
|
3814
|
+
expectTypeOf(json.ok).toEqualTypeOf<false>()
|
|
3815
|
+
} else {
|
|
3816
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'upstream_error'>()
|
|
3817
|
+
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3818
|
+
}
|
|
3819
|
+
void json
|
|
3820
|
+
return
|
|
3821
|
+
}
|
|
3822
|
+
case 504: {
|
|
3823
|
+
const json = await res.json()
|
|
3824
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'request_timeout'>()
|
|
3825
|
+
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3826
|
+
void json
|
|
3827
|
+
return
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
})
|
|
3831
|
+
|
|
3832
|
+
test('GET /v1/indexer/query?live=true', async () => {
|
|
3833
|
+
const client = Client.create()
|
|
3834
|
+
const res = await client.v1.indexer.query.$get({
|
|
3835
|
+
query: { chainId: '42431', live: 'true', sql: 'select 1' },
|
|
3836
|
+
})
|
|
3837
|
+
|
|
3838
|
+
if (res.status === 200) {
|
|
3839
|
+
const text = await res.text()
|
|
3840
|
+
expectTypeOf(text).toEqualTypeOf<string>()
|
|
3450
3841
|
}
|
|
3451
3842
|
})
|
|
3452
3843
|
|
|
@@ -3515,17 +3906,18 @@ describe('narrows responses by status', () => {
|
|
|
3515
3906
|
}
|
|
3516
3907
|
})
|
|
3517
3908
|
|
|
3518
|
-
test('POST /rpc
|
|
3909
|
+
test('POST /rpc', async () => {
|
|
3519
3910
|
const client = Client.create()
|
|
3520
|
-
const res = await client.rpc
|
|
3521
|
-
|
|
3911
|
+
const res = await client.rpc.$post({
|
|
3912
|
+
json: { jsonrpc: '2.0', method: 'eth_chainId', params: [] },
|
|
3522
3913
|
})
|
|
3523
3914
|
|
|
3524
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | PublicAccessStatus>()
|
|
3915
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 204 | 400 | 413 | 502 | PublicAccessStatus>()
|
|
3525
3916
|
|
|
3526
3917
|
switch (res.status) {
|
|
3527
3918
|
case 200: {
|
|
3528
3919
|
const json = await res.json()
|
|
3920
|
+
if (json === null) return
|
|
3529
3921
|
if (Array.isArray(json))
|
|
3530
3922
|
expectTypeOf(json[0]!.jsonrpc).toEqualTypeOf<
|
|
3531
3923
|
z.output<typeof Rpc.schema.Response>['jsonrpc']
|
|
@@ -3537,27 +3929,44 @@ describe('narrows responses by status', () => {
|
|
|
3537
3929
|
void json
|
|
3538
3930
|
return
|
|
3539
3931
|
}
|
|
3932
|
+
case 204:
|
|
3933
|
+
return
|
|
3540
3934
|
case 400: {
|
|
3541
3935
|
const json = await res.json()
|
|
3542
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3936
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3937
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported'>
|
|
3938
|
+
>()
|
|
3543
3939
|
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3544
3940
|
void json
|
|
3545
3941
|
return
|
|
3546
3942
|
}
|
|
3943
|
+
case 413: {
|
|
3944
|
+
const json = await res.json()
|
|
3945
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'payload_too_large'>()
|
|
3946
|
+
return
|
|
3947
|
+
}
|
|
3948
|
+
case 502: {
|
|
3949
|
+
const json = await res.json()
|
|
3950
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'upstream_error'>()
|
|
3951
|
+
void json
|
|
3952
|
+
return
|
|
3953
|
+
}
|
|
3547
3954
|
}
|
|
3548
3955
|
})
|
|
3549
3956
|
|
|
3550
3957
|
test('POST /rpc/:chain testnet shortcut', async () => {
|
|
3551
3958
|
const client = Client.create()
|
|
3552
|
-
const res = await client.rpc[':chain{(mainnet|testnet|[0-9]+)}
|
|
3959
|
+
const res = await client.rpc[':chain{(mainnet|testnet|[0-9]+)}'].$post({
|
|
3960
|
+
json: { id: 1, jsonrpc: '2.0', method: 'eth_chainId', params: [] },
|
|
3553
3961
|
param: { chain: 'testnet' },
|
|
3554
3962
|
})
|
|
3555
3963
|
|
|
3556
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | PublicAccessStatus>()
|
|
3964
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 204 | 400 | 413 | 502 | PublicAccessStatus>()
|
|
3557
3965
|
|
|
3558
3966
|
switch (res.status) {
|
|
3559
3967
|
case 200: {
|
|
3560
3968
|
const json = await res.json()
|
|
3969
|
+
if (json === null) return
|
|
3561
3970
|
if (Array.isArray(json))
|
|
3562
3971
|
expectTypeOf(json[0]!.jsonrpc).toEqualTypeOf<
|
|
3563
3972
|
z.output<typeof Rpc.schema.Response>['jsonrpc']
|
|
@@ -3569,13 +3978,28 @@ describe('narrows responses by status', () => {
|
|
|
3569
3978
|
void json
|
|
3570
3979
|
return
|
|
3571
3980
|
}
|
|
3981
|
+
case 204:
|
|
3982
|
+
return
|
|
3572
3983
|
case 400: {
|
|
3573
3984
|
const json = await res.json()
|
|
3574
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3985
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3986
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported'>
|
|
3987
|
+
>()
|
|
3575
3988
|
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3576
3989
|
void json
|
|
3577
3990
|
return
|
|
3578
3991
|
}
|
|
3992
|
+
case 413: {
|
|
3993
|
+
const json = await res.json()
|
|
3994
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'payload_too_large'>()
|
|
3995
|
+
return
|
|
3996
|
+
}
|
|
3997
|
+
case 502: {
|
|
3998
|
+
const json = await res.json()
|
|
3999
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'upstream_error'>()
|
|
4000
|
+
void json
|
|
4001
|
+
return
|
|
4002
|
+
}
|
|
3579
4003
|
}
|
|
3580
4004
|
})
|
|
3581
4005
|
|
|
@@ -3584,8 +4008,14 @@ describe('narrows responses by status', () => {
|
|
|
3584
4008
|
const res = await client.v1.addresses[':address'].activities.$get({
|
|
3585
4009
|
param: { address: '0x0000000000000000000000000000000000000000' },
|
|
3586
4010
|
query: {
|
|
4011
|
+
'amount.from': '1000000',
|
|
4012
|
+
'amount.to': '2000000',
|
|
3587
4013
|
chainId: '4217',
|
|
3588
4014
|
include: 'zones,token.logoUri,token.verified',
|
|
4015
|
+
type: 'transfer,swap',
|
|
4016
|
+
'valuation.amount.from': '1',
|
|
4017
|
+
'valuation.amount.to': '100',
|
|
4018
|
+
'valuation.currency': 'USD',
|
|
3589
4019
|
},
|
|
3590
4020
|
})
|
|
3591
4021
|
|
|
@@ -3642,6 +4072,14 @@ describe('narrows responses by status', () => {
|
|
|
3642
4072
|
expectTypeOf(json.data[0]!.type).toEqualTypeOf<Webhooks.EventType>()
|
|
3643
4073
|
void json
|
|
3644
4074
|
}
|
|
4075
|
+
if (res.status === 400) {
|
|
4076
|
+
const json = await res.json()
|
|
4077
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'api_key_malformed'>()
|
|
4078
|
+
}
|
|
4079
|
+
if (res.status === 404) {
|
|
4080
|
+
const json = await res.json()
|
|
4081
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhooks_not_enabled'>()
|
|
4082
|
+
}
|
|
3645
4083
|
})
|
|
3646
4084
|
|
|
3647
4085
|
test('POST /v1/webhooks', async () => {
|
|
@@ -3649,14 +4087,24 @@ describe('narrows responses by status', () => {
|
|
|
3649
4087
|
void client.v1.webhooks.$post({
|
|
3650
4088
|
json: {
|
|
3651
4089
|
destination: { type: 'url', url: 'https://example.com/webhook' },
|
|
3652
|
-
eventType: '
|
|
4090
|
+
eventType: 'routes:deposit.updated',
|
|
3653
4091
|
filters: {
|
|
3654
|
-
depositAddressId: '
|
|
4092
|
+
depositAddressId: 'rda_001785792000000_2ZPE2gvateYEQ0dQslgvkhjx',
|
|
3655
4093
|
recipient: `0x${'11'.repeat(20)}`,
|
|
3656
4094
|
status: 'completed',
|
|
3657
4095
|
},
|
|
3658
4096
|
},
|
|
3659
4097
|
})
|
|
4098
|
+
void client.v1.webhooks.$post({
|
|
4099
|
+
json: {
|
|
4100
|
+
destination: { type: 'url', url: 'https://example.com/webhook' },
|
|
4101
|
+
eventType: 'routes:transfer.updated',
|
|
4102
|
+
filters: {
|
|
4103
|
+
id: 'rtr_001785792000000_2ZPE2gvateYEQ0dQslgvkhjx',
|
|
4104
|
+
status: 'completed',
|
|
4105
|
+
},
|
|
4106
|
+
},
|
|
4107
|
+
})
|
|
3660
4108
|
const res = await client.v1.webhooks.$post({
|
|
3661
4109
|
json: {
|
|
3662
4110
|
destination: { type: 'url', url: 'https://example.com/webhook' },
|
|
@@ -3697,6 +4145,10 @@ describe('narrows responses by status', () => {
|
|
|
3697
4145
|
'api_key_forbidden' | 'api_key_ip_forbidden' | 'limit_exceeded'
|
|
3698
4146
|
>()
|
|
3699
4147
|
}
|
|
4148
|
+
if (res.status === 404) {
|
|
4149
|
+
const json = await res.json()
|
|
4150
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhooks_not_enabled'>()
|
|
4151
|
+
}
|
|
3700
4152
|
})
|
|
3701
4153
|
|
|
3702
4154
|
test('GET /v1/webhooks', async () => {
|
|
@@ -3721,6 +4173,14 @@ describe('narrows responses by status', () => {
|
|
|
3721
4173
|
>()
|
|
3722
4174
|
void json
|
|
3723
4175
|
}
|
|
4176
|
+
if (res.status === 400) {
|
|
4177
|
+
const json = await res.json()
|
|
4178
|
+
expectTypeOf(json.error.code).toEqualTypeOf<Access400<'query_invalid'>>()
|
|
4179
|
+
}
|
|
4180
|
+
if (res.status === 404) {
|
|
4181
|
+
const json = await res.json()
|
|
4182
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhooks_not_enabled'>()
|
|
4183
|
+
}
|
|
3724
4184
|
})
|
|
3725
4185
|
|
|
3726
4186
|
test('GET /v1/webhooks/:id', async () => {
|
|
@@ -3742,6 +4202,14 @@ describe('narrows responses by status', () => {
|
|
|
3742
4202
|
>()
|
|
3743
4203
|
void json
|
|
3744
4204
|
}
|
|
4205
|
+
if (res.status === 400) {
|
|
4206
|
+
const json = await res.json()
|
|
4207
|
+
expectTypeOf(json.error.code).toEqualTypeOf<Access400<'param_invalid'>>()
|
|
4208
|
+
}
|
|
4209
|
+
if (res.status === 404) {
|
|
4210
|
+
const json = await res.json()
|
|
4211
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhook_not_found' | 'webhooks_not_enabled'>()
|
|
4212
|
+
}
|
|
3745
4213
|
})
|
|
3746
4214
|
|
|
3747
4215
|
test('GET /v1/webhooks/:id/deliveries', async () => {
|
|
@@ -3763,6 +4231,14 @@ describe('narrows responses by status', () => {
|
|
|
3763
4231
|
>()
|
|
3764
4232
|
void json
|
|
3765
4233
|
}
|
|
4234
|
+
if (res.status === 400) {
|
|
4235
|
+
const json = await res.json()
|
|
4236
|
+
expectTypeOf(json.error.code).toEqualTypeOf<Access400<'param_invalid' | 'query_invalid'>>()
|
|
4237
|
+
}
|
|
4238
|
+
if (res.status === 404) {
|
|
4239
|
+
const json = await res.json()
|
|
4240
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhook_not_found' | 'webhooks_not_enabled'>()
|
|
4241
|
+
}
|
|
3766
4242
|
})
|
|
3767
4243
|
|
|
3768
4244
|
test('POST /v1/webhooks/:id/ping', async () => {
|
|
@@ -3780,6 +4256,14 @@ describe('narrows responses by status', () => {
|
|
|
3780
4256
|
>()
|
|
3781
4257
|
void json
|
|
3782
4258
|
}
|
|
4259
|
+
if (res.status === 400) {
|
|
4260
|
+
const json = await res.json()
|
|
4261
|
+
expectTypeOf(json.error.code).toEqualTypeOf<Access400<'param_invalid'>>()
|
|
4262
|
+
}
|
|
4263
|
+
if (res.status === 404) {
|
|
4264
|
+
const json = await res.json()
|
|
4265
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhook_not_found' | 'webhooks_not_enabled'>()
|
|
4266
|
+
}
|
|
3783
4267
|
})
|
|
3784
4268
|
|
|
3785
4269
|
test('POST /v1/webhooks/:id/deliveries/:deliveryId/retry', async () => {
|
|
@@ -3799,6 +4283,16 @@ describe('narrows responses by status', () => {
|
|
|
3799
4283
|
>()
|
|
3800
4284
|
void json
|
|
3801
4285
|
}
|
|
4286
|
+
if (res.status === 400) {
|
|
4287
|
+
const json = await res.json()
|
|
4288
|
+
expectTypeOf(json.error.code).toEqualTypeOf<Access400<'param_invalid'>>()
|
|
4289
|
+
}
|
|
4290
|
+
if (res.status === 404) {
|
|
4291
|
+
const json = await res.json()
|
|
4292
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
4293
|
+
'delivery_not_found' | 'webhook_not_found' | 'webhooks_not_enabled'
|
|
4294
|
+
>()
|
|
4295
|
+
}
|
|
3802
4296
|
})
|
|
3803
4297
|
|
|
3804
4298
|
test('PATCH /v1/webhooks/:id', async () => {
|
|
@@ -3833,6 +4327,10 @@ describe('narrows responses by status', () => {
|
|
|
3833
4327
|
>
|
|
3834
4328
|
>()
|
|
3835
4329
|
}
|
|
4330
|
+
if (res.status === 404) {
|
|
4331
|
+
const json = await res.json()
|
|
4332
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhook_not_found' | 'webhooks_not_enabled'>()
|
|
4333
|
+
}
|
|
3836
4334
|
})
|
|
3837
4335
|
|
|
3838
4336
|
test('DELETE /v1/webhooks/:id', async () => {
|
|
@@ -3850,6 +4348,14 @@ describe('narrows responses by status', () => {
|
|
|
3850
4348
|
>()
|
|
3851
4349
|
void json
|
|
3852
4350
|
}
|
|
4351
|
+
if (res.status === 400) {
|
|
4352
|
+
const json = await res.json()
|
|
4353
|
+
expectTypeOf(json.error.code).toEqualTypeOf<Access400<'param_invalid'>>()
|
|
4354
|
+
}
|
|
4355
|
+
if (res.status === 404) {
|
|
4356
|
+
const json = await res.json()
|
|
4357
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhook_not_found' | 'webhooks_not_enabled'>()
|
|
4358
|
+
}
|
|
3853
4359
|
})
|
|
3854
4360
|
|
|
3855
4361
|
test('POST /v1/orgs/:orgId/webhooks', async () => {
|
|
@@ -3944,9 +4450,13 @@ describe('narrows responses by status', () => {
|
|
|
3944
4450
|
>()
|
|
3945
4451
|
if (json.envelope.type === 'block:created')
|
|
3946
4452
|
expectTypeOf(json.envelope.data.number).toEqualTypeOf<number>()
|
|
3947
|
-
if (json.envelope.type === '
|
|
4453
|
+
if (json.envelope.type === 'routes:deposit.updated')
|
|
4454
|
+
expectTypeOf(json.envelope.data.status).toEqualTypeOf<
|
|
4455
|
+
z.output<typeof Webhooks.schema.RoutesDepositEvent>['status']
|
|
4456
|
+
>()
|
|
4457
|
+
if (json.envelope.type === 'routes:transfer.updated')
|
|
3948
4458
|
expectTypeOf(json.envelope.data.status).toEqualTypeOf<
|
|
3949
|
-
z.output<typeof Webhooks.schema.
|
|
4459
|
+
z.output<typeof Webhooks.schema.RoutesTransferEvent>['status']
|
|
3950
4460
|
>()
|
|
3951
4461
|
expectTypeOf(json.requestUrl).toEqualTypeOf<string>()
|
|
3952
4462
|
void json
|