tapimo 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/ApiKey.js +1 -1
- package/dist/ApiKey.js.map +1 -1
- package/dist/ApiKeys.d.ts +95 -14
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +360 -49
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +12466 -10374
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +300 -22
- package/dist/App.js.map +1 -1
- package/dist/Assets.d.ts.map +1 -1
- package/dist/Assets.js +2 -1
- package/dist/Assets.js.map +1 -1
- package/dist/Handler.d.ts +0 -1
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js +0 -1
- package/dist/Handler.js.map +1 -1
- package/dist/Scope.d.ts +13 -5
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +16 -5
- package/dist/Scope.js.map +1 -1
- package/dist/Webhooks.js +1 -1
- package/dist/Webhooks.js.map +1 -1
- package/dist/admin/App.d.ts +3057 -546
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/App.js +26 -5
- package/dist/admin/App.js.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +179 -27
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +95 -43
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +1398 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.js +463 -7
- package/dist/admin/apps/earn-vaults.js.map +1 -1
- package/dist/admin/apps/organizations.d.ts +267 -15
- package/dist/admin/apps/organizations.d.ts.map +1 -1
- package/dist/admin/apps/organizations.js +241 -25
- package/dist/admin/apps/organizations.js.map +1 -1
- package/dist/admin/apps/routes-support.d.ts +95 -0
- package/dist/admin/apps/routes-support.d.ts.map +1 -0
- package/dist/admin/apps/routes-support.js +151 -0
- package/dist/admin/apps/routes-support.js.map +1 -0
- package/dist/admin/apps/routes.d.ts +2764 -0
- package/dist/admin/apps/routes.d.ts.map +1 -0
- package/dist/admin/apps/routes.js +728 -0
- package/dist/admin/apps/routes.js.map +1 -0
- package/dist/admin/apps/subsidies.d.ts +501 -0
- package/dist/admin/apps/subsidies.d.ts.map +1 -0
- package/dist/admin/apps/subsidies.js +384 -0
- package/dist/admin/apps/subsidies.js.map +1 -0
- package/dist/admin/apps/verified-tokens.d.ts +166 -160
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
- package/dist/admin/apps/verified-tokens.js +27 -7
- package/dist/admin/apps/verified-tokens.js.map +1 -1
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +201 -149
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +5 -2
- package/dist/analytics/Analytics.d.ts.map +1 -1
- package/dist/analytics/Analytics.js +31 -1
- package/dist/analytics/Analytics.js.map +1 -1
- package/dist/analytics/tables/requestEvents.d.ts +2 -1
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
- package/dist/analytics/tables/requestEvents.js +10 -1
- package/dist/analytics/tables/requestEvents.js.map +1 -1
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts +72 -0
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts.map +1 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js +56 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js.map +1 -0
- package/dist/apps/Zones.d.ts +21 -12526
- package/dist/apps/Zones.d.ts.map +1 -1
- package/dist/apps/Zones.js +37 -5
- package/dist/apps/Zones.js.map +1 -1
- package/dist/apps/data/App.d.ts +3971 -2595
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +76 -21
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +629 -299
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +495 -190
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +72 -0
- package/dist/apps/data/routes/addresses.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +116 -116
- package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
- package/dist/apps/data/routes/coingecko.js +47 -21
- package/dist/apps/data/routes/coingecko.js.map +1 -1
- package/dist/apps/data/routes/earn.d.ts +1450 -337
- package/dist/apps/data/routes/earn.d.ts.map +1 -1
- package/dist/apps/data/routes/earn.js +1226 -144
- package/dist/apps/data/routes/earn.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts +113 -108
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +41 -21
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +142 -17
- package/dist/apps/data/routes/indexer.d.ts.map +1 -1
- package/dist/apps/data/routes/indexer.js +83 -27
- package/dist/apps/data/routes/indexer.js.map +1 -1
- package/dist/apps/data/routes/receipts.d.ts +235 -235
- package/dist/apps/data/routes/rpc.d.ts +507 -33
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +309 -165
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +47 -15
- package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
- package/dist/apps/data/routes/tokenlist.js +68 -11
- package/dist/apps/data/routes/tokenlist.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +2 -0
- package/dist/apps/data/routes/tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/tokens.js +26 -14
- package/dist/apps/data/routes/tokens.js.map +1 -1
- package/dist/apps/data/routes/transfers.d.ts +93 -77
- package/dist/apps/data/routes/transfers.d.ts.map +1 -1
- package/dist/apps/data/routes/transfers.js +9 -7
- package/dist/apps/data/routes/transfers.js.map +1 -1
- package/dist/apps/data/routes/valuation.d.ts +32 -32
- package/dist/apps/data/routes/verified-tokens.d.ts +88 -88
- package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/verified-tokens.js +64 -20
- package/dist/apps/data/routes/verified-tokens.js.map +1 -1
- package/dist/apps/data/routes/webhooks.d.ts +614 -177
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +308 -205
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/data/routes/zones.d.ts +31 -31
- package/dist/apps/data/routes/zones.d.ts.map +1 -1
- package/dist/apps/data/routes/zones.js +20 -12
- package/dist/apps/data/routes/zones.js.map +1 -1
- package/dist/apps/docs/reference.js +2 -2
- package/dist/apps/docs/reference.js.map +1 -1
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/management/App.d.ts +3780 -3402
- package/dist/apps/management/App.d.ts.map +1 -1
- package/dist/apps/management/App.js +5 -14
- package/dist/apps/management/App.js.map +1 -1
- package/dist/apps/management/Billing.d.ts +48 -7
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +204 -25
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +317 -215
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.js +43 -15
- package/dist/apps/management/routes/api-keys.js.map +1 -1
- package/dist/apps/management/routes/billing.d.ts +290 -4
- package/dist/apps/management/routes/billing.d.ts.map +1 -1
- package/dist/apps/management/routes/billing.js +274 -49
- package/dist/apps/management/routes/billing.js.map +1 -1
- package/dist/apps/management/routes/faucet.d.ts +6 -6
- package/dist/apps/management/routes/faucet.js +1 -1
- package/dist/apps/management/routes/faucet.js.map +1 -1
- package/dist/apps/management/routes/invitations.d.ts +213 -138
- package/dist/apps/management/routes/invitations.d.ts.map +1 -1
- package/dist/apps/management/routes/invitations.js +117 -13
- package/dist/apps/management/routes/invitations.js.map +1 -1
- package/dist/apps/management/routes/invite-links.d.ts +166 -166
- package/dist/apps/management/routes/me.d.ts.map +1 -1
- package/dist/apps/management/routes/me.js +6 -2
- package/dist/apps/management/routes/me.js.map +1 -1
- package/dist/apps/management/routes/members.d.ts +30 -30
- package/dist/apps/management/routes/orgs.d.ts +103 -87
- package/dist/apps/management/routes/orgs.d.ts.map +1 -1
- package/dist/apps/management/routes/orgs.js +52 -12
- package/dist/apps/management/routes/orgs.js.map +1 -1
- package/dist/apps/management/routes/projects.d.ts +125 -125
- package/dist/apps/management/routes/projects.d.ts.map +1 -1
- package/dist/apps/management/routes/projects.js +6 -1
- package/dist/apps/management/routes/projects.js.map +1 -1
- package/dist/apps/management/routes/scopes.d.ts.map +1 -1
- package/dist/apps/management/routes/scopes.js +4 -1
- package/dist/apps/management/routes/scopes.js.map +1 -1
- package/dist/apps/management/routes/usage.d.ts +24 -24
- package/dist/apps/management/routes/usage.js +21 -4
- package/dist/apps/management/routes/usage.js.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.d.ts +95 -95
- package/dist/apps/management/routes/verified-token-requests.d.ts.map +1 -1
- package/dist/apps/management/routes/verified-token-requests.js +7 -9
- package/dist/apps/management/routes/verified-token-requests.js.map +1 -1
- package/dist/apps/management/routes/webhooks.d.ts +682 -616
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +58 -12
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/mcp.d.ts +1 -1
- package/dist/apps/mcp.d.ts.map +1 -1
- package/dist/apps/mcp.js +23 -10
- package/dist/apps/mcp.js.map +1 -1
- package/dist/apps/mpp/App.d.ts +44 -44
- package/dist/apps/mpp/App.d.ts.map +1 -1
- package/dist/apps/mpp/App.js +35 -7
- package/dist/apps/mpp/App.js.map +1 -1
- package/dist/apps/mpp/internal/Adapter.d.ts +2 -0
- package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Adapter.js +30 -1
- package/dist/apps/mpp/internal/Adapter.js.map +1 -1
- package/dist/apps/mpp/internal/Policy.d.ts +22 -4
- package/dist/apps/mpp/internal/Policy.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Policy.js +24 -6
- package/dist/apps/mpp/internal/Policy.js.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.d.ts +3 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.js +6 -3
- package/dist/apps/mpp/internal/Sponsorship.js.map +1 -1
- package/dist/apps/relay/App.d.ts +2 -0
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +134 -75
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts +5 -3
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +209 -28
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/apps/{funding → routes}/Access.d.ts +4 -4
- package/dist/apps/routes/Access.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Access.js +4 -4
- package/dist/apps/routes/Access.js.map +1 -0
- package/dist/apps/{funding → routes}/App.d.ts +418 -124
- package/dist/apps/{funding → routes}/App.d.ts.map +1 -1
- package/dist/apps/{funding → routes}/App.js +16 -16
- package/dist/apps/routes/App.js.map +1 -0
- package/dist/apps/routes/Inventory.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/Inventory.js +2 -2
- package/dist/apps/routes/Inventory.js.map +1 -0
- package/dist/apps/routes/index.d.ts +2 -0
- package/dist/apps/routes/index.d.ts.map +1 -0
- package/dist/apps/routes/index.js +2 -0
- package/dist/apps/routes/index.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.d.ts +32 -32
- package/dist/apps/routes/routes/chains.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.js +25 -25
- package/dist/apps/routes/routes/chains.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.d.ts +107 -43
- package/dist/apps/routes/routes/deposit-addresses.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.js +497 -222
- package/dist/apps/routes/routes/deposit-addresses.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/providers.d.ts +8 -8
- package/dist/apps/routes/routes/providers.d.ts.map +1 -0
- package/dist/apps/routes/routes/providers.js +57 -0
- package/dist/apps/routes/routes/providers.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.d.ts +106 -103
- package/dist/apps/routes/routes/quotes.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.js +55 -38
- package/dist/apps/routes/routes/quotes.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/transfers.d.ts +733 -428
- package/dist/apps/routes/routes/transfers.d.ts.map +1 -0
- package/dist/apps/routes/routes/transfers.js +1140 -0
- package/dist/apps/routes/routes/transfers.js.map +1 -0
- package/dist/cli/Cli.d.ts +30 -0
- package/dist/cli/Cli.d.ts.map +1 -1
- package/dist/cli/commands/admin.d.ts +36 -0
- package/dist/cli/commands/admin.d.ts.map +1 -1
- package/dist/cli/commands/admin.js +273 -0
- package/dist/cli/commands/admin.js.map +1 -1
- package/dist/cloudflare.d.ts +16 -14
- package/dist/cloudflare.d.ts.map +1 -1
- package/dist/cloudflare.js +26 -21
- package/dist/cloudflare.js.map +1 -1
- package/dist/db/Db.d.ts +63 -21
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +1035 -15
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +780 -133
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +575 -162
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts +4 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js +2 -0
- package/dist/db/tables/apiKeyAdmissionBootstraps.js.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts +73 -0
- package/dist/db/tables/apiKeyAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyAdmissions.js +142 -0
- package/dist/db/tables/apiKeyAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts +4 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js +2 -0
- package/dist/db/tables/apiKeyOwnerAdmissions.js.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts +20 -0
- package/dist/db/tables/apiKeyOwnerTombstones.d.ts.map +1 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js +57 -0
- package/dist/db/tables/apiKeyOwnerTombstones.js.map +1 -0
- package/dist/db/tables/apiKeyRevocations.d.ts +21 -0
- package/dist/db/tables/apiKeyRevocations.d.ts.map +1 -0
- package/dist/db/tables/apiKeyRevocations.js +98 -0
- package/dist/db/tables/apiKeyRevocations.js.map +1 -0
- package/dist/db/tables/authAccounts.d.ts +47 -0
- package/dist/db/tables/authAccounts.d.ts.map +1 -0
- package/dist/db/tables/authAccounts.js +72 -0
- package/dist/db/tables/authAccounts.js.map +1 -0
- package/dist/db/tables/authSessions.d.ts +12 -0
- package/dist/db/tables/authSessions.d.ts.map +1 -0
- package/dist/db/tables/authSessions.js +2 -0
- package/dist/db/tables/authSessions.js.map +1 -0
- package/dist/db/tables/authVerifications.d.ts +12 -0
- package/dist/db/tables/authVerifications.d.ts.map +1 -0
- package/dist/db/tables/authVerifications.js +2 -0
- package/dist/db/tables/authVerifications.js.map +1 -0
- package/dist/db/tables/invitations.d.ts +17 -1
- package/dist/db/tables/invitations.d.ts.map +1 -1
- package/dist/db/tables/invitations.js +123 -43
- package/dist/db/tables/invitations.js.map +1 -1
- package/dist/db/tables/memberships.d.ts +8 -0
- package/dist/db/tables/memberships.d.ts.map +1 -1
- package/dist/db/tables/memberships.js +51 -2
- package/dist/db/tables/memberships.js.map +1 -1
- package/dist/db/tables/organizations.d.ts +32 -10
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +110 -49
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +2 -0
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +12 -3
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/requestUsage.d.ts.map +1 -1
- package/dist/db/tables/requestUsage.js.map +1 -1
- package/dist/db/tables/rewardAccounts.d.ts +86 -0
- package/dist/db/tables/rewardAccounts.d.ts.map +1 -0
- package/dist/db/tables/rewardAccounts.js +88 -0
- package/dist/db/tables/rewardAccounts.js.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts +36 -0
- package/dist/db/tables/rewardCampaignDistributors.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaignDistributors.js +30 -0
- package/dist/db/tables/rewardCampaignDistributors.js.map +1 -0
- package/dist/db/tables/rewardCampaigns.d.ts +171 -0
- package/dist/db/tables/rewardCampaigns.d.ts.map +1 -0
- package/dist/db/tables/rewardCampaigns.js +392 -0
- package/dist/db/tables/rewardCampaigns.js.map +1 -0
- package/dist/db/tables/rewardCredits.d.ts +53 -0
- package/dist/db/tables/rewardCredits.d.ts.map +1 -0
- package/dist/db/tables/rewardCredits.js +63 -0
- package/dist/db/tables/rewardCredits.js.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts +61 -0
- package/dist/db/tables/rewardEligibilityAssociations.d.ts.map +1 -0
- package/dist/db/tables/rewardEligibilityAssociations.js +103 -0
- package/dist/db/tables/rewardEligibilityAssociations.js.map +1 -0
- package/dist/db/tables/rewardRuns.d.ts +188 -0
- package/dist/db/tables/rewardRuns.d.ts.map +1 -0
- package/dist/db/tables/rewardRuns.js +278 -0
- package/dist/db/tables/rewardRuns.js.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts +100 -0
- package/dist/db/tables/rewardTransactionAttempts.d.ts.map +1 -0
- package/dist/db/tables/rewardTransactionAttempts.js +163 -0
- package/dist/db/tables/rewardTransactionAttempts.js.map +1 -0
- package/dist/db/tables/routesCatalog.d.ts +58 -0
- package/dist/db/tables/routesCatalog.d.ts.map +1 -0
- package/dist/db/tables/{fundingCatalog.js → routesCatalog.js} +19 -19
- package/dist/db/tables/routesCatalog.js.map +1 -0
- package/dist/db/tables/routesDepositAddresses.d.ts +476 -0
- package/dist/db/tables/routesDepositAddresses.d.ts.map +1 -0
- package/dist/db/tables/routesDepositAddresses.js +587 -0
- package/dist/db/tables/routesDepositAddresses.js.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.d.ts → routesDepositRequestObservations.d.ts} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.d.ts.map +1 -0
- package/dist/db/tables/{fundingDepositRequestObservations.js → routesDepositRequestObservations.js} +6 -6
- package/dist/db/tables/routesDepositRequestObservations.js.map +1 -0
- package/dist/db/tables/{fundingDeposits.d.ts → routesDeposits.d.ts} +210 -22
- package/dist/db/tables/routesDeposits.d.ts.map +1 -0
- package/dist/db/tables/routesDeposits.js +576 -0
- package/dist/db/tables/routesDeposits.js.map +1 -0
- package/dist/db/tables/routesIdempotency.d.ts +166 -0
- package/dist/db/tables/routesIdempotency.d.ts.map +1 -0
- package/dist/db/tables/routesIdempotency.js +330 -0
- package/dist/db/tables/routesIdempotency.js.map +1 -0
- package/dist/db/tables/routesSubsidies.d.ts +27 -0
- package/dist/db/tables/routesSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesSubsidies.js +45 -0
- package/dist/db/tables/routesSubsidies.js.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.d.ts → routesTransferEvents.d.ts} +3 -3
- package/dist/db/tables/routesTransferEvents.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferEvents.js → routesTransferEvents.js} +3 -3
- package/dist/db/tables/routesTransferEvents.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts +19 -0
- package/dist/db/tables/routesTransferSubsidies.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidies.js +17 -0
- package/dist/db/tables/routesTransferSubsidies.js.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts +51 -0
- package/dist/db/tables/routesTransferSubsidyNonces.d.ts.map +1 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js +82 -0
- package/dist/db/tables/routesTransferSubsidyNonces.js.map +1 -0
- package/dist/db/tables/routesTransferTransactions.d.ts +77 -0
- package/dist/db/tables/routesTransferTransactions.d.ts.map +1 -0
- package/dist/db/tables/{fundingTransferTransactions.js → routesTransferTransactions.js} +31 -13
- package/dist/db/tables/routesTransferTransactions.js.map +1 -0
- package/dist/db/tables/routesTransfers.d.ts +319 -0
- package/dist/db/tables/routesTransfers.d.ts.map +1 -0
- package/dist/db/tables/routesTransfers.js +372 -0
- package/dist/db/tables/routesTransfers.js.map +1 -0
- package/dist/db/tables/sponsoredTransactions.d.ts +75 -20
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +124 -54
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/sponsorshipAttributions.d.ts +69 -0
- package/dist/db/tables/sponsorshipAttributions.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipAttributions.js +77 -0
- package/dist/db/tables/sponsorshipAttributions.js.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts +22 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.d.ts.map +1 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js +45 -0
- package/dist/db/tables/sponsorshipReconciliationCursors.js.map +1 -0
- package/dist/db/tables/stripeCustomers.d.ts +11 -0
- package/dist/db/tables/stripeCustomers.d.ts.map +1 -1
- package/dist/db/tables/stripeCustomers.js +13 -0
- package/dist/db/tables/stripeCustomers.js.map +1 -1
- package/dist/db/tables/users.d.ts +17 -1
- package/dist/db/tables/users.d.ts.map +1 -1
- package/dist/db/tables/users.js +47 -2
- package/dist/db/tables/users.js.map +1 -1
- package/dist/db/tables/verifiedTokenRequests.d.ts +21 -4
- package/dist/db/tables/verifiedTokenRequests.d.ts.map +1 -1
- package/dist/db/tables/verifiedTokenRequests.js +65 -44
- package/dist/db/tables/verifiedTokenRequests.js.map +1 -1
- package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
- package/dist/db/tables/webhookQueueEvents.js +5 -1
- package/dist/db/tables/webhookQueueEvents.js.map +1 -1
- package/dist/db/tables/webhookSubscriptions.d.ts +19 -11
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +45 -13
- package/dist/db/tables/webhookSubscriptions.js.map +1 -1
- package/dist/handlers/internal/executionError.d.ts +2 -2
- package/dist/handlers/internal/executionError.d.ts.map +1 -1
- package/dist/handlers/internal/executionError.js +1 -2
- package/dist/handlers/internal/executionError.js.map +1 -1
- package/dist/handlers/internal/multisig.d.ts +4 -232
- package/dist/handlers/internal/multisig.d.ts.map +1 -1
- package/dist/handlers/internal/multisig.js +11 -537
- package/dist/handlers/internal/multisig.js.map +1 -1
- package/dist/handlers/internal/sponsorship.d.ts +19 -8
- package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
- package/dist/handlers/internal/sponsorship.js +13 -9
- package/dist/handlers/internal/sponsorship.js.map +1 -1
- package/dist/handlers/relay.d.ts +9 -12
- package/dist/handlers/relay.d.ts.map +1 -1
- package/dist/handlers/relay.js +81 -85
- package/dist/handlers/relay.js.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/AssetResponse.d.ts +12 -0
- package/dist/internal/AssetResponse.d.ts.map +1 -0
- package/dist/internal/AssetResponse.js +21 -0
- package/dist/internal/AssetResponse.js.map +1 -0
- package/dist/internal/Auth.d.ts +64 -12
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +631 -180
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/BetterAuth.d.ts +1488 -0
- package/dist/internal/BetterAuth.d.ts.map +1 -0
- package/dist/internal/BetterAuth.js +253 -0
- package/dist/internal/BetterAuth.js.map +1 -0
- package/dist/internal/Cache.d.ts +2 -0
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +2 -0
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/EarnRates.d.ts +26 -3
- package/dist/internal/EarnRates.d.ts.map +1 -1
- package/dist/internal/EarnRates.js +84 -19
- package/dist/internal/EarnRates.js.map +1 -1
- package/dist/internal/EarnSharePrices.d.ts +120 -0
- package/dist/internal/EarnSharePrices.d.ts.map +1 -0
- package/dist/internal/EarnSharePrices.js +179 -0
- package/dist/internal/EarnSharePrices.js.map +1 -0
- package/dist/internal/EarnVaults.d.ts +4 -0
- package/dist/internal/EarnVaults.d.ts.map +1 -1
- package/dist/internal/EarnVaults.js +27 -10
- package/dist/internal/EarnVaults.js.map +1 -1
- package/dist/internal/Email.d.ts +37 -0
- package/dist/internal/Email.d.ts.map +1 -0
- package/dist/internal/Email.js +16 -0
- package/dist/internal/Email.js.map +1 -0
- package/dist/internal/Log.d.ts +32 -28
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +18 -11
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/MetricSink.d.ts +3 -0
- package/dist/internal/MetricSink.d.ts.map +1 -1
- package/dist/internal/MetricSink.js +67 -8
- package/dist/internal/MetricSink.js.map +1 -1
- package/dist/internal/Mpp.d.ts.map +1 -1
- package/dist/internal/Mpp.js +20 -25
- package/dist/internal/Mpp.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +26 -3
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +25 -10
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/Provider.d.ts +1 -1
- package/dist/internal/Provider.d.ts.map +1 -1
- package/dist/internal/RateLimit.d.ts.map +1 -1
- package/dist/internal/RateLimit.js +13 -1
- package/dist/internal/RateLimit.js.map +1 -1
- package/dist/internal/Store.d.ts +16 -0
- package/dist/internal/Store.d.ts.map +1 -1
- package/dist/internal/Store.js +59 -8
- package/dist/internal/Store.js.map +1 -1
- package/dist/internal/Tidx.d.ts +9 -2
- package/dist/internal/Tidx.d.ts.map +1 -1
- package/dist/internal/Tidx.js +78 -11
- package/dist/internal/Tidx.js.map +1 -1
- package/dist/internal/Timing.d.ts +26 -0
- package/dist/internal/Timing.d.ts.map +1 -1
- package/dist/internal/Timing.js +63 -5
- package/dist/internal/Timing.js.map +1 -1
- package/dist/internal/VercelOidc.d.ts +94 -0
- package/dist/internal/VercelOidc.d.ts.map +1 -0
- package/dist/internal/VercelOidc.js +128 -0
- package/dist/internal/VercelOidc.js.map +1 -0
- package/dist/internal/VerifiedTokens.d.ts +2 -8
- package/dist/internal/VerifiedTokens.d.ts.map +1 -1
- package/dist/internal/VerifiedTokens.js +24 -24
- package/dist/internal/VerifiedTokens.js.map +1 -1
- package/dist/internal/Viem.d.ts +30 -2067
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +167 -17
- package/dist/internal/Viem.js.map +1 -1
- package/dist/internal/Webhooks.d.ts +12 -4
- package/dist/internal/Webhooks.d.ts.map +1 -1
- package/dist/internal/Webhooks.js +9 -3
- package/dist/internal/Webhooks.js.map +1 -1
- package/dist/internal/ZoneRpc.d.ts +7 -0
- package/dist/internal/ZoneRpc.d.ts.map +1 -0
- package/dist/internal/ZoneRpc.js +49 -0
- package/dist/internal/ZoneRpc.js.map +1 -0
- package/dist/internal/index.d.ts +3 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +3 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/rewards/Audit.d.ts +88 -0
- package/dist/internal/rewards/Audit.d.ts.map +1 -0
- package/dist/internal/rewards/Audit.js +134 -0
- package/dist/internal/rewards/Audit.js.map +1 -0
- package/dist/internal/rewards/Campaigns.d.ts +572 -0
- package/dist/internal/rewards/Campaigns.d.ts.map +1 -0
- package/dist/internal/rewards/Campaigns.js +531 -0
- package/dist/internal/rewards/Campaigns.js.map +1 -0
- package/dist/internal/rewards/Credits.d.ts +76 -0
- package/dist/internal/rewards/Credits.d.ts.map +1 -0
- package/dist/internal/rewards/Credits.js +95 -0
- package/dist/internal/rewards/Credits.js.map +1 -0
- package/dist/internal/rewards/Events.d.ts +100 -0
- package/dist/internal/rewards/Events.d.ts.map +1 -0
- package/dist/internal/rewards/Events.js +340 -0
- package/dist/internal/rewards/Events.js.map +1 -0
- package/dist/internal/rewards/Projection.d.ts +237 -0
- package/dist/internal/rewards/Projection.d.ts.map +1 -0
- package/dist/internal/rewards/Projection.js +616 -0
- package/dist/internal/rewards/Projection.js.map +1 -0
- package/dist/internal/rewards/Rates.d.ts +44 -0
- package/dist/internal/rewards/Rates.d.ts.map +1 -0
- package/dist/internal/rewards/Rates.js +60 -0
- package/dist/internal/rewards/Rates.js.map +1 -0
- package/dist/internal/rewards/Read.d.ts +158 -0
- package/dist/internal/rewards/Read.d.ts.map +1 -0
- package/dist/internal/rewards/Read.js +292 -0
- package/dist/internal/rewards/Read.js.map +1 -0
- package/dist/internal/rewards/Runner.d.ts +164 -0
- package/dist/internal/rewards/Runner.d.ts.map +1 -0
- package/dist/internal/rewards/Runner.js +1778 -0
- package/dist/internal/rewards/Runner.js.map +1 -0
- package/dist/internal/rewards/Signer.d.ts +224 -0
- package/dist/internal/rewards/Signer.d.ts.map +1 -0
- package/dist/internal/rewards/Signer.js +135 -0
- package/dist/internal/rewards/Signer.js.map +1 -0
- package/dist/internal/rewards/index.d.ts +15 -0
- package/dist/internal/rewards/index.d.ts.map +1 -0
- package/dist/internal/rewards/index.js +15 -0
- package/dist/internal/rewards/index.js.map +1 -0
- package/dist/internal/{funding → routes}/Action.d.ts +12 -1
- package/dist/internal/routes/Action.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Action.js +17 -9
- package/dist/internal/routes/Action.js.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.d.ts +20 -20
- package/dist/internal/routes/Catalog.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Catalog.js +29 -29
- package/dist/internal/routes/Catalog.js.map +1 -0
- package/dist/internal/{funding → routes}/Chain.d.ts +10 -10
- package/dist/internal/routes/Chain.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Chain.js +3 -3
- package/dist/internal/routes/Chain.js.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.d.ts +45 -23
- package/dist/internal/routes/Deposit.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Deposit.js +60 -27
- package/dist/internal/routes/Deposit.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.d.ts +56 -27
- package/dist/internal/routes/DepositAddress.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositAddress.js +95 -33
- package/dist/internal/routes/DepositAddress.js.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.d.ts +4 -4
- package/dist/internal/routes/DepositWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/DepositWebhook.js +4 -4
- package/dist/internal/routes/DepositWebhook.js.map +1 -0
- package/dist/internal/routes/Economics.d.ts +25 -0
- package/dist/internal/routes/Economics.d.ts.map +1 -0
- package/dist/internal/routes/Economics.js +28 -0
- package/dist/internal/routes/Economics.js.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.d.ts +3 -3
- package/dist/internal/routes/Evidence.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Evidence.js +7 -7
- package/dist/internal/routes/Evidence.js.map +1 -0
- package/dist/internal/routes/Observability.d.ts +154 -0
- package/dist/internal/routes/Observability.d.ts.map +1 -0
- package/dist/internal/routes/Observability.js +389 -0
- package/dist/internal/routes/Observability.js.map +1 -0
- package/dist/internal/{funding → routes}/Provider.d.ts +311 -105
- package/dist/internal/routes/Provider.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Provider.js +229 -98
- package/dist/internal/routes/Provider.js.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.d.ts +11 -6
- package/dist/internal/routes/Reconciliation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Reconciliation.js +408 -158
- package/dist/internal/routes/Reconciliation.js.map +1 -0
- package/dist/internal/routes/Route.d.ts +21 -0
- package/dist/internal/routes/Route.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Route.js +1 -1
- package/dist/internal/routes/Route.js.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.d.ts +6 -6
- package/dist/internal/routes/SourceObservation.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/SourceObservation.js +8 -8
- package/dist/internal/routes/SourceObservation.js.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.d.ts +48 -3
- package/dist/internal/routes/Subsidy.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Subsidy.js +43 -3
- package/dist/internal/routes/Subsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/Token.d.ts +4 -4
- package/dist/internal/routes/Token.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/Token.js +3 -3
- package/dist/internal/routes/Token.js.map +1 -0
- package/dist/internal/{funding → routes}/Transfer.d.ts +241 -46
- package/dist/internal/routes/Transfer.d.ts.map +1 -0
- package/dist/internal/routes/Transfer.js +728 -0
- package/dist/internal/routes/Transfer.js.map +1 -0
- package/dist/internal/{funding → routes}/TransferReconciliation.d.ts +13 -10
- package/dist/internal/routes/TransferReconciliation.d.ts.map +1 -0
- package/dist/internal/routes/TransferReconciliation.js +422 -0
- package/dist/internal/routes/TransferReconciliation.js.map +1 -0
- package/dist/internal/routes/TransferSubsidy.d.ts +201 -0
- package/dist/internal/routes/TransferSubsidy.d.ts.map +1 -0
- package/dist/internal/routes/TransferSubsidy.js +256 -0
- package/dist/internal/routes/TransferSubsidy.js.map +1 -0
- package/dist/internal/{funding → routes}/TransferWebhook.d.ts +5 -5
- package/dist/internal/routes/TransferWebhook.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/TransferWebhook.js +3 -3
- package/dist/internal/routes/TransferWebhook.js.map +1 -0
- package/dist/internal/{funding → routes}/index.d.ts +2 -0
- package/dist/internal/routes/index.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/index.js +2 -0
- package/dist/internal/routes/index.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.d.ts +4 -4
- package/dist/internal/routes/providers/across.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/across.js +13 -13
- package/dist/internal/routes/providers/across.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.d.ts +21 -12
- package/dist/internal/routes/providers/relay.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/relay.js +194 -110
- package/dist/internal/routes/providers/relay.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.d.ts +4 -4
- package/dist/internal/routes/providers/rhino.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/rhino.js +10 -10
- package/dist/internal/routes/providers/rhino.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.d.ts +4 -4
- package/dist/internal/routes/providers/squid.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/squid.js +14 -14
- package/dist/internal/routes/providers/squid.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/stargate.d.ts +46 -18
- package/dist/internal/routes/providers/stargate.d.ts.map +1 -0
- package/dist/internal/routes/providers/stargate.js +898 -0
- package/dist/internal/routes/providers/stargate.js.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.d.ts +4 -4
- package/dist/internal/routes/providers/symbiosis.d.ts.map +1 -0
- package/dist/internal/{funding → routes}/providers/symbiosis.js +30 -20
- package/dist/internal/routes/providers/symbiosis.js.map +1 -0
- package/dist/internal/webhookDestinations/slack.js +12 -12
- package/dist/internal/webhookDestinations/slack.js.map +1 -1
- package/dist/providers/index.d.ts +12 -12
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +12 -12
- package/dist/providers/index.js.map +1 -1
- package/dist/server.d.ts +19 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +19 -0
- package/dist/server.js.map +1 -0
- package/package.json +15 -4
- package/src/ApiKey.ts +1 -1
- package/src/ApiKeys.test.ts +1033 -3
- package/src/ApiKeys.ts +489 -48
- package/src/App.test-d.ts +1 -1
- package/src/App.test.ts +216 -25
- package/src/App.ts +334 -31
- package/src/Assets.test.ts +2 -2
- package/src/Assets.ts +3 -1
- package/src/Auth.test-d.ts +1 -1
- package/src/Client.test-d.ts +539 -110
- package/src/Handler.ts +0 -1
- package/src/OpenApi.contract.test.ts +195 -0
- package/src/Scope.ts +17 -5
- package/src/Webhooks.ts +1 -1
- package/src/admin/App.test.ts +30 -2
- package/src/admin/App.ts +42 -6
- package/src/admin/apps/api-keys.test.ts +267 -5
- package/src/admin/apps/api-keys.ts +100 -50
- package/src/admin/apps/earn-vaults.test.ts +158 -0
- package/src/admin/apps/earn-vaults.ts +679 -6
- package/src/admin/apps/organizations.test.ts +306 -17
- package/src/admin/apps/organizations.ts +299 -24
- package/src/admin/apps/routes-support.test.ts +200 -0
- package/src/admin/apps/routes-support.ts +201 -0
- package/src/admin/apps/routes.test.ts +450 -0
- package/src/admin/apps/routes.ts +896 -0
- package/src/admin/apps/scopes.test.ts +15 -5
- package/src/admin/apps/subsidies.test.ts +306 -0
- package/src/admin/apps/subsidies.ts +457 -0
- package/src/admin/apps/verified-tokens.test.ts +40 -3
- package/src/admin/apps/verified-tokens.ts +33 -7
- package/src/admin/ui/plugin.ts +1 -2
- package/src/admin/ui/src/components/RewardCampaignForm.tsx +1009 -0
- package/src/admin/ui/src/lib/config.ts +11 -2
- package/src/admin/ui/src/lib/earn-vaults.ts +2 -2
- package/src/admin/ui/src/lib/organizations.test.ts +83 -50
- package/src/admin/ui/src/lib/organizations.ts +106 -25
- package/src/admin/ui/src/lib/query-client.ts +1 -1
- package/src/admin/ui/src/lib/reward-campaigns.ts +136 -0
- package/src/admin/ui/src/lib/routes.test.ts +88 -0
- package/src/admin/ui/src/lib/routes.ts +304 -0
- package/src/admin/ui/src/lib/subsidies.ts +75 -0
- package/src/admin/ui/src/lib/verified-tokens.ts +24 -9
- package/src/admin/ui/src/routeTree.gen.ts +63 -0
- package/src/admin/ui/src/routes/__root.tsx +13 -2
- package/src/admin/ui/src/routes/api-keys.tsx +196 -84
- package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +105 -70
- package/src/admin/ui/src/routes/organizations.tsx +34 -4
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +239 -23
- package/src/admin/ui/src/routes/routes.tsx +1615 -0
- package/src/admin/ui/src/routes/routes_.support.tsx +248 -0
- package/src/admin/ui/src/routes/subsidies.tsx +799 -0
- package/src/admin/ui/src/routes/verified-tokens.tsx +64 -20
- package/src/admin/ui.generated.ts +202 -188
- package/src/analytics/Analytics.test.ts +108 -18
- package/src/analytics/Analytics.ts +38 -6
- package/src/analytics/tables/requestEvents.test.ts +100 -0
- package/src/analytics/tables/requestEvents.ts +10 -1
- package/src/analytics/tables/routesLifecycleIntervals.ts +140 -0
- package/src/apps/Zones.test.ts +15 -0
- package/src/apps/Zones.ts +52 -5
- package/src/apps/composition.test.ts +68 -60
- package/src/apps/data/App.test.ts +180 -2
- package/src/apps/data/App.ts +88 -28
- package/src/apps/data/routes/activities.test.ts +419 -7
- package/src/apps/data/routes/activities.ts +683 -216
- package/src/apps/data/routes/balances.test.ts +2 -2
- package/src/apps/data/routes/blocks.test.ts +46 -1
- package/src/apps/data/routes/coingecko.test.ts +419 -1
- package/src/apps/data/routes/coingecko.ts +309 -253
- package/src/apps/data/routes/earn.discovery.test.ts +274 -0
- package/src/apps/data/routes/earn.test.ts +1294 -17
- package/src/apps/data/routes/earn.ts +1838 -321
- package/src/apps/data/routes/exchanges.test.ts +12 -15
- package/src/apps/data/routes/fee-amm.test.ts +243 -0
- package/src/apps/data/routes/fee-amm.ts +201 -162
- package/src/apps/data/routes/indexer.test.ts +389 -0
- package/src/apps/data/routes/indexer.ts +165 -69
- package/src/apps/data/routes/receipts.test.ts +1 -1
- package/src/apps/data/routes/rpc.test.ts +384 -8
- package/src/apps/data/routes/rpc.ts +452 -227
- package/src/apps/data/routes/rpc.zone.test.ts +340 -0
- package/src/apps/data/routes/tokenlist.test.ts +285 -0
- package/src/apps/data/routes/tokenlist.ts +173 -88
- package/src/apps/data/routes/tokens.test.ts +93 -3
- package/src/apps/data/routes/tokens.ts +39 -23
- package/src/apps/data/routes/transactions.test.ts +1 -1
- package/src/apps/data/routes/transfers.test.ts +56 -24
- package/src/apps/data/routes/transfers.ts +19 -8
- package/src/apps/data/routes/valuation.test.ts +1 -1
- package/src/apps/data/routes/verified-tokens.test.ts +345 -0
- package/src/apps/data/routes/verified-tokens.ts +99 -29
- package/src/apps/data/routes/webhooks.scan.test.ts +29 -0
- package/src/apps/data/routes/webhooks.test.ts +651 -83
- package/src/apps/data/routes/webhooks.ts +1113 -868
- package/src/apps/data/routes/zones.test.ts +148 -71
- package/src/apps/data/routes/zones.ts +71 -55
- package/src/apps/docs/reference.ts +2 -2
- package/src/apps/index.ts +1 -1
- package/src/apps/management/App.ts +9 -51
- package/src/apps/management/Billing.test.ts +375 -14
- package/src/apps/management/Billing.ts +265 -29
- package/src/apps/management/routes/api-keys.test.ts +269 -7
- package/src/apps/management/routes/api-keys.ts +61 -20
- package/src/apps/management/routes/billing.test.ts +477 -15
- package/src/apps/management/routes/billing.ts +377 -50
- package/src/apps/management/routes/faucet.test.ts +1 -1
- package/src/apps/management/routes/faucet.ts +1 -1
- package/src/apps/management/routes/invitations.test.ts +270 -3
- package/src/apps/management/routes/invitations.ts +185 -15
- package/src/apps/management/routes/invoicePreview.test.ts +549 -0
- package/src/apps/management/routes/me.test.ts +246 -5
- package/src/apps/management/routes/me.ts +7 -2
- package/src/apps/management/routes/members.test.ts +108 -0
- package/src/apps/management/routes/orgs.test.ts +191 -3
- package/src/apps/management/routes/orgs.ts +58 -11
- package/src/apps/management/routes/projects.test.ts +33 -3
- package/src/apps/management/routes/projects.ts +6 -1
- package/src/apps/management/routes/scopes.test.ts +30 -2
- package/src/apps/management/routes/scopes.ts +4 -1
- package/src/apps/management/routes/usage.test.ts +32 -0
- package/src/apps/management/routes/usage.ts +22 -4
- package/src/apps/management/routes/verified-token-requests.test.ts +16 -2
- package/src/apps/management/routes/verified-token-requests.ts +7 -10
- package/src/apps/management/routes/webhooks.test.ts +49 -26
- package/src/apps/management/routes/webhooks.ts +78 -22
- package/src/apps/mcp.test.ts +113 -30
- package/src/apps/mcp.ts +22 -10
- package/src/apps/mpp/App.ts +37 -7
- package/src/apps/mpp/Mpp.test.ts +49 -8
- package/src/apps/mpp/Mpp.zone.test.ts +219 -0
- package/src/apps/mpp/internal/Adapter.ts +34 -0
- package/src/apps/mpp/internal/Policy.test.ts +86 -31
- package/src/apps/mpp/internal/Policy.ts +49 -7
- package/src/apps/mpp/internal/Sponsorship.test.ts +207 -0
- package/src/apps/mpp/internal/Sponsorship.ts +9 -3
- package/src/apps/relay/App.test.ts +839 -64
- package/src/apps/relay/App.ts +148 -81
- package/src/apps/relay/App.zone-billing.test.ts +257 -0
- package/src/apps/relay/Sponsorships.test.ts +67 -4
- package/src/apps/relay/Sponsorships.ts +233 -32
- package/src/apps/relay/Sponsorships.zone.test.ts +102 -0
- package/src/apps/{funding → routes}/Access.ts +6 -6
- package/src/apps/routes/App.test.ts +165 -0
- package/src/apps/routes/App.ts +96 -0
- package/src/apps/{funding → routes}/Inventory.ts +2 -2
- package/src/apps/routes/index.ts +1 -0
- package/src/apps/{funding → routes}/routes/chains.test.ts +66 -66
- package/src/apps/{funding → routes}/routes/chains.ts +23 -23
- package/src/apps/{funding → routes}/routes/deposit-addresses.test.ts +1358 -458
- package/src/apps/{funding → routes}/routes/deposit-addresses.ts +566 -246
- package/src/apps/{funding → routes}/routes/providers.test.ts +27 -33
- package/src/apps/{funding → routes}/routes/providers.ts +23 -23
- package/src/apps/{funding → routes}/routes/quotes.test.ts +298 -41
- package/src/apps/{funding → routes}/routes/quotes.ts +57 -40
- package/src/apps/{funding → routes}/routes/transfers.test.ts +1100 -353
- package/src/apps/routes/routes/transfers.ts +1332 -0
- package/src/cli/Cli.test.ts +1 -1
- package/src/cli/commands/admin.test.ts +748 -1
- package/src/cli/commands/admin.ts +278 -0
- package/src/cloudflare.ts +52 -47
- package/src/db/Db.test.ts +245 -2
- package/src/db/Db.ts +1485 -34
- package/src/db/Schema.ts +729 -228
- package/src/db/tables/apiKeyAdmissionBootstraps.ts +4 -0
- package/src/db/tables/apiKeyAdmissions.ts +218 -0
- package/src/db/tables/apiKeyOwnerAdmissions.ts +4 -0
- package/src/db/tables/apiKeyOwnerTombstones.ts +81 -0
- package/src/db/tables/apiKeyRevocations.test.ts +74 -0
- package/src/db/tables/apiKeyRevocations.ts +121 -0
- package/src/db/tables/authAccounts.ts +105 -0
- package/src/db/tables/authSessions.ts +13 -0
- package/src/db/tables/authVerifications.ts +13 -0
- package/src/db/tables/invitations.ts +142 -45
- package/src/db/tables/memberships.ts +79 -3
- package/src/db/tables/organizations.test.ts +690 -13
- package/src/db/tables/organizations.ts +139 -55
- package/src/db/tables/projects.test.ts +16 -0
- package/src/db/tables/projects.ts +13 -3
- package/src/db/tables/requestUsage.ts +4 -1
- package/src/db/tables/rewardAccounts.ts +178 -0
- package/src/db/tables/rewardCampaignDistributors.ts +68 -0
- package/src/db/tables/rewardCampaigns.test.ts +1388 -0
- package/src/db/tables/rewardCampaigns.ts +647 -0
- package/src/db/tables/rewardCredits.ts +110 -0
- package/src/db/tables/rewardEligibilityAssociations.test.ts +271 -0
- package/src/db/tables/rewardEligibilityAssociations.ts +184 -0
- package/src/db/tables/rewardRuns.ts +514 -0
- package/src/db/tables/rewardTransactionAttempts.ts +272 -0
- package/src/db/tables/routesCatalog.test.ts +185 -0
- package/src/db/tables/routesCatalog.ts +163 -0
- package/src/db/tables/routesDepositAddresses.test.ts +1048 -0
- package/src/db/tables/routesDepositAddresses.ts +1008 -0
- package/src/db/tables/{fundingDepositRequestObservations.test.ts → routesDepositRequestObservations.test.ts} +13 -14
- package/src/db/tables/{fundingDepositRequestObservations.ts → routesDepositRequestObservations.ts} +10 -10
- package/src/db/tables/{fundingDeposits.test.ts → routesDeposits.test.ts} +388 -46
- package/src/db/tables/routesDeposits.ts +1062 -0
- package/src/db/tables/routesIdempotency.test.ts +796 -0
- package/src/db/tables/routesIdempotency.ts +496 -0
- package/src/db/tables/routesSubsidies.test.ts +120 -0
- package/src/db/tables/routesSubsidies.ts +71 -0
- package/src/db/tables/{fundingTransferEvents.ts → routesTransferEvents.ts} +4 -4
- package/src/db/tables/routesTransferSubsidies.ts +38 -0
- package/src/db/tables/routesTransferSubsidyNonces.ts +124 -0
- package/src/db/tables/routesTransferTransactions.test.ts +195 -0
- package/src/db/tables/{fundingTransferTransactions.ts → routesTransferTransactions.ts} +63 -18
- package/src/db/tables/routesTransfers.test.ts +338 -0
- package/src/db/tables/routesTransfers.ts +662 -0
- package/src/db/tables/sponsoredTransactions.test.ts +269 -45
- package/src/db/tables/sponsoredTransactions.ts +225 -65
- package/src/db/tables/sponsorshipAttributions.test.ts +160 -0
- package/src/db/tables/sponsorshipAttributions.ts +168 -0
- package/src/db/tables/sponsorshipReconciliationCursors.test.ts +115 -0
- package/src/db/tables/sponsorshipReconciliationCursors.ts +67 -0
- package/src/db/tables/stripeCustomers.test.ts +85 -0
- package/src/db/tables/stripeCustomers.ts +24 -0
- package/src/db/tables/users.test.ts +129 -0
- package/src/db/tables/users.ts +49 -3
- package/src/db/tables/verifiedTokenRequests.test.ts +39 -20
- package/src/db/tables/verifiedTokenRequests.ts +80 -44
- package/src/db/tables/webhookQueueEvents.ts +8 -1
- package/src/db/tables/webhookSubscriptions.ts +95 -20
- package/src/handlers/internal/executionError.ts +3 -4
- package/src/handlers/internal/multisig.ts +13 -816
- package/src/handlers/internal/sponsorship.ts +26 -10
- package/src/handlers/relay.test-d.ts +9 -1
- package/src/handlers/relay.test.ts +823 -3
- package/src/handlers/relay.ts +127 -107
- package/src/index.test-d.ts +7 -0
- package/src/index.ts +0 -17
- package/src/internal/AssetResponse.ts +26 -0
- package/src/internal/Auth.test.ts +1656 -9
- package/src/internal/Auth.ts +880 -244
- package/src/internal/BetterAuth.test.ts +242 -0
- package/src/internal/BetterAuth.ts +349 -0
- package/src/internal/Cache.ts +2 -0
- package/src/internal/EarnRates.test.ts +17 -0
- package/src/internal/EarnRates.ts +124 -31
- package/src/internal/EarnSharePrices.test.ts +182 -0
- package/src/internal/EarnSharePrices.ts +313 -0
- package/src/internal/EarnVaults.test.ts +21 -0
- package/src/internal/EarnVaults.ts +33 -11
- package/src/internal/Email.ts +54 -0
- package/src/internal/Idempotency.test.ts +2 -2
- package/src/internal/Log.test-d.ts +8 -7
- package/src/internal/Log.test.ts +114 -16
- package/src/internal/Log.ts +53 -40
- package/src/internal/MetricSink.test.ts +313 -26
- package/src/internal/MetricSink.ts +73 -8
- package/src/internal/Mpp.test.ts +31 -0
- package/src/internal/Mpp.ts +21 -24
- package/src/internal/OpenApi.ts +45 -12
- package/src/internal/Provider.test.ts +1 -1
- package/src/internal/Provider.ts +1 -1
- package/src/internal/RateLimit.test.ts +21 -3
- package/src/internal/RateLimit.ts +12 -1
- package/src/internal/Store.test-d.ts +1 -1
- package/src/internal/Store.test.ts +151 -8
- package/src/internal/Store.ts +76 -9
- package/src/internal/Tidx.test.ts +59 -8
- package/src/internal/Tidx.ts +86 -14
- package/src/internal/Timing.test.ts +77 -0
- package/src/internal/Timing.ts +83 -6
- package/src/internal/VercelOidc.test.ts +188 -0
- package/src/internal/VercelOidc.ts +193 -0
- package/src/internal/VerifiedTokens.test.ts +60 -6
- package/src/internal/VerifiedTokens.ts +21 -24
- package/src/internal/Viem.batch.test.ts +80 -0
- package/src/internal/Viem.test.ts +201 -2
- package/src/internal/Viem.ts +221 -25
- package/src/internal/Webhooks.test.ts +85 -6
- package/src/internal/Webhooks.ts +22 -4
- package/src/internal/ZoneRpc.ts +50 -0
- package/src/internal/exchange/Provider.test.ts +2 -2
- package/src/internal/index.test.ts +3 -1
- package/src/internal/index.ts +3 -1
- package/src/internal/rewards/Audit.ts +231 -0
- package/src/internal/rewards/Campaigns.test.ts +1234 -0
- package/src/internal/rewards/Campaigns.ts +1205 -0
- package/src/internal/rewards/Credits.ts +165 -0
- package/src/internal/rewards/Events.local.test.ts +113 -0
- package/src/internal/rewards/Events.test.ts +152 -0
- package/src/internal/rewards/Events.ts +468 -0
- package/src/internal/rewards/Projection.test.ts +681 -0
- package/src/internal/rewards/Projection.ts +987 -0
- package/src/internal/rewards/Rates.test.ts +171 -0
- package/src/internal/rewards/Rates.ts +110 -0
- package/src/internal/rewards/Read.test.ts +501 -0
- package/src/internal/rewards/Read.ts +476 -0
- package/src/internal/rewards/Runner.checkpoint.test.ts +80 -0
- package/src/internal/rewards/Runner.states.test.ts +188 -0
- package/src/internal/rewards/Runner.test.ts +90 -0
- package/src/internal/rewards/Runner.ts +2229 -0
- package/src/internal/rewards/Signer.test.ts +79 -0
- package/src/internal/rewards/Signer.ts +180 -0
- package/src/internal/rewards/index.ts +14 -0
- package/src/internal/{funding → routes}/Action.test.ts +63 -14
- package/src/internal/{funding → routes}/Action.ts +35 -8
- package/src/internal/{funding → routes}/Catalog.test.ts +3 -3
- package/src/internal/{funding → routes}/Catalog.ts +39 -39
- package/src/internal/{funding → routes}/Chain.test.ts +1 -1
- package/src/internal/{funding → routes}/Chain.ts +11 -11
- package/src/internal/{funding → routes}/Deposit.test.ts +1 -1
- package/src/internal/{funding → routes}/Deposit.ts +93 -45
- package/src/internal/{funding → routes}/DepositAddress.test.ts +11 -3
- package/src/internal/{funding → routes}/DepositAddress.ts +132 -53
- package/src/internal/{funding → routes}/DepositWebhook.test.ts +61 -18
- package/src/internal/{funding → routes}/DepositWebhook.ts +9 -9
- package/src/internal/routes/Economics.test.ts +42 -0
- package/src/internal/routes/Economics.ts +47 -0
- package/src/internal/{funding → routes}/Evidence.test.ts +6 -6
- package/src/internal/{funding → routes}/Evidence.ts +9 -9
- package/src/internal/routes/Observability.test.ts +636 -0
- package/src/internal/routes/Observability.ts +668 -0
- package/src/internal/{funding → routes}/Provider.test.ts +489 -153
- package/src/internal/{funding → routes}/Provider.ts +489 -186
- package/src/internal/{funding → routes}/Reconciliation.local.test.ts +84 -12
- package/src/internal/{funding → routes}/Reconciliation.test.ts +1213 -279
- package/src/internal/{funding → routes}/Reconciliation.ts +501 -203
- package/src/internal/routes/Reconciliation.unattributed.test.ts +250 -0
- package/src/internal/{funding → routes}/Route.ts +7 -7
- package/src/internal/{funding → routes}/SourceObservation.test.ts +13 -14
- package/src/internal/{funding → routes}/SourceObservation.ts +13 -13
- package/src/internal/{funding → routes}/Subsidy.local.test.ts +7 -7
- package/src/internal/routes/Subsidy.test.ts +169 -0
- package/src/internal/{funding → routes}/Subsidy.ts +86 -6
- package/src/internal/{funding → routes}/Token.test.ts +1 -1
- package/src/internal/{funding → routes}/Token.ts +5 -5
- package/src/internal/routes/Transfer.test.ts +1199 -0
- package/src/internal/routes/Transfer.ts +1206 -0
- package/src/internal/routes/TransferReconciliation.test.ts +731 -0
- package/src/internal/routes/TransferReconciliation.ts +527 -0
- package/src/internal/routes/TransferSubsidy.test.ts +172 -0
- package/src/internal/routes/TransferSubsidy.ts +447 -0
- package/src/internal/{funding → routes}/TransferWebhook.test.ts +13 -13
- package/src/internal/{funding → routes}/TransferWebhook.ts +7 -7
- package/src/internal/{funding → routes}/index.test.ts +5 -3
- package/src/internal/{funding → routes}/index.ts +2 -0
- package/src/internal/{funding → routes}/providers/across.ts +16 -16
- package/src/internal/{funding → routes}/providers/index.test.ts +157 -44
- package/src/internal/{funding → routes}/providers/relay.test.ts +224 -32
- package/src/internal/{funding → routes}/providers/relay.ts +228 -121
- package/src/internal/{funding → routes}/providers/rhino.ts +16 -16
- package/src/internal/{funding → routes}/providers/squid.ts +17 -17
- package/src/internal/routes/providers/stargate.test.ts +728 -0
- package/src/internal/routes/providers/stargate.ts +1276 -0
- package/src/internal/{funding → routes}/providers/symbiosis.ts +64 -24
- package/src/internal/webhookDestinations/slack.ts +10 -10
- package/src/providers/index.ts +13 -13
- package/src/server.ts +18 -0
- package/dist/apps/funding/Access.d.ts.map +0 -1
- package/dist/apps/funding/Access.js.map +0 -1
- package/dist/apps/funding/App.js.map +0 -1
- package/dist/apps/funding/Inventory.d.ts.map +0 -1
- package/dist/apps/funding/Inventory.js.map +0 -1
- package/dist/apps/funding/ProviderAttempts.d.ts +0 -5
- package/dist/apps/funding/ProviderAttempts.d.ts.map +0 -1
- package/dist/apps/funding/ProviderAttempts.js +0 -24
- package/dist/apps/funding/ProviderAttempts.js.map +0 -1
- package/dist/apps/funding/index.d.ts +0 -2
- package/dist/apps/funding/index.d.ts.map +0 -1
- package/dist/apps/funding/index.js +0 -2
- package/dist/apps/funding/index.js.map +0 -1
- package/dist/apps/funding/routes/chains.d.ts.map +0 -1
- package/dist/apps/funding/routes/chains.js.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.d.ts.map +0 -1
- package/dist/apps/funding/routes/deposit-addresses.js.map +0 -1
- package/dist/apps/funding/routes/providers.d.ts.map +0 -1
- package/dist/apps/funding/routes/providers.js +0 -57
- package/dist/apps/funding/routes/providers.js.map +0 -1
- package/dist/apps/funding/routes/quotes.d.ts.map +0 -1
- package/dist/apps/funding/routes/quotes.js.map +0 -1
- package/dist/apps/funding/routes/transfers.d.ts.map +0 -1
- package/dist/apps/funding/routes/transfers.js +0 -828
- package/dist/apps/funding/routes/transfers.js.map +0 -1
- package/dist/db/tables/fundingCatalog.d.ts +0 -58
- package/dist/db/tables/fundingCatalog.d.ts.map +0 -1
- package/dist/db/tables/fundingCatalog.js.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.d.ts +0 -192
- package/dist/db/tables/fundingDepositAddresses.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositAddresses.js +0 -235
- package/dist/db/tables/fundingDepositAddresses.js.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.d.ts.map +0 -1
- package/dist/db/tables/fundingDepositRequestObservations.js.map +0 -1
- package/dist/db/tables/fundingDeposits.d.ts.map +0 -1
- package/dist/db/tables/fundingDeposits.js +0 -295
- package/dist/db/tables/fundingDeposits.js.map +0 -1
- package/dist/db/tables/fundingIdempotency.d.ts +0 -91
- package/dist/db/tables/fundingIdempotency.d.ts.map +0 -1
- package/dist/db/tables/fundingIdempotency.js +0 -103
- package/dist/db/tables/fundingIdempotency.js.map +0 -1
- package/dist/db/tables/fundingTransferEvents.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferEvents.js.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.d.ts +0 -53
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +0 -1
- package/dist/db/tables/fundingTransferTransactions.js.map +0 -1
- package/dist/db/tables/fundingTransfers.d.ts +0 -99
- package/dist/db/tables/fundingTransfers.d.ts.map +0 -1
- package/dist/db/tables/fundingTransfers.js +0 -110
- package/dist/db/tables/fundingTransfers.js.map +0 -1
- package/dist/internal/funding/Action.d.ts.map +0 -1
- package/dist/internal/funding/Action.js.map +0 -1
- package/dist/internal/funding/Catalog.d.ts.map +0 -1
- package/dist/internal/funding/Catalog.js.map +0 -1
- package/dist/internal/funding/Chain.d.ts.map +0 -1
- package/dist/internal/funding/Chain.js.map +0 -1
- package/dist/internal/funding/Deposit.d.ts.map +0 -1
- package/dist/internal/funding/Deposit.js.map +0 -1
- package/dist/internal/funding/DepositAddress.d.ts.map +0 -1
- package/dist/internal/funding/DepositAddress.js.map +0 -1
- package/dist/internal/funding/DepositWebhook.d.ts.map +0 -1
- package/dist/internal/funding/DepositWebhook.js.map +0 -1
- package/dist/internal/funding/Evidence.d.ts.map +0 -1
- package/dist/internal/funding/Evidence.js.map +0 -1
- package/dist/internal/funding/Provider.d.ts.map +0 -1
- package/dist/internal/funding/Provider.js.map +0 -1
- package/dist/internal/funding/Reconciliation.d.ts.map +0 -1
- package/dist/internal/funding/Reconciliation.js.map +0 -1
- package/dist/internal/funding/Route.d.ts +0 -21
- package/dist/internal/funding/Route.d.ts.map +0 -1
- package/dist/internal/funding/Route.js.map +0 -1
- package/dist/internal/funding/SourceObservation.d.ts.map +0 -1
- package/dist/internal/funding/SourceObservation.js.map +0 -1
- package/dist/internal/funding/Subsidy.d.ts.map +0 -1
- package/dist/internal/funding/Subsidy.js.map +0 -1
- package/dist/internal/funding/Token.d.ts.map +0 -1
- package/dist/internal/funding/Token.js.map +0 -1
- package/dist/internal/funding/Transfer.d.ts.map +0 -1
- package/dist/internal/funding/Transfer.js +0 -462
- package/dist/internal/funding/Transfer.js.map +0 -1
- package/dist/internal/funding/TransferReconciliation.d.ts.map +0 -1
- package/dist/internal/funding/TransferReconciliation.js +0 -192
- package/dist/internal/funding/TransferReconciliation.js.map +0 -1
- package/dist/internal/funding/TransferWebhook.d.ts.map +0 -1
- package/dist/internal/funding/TransferWebhook.js.map +0 -1
- package/dist/internal/funding/index.d.ts.map +0 -1
- package/dist/internal/funding/index.js.map +0 -1
- package/dist/internal/funding/providers/across.d.ts.map +0 -1
- package/dist/internal/funding/providers/across.js.map +0 -1
- package/dist/internal/funding/providers/relay.d.ts.map +0 -1
- package/dist/internal/funding/providers/relay.js.map +0 -1
- package/dist/internal/funding/providers/rhino.d.ts.map +0 -1
- package/dist/internal/funding/providers/rhino.js.map +0 -1
- package/dist/internal/funding/providers/squid.d.ts.map +0 -1
- package/dist/internal/funding/providers/squid.js.map +0 -1
- package/dist/internal/funding/providers/stargate.d.ts.map +0 -1
- package/dist/internal/funding/providers/stargate.js +0 -579
- package/dist/internal/funding/providers/stargate.js.map +0 -1
- package/dist/internal/funding/providers/symbiosis.d.ts.map +0 -1
- package/dist/internal/funding/providers/symbiosis.js.map +0 -1
- package/src/apps/funding/App.test.ts +0 -78
- package/src/apps/funding/App.ts +0 -88
- package/src/apps/funding/ProviderAttempts.ts +0 -26
- package/src/apps/funding/index.ts +0 -1
- package/src/apps/funding/routes/transfers.ts +0 -987
- package/src/db/tables/fundingCatalog.test.ts +0 -122
- package/src/db/tables/fundingCatalog.ts +0 -163
- package/src/db/tables/fundingDepositAddresses.test.ts +0 -608
- package/src/db/tables/fundingDepositAddresses.ts +0 -443
- package/src/db/tables/fundingDeposits.ts +0 -572
- package/src/db/tables/fundingIdempotency.test.ts +0 -182
- package/src/db/tables/fundingIdempotency.ts +0 -180
- package/src/db/tables/fundingTransferTransactions.test.ts +0 -112
- package/src/db/tables/fundingTransfers.test.ts +0 -115
- package/src/db/tables/fundingTransfers.ts +0 -189
- package/src/handlers/internal/multisig.test.ts +0 -818
- package/src/internal/funding/Subsidy.test.ts +0 -75
- package/src/internal/funding/Transfer.test.ts +0 -524
- package/src/internal/funding/Transfer.ts +0 -762
- package/src/internal/funding/TransferReconciliation.test.ts +0 -147
- package/src/internal/funding/TransferReconciliation.ts +0 -264
- package/src/internal/funding/providers/stargate.test.ts +0 -328
- package/src/internal/funding/providers/stargate.ts +0 -856
- /package/dist/apps/{funding → routes}/Inventory.d.ts +0 -0
- /package/src/internal/{funding → routes}/Route.test.ts +0 -0
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
|
>()
|
|
@@ -245,6 +296,16 @@ describe('narrows responses by status', () => {
|
|
|
245
296
|
VaultValue | null | undefined
|
|
246
297
|
>()
|
|
247
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
|
+
>()
|
|
248
309
|
expectTypeOf(json.data[0]!.slug).toEqualTypeOf<string | null>()
|
|
249
310
|
expectTypeOf(json.data[0]!.state.openRedeemRequestCount).toEqualTypeOf<number>()
|
|
250
311
|
expectTypeOf(json.data[0]!.state.totalAssets).toEqualTypeOf<string>()
|
|
@@ -261,7 +322,9 @@ describe('narrows responses by status', () => {
|
|
|
261
322
|
}
|
|
262
323
|
if (res.status === 400) {
|
|
263
324
|
const json = await res.json()
|
|
264
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
325
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
326
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid'>
|
|
327
|
+
>()
|
|
265
328
|
void json
|
|
266
329
|
return
|
|
267
330
|
}
|
|
@@ -289,6 +352,7 @@ describe('narrows responses by status', () => {
|
|
|
289
352
|
expectTypeOf(json).toEqualTypeOf<
|
|
290
353
|
z.output<typeof Earn.schema.getVerifiedEarnVaults.Response>
|
|
291
354
|
>()
|
|
355
|
+
expectTypeOf(json.data[0]!.apy?.vault).toEqualTypeOf<string | undefined>()
|
|
292
356
|
expectTypeOf(json.data[0]!.engine.type).toEqualTypeOf<'erc4626' | 'veda'>()
|
|
293
357
|
expectTypeOf(json.data[0]!.instantLiquidity).toEqualTypeOf<string | null>()
|
|
294
358
|
expectTypeOf(json.data[0]!.slug).toEqualTypeOf<string>()
|
|
@@ -303,7 +367,9 @@ describe('narrows responses by status', () => {
|
|
|
303
367
|
}
|
|
304
368
|
if (res.status === 400) {
|
|
305
369
|
const json = await res.json()
|
|
306
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
370
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
371
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported' | 'query_invalid'>
|
|
372
|
+
>()
|
|
307
373
|
void json
|
|
308
374
|
return
|
|
309
375
|
}
|
|
@@ -333,6 +399,7 @@ describe('narrows responses by status', () => {
|
|
|
333
399
|
expectTypeOf(json.data[0]!.assetAmount.currency).toEqualTypeOf<string>()
|
|
334
400
|
expectTypeOf(json.data[0]!.assetToken.address).toEqualTypeOf<`0x${string}`>()
|
|
335
401
|
expectTypeOf(json.data[0]!.assetToken.decimals).toEqualTypeOf<number>()
|
|
402
|
+
expectTypeOf(json.data[0]!.chainId).toEqualTypeOf<number>()
|
|
336
403
|
expectTypeOf(json.data[0]!.id).toEqualTypeOf<`0x${string}`>()
|
|
337
404
|
expectTypeOf(json.data[0]!.lifetimeCashFlows?.status).toEqualTypeOf<
|
|
338
405
|
'complete' | 'incomplete_history' | undefined
|
|
@@ -386,8 +453,9 @@ describe('narrows responses by status', () => {
|
|
|
386
453
|
const json = await res.json()
|
|
387
454
|
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getEarnVault.Response>>()
|
|
388
455
|
// `apy` and `tvl` are include-gated, so both are absent unless requested.
|
|
389
|
-
expectTypeOf(json.apy).toEqualTypeOf<EarnRates.Apy | null | undefined>()
|
|
390
456
|
expectTypeOf(json.apy?.asOf).toEqualTypeOf<string | undefined>()
|
|
457
|
+
expectTypeOf(json.apy?.net).toEqualTypeOf<string | undefined>()
|
|
458
|
+
expectTypeOf(json.apy?.vault).toEqualTypeOf<string | undefined>()
|
|
391
459
|
expectTypeOf(json.assetToken.address).toEqualTypeOf<`0x${string}`>()
|
|
392
460
|
expectTypeOf(json.engine.type).toEqualTypeOf<'erc4626' | 'veda' | null>()
|
|
393
461
|
expectTypeOf(json.instantLiquidity).toEqualTypeOf<string | null>()
|
|
@@ -405,7 +473,58 @@ describe('narrows responses by status', () => {
|
|
|
405
473
|
}
|
|
406
474
|
if (res.status === 400) {
|
|
407
475
|
const json = await res.json()
|
|
408
|
-
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
|
+
>()
|
|
409
528
|
void json
|
|
410
529
|
return
|
|
411
530
|
}
|
|
@@ -439,12 +558,23 @@ describe('narrows responses by status', () => {
|
|
|
439
558
|
const json = await res.json()
|
|
440
559
|
expectTypeOf(json).toEqualTypeOf<z.output<typeof Earn.schema.getEarnVaultPosition.Response>>()
|
|
441
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>()
|
|
442
571
|
expectTypeOf(json.assetAllowance).toEqualTypeOf<string>()
|
|
443
572
|
expectTypeOf(json.assetBalance).toEqualTypeOf<string>()
|
|
444
573
|
expectTypeOf(json.assetToken).toEqualTypeOf<`0x${string}`>()
|
|
445
574
|
expectTypeOf(json.asOf).toEqualTypeOf<string | undefined>()
|
|
446
575
|
expectTypeOf(json.block?.number).toEqualTypeOf<number | undefined>()
|
|
447
576
|
expectTypeOf(json.block?.timestamp).toEqualTypeOf<string | undefined>()
|
|
577
|
+
expectTypeOf(json.chainId).toEqualTypeOf<number>()
|
|
448
578
|
expectTypeOf(json.id).toEqualTypeOf<`0x${string}`>()
|
|
449
579
|
expectTypeOf(json.shareAllowance).toEqualTypeOf<string>()
|
|
450
580
|
expectTypeOf(json.shareBalance).toEqualTypeOf<string>()
|
|
@@ -477,6 +607,58 @@ describe('narrows responses by status', () => {
|
|
|
477
607
|
}
|
|
478
608
|
})
|
|
479
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
|
+
|
|
480
662
|
test('GET /v1/earn/vaults/:vaultId/earnings/:address', async () => {
|
|
481
663
|
const client = Client.create()
|
|
482
664
|
const res = await client.v1.earn.vaults[':vaultId'].earnings[':address'].$get({
|
|
@@ -730,6 +912,42 @@ describe('narrows responses by status', () => {
|
|
|
730
912
|
}
|
|
731
913
|
})
|
|
732
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
|
+
|
|
733
951
|
test('PATCH /v1/orgs/:orgId/billing', async () => {
|
|
734
952
|
const client = Client.create()
|
|
735
953
|
const res = await client.v1.orgs[':orgId{org_[A-Za-z0-9_-]+}'].billing.$patch({
|
|
@@ -888,7 +1106,9 @@ describe('narrows responses by status', () => {
|
|
|
888
1106
|
}
|
|
889
1107
|
case 409: {
|
|
890
1108
|
const json = await res.json()
|
|
891
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1109
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1110
|
+
'routes_deposit_addresses_active' | 'sponsorships_unreported'
|
|
1111
|
+
>()
|
|
892
1112
|
void json
|
|
893
1113
|
return
|
|
894
1114
|
}
|
|
@@ -1086,7 +1306,9 @@ describe('narrows responses by status', () => {
|
|
|
1086
1306
|
}
|
|
1087
1307
|
case 409: {
|
|
1088
1308
|
const json = await res.json()
|
|
1089
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1309
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
1310
|
+
'routes_deposit_addresses_active' | 'sponsorships_unreported'
|
|
1311
|
+
>()
|
|
1090
1312
|
void json
|
|
1091
1313
|
return
|
|
1092
1314
|
}
|
|
@@ -1102,7 +1324,7 @@ describe('narrows responses by status', () => {
|
|
|
1102
1324
|
param: { orgId: 'org_test', projectId: 'prj_test' },
|
|
1103
1325
|
})
|
|
1104
1326
|
|
|
1105
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 502>()
|
|
1327
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 401 | 403 | 404 | 409 | 502>()
|
|
1106
1328
|
|
|
1107
1329
|
switch (res.status) {
|
|
1108
1330
|
case 200: {
|
|
@@ -1126,7 +1348,7 @@ describe('narrows responses by status', () => {
|
|
|
1126
1348
|
const client = Client.create()
|
|
1127
1349
|
const res = await client.v1.orgs[':orgId{org_[A-Za-z0-9_-]+}']['api-keys'].$get({
|
|
1128
1350
|
// The environment filter is optional (defaults to production server-side).
|
|
1129
|
-
query: { environment: 'sandbox' },
|
|
1351
|
+
query: { environment: 'sandbox', include: '' },
|
|
1130
1352
|
param: { orgId: 'org_test' },
|
|
1131
1353
|
})
|
|
1132
1354
|
|
|
@@ -1360,6 +1582,12 @@ describe('narrows responses by status', () => {
|
|
|
1360
1582
|
void json
|
|
1361
1583
|
return
|
|
1362
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
|
+
}
|
|
1363
1591
|
}
|
|
1364
1592
|
})
|
|
1365
1593
|
|
|
@@ -2258,10 +2486,12 @@ describe('narrows responses by status', () => {
|
|
|
2258
2486
|
}
|
|
2259
2487
|
})
|
|
2260
2488
|
|
|
2261
|
-
test('GET /v1/
|
|
2489
|
+
test('GET /v1/routes/quotes', async () => {
|
|
2262
2490
|
const client = Client.create()
|
|
2263
|
-
const res = await client.v1.
|
|
2491
|
+
const res = await client.v1.routes.quotes.$get({
|
|
2264
2492
|
query: {
|
|
2493
|
+
destinationChain: 'eip155:8453',
|
|
2494
|
+
destinationToken: 'USDC',
|
|
2265
2495
|
provider: 'across',
|
|
2266
2496
|
sourceAmount: '1000000',
|
|
2267
2497
|
sourceChain: 'base',
|
|
@@ -2290,14 +2520,16 @@ describe('narrows responses by status', () => {
|
|
|
2290
2520
|
| undefined
|
|
2291
2521
|
>()
|
|
2292
2522
|
expectTypeOf(json.data[0]!.sourceAmount).toEqualTypeOf<
|
|
2293
|
-
z.output<
|
|
2294
|
-
typeof FundingQuotes.schema.quoteFunding.Response
|
|
2295
|
-
>['data'][number]['sourceAmount']
|
|
2523
|
+
z.output<typeof RoutesQuotes.schema.quoteRoutes.Response>['data'][number]['sourceAmount']
|
|
2296
2524
|
>()
|
|
2297
2525
|
// @ts-expect-error token references do not contain quantities
|
|
2298
2526
|
void json.data[0]!.sourceToken.amount
|
|
2299
2527
|
// @ts-expect-error provider details no longer duplicate destination amounts
|
|
2300
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
|
|
2301
2533
|
expectTypeOf(json.data[0]!.provider.id).toEqualTypeOf<string>()
|
|
2302
2534
|
expectTypeOf(json.data[0]!.quote.expiresAt).toEqualTypeOf<string | undefined>()
|
|
2303
2535
|
expectTypeOf(json.data[0]!.destinationChain.addressFormat).toEqualTypeOf<
|
|
@@ -2326,9 +2558,9 @@ describe('narrows responses by status', () => {
|
|
|
2326
2558
|
}
|
|
2327
2559
|
})
|
|
2328
2560
|
|
|
2329
|
-
test('GET /v1/
|
|
2561
|
+
test('GET /v1/routes/chains', async () => {
|
|
2330
2562
|
const client = Client.create()
|
|
2331
|
-
const res = await client.v1.
|
|
2563
|
+
const res = await client.v1.routes.chains.$get()
|
|
2332
2564
|
|
|
2333
2565
|
expectTypeOf(res.status).toEqualTypeOf<200 | PaidAccessStatus>()
|
|
2334
2566
|
|
|
@@ -2337,7 +2569,7 @@ describe('narrows responses by status', () => {
|
|
|
2337
2569
|
const json = await res.json()
|
|
2338
2570
|
expectTypeOf(json.data[0]!.tokens[0]!.symbol).toEqualTypeOf<
|
|
2339
2571
|
z.output<
|
|
2340
|
-
typeof
|
|
2572
|
+
typeof RoutesChains.schema.getRoutesChains.Response
|
|
2341
2573
|
>['data'][number]['tokens'][number]['symbol']
|
|
2342
2574
|
>()
|
|
2343
2575
|
expectTypeOf(json.data[0]!.addressFormat).toEqualTypeOf<'base58' | 'base58check' | 'hex'>()
|
|
@@ -2354,9 +2586,9 @@ describe('narrows responses by status', () => {
|
|
|
2354
2586
|
}
|
|
2355
2587
|
})
|
|
2356
2588
|
|
|
2357
|
-
test('GET /v1/
|
|
2589
|
+
test('GET /v1/routes/providers', async () => {
|
|
2358
2590
|
const client = Client.create()
|
|
2359
|
-
const res = await client.v1.
|
|
2591
|
+
const res = await client.v1.routes.providers.$get()
|
|
2360
2592
|
|
|
2361
2593
|
expectTypeOf(res.status).toEqualTypeOf<200 | PaidAccessStatus>()
|
|
2362
2594
|
|
|
@@ -2379,7 +2611,7 @@ describe('narrows responses by status', () => {
|
|
|
2379
2611
|
}
|
|
2380
2612
|
})
|
|
2381
2613
|
|
|
2382
|
-
test('POST /v1/
|
|
2614
|
+
test('POST /v1/routes/deposit-addresses', async () => {
|
|
2383
2615
|
const client = Client.create()
|
|
2384
2616
|
const json = {
|
|
2385
2617
|
amount: '100000000',
|
|
@@ -2390,13 +2622,13 @@ describe('narrows responses by status', () => {
|
|
|
2390
2622
|
sourceToken: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
|
|
2391
2623
|
} as const
|
|
2392
2624
|
// @ts-expect-error `Idempotency-Key` is required for deposit-address creation.
|
|
2393
|
-
void client.v1.
|
|
2394
|
-
const res = await client.v1.
|
|
2395
|
-
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' },
|
|
2396
2628
|
json,
|
|
2397
2629
|
})
|
|
2398
2630
|
|
|
2399
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 409 | 502 | PublicAccessStatus>()
|
|
2631
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 403 | 404 | 409 | 502 | PublicAccessStatus>()
|
|
2400
2632
|
|
|
2401
2633
|
switch (res.status) {
|
|
2402
2634
|
case 200: {
|
|
@@ -2404,14 +2636,14 @@ describe('narrows responses by status', () => {
|
|
|
2404
2636
|
expectTypeOf(json.id).toEqualTypeOf<string>()
|
|
2405
2637
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2406
2638
|
z.output<
|
|
2407
|
-
typeof
|
|
2639
|
+
typeof RoutesDepositAddresses.schema.createRoutesDepositAddress.Response
|
|
2408
2640
|
>['status']
|
|
2409
2641
|
>()
|
|
2410
2642
|
expectTypeOf(json.subsidize).toEqualTypeOf<boolean>()
|
|
2411
2643
|
if ('quote' in json) {
|
|
2412
2644
|
expectTypeOf(json.destinationAmount.baseUnits).toEqualTypeOf<string>()
|
|
2413
2645
|
expectTypeOf(json.fees).toEqualTypeOf<
|
|
2414
|
-
z.output<typeof
|
|
2646
|
+
z.output<typeof RoutesDepositAddress.schema.CreatedRoutesDepositAddress>['fees']
|
|
2415
2647
|
>()
|
|
2416
2648
|
expectTypeOf(json.quote.sampledAt).toEqualTypeOf<string>()
|
|
2417
2649
|
expectTypeOf(json.sourceAmount.baseUnits).toEqualTypeOf<string>()
|
|
@@ -2419,6 +2651,19 @@ describe('narrows responses by status', () => {
|
|
|
2419
2651
|
void json
|
|
2420
2652
|
return
|
|
2421
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
|
+
}
|
|
2422
2667
|
case 404: {
|
|
2423
2668
|
const json = await res.json()
|
|
2424
2669
|
expectTypeOf(json.error.code).toEqualTypeOf<'deposit_address_not_available'>()
|
|
@@ -2436,10 +2681,10 @@ describe('narrows responses by status', () => {
|
|
|
2436
2681
|
}
|
|
2437
2682
|
})
|
|
2438
2683
|
|
|
2439
|
-
test('GET /v1/
|
|
2684
|
+
test('GET /v1/routes/deposit-addresses/:id', async () => {
|
|
2440
2685
|
const client = Client.create()
|
|
2441
|
-
const res = await client.v1.
|
|
2442
|
-
param: { id: '
|
|
2686
|
+
const res = await client.v1.routes['deposit-addresses'][':id{rda_[A-Za-z0-9_-]+}'].$get({
|
|
2687
|
+
param: { id: 'rda_test' },
|
|
2443
2688
|
})
|
|
2444
2689
|
|
|
2445
2690
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PublicAccessStatus>()
|
|
@@ -2448,7 +2693,7 @@ describe('narrows responses by status', () => {
|
|
|
2448
2693
|
case 200: {
|
|
2449
2694
|
const json = await res.json()
|
|
2450
2695
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2451
|
-
z.output<typeof
|
|
2696
|
+
z.output<typeof RoutesDepositAddresses.schema.DepositAddress>['status']
|
|
2452
2697
|
>()
|
|
2453
2698
|
expectTypeOf(json.sourceChain.kind).toEqualTypeOf<'evm' | 'solana' | 'tron'>()
|
|
2454
2699
|
expectTypeOf(json.subsidize).toEqualTypeOf<boolean>()
|
|
@@ -2459,16 +2704,16 @@ describe('narrows responses by status', () => {
|
|
|
2459
2704
|
}
|
|
2460
2705
|
case 404: {
|
|
2461
2706
|
const json = await res.json()
|
|
2462
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2707
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_address_not_found'>()
|
|
2463
2708
|
void json
|
|
2464
2709
|
return
|
|
2465
2710
|
}
|
|
2466
2711
|
}
|
|
2467
2712
|
})
|
|
2468
2713
|
|
|
2469
|
-
test('GET /v1/
|
|
2714
|
+
test('GET /v1/routes/deposit-addresses', async () => {
|
|
2470
2715
|
const client = Client.create()
|
|
2471
|
-
const res = await client.v1.
|
|
2716
|
+
const res = await client.v1.routes['deposit-addresses'].$get()
|
|
2472
2717
|
|
|
2473
2718
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 502 | PublicAccessStatus>()
|
|
2474
2719
|
|
|
@@ -2476,7 +2721,7 @@ describe('narrows responses by status', () => {
|
|
|
2476
2721
|
case 200: {
|
|
2477
2722
|
const json = await res.json()
|
|
2478
2723
|
expectTypeOf(json.data[0]!.status).toEqualTypeOf<
|
|
2479
|
-
z.output<typeof
|
|
2724
|
+
z.output<typeof RoutesDepositAddresses.schema.DepositAddress>['status']
|
|
2480
2725
|
>()
|
|
2481
2726
|
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
2482
2727
|
void json
|
|
@@ -2485,11 +2730,11 @@ describe('narrows responses by status', () => {
|
|
|
2485
2730
|
}
|
|
2486
2731
|
})
|
|
2487
2732
|
|
|
2488
|
-
test('POST /v1/
|
|
2733
|
+
test('POST /v1/routes/deposit-addresses/:id/reconcile', async () => {
|
|
2489
2734
|
const client = Client.create()
|
|
2490
|
-
const res = await client.v1.
|
|
2491
|
-
':id{
|
|
2492
|
-
].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' } })
|
|
2493
2738
|
|
|
2494
2739
|
expectTypeOf(res.status).toEqualTypeOf<202 | 400 | 401 | 403 | 404 | 409 | 429 | 501 | 502>()
|
|
2495
2740
|
|
|
@@ -2500,13 +2745,13 @@ describe('narrows responses by status', () => {
|
|
|
2500
2745
|
}
|
|
2501
2746
|
case 404: {
|
|
2502
2747
|
const json = await res.json()
|
|
2503
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2748
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_address_not_found'>()
|
|
2504
2749
|
void json
|
|
2505
2750
|
return
|
|
2506
2751
|
}
|
|
2507
2752
|
case 409: {
|
|
2508
2753
|
const json = await res.json()
|
|
2509
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2754
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_address_not_active'>()
|
|
2510
2755
|
void json
|
|
2511
2756
|
return
|
|
2512
2757
|
}
|
|
@@ -2525,13 +2770,13 @@ describe('narrows responses by status', () => {
|
|
|
2525
2770
|
}
|
|
2526
2771
|
})
|
|
2527
2772
|
|
|
2528
|
-
test('GET /v1/
|
|
2773
|
+
test('GET /v1/routes/deposits', async () => {
|
|
2529
2774
|
const client = Client.create()
|
|
2530
|
-
void client.v1.
|
|
2531
|
-
void client.v1.
|
|
2775
|
+
void client.v1.routes.deposits.$get()
|
|
2776
|
+
void client.v1.routes.deposits.$get({
|
|
2532
2777
|
query: { depositAddress: 'TJRabPrwbZy45sbavfcjinPJC18kjpRTv8' },
|
|
2533
2778
|
})
|
|
2534
|
-
const res = await client.v1.
|
|
2779
|
+
const res = await client.v1.routes.deposits.$get({
|
|
2535
2780
|
query: {
|
|
2536
2781
|
depositAddress: 'TJRabPrwbZy45sbavfcjinPJC18kjpRTv8',
|
|
2537
2782
|
destinationToken: 'usdt0',
|
|
@@ -2551,10 +2796,10 @@ describe('narrows responses by status', () => {
|
|
|
2551
2796
|
const json = await res.json()
|
|
2552
2797
|
expectTypeOf(json.data[0]!.recipient).toEqualTypeOf<string>()
|
|
2553
2798
|
expectTypeOf(json.data[0]!.status).toEqualTypeOf<
|
|
2554
|
-
z.output<typeof
|
|
2799
|
+
z.output<typeof RoutesDepositAddresses.schema.Deposit>['status']
|
|
2555
2800
|
>()
|
|
2556
2801
|
expectTypeOf(json.meta).toEqualTypeOf<
|
|
2557
|
-
z.output<typeof
|
|
2802
|
+
z.output<typeof RoutesDepositAddresses.schema.listRoutesDeposits.Response>['meta']
|
|
2558
2803
|
>()
|
|
2559
2804
|
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
2560
2805
|
void json
|
|
@@ -2563,10 +2808,10 @@ describe('narrows responses by status', () => {
|
|
|
2563
2808
|
}
|
|
2564
2809
|
})
|
|
2565
2810
|
|
|
2566
|
-
test('GET /v1/
|
|
2811
|
+
test('GET /v1/routes/deposits/:id', async () => {
|
|
2567
2812
|
const client = Client.create()
|
|
2568
|
-
const res = await client.v1.
|
|
2569
|
-
param: { id: '
|
|
2813
|
+
const res = await client.v1.routes.deposits[':id{rdp_[A-Za-z0-9_-]+}'].$get({
|
|
2814
|
+
param: { id: 'rdp_001785792060000_2ZPE2gvateYEQ0dQslgvkhjx' },
|
|
2570
2815
|
})
|
|
2571
2816
|
|
|
2572
2817
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PublicAccessStatus>()
|
|
@@ -2578,11 +2823,11 @@ describe('narrows responses by status', () => {
|
|
|
2578
2823
|
'chain' | 'manual' | 'poll' | 'webhook' | undefined
|
|
2579
2824
|
>()
|
|
2580
2825
|
expectTypeOf(json.destinationAmountRequired).toEqualTypeOf<
|
|
2581
|
-
z.output<typeof
|
|
2826
|
+
z.output<typeof RoutesDepositAddresses.schema.Deposit>['destinationAmountRequired']
|
|
2582
2827
|
>()
|
|
2583
2828
|
expectTypeOf(json.sourceTransferIndex).toEqualTypeOf<number | undefined>()
|
|
2584
2829
|
expectTypeOf(json.statusReason).toEqualTypeOf<
|
|
2585
|
-
z.output<typeof
|
|
2830
|
+
z.output<typeof RoutesDepositAddresses.schema.Deposit>['statusReason']
|
|
2586
2831
|
>()
|
|
2587
2832
|
// @ts-expect-error provider request identifiers remain private
|
|
2588
2833
|
void json.providerRequestIds
|
|
@@ -2591,16 +2836,16 @@ describe('narrows responses by status', () => {
|
|
|
2591
2836
|
}
|
|
2592
2837
|
case 404: {
|
|
2593
2838
|
const json = await res.json()
|
|
2594
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
2839
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_deposit_not_found'>()
|
|
2595
2840
|
void json
|
|
2596
2841
|
return
|
|
2597
2842
|
}
|
|
2598
2843
|
}
|
|
2599
2844
|
})
|
|
2600
2845
|
|
|
2601
|
-
test('GET /v1/
|
|
2846
|
+
test('GET /v1/routes/transfers', async () => {
|
|
2602
2847
|
const client = Client.create()
|
|
2603
|
-
const res = await client.v1.
|
|
2848
|
+
const res = await client.v1.routes.transfers.$get({ query: {} })
|
|
2604
2849
|
|
|
2605
2850
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 502 | PublicAccessStatus>()
|
|
2606
2851
|
|
|
@@ -2609,7 +2854,7 @@ describe('narrows responses by status', () => {
|
|
|
2609
2854
|
const json = await res.json()
|
|
2610
2855
|
expectTypeOf(json.data[0]!.id).toEqualTypeOf<string>()
|
|
2611
2856
|
expectTypeOf(json.data[0]!.status).toEqualTypeOf<
|
|
2612
|
-
z.output<typeof
|
|
2857
|
+
z.output<typeof RoutesTransfers.schema.Transfer>['status']
|
|
2613
2858
|
>()
|
|
2614
2859
|
expectTypeOf(json.data[0]!.version).toEqualTypeOf<number>()
|
|
2615
2860
|
// Transfer reads never expose the executable action.
|
|
@@ -2617,7 +2862,7 @@ describe('narrows responses by status', () => {
|
|
|
2617
2862
|
void json.data[0]!.action
|
|
2618
2863
|
// `meta` (opt-in `include=totalCount` count) is optional.
|
|
2619
2864
|
expectTypeOf(json.meta).toEqualTypeOf<
|
|
2620
|
-
z.output<typeof
|
|
2865
|
+
z.output<typeof RoutesTransfers.schema.listRoutesTransfers.Response>['meta']
|
|
2621
2866
|
>()
|
|
2622
2867
|
expectTypeOf(json.nextCursor).toEqualTypeOf<string | null>()
|
|
2623
2868
|
void json
|
|
@@ -2633,10 +2878,11 @@ describe('narrows responses by status', () => {
|
|
|
2633
2878
|
}
|
|
2634
2879
|
})
|
|
2635
2880
|
|
|
2636
|
-
test('POST /v1/
|
|
2881
|
+
test('POST /v1/routes/transfers', async () => {
|
|
2637
2882
|
const client = Client.create()
|
|
2638
2883
|
const json = {
|
|
2639
2884
|
amount: '1000000',
|
|
2885
|
+
destinationChain: 'eip155:8453',
|
|
2640
2886
|
destinationToken: '0x20c000000000000000000000b9537d11c60e8b50',
|
|
2641
2887
|
mode: 'exactSource',
|
|
2642
2888
|
provider: 'stargate',
|
|
@@ -2645,14 +2891,16 @@ describe('narrows responses by status', () => {
|
|
|
2645
2891
|
sourceChain: 'eip155:8453',
|
|
2646
2892
|
sourceToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
2647
2893
|
} as const
|
|
2648
|
-
// @ts-expect-error `Idempotency-Key` is required for
|
|
2649
|
-
void client.v1.
|
|
2650
|
-
const res = await client.v1.
|
|
2651
|
-
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' },
|
|
2652
2898
|
json,
|
|
2653
2899
|
})
|
|
2654
2900
|
|
|
2655
|
-
expectTypeOf(res.status).toEqualTypeOf<
|
|
2901
|
+
expectTypeOf(res.status).toEqualTypeOf<
|
|
2902
|
+
200 | 400 | 403 | 404 | 409 | 501 | 502 | 503 | PublicAccessStatus
|
|
2903
|
+
>()
|
|
2656
2904
|
|
|
2657
2905
|
switch (res.status) {
|
|
2658
2906
|
case 200: {
|
|
@@ -2660,7 +2908,7 @@ describe('narrows responses by status', () => {
|
|
|
2660
2908
|
expectTypeOf(json.action.type).toEqualTypeOf<'evm:calls'>()
|
|
2661
2909
|
expectTypeOf(json.id).toEqualTypeOf<string>()
|
|
2662
2910
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2663
|
-
z.output<typeof
|
|
2911
|
+
z.output<typeof RoutesTransfers.schema.createRoutesTransfer.Response>['status']
|
|
2664
2912
|
>()
|
|
2665
2913
|
void json
|
|
2666
2914
|
return
|
|
@@ -2682,7 +2930,7 @@ describe('narrows responses by status', () => {
|
|
|
2682
2930
|
}
|
|
2683
2931
|
})
|
|
2684
2932
|
|
|
2685
|
-
test('POST /v1/
|
|
2933
|
+
test('POST /v1/routes/transfers/vault', async () => {
|
|
2686
2934
|
const client = Client.create()
|
|
2687
2935
|
const json = {
|
|
2688
2936
|
amount: '1000000',
|
|
@@ -2694,9 +2942,9 @@ describe('narrows responses by status', () => {
|
|
|
2694
2942
|
vaultAddress: `0x${'f4'.repeat(20)}`,
|
|
2695
2943
|
} as const
|
|
2696
2944
|
// @ts-expect-error `Idempotency-Key` is required for vault transfer creation.
|
|
2697
|
-
void client.v1.
|
|
2698
|
-
const res = await client.v1.
|
|
2699
|
-
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' },
|
|
2700
2948
|
json,
|
|
2701
2949
|
})
|
|
2702
2950
|
|
|
@@ -2708,7 +2956,7 @@ describe('narrows responses by status', () => {
|
|
|
2708
2956
|
}
|
|
2709
2957
|
})
|
|
2710
2958
|
|
|
2711
|
-
test('POST /v1/
|
|
2959
|
+
test('POST /v1/routes/transfers/zone', async () => {
|
|
2712
2960
|
const client = Client.create()
|
|
2713
2961
|
const json = {
|
|
2714
2962
|
amount: '1000000',
|
|
@@ -2722,9 +2970,9 @@ describe('narrows responses by status', () => {
|
|
|
2722
2970
|
sourceToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
2723
2971
|
} as const
|
|
2724
2972
|
// @ts-expect-error `Idempotency-Key` is required for Zone transfer creation.
|
|
2725
|
-
void client.v1.
|
|
2726
|
-
const res = await client.v1.
|
|
2727
|
-
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' },
|
|
2728
2976
|
json,
|
|
2729
2977
|
})
|
|
2730
2978
|
|
|
@@ -2736,10 +2984,10 @@ describe('narrows responses by status', () => {
|
|
|
2736
2984
|
}
|
|
2737
2985
|
})
|
|
2738
2986
|
|
|
2739
|
-
test('GET /v1/
|
|
2987
|
+
test('GET /v1/routes/transfers/:id', async () => {
|
|
2740
2988
|
const client = Client.create()
|
|
2741
|
-
const res = await client.v1.
|
|
2742
|
-
param: { id: '
|
|
2989
|
+
const res = await client.v1.routes.transfers[':id{rtr_[A-Za-z0-9_-]+}'].$get({
|
|
2990
|
+
param: { id: 'rtr_test' },
|
|
2743
2991
|
})
|
|
2744
2992
|
|
|
2745
2993
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 502 | PublicAccessStatus>()
|
|
@@ -2749,10 +2997,10 @@ describe('narrows responses by status', () => {
|
|
|
2749
2997
|
const json = await res.json()
|
|
2750
2998
|
expectTypeOf(json.id).toEqualTypeOf<string>()
|
|
2751
2999
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2752
|
-
z.output<typeof
|
|
3000
|
+
z.output<typeof RoutesTransfers.schema.getRoutesTransfer.Response>['status']
|
|
2753
3001
|
>()
|
|
2754
3002
|
expectTypeOf(json.statusReason).toEqualTypeOf<
|
|
2755
|
-
z.output<typeof
|
|
3003
|
+
z.output<typeof RoutesTransfers.schema.getRoutesTransfer.Response>['statusReason']
|
|
2756
3004
|
>()
|
|
2757
3005
|
// @ts-expect-error `action` is a creation-only field
|
|
2758
3006
|
void json.action
|
|
@@ -2761,7 +3009,7 @@ describe('narrows responses by status', () => {
|
|
|
2761
3009
|
}
|
|
2762
3010
|
case 404: {
|
|
2763
3011
|
const json = await res.json()
|
|
2764
|
-
expectTypeOf(json.error.code).toEqualTypeOf<'
|
|
3012
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'routes_transfer_not_found'>()
|
|
2765
3013
|
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
2766
3014
|
void json
|
|
2767
3015
|
return
|
|
@@ -2769,13 +3017,17 @@ describe('narrows responses by status', () => {
|
|
|
2769
3017
|
}
|
|
2770
3018
|
})
|
|
2771
3019
|
|
|
2772
|
-
test('POST /v1/
|
|
3020
|
+
test('POST /v1/routes/transfers/:id/source-transactions', async () => {
|
|
2773
3021
|
const client = Client.create()
|
|
2774
|
-
const
|
|
2775
|
-
'source-transactions'
|
|
2776
|
-
|
|
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({
|
|
2777
3029
|
json: { transactionHash: `0x${'51'.repeat(32)}` },
|
|
2778
|
-
param: { id: '
|
|
3030
|
+
param: { id: 'rtr_test' },
|
|
2779
3031
|
})
|
|
2780
3032
|
|
|
2781
3033
|
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 404 | 409 | 501 | 502 | PublicAccessStatus>()
|
|
@@ -2786,7 +3038,7 @@ describe('narrows responses by status', () => {
|
|
|
2786
3038
|
expectTypeOf(json.sourceTransactionHashes).toEqualTypeOf<string[] | undefined>()
|
|
2787
3039
|
expectTypeOf(json.status).toEqualTypeOf<
|
|
2788
3040
|
z.output<
|
|
2789
|
-
typeof
|
|
3041
|
+
typeof RoutesTransfers.schema.registerRoutesTransferSourceTransaction.Response
|
|
2790
3042
|
>['status']
|
|
2791
3043
|
>()
|
|
2792
3044
|
void json
|
|
@@ -2795,7 +3047,7 @@ describe('narrows responses by status', () => {
|
|
|
2795
3047
|
case 409: {
|
|
2796
3048
|
const json = await res.json()
|
|
2797
3049
|
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
2798
|
-
| '
|
|
3050
|
+
| 'routes_transfer_not_awaiting_source'
|
|
2799
3051
|
| 'source_transaction_conflict'
|
|
2800
3052
|
| 'source_transaction_pending'
|
|
2801
3053
|
>()
|
|
@@ -3382,6 +3634,9 @@ describe('narrows responses by status', () => {
|
|
|
3382
3634
|
expectTypeOf(json.data[0]!.address).toEqualTypeOf<
|
|
3383
3635
|
z.output<typeof VerifiedTokens.schema.Token>['address']
|
|
3384
3636
|
>()
|
|
3637
|
+
expectTypeOf(json.data[0]!.id).toEqualTypeOf<
|
|
3638
|
+
z.output<typeof VerifiedTokens.schema.Token>['id']
|
|
3639
|
+
>()
|
|
3385
3640
|
void json
|
|
3386
3641
|
return
|
|
3387
3642
|
}
|
|
@@ -3446,6 +3701,7 @@ describe('narrows responses by status', () => {
|
|
|
3446
3701
|
expectTypeOf(json.address).toEqualTypeOf<
|
|
3447
3702
|
z.output<typeof VerifiedTokens.schema.Token>['address']
|
|
3448
3703
|
>()
|
|
3704
|
+
expectTypeOf(json.id).toEqualTypeOf<z.output<typeof VerifiedTokens.schema.Token>['id']>()
|
|
3449
3705
|
void json
|
|
3450
3706
|
return
|
|
3451
3707
|
}
|
|
@@ -3475,13 +3731,48 @@ describe('narrows responses by status', () => {
|
|
|
3475
3731
|
}
|
|
3476
3732
|
})
|
|
3477
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
|
+
|
|
3478
3769
|
test('GET /v1/indexer/query', async () => {
|
|
3479
3770
|
const client = Client.create()
|
|
3480
3771
|
const res = await client.v1.indexer.query.$get({
|
|
3481
3772
|
query: { chainId: '42431', sql: 'select 1' },
|
|
3482
3773
|
})
|
|
3483
3774
|
|
|
3484
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 422 | PaidAccessStatus>()
|
|
3775
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | 422 | 502 | 504 | PaidAccessStatus>()
|
|
3485
3776
|
|
|
3486
3777
|
switch (res.status) {
|
|
3487
3778
|
case 200: {
|
|
@@ -3502,7 +3793,9 @@ describe('narrows responses by status', () => {
|
|
|
3502
3793
|
expectTypeOf(json.error).toEqualTypeOf<string>()
|
|
3503
3794
|
expectTypeOf(json.ok).toEqualTypeOf<false>()
|
|
3504
3795
|
} else {
|
|
3505
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3796
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3797
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported'>
|
|
3798
|
+
>()
|
|
3506
3799
|
}
|
|
3507
3800
|
void json
|
|
3508
3801
|
return
|
|
@@ -3514,6 +3807,37 @@ describe('narrows responses by status', () => {
|
|
|
3514
3807
|
void json
|
|
3515
3808
|
return
|
|
3516
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>()
|
|
3517
3841
|
}
|
|
3518
3842
|
})
|
|
3519
3843
|
|
|
@@ -3582,17 +3906,18 @@ describe('narrows responses by status', () => {
|
|
|
3582
3906
|
}
|
|
3583
3907
|
})
|
|
3584
3908
|
|
|
3585
|
-
test('POST /rpc
|
|
3909
|
+
test('POST /rpc', async () => {
|
|
3586
3910
|
const client = Client.create()
|
|
3587
|
-
const res = await client.rpc
|
|
3588
|
-
|
|
3911
|
+
const res = await client.rpc.$post({
|
|
3912
|
+
json: { jsonrpc: '2.0', method: 'eth_chainId', params: [] },
|
|
3589
3913
|
})
|
|
3590
3914
|
|
|
3591
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | PublicAccessStatus>()
|
|
3915
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 204 | 400 | 413 | 502 | PublicAccessStatus>()
|
|
3592
3916
|
|
|
3593
3917
|
switch (res.status) {
|
|
3594
3918
|
case 200: {
|
|
3595
3919
|
const json = await res.json()
|
|
3920
|
+
if (json === null) return
|
|
3596
3921
|
if (Array.isArray(json))
|
|
3597
3922
|
expectTypeOf(json[0]!.jsonrpc).toEqualTypeOf<
|
|
3598
3923
|
z.output<typeof Rpc.schema.Response>['jsonrpc']
|
|
@@ -3604,27 +3929,44 @@ describe('narrows responses by status', () => {
|
|
|
3604
3929
|
void json
|
|
3605
3930
|
return
|
|
3606
3931
|
}
|
|
3932
|
+
case 204:
|
|
3933
|
+
return
|
|
3607
3934
|
case 400: {
|
|
3608
3935
|
const json = await res.json()
|
|
3609
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3936
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3937
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported'>
|
|
3938
|
+
>()
|
|
3610
3939
|
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3611
3940
|
void json
|
|
3612
3941
|
return
|
|
3613
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
|
+
}
|
|
3614
3954
|
}
|
|
3615
3955
|
})
|
|
3616
3956
|
|
|
3617
3957
|
test('POST /rpc/:chain testnet shortcut', async () => {
|
|
3618
3958
|
const client = Client.create()
|
|
3619
|
-
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: [] },
|
|
3620
3961
|
param: { chain: 'testnet' },
|
|
3621
3962
|
})
|
|
3622
3963
|
|
|
3623
|
-
expectTypeOf(res.status).toEqualTypeOf<200 | 400 | PublicAccessStatus>()
|
|
3964
|
+
expectTypeOf(res.status).toEqualTypeOf<200 | 204 | 400 | 413 | 502 | PublicAccessStatus>()
|
|
3624
3965
|
|
|
3625
3966
|
switch (res.status) {
|
|
3626
3967
|
case 200: {
|
|
3627
3968
|
const json = await res.json()
|
|
3969
|
+
if (json === null) return
|
|
3628
3970
|
if (Array.isArray(json))
|
|
3629
3971
|
expectTypeOf(json[0]!.jsonrpc).toEqualTypeOf<
|
|
3630
3972
|
z.output<typeof Rpc.schema.Response>['jsonrpc']
|
|
@@ -3636,13 +3978,28 @@ describe('narrows responses by status', () => {
|
|
|
3636
3978
|
void json
|
|
3637
3979
|
return
|
|
3638
3980
|
}
|
|
3981
|
+
case 204:
|
|
3982
|
+
return
|
|
3639
3983
|
case 400: {
|
|
3640
3984
|
const json = await res.json()
|
|
3641
|
-
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3985
|
+
expectTypeOf(json.error.code).toEqualTypeOf<
|
|
3986
|
+
Access400<'chain_id_invalid' | 'chain_id_unsupported'>
|
|
3987
|
+
>()
|
|
3642
3988
|
expectTypeOf(json.error.message).toEqualTypeOf<string>()
|
|
3643
3989
|
void json
|
|
3644
3990
|
return
|
|
3645
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
|
+
}
|
|
3646
4003
|
}
|
|
3647
4004
|
})
|
|
3648
4005
|
|
|
@@ -3651,8 +4008,14 @@ describe('narrows responses by status', () => {
|
|
|
3651
4008
|
const res = await client.v1.addresses[':address'].activities.$get({
|
|
3652
4009
|
param: { address: '0x0000000000000000000000000000000000000000' },
|
|
3653
4010
|
query: {
|
|
4011
|
+
'amount.from': '1000000',
|
|
4012
|
+
'amount.to': '2000000',
|
|
3654
4013
|
chainId: '4217',
|
|
3655
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',
|
|
3656
4019
|
},
|
|
3657
4020
|
})
|
|
3658
4021
|
|
|
@@ -3709,6 +4072,14 @@ describe('narrows responses by status', () => {
|
|
|
3709
4072
|
expectTypeOf(json.data[0]!.type).toEqualTypeOf<Webhooks.EventType>()
|
|
3710
4073
|
void json
|
|
3711
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
|
+
}
|
|
3712
4083
|
})
|
|
3713
4084
|
|
|
3714
4085
|
test('POST /v1/webhooks', async () => {
|
|
@@ -3716,9 +4087,9 @@ describe('narrows responses by status', () => {
|
|
|
3716
4087
|
void client.v1.webhooks.$post({
|
|
3717
4088
|
json: {
|
|
3718
4089
|
destination: { type: 'url', url: 'https://example.com/webhook' },
|
|
3719
|
-
eventType: '
|
|
4090
|
+
eventType: 'routes:deposit.updated',
|
|
3720
4091
|
filters: {
|
|
3721
|
-
depositAddressId: '
|
|
4092
|
+
depositAddressId: 'rda_001785792000000_2ZPE2gvateYEQ0dQslgvkhjx',
|
|
3722
4093
|
recipient: `0x${'11'.repeat(20)}`,
|
|
3723
4094
|
status: 'completed',
|
|
3724
4095
|
},
|
|
@@ -3727,9 +4098,9 @@ describe('narrows responses by status', () => {
|
|
|
3727
4098
|
void client.v1.webhooks.$post({
|
|
3728
4099
|
json: {
|
|
3729
4100
|
destination: { type: 'url', url: 'https://example.com/webhook' },
|
|
3730
|
-
eventType: '
|
|
4101
|
+
eventType: 'routes:transfer.updated',
|
|
3731
4102
|
filters: {
|
|
3732
|
-
id: '
|
|
4103
|
+
id: 'rtr_001785792000000_2ZPE2gvateYEQ0dQslgvkhjx',
|
|
3733
4104
|
status: 'completed',
|
|
3734
4105
|
},
|
|
3735
4106
|
},
|
|
@@ -3774,6 +4145,10 @@ describe('narrows responses by status', () => {
|
|
|
3774
4145
|
'api_key_forbidden' | 'api_key_ip_forbidden' | 'limit_exceeded'
|
|
3775
4146
|
>()
|
|
3776
4147
|
}
|
|
4148
|
+
if (res.status === 404) {
|
|
4149
|
+
const json = await res.json()
|
|
4150
|
+
expectTypeOf(json.error.code).toEqualTypeOf<'webhooks_not_enabled'>()
|
|
4151
|
+
}
|
|
3777
4152
|
})
|
|
3778
4153
|
|
|
3779
4154
|
test('GET /v1/webhooks', async () => {
|
|
@@ -3798,6 +4173,14 @@ describe('narrows responses by status', () => {
|
|
|
3798
4173
|
>()
|
|
3799
4174
|
void json
|
|
3800
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
|
+
}
|
|
3801
4184
|
})
|
|
3802
4185
|
|
|
3803
4186
|
test('GET /v1/webhooks/:id', async () => {
|
|
@@ -3819,6 +4202,14 @@ describe('narrows responses by status', () => {
|
|
|
3819
4202
|
>()
|
|
3820
4203
|
void json
|
|
3821
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
|
+
}
|
|
3822
4213
|
})
|
|
3823
4214
|
|
|
3824
4215
|
test('GET /v1/webhooks/:id/deliveries', async () => {
|
|
@@ -3840,6 +4231,14 @@ describe('narrows responses by status', () => {
|
|
|
3840
4231
|
>()
|
|
3841
4232
|
void json
|
|
3842
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
|
+
}
|
|
3843
4242
|
})
|
|
3844
4243
|
|
|
3845
4244
|
test('POST /v1/webhooks/:id/ping', async () => {
|
|
@@ -3857,6 +4256,14 @@ describe('narrows responses by status', () => {
|
|
|
3857
4256
|
>()
|
|
3858
4257
|
void json
|
|
3859
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
|
+
}
|
|
3860
4267
|
})
|
|
3861
4268
|
|
|
3862
4269
|
test('POST /v1/webhooks/:id/deliveries/:deliveryId/retry', async () => {
|
|
@@ -3876,6 +4283,16 @@ describe('narrows responses by status', () => {
|
|
|
3876
4283
|
>()
|
|
3877
4284
|
void json
|
|
3878
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
|
+
}
|
|
3879
4296
|
})
|
|
3880
4297
|
|
|
3881
4298
|
test('PATCH /v1/webhooks/:id', async () => {
|
|
@@ -3910,6 +4327,10 @@ describe('narrows responses by status', () => {
|
|
|
3910
4327
|
>
|
|
3911
4328
|
>()
|
|
3912
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
|
+
}
|
|
3913
4334
|
})
|
|
3914
4335
|
|
|
3915
4336
|
test('DELETE /v1/webhooks/:id', async () => {
|
|
@@ -3927,6 +4348,14 @@ describe('narrows responses by status', () => {
|
|
|
3927
4348
|
>()
|
|
3928
4349
|
void json
|
|
3929
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
|
+
}
|
|
3930
4359
|
})
|
|
3931
4360
|
|
|
3932
4361
|
test('POST /v1/orgs/:orgId/webhooks', async () => {
|
|
@@ -4021,13 +4450,13 @@ describe('narrows responses by status', () => {
|
|
|
4021
4450
|
>()
|
|
4022
4451
|
if (json.envelope.type === 'block:created')
|
|
4023
4452
|
expectTypeOf(json.envelope.data.number).toEqualTypeOf<number>()
|
|
4024
|
-
if (json.envelope.type === '
|
|
4453
|
+
if (json.envelope.type === 'routes:deposit.updated')
|
|
4025
4454
|
expectTypeOf(json.envelope.data.status).toEqualTypeOf<
|
|
4026
|
-
z.output<typeof Webhooks.schema.
|
|
4455
|
+
z.output<typeof Webhooks.schema.RoutesDepositEvent>['status']
|
|
4027
4456
|
>()
|
|
4028
|
-
if (json.envelope.type === '
|
|
4457
|
+
if (json.envelope.type === 'routes:transfer.updated')
|
|
4029
4458
|
expectTypeOf(json.envelope.data.status).toEqualTypeOf<
|
|
4030
|
-
z.output<typeof Webhooks.schema.
|
|
4459
|
+
z.output<typeof Webhooks.schema.RoutesTransferEvent>['status']
|
|
4031
4460
|
>()
|
|
4032
4461
|
expectTypeOf(json.requestUrl).toEqualTypeOf<string>()
|
|
4033
4462
|
void json
|