tapimo 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/ApiKey.js +1 -1
- package/dist/ApiKey.js.map +1 -1
- package/dist/ApiKeys.d.ts +95 -14
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +360 -49
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +12457 -10365
- 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 -549
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/App.js +26 -5
- package/dist/admin/App.js.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +159 -7
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +95 -43
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +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 +88 -88
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
- package/dist/admin/apps/verified-tokens.js +3 -3
- package/dist/admin/apps/verified-tokens.js.map +1 -1
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +129 -69
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +5 -2
- package/dist/analytics/Analytics.d.ts.map +1 -1
- package/dist/analytics/Analytics.js +31 -1
- package/dist/analytics/Analytics.js.map +1 -1
- package/dist/analytics/tables/requestEvents.d.ts +2 -1
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
- package/dist/analytics/tables/requestEvents.js +10 -1
- package/dist/analytics/tables/requestEvents.js.map +1 -1
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts +72 -0
- package/dist/analytics/tables/routesLifecycleIntervals.d.ts.map +1 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js +56 -0
- package/dist/analytics/tables/routesLifecycleIntervals.js.map +1 -0
- package/dist/apps/Zones.d.ts +21 -12526
- package/dist/apps/Zones.d.ts.map +1 -1
- package/dist/apps/Zones.js +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 +364 -34
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +495 -190
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +72 -0
- package/dist/apps/data/routes/addresses.d.ts.map +1 -1
- package/dist/apps/data/routes/blocks.d.ts +37 -37
- package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
- package/dist/apps/data/routes/coingecko.js +47 -21
- package/dist/apps/data/routes/coingecko.js.map +1 -1
- package/dist/apps/data/routes/earn.d.ts +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 +5 -0
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +31 -19
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +125 -0
- package/dist/apps/data/routes/indexer.d.ts.map +1 -1
- package/dist/apps/data/routes/indexer.js +83 -27
- package/dist/apps/data/routes/indexer.js.map +1 -1
- package/dist/apps/data/routes/rpc.d.ts +507 -33
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +266 -156
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +47 -15
- package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
- package/dist/apps/data/routes/tokenlist.js +68 -11
- package/dist/apps/data/routes/tokenlist.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +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 +28 -12
- 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 +30 -30
- package/dist/apps/data/routes/verified-tokens.d.ts +9 -9
- 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 +613 -176
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +291 -195
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/data/routes/zones.d.ts.map +1 -1
- package/dist/apps/data/routes/zones.js +20 -12
- package/dist/apps/data/routes/zones.js.map +1 -1
- package/dist/apps/docs/reference.js +2 -2
- package/dist/apps/docs/reference.js.map +1 -1
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/management/App.d.ts +3763 -3385
- 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 +106 -4
- 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 +77 -2
- 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 +4 -4
- 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 +18 -2
- 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 +4 -4
- 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 +2 -2
- package/dist/apps/management/routes/webhooks.d.ts +280 -214
- 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.js +7 -7
- package/dist/apps/mcp.js.map +1 -1
- package/dist/apps/mpp/App.d.ts.map +1 -1
- package/dist/apps/mpp/App.js +35 -7
- package/dist/apps/mpp/App.js.map +1 -1
- package/dist/apps/mpp/internal/Adapter.d.ts +2 -0
- package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Adapter.js +30 -1
- package/dist/apps/mpp/internal/Adapter.js.map +1 -1
- package/dist/apps/mpp/internal/Policy.d.ts +22 -4
- package/dist/apps/mpp/internal/Policy.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Policy.js +24 -6
- package/dist/apps/mpp/internal/Policy.js.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.d.ts +3 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -1
- package/dist/apps/mpp/internal/Sponsorship.js +6 -3
- package/dist/apps/mpp/internal/Sponsorship.js.map +1 -1
- package/dist/apps/relay/App.d.ts +2 -0
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +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 +7 -7
- package/dist/apps/routes/routes/chains.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/chains.js +25 -25
- package/dist/apps/routes/routes/chains.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/deposit-addresses.d.ts +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 +19 -16
- package/dist/apps/routes/routes/quotes.d.ts.map +1 -0
- package/dist/apps/{funding → routes}/routes/quotes.js +55 -38
- package/dist/apps/routes/routes/quotes.js.map +1 -0
- package/dist/apps/{funding → routes}/routes/transfers.d.ts +379 -74
- 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 +1030 -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/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 +48 -12
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +603 -175
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/BetterAuth.d.ts +1488 -0
- package/dist/internal/BetterAuth.d.ts.map +1 -0
- package/dist/internal/BetterAuth.js +253 -0
- package/dist/internal/BetterAuth.js.map +1 -0
- package/dist/internal/Cache.d.ts +2 -0
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +2 -0
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/EarnRates.d.ts +26 -3
- package/dist/internal/EarnRates.d.ts.map +1 -1
- package/dist/internal/EarnRates.js +84 -19
- package/dist/internal/EarnRates.js.map +1 -1
- package/dist/internal/EarnSharePrices.d.ts +120 -0
- package/dist/internal/EarnSharePrices.d.ts.map +1 -0
- package/dist/internal/EarnSharePrices.js +179 -0
- package/dist/internal/EarnSharePrices.js.map +1 -0
- package/dist/internal/EarnVaults.d.ts +4 -0
- package/dist/internal/EarnVaults.d.ts.map +1 -1
- package/dist/internal/EarnVaults.js +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 +8 -3
- package/src/admin/apps/verified-tokens.ts +3 -3
- package/src/admin/ui/plugin.ts +1 -2
- package/src/admin/ui/src/components/RewardCampaignForm.tsx +1009 -0
- package/src/admin/ui/src/lib/config.ts +11 -2
- package/src/admin/ui/src/lib/earn-vaults.ts +2 -2
- package/src/admin/ui/src/lib/organizations.test.ts +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/routeTree.gen.ts +63 -0
- package/src/admin/ui/src/routes/__root.tsx +12 -1
- package/src/admin/ui/src/routes/api-keys.tsx +196 -84
- package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +105 -70
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +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.generated.ts +144 -69
- package/src/analytics/Analytics.test.ts +108 -18
- package/src/analytics/Analytics.ts +38 -6
- package/src/analytics/tables/requestEvents.test.ts +100 -0
- package/src/analytics/tables/requestEvents.ts +10 -1
- package/src/analytics/tables/routesLifecycleIntervals.ts +140 -0
- package/src/apps/Zones.test.ts +15 -0
- package/src/apps/Zones.ts +52 -5
- package/src/apps/composition.test.ts +68 -60
- package/src/apps/data/App.test.ts +154 -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 +224 -0
- package/src/apps/data/routes/fee-amm.ts +191 -160
- package/src/apps/data/routes/indexer.test.ts +389 -0
- package/src/apps/data/routes/indexer.ts +165 -69
- package/src/apps/data/routes/receipts.test.ts +1 -1
- package/src/apps/data/routes/rpc.test.ts +352 -8
- package/src/apps/data/routes/rpc.ts +407 -219
- package/src/apps/data/routes/rpc.zone.test.ts +340 -0
- package/src/apps/data/routes/tokenlist.test.ts +285 -0
- package/src/apps/data/routes/tokenlist.ts +173 -88
- package/src/apps/data/routes/tokens.test.ts +93 -3
- package/src/apps/data/routes/tokens.ts +39 -23
- package/src/apps/data/routes/transactions.test.ts +1 -1
- package/src/apps/data/routes/transfers.test.ts +56 -24
- package/src/apps/data/routes/transfers.ts +19 -8
- package/src/apps/data/routes/valuation.test.ts +1 -1
- package/src/apps/data/routes/verified-tokens.test.ts +345 -0
- package/src/apps/data/routes/verified-tokens.ts +99 -29
- package/src/apps/data/routes/webhooks.test.ts +645 -83
- package/src/apps/data/routes/webhooks.ts +1089 -857
- 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/webhooks.test.ts +49 -26
- package/src/apps/management/routes/webhooks.ts +78 -22
- package/src/apps/mcp.test.ts +6 -6
- package/src/apps/mcp.ts +7 -7
- package/src/apps/mpp/App.ts +37 -7
- package/src/apps/mpp/Mpp.test.ts +49 -8
- package/src/apps/mpp/Mpp.zone.test.ts +219 -0
- package/src/apps/mpp/internal/Adapter.ts +34 -0
- package/src/apps/mpp/internal/Policy.test.ts +86 -31
- package/src/apps/mpp/internal/Policy.ts +49 -7
- package/src/apps/mpp/internal/Sponsorship.test.ts +207 -0
- package/src/apps/mpp/internal/Sponsorship.ts +9 -3
- package/src/apps/relay/App.test.ts +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 +1476 -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} +316 -46
- package/src/db/tables/routesDeposits.ts +1062 -0
- package/src/db/tables/routesIdempotency.test.ts +796 -0
- package/src/db/tables/routesIdempotency.ts +496 -0
- package/src/db/tables/routesSubsidies.test.ts +120 -0
- package/src/db/tables/routesSubsidies.ts +71 -0
- package/src/db/tables/{fundingTransferEvents.ts → routesTransferEvents.ts} +4 -4
- package/src/db/tables/routesTransferSubsidies.ts +38 -0
- package/src/db/tables/routesTransferSubsidyNonces.ts +124 -0
- package/src/db/tables/routesTransferTransactions.test.ts +195 -0
- package/src/db/tables/{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/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 +1564 -9
- package/src/internal/Auth.ts +833 -239
- package/src/internal/BetterAuth.test.ts +242 -0
- package/src/internal/BetterAuth.ts +349 -0
- package/src/internal/Cache.ts +2 -0
- package/src/internal/EarnRates.test.ts +17 -0
- package/src/internal/EarnRates.ts +124 -31
- package/src/internal/EarnSharePrices.test.ts +182 -0
- package/src/internal/EarnSharePrices.ts +313 -0
- package/src/internal/EarnVaults.test.ts +21 -0
- package/src/internal/EarnVaults.ts +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 +165 -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
|
@@ -1,856 +0,0 @@
|
|
|
1
|
-
import { AbiEvent, AbiFunction, Address, Hash, Hex } from 'ox'
|
|
2
|
-
import {
|
|
3
|
-
BlockNotFoundError,
|
|
4
|
-
parseEventLogs,
|
|
5
|
-
publicActions,
|
|
6
|
-
TransactionReceiptNotFoundError,
|
|
7
|
-
} from 'viem'
|
|
8
|
-
import * as z from 'zod/mini'
|
|
9
|
-
|
|
10
|
-
import * as Viem from '../../Viem.js'
|
|
11
|
-
import * as Action from '../Action.js'
|
|
12
|
-
import type * as Catalog from '../Catalog.js'
|
|
13
|
-
import * as Chain from '../Chain.js'
|
|
14
|
-
import * as FundingProvider from '../Provider.js'
|
|
15
|
-
|
|
16
|
-
const approve = AbiFunction.from('function approve(address spender, uint256 amount)')
|
|
17
|
-
const defaultFetch: FundingProvider.Fetch = (input, init) => globalThis.fetch(input, init)
|
|
18
|
-
const destinationChainId = 'eip155:4217'
|
|
19
|
-
const destinationEid = 30_410
|
|
20
|
-
const destinationPool = '0x8c76e2f6c5ceda9aa7772e7eff30280226c44392'
|
|
21
|
-
const destinationToken = '0x20C000000000000000000000b9537d11c60E8b50'
|
|
22
|
-
const layerZeroEndpoint = '0x1a44076050125825900e736c501f859c50fE728c'
|
|
23
|
-
const oftReceived = AbiEvent.from(
|
|
24
|
-
'event OFTReceived(bytes32 indexed guid, uint32 srcEid, address indexed toAddress, uint256 amountReceivedLD)',
|
|
25
|
-
)
|
|
26
|
-
const oftSent = AbiEvent.from(
|
|
27
|
-
'event OFTSent(bytes32 indexed guid, uint32 dstEid, address indexed fromAddress, uint256 amountSentLD, uint256 amountReceivedLD)',
|
|
28
|
-
)
|
|
29
|
-
const packetSent = AbiEvent.from(
|
|
30
|
-
'event PacketSent(bytes encodedPayload, bytes options, address sendLibrary)',
|
|
31
|
-
)
|
|
32
|
-
const quoteOft = AbiFunction.from(
|
|
33
|
-
'function quoteOFT((uint32 dstEid, bytes32 to, uint256 amountLD, uint256 minAmountLD, bytes extraOptions, bytes composeMsg, bytes oftCmd) sendParam) view returns ((uint256 minAmountLD, uint256 maxAmountLD) limit, (int256 feeAmountLD, string description)[] oftFeeDetails, (uint256 amountSentLD, uint256 amountReceivedLD) receipt)',
|
|
34
|
-
)
|
|
35
|
-
const quoteSend = AbiFunction.from(
|
|
36
|
-
'function quoteSend((uint32 dstEid, bytes32 to, uint256 amountLD, uint256 minAmountLD, bytes extraOptions, bytes composeMsg, bytes oftCmd) sendParam, bool payInLzToken) view returns ((uint256 nativeFee, uint256 lzTokenFee) fee)',
|
|
37
|
-
)
|
|
38
|
-
const sendToken = AbiFunction.from(
|
|
39
|
-
'function sendToken((uint32 dstEid, bytes32 to, uint256 amountLD, uint256 minAmountLD, bytes extraOptions, bytes composeMsg, bytes oftCmd) sendParam, (uint256 nativeFee, uint256 lzTokenFee) fee, address refundAddress) payable returns ((bytes32 guid, uint64 nonce, (uint256 nativeFee, uint256 lzTokenFee) fee) msgReceipt, (uint256 amountSentLD, uint256 amountReceivedLD) oftReceipt, (uint72 ticketId, bytes passengerBytes) ticket)',
|
|
40
|
-
)
|
|
41
|
-
const quoteTtlMs = 60_000
|
|
42
|
-
const maximumLogBlockRange = 100_000n
|
|
43
|
-
const sourceEids = {
|
|
44
|
-
'eip155:1': 30_101,
|
|
45
|
-
'eip155:8453': 30_184,
|
|
46
|
-
} as const
|
|
47
|
-
const transferEvent = AbiEvent.from(
|
|
48
|
-
'event Transfer(address indexed from, address indexed to, uint256 value)',
|
|
49
|
-
)
|
|
50
|
-
const zeroAddress = '0x0000000000000000000000000000000000000000'
|
|
51
|
-
|
|
52
|
-
/** Stargate provider schemas. */
|
|
53
|
-
export namespace schema {
|
|
54
|
-
/** Configuration captured from one selected Stargate route. */
|
|
55
|
-
export const Configuration = z
|
|
56
|
-
.strictObject({
|
|
57
|
-
destinationPoolAddress: z.optional(
|
|
58
|
-
z
|
|
59
|
-
.string()
|
|
60
|
-
.check(
|
|
61
|
-
z.regex(/^0x[0-9a-fA-F]{40}$/),
|
|
62
|
-
z.describe('Stargate pool contract on the Tempo destination chain.'),
|
|
63
|
-
),
|
|
64
|
-
),
|
|
65
|
-
poolAddress: z
|
|
66
|
-
.string()
|
|
67
|
-
.check(
|
|
68
|
-
z.regex(/^0x[0-9a-fA-F]{40}$/),
|
|
69
|
-
z.describe('Stargate pool contract on the source chain.'),
|
|
70
|
-
),
|
|
71
|
-
sourceEid: z.optional(
|
|
72
|
-
z
|
|
73
|
-
.number()
|
|
74
|
-
.check(z.int(), z.positive(), z.describe('LayerZero endpoint ID for the source chain.')),
|
|
75
|
-
),
|
|
76
|
-
})
|
|
77
|
-
.check(z.describe('Stargate configuration for one funding route.'))
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
type Deployment = {
|
|
81
|
-
destinationPool: Address.Address
|
|
82
|
-
pool: Address.Address
|
|
83
|
-
sourceEid: number
|
|
84
|
-
sourceToken: Address.Address
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
type SendParam = {
|
|
88
|
-
amountLD: bigint
|
|
89
|
-
composeMsg: Hex.Hex
|
|
90
|
-
dstEid: number
|
|
91
|
-
extraOptions: Hex.Hex
|
|
92
|
-
minAmountLD: bigint
|
|
93
|
-
oftCmd: Hex.Hex
|
|
94
|
-
to: Hex.Hex
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/** Creates a direct Stargate V2 OFT funding provider. */
|
|
98
|
-
export function stargate(options: stargate.Options = {}) {
|
|
99
|
-
const fetch = options.fetch ?? defaultFetch
|
|
100
|
-
const now = options.now ?? (() => new Date())
|
|
101
|
-
|
|
102
|
-
return FundingProvider.from({
|
|
103
|
-
id: 'stargate',
|
|
104
|
-
name: 'Stargate',
|
|
105
|
-
async getQuote({ candidate, route }, signal) {
|
|
106
|
-
const deployment = resolveDeployment({
|
|
107
|
-
configuration: candidate.configuration,
|
|
108
|
-
destinationChainId: route.destination.chain.id,
|
|
109
|
-
destinationTokenAddress: route.destination.address,
|
|
110
|
-
sourceChainId: route.source.chain.id,
|
|
111
|
-
sourceTokenAddress: route.source.address,
|
|
112
|
-
})
|
|
113
|
-
const sampledAt = now()
|
|
114
|
-
if (!deployment) return unavailable({ message: 'ROUTE_NOT_CONFIGURED', now: sampledAt })
|
|
115
|
-
|
|
116
|
-
const sendParam = createSendParam({
|
|
117
|
-
amount: candidate.sourceAmount.amount,
|
|
118
|
-
recipient: zeroAddress,
|
|
119
|
-
})
|
|
120
|
-
const [limit, feeDetails, receipt] = await rpcClient({
|
|
121
|
-
fetch,
|
|
122
|
-
signal,
|
|
123
|
-
urls: route.source.chain.rpcUrls,
|
|
124
|
-
}).readContract({
|
|
125
|
-
abi: [quoteOft],
|
|
126
|
-
address: deployment.pool,
|
|
127
|
-
args: [sendParam],
|
|
128
|
-
functionName: 'quoteOFT',
|
|
129
|
-
})
|
|
130
|
-
if (!isExactQuote({ amount: candidate.sourceAmount.amount, feeDetails, limit, receipt }))
|
|
131
|
-
return unavailable({ message: 'NO_EXACT_ROUTE', now: sampledAt })
|
|
132
|
-
|
|
133
|
-
return {
|
|
134
|
-
destinationAmountMin: receipt.amountReceivedLD.toString(),
|
|
135
|
-
destinationAmount: receipt.amountReceivedLD.toString(),
|
|
136
|
-
quality: quality(),
|
|
137
|
-
sampledAt: sampledAt.toISOString(),
|
|
138
|
-
status: 'available',
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
async prepareTransfer({ candidate, method, mode, recipient, sender }, signal) {
|
|
142
|
-
if (
|
|
143
|
-
method !== 'transaction' ||
|
|
144
|
-
mode !== 'exactSource' ||
|
|
145
|
-
!Address.validate(recipient, { strict: false }) ||
|
|
146
|
-
!Address.validate(sender, { strict: false })
|
|
147
|
-
)
|
|
148
|
-
throw new FundingProvider.ProviderConfigurationError()
|
|
149
|
-
|
|
150
|
-
const deployment = resolveDeployment({
|
|
151
|
-
configuration: candidate.configuration,
|
|
152
|
-
destinationChainId: candidate.destinationChain.id,
|
|
153
|
-
destinationTokenAddress: candidate.destinationToken.address,
|
|
154
|
-
sourceChainId: candidate.sourceChain.id,
|
|
155
|
-
sourceTokenAddress: candidate.sourceToken.address,
|
|
156
|
-
})
|
|
157
|
-
if (!deployment) throw new FundingProvider.ProviderUnavailableError()
|
|
158
|
-
const sendParam = createSendParam({ amount: candidate.sourceAmount.amount, recipient })
|
|
159
|
-
const rpc = rpcClient({ fetch, signal, urls: candidate.route.source.chain.rpcUrls })
|
|
160
|
-
const [[limit, feeDetails, receipt], messagingFee, destinationBlock] = await Promise.all([
|
|
161
|
-
rpc.readContract({
|
|
162
|
-
abi: [quoteOft],
|
|
163
|
-
address: deployment.pool,
|
|
164
|
-
args: [sendParam],
|
|
165
|
-
functionName: 'quoteOFT',
|
|
166
|
-
}),
|
|
167
|
-
rpc.readContract({
|
|
168
|
-
abi: [quoteSend],
|
|
169
|
-
account: sender as Address.Address,
|
|
170
|
-
address: deployment.pool,
|
|
171
|
-
args: [sendParam, false],
|
|
172
|
-
functionName: 'quoteSend',
|
|
173
|
-
}),
|
|
174
|
-
rpcClient({
|
|
175
|
-
fetch,
|
|
176
|
-
signal,
|
|
177
|
-
urls: candidate.route.destination.chain.rpcUrls,
|
|
178
|
-
}).getBlock({ blockTag: 'finalized', includeTransactions: false }),
|
|
179
|
-
])
|
|
180
|
-
if (!isExactQuote({ amount: candidate.sourceAmount.amount, feeDetails, limit, receipt }))
|
|
181
|
-
throw new FundingProvider.ProviderUnavailableError()
|
|
182
|
-
if (messagingFee.lzTokenFee !== 0n) throw new FundingProvider.ProviderPayloadError()
|
|
183
|
-
|
|
184
|
-
const action = {
|
|
185
|
-
calls: [
|
|
186
|
-
{
|
|
187
|
-
data: AbiFunction.encodeData(approve, [
|
|
188
|
-
deployment.pool,
|
|
189
|
-
BigInt(candidate.sourceAmount.amount),
|
|
190
|
-
]),
|
|
191
|
-
to: deployment.sourceToken,
|
|
192
|
-
value: '0x0',
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
data: AbiFunction.encodeData(sendToken, [sendParam, messagingFee, sender]),
|
|
196
|
-
to: deployment.pool,
|
|
197
|
-
value: Hex.fromNumber(messagingFee.nativeFee),
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
type: 'evm:calls' as const,
|
|
201
|
-
}
|
|
202
|
-
validateAction({
|
|
203
|
-
action,
|
|
204
|
-
configuration: candidate.configuration,
|
|
205
|
-
destinationTokenAddress: candidate.destinationToken.address,
|
|
206
|
-
recipient,
|
|
207
|
-
sender,
|
|
208
|
-
sourceAmount: candidate.sourceAmount.amount,
|
|
209
|
-
sourceChainId: candidate.sourceChain.id,
|
|
210
|
-
sourceTokenAddress: candidate.sourceToken.address,
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
const sampledAt = now()
|
|
214
|
-
return {
|
|
215
|
-
action,
|
|
216
|
-
destinationAmountMin: receipt.amountReceivedLD.toString(),
|
|
217
|
-
destinationAmount: receipt.amountReceivedLD.toString(),
|
|
218
|
-
expiresAt: new Date(sampledAt.getTime() + quoteTtlMs).toISOString(),
|
|
219
|
-
fees:
|
|
220
|
-
messagingFee.nativeFee === 0n
|
|
221
|
-
? []
|
|
222
|
-
: [
|
|
223
|
-
{
|
|
224
|
-
amount: messagingFee.nativeFee.toString(),
|
|
225
|
-
side: 'source' as const,
|
|
226
|
-
token: nativeToken(candidate.sourceChain.id),
|
|
227
|
-
},
|
|
228
|
-
],
|
|
229
|
-
providerState: {
|
|
230
|
-
destinationBlockNumber: destinationBlock.number.toString(),
|
|
231
|
-
routeConfiguration: candidate.configuration,
|
|
232
|
-
},
|
|
233
|
-
quality: quality(),
|
|
234
|
-
sampledAt: sampledAt.toISOString(),
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
validateTransferAction({ action, candidate, recipient, sender }) {
|
|
238
|
-
return {
|
|
239
|
-
nativeValues: validateAction({
|
|
240
|
-
action,
|
|
241
|
-
configuration: candidate.configuration,
|
|
242
|
-
destinationTokenAddress: candidate.destinationToken.address,
|
|
243
|
-
recipient,
|
|
244
|
-
sender,
|
|
245
|
-
sourceAmount: candidate.sourceAmount.amount,
|
|
246
|
-
sourceChainId: candidate.sourceChain.id,
|
|
247
|
-
sourceTokenAddress: candidate.sourceToken.address,
|
|
248
|
-
}),
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
async verifySourceTransaction(
|
|
252
|
-
{
|
|
253
|
-
destinationChain,
|
|
254
|
-
providerState,
|
|
255
|
-
routeConfiguration,
|
|
256
|
-
sourceChain,
|
|
257
|
-
transactionHash,
|
|
258
|
-
transfer,
|
|
259
|
-
},
|
|
260
|
-
signal,
|
|
261
|
-
) {
|
|
262
|
-
if (transfer.method !== 'transaction' || transfer.mode !== 'exactSource' || !transfer.sender)
|
|
263
|
-
return { type: 'invalid' }
|
|
264
|
-
const configuration = providerState?.['routeConfiguration'] ?? routeConfiguration
|
|
265
|
-
const evidence = await verifySourceTransaction({
|
|
266
|
-
configuration,
|
|
267
|
-
destinationTokenAddress: transfer.destinationToken.address,
|
|
268
|
-
fetch,
|
|
269
|
-
recipient: transfer.recipient,
|
|
270
|
-
sender: transfer.sender,
|
|
271
|
-
signal,
|
|
272
|
-
sourceAmount: transfer.sourceAmount.baseUnits,
|
|
273
|
-
sourceChain,
|
|
274
|
-
sourceTokenAddress: transfer.sourceToken.address,
|
|
275
|
-
transactionHash,
|
|
276
|
-
validAfter: transfer.quote.sampledAt,
|
|
277
|
-
})
|
|
278
|
-
if (evidence.type === 'invalid') return evidence
|
|
279
|
-
if (evidence.type !== 'verified') return { type: 'pending' }
|
|
280
|
-
const destinationBlockNumber =
|
|
281
|
-
typeof providerState?.['destinationBlockNumber'] === 'string' &&
|
|
282
|
-
/^\d+$/.test(providerState['destinationBlockNumber'])
|
|
283
|
-
? providerState['destinationBlockNumber']
|
|
284
|
-
: await blockNumberBefore({
|
|
285
|
-
chain: destinationChain,
|
|
286
|
-
fetch,
|
|
287
|
-
signal,
|
|
288
|
-
timestamp: transfer.quote.sampledAt,
|
|
289
|
-
})
|
|
290
|
-
return {
|
|
291
|
-
providerState: {
|
|
292
|
-
...providerState,
|
|
293
|
-
destinationBlockNumber,
|
|
294
|
-
routeConfiguration: configuration,
|
|
295
|
-
stargate: {
|
|
296
|
-
guid: evidence.guid,
|
|
297
|
-
sourceBlock: {
|
|
298
|
-
hash: evidence.sourceBlock.hash,
|
|
299
|
-
number: evidence.sourceBlock.number.toString(),
|
|
300
|
-
},
|
|
301
|
-
sourceEid: evidence.sourceEid,
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
type: 'verified',
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
})
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
export declare namespace stargate {
|
|
311
|
-
/** Stargate provider options. */
|
|
312
|
-
type Options = {
|
|
313
|
-
/** Fetch implementation override for chain RPC requests. */
|
|
314
|
-
fetch?: FundingProvider.Fetch | undefined
|
|
315
|
-
/** Clock override for deterministic tests. */
|
|
316
|
-
now?: (() => Date) | undefined
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/** Validates one direct Stargate action and returns its exact native-value allowance. */
|
|
321
|
-
export function validateAction(options: validateAction.Options): readonly Action.NativeValue[] {
|
|
322
|
-
try {
|
|
323
|
-
const action = Action.schema.EvmCalls.parse(options.action)
|
|
324
|
-
const deployment = resolveDeployment({
|
|
325
|
-
configuration: options.configuration,
|
|
326
|
-
destinationChainId,
|
|
327
|
-
destinationTokenAddress: options.destinationTokenAddress,
|
|
328
|
-
sourceChainId: options.sourceChainId,
|
|
329
|
-
sourceTokenAddress: options.sourceTokenAddress,
|
|
330
|
-
})
|
|
331
|
-
if (!deployment || action.calls.length !== 2) throw new FundingProvider.ProviderPayloadError()
|
|
332
|
-
const [approval, execution] = action.calls
|
|
333
|
-
if (
|
|
334
|
-
!Address.isEqual(approval!.to as Address.Address, deployment.sourceToken) ||
|
|
335
|
-
BigInt(approval!.value) !== 0n
|
|
336
|
-
)
|
|
337
|
-
throw new FundingProvider.ProviderPayloadError()
|
|
338
|
-
|
|
339
|
-
const [spender, approvalAmount] = AbiFunction.decodeData(approve, approval!.data as Hex.Hex)
|
|
340
|
-
if (
|
|
341
|
-
!Address.isEqual(spender, deployment.pool) ||
|
|
342
|
-
approvalAmount !== BigInt(options.sourceAmount)
|
|
343
|
-
)
|
|
344
|
-
throw new FundingProvider.ProviderPayloadError()
|
|
345
|
-
validateSend({
|
|
346
|
-
data: execution!.data as Hex.Hex,
|
|
347
|
-
nativeValue: BigInt(execution!.value),
|
|
348
|
-
pool: deployment.pool,
|
|
349
|
-
recipient: options.recipient,
|
|
350
|
-
sender: options.sender,
|
|
351
|
-
sourceAmount: options.sourceAmount,
|
|
352
|
-
to: execution!.to as Address.Address,
|
|
353
|
-
})
|
|
354
|
-
return [{ to: execution!.to, value: execution!.value }]
|
|
355
|
-
} catch (cause) {
|
|
356
|
-
if (cause instanceof FundingProvider.ProviderPayloadError) throw cause
|
|
357
|
-
throw new FundingProvider.ProviderPayloadError()
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export declare namespace validateAction {
|
|
362
|
-
/** Expected route terms for one Stargate action. */
|
|
363
|
-
type Options = {
|
|
364
|
-
/** Prepared Stargate action. */
|
|
365
|
-
action: Action.EvmCalls
|
|
366
|
-
/** Stargate configuration for the selected route. */
|
|
367
|
-
configuration?: Catalog.Configuration | undefined
|
|
368
|
-
/** Curated Tempo destination token. */
|
|
369
|
-
destinationTokenAddress: string
|
|
370
|
-
/** Tempo beneficiary. */
|
|
371
|
-
recipient: string
|
|
372
|
-
/** Source account and LayerZero refund recipient. */
|
|
373
|
-
sender: string
|
|
374
|
-
/** Exact source amount in base units. */
|
|
375
|
-
sourceAmount: string
|
|
376
|
-
/** Source chain CAIP-2 id. */
|
|
377
|
-
sourceChainId: string
|
|
378
|
-
/** Curated source token. */
|
|
379
|
-
sourceTokenAddress: string
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/** Verifies a submitted Stargate source transaction against stored transfer terms. */
|
|
384
|
-
export async function verifySourceTransaction(
|
|
385
|
-
options: verifySourceTransaction.Options,
|
|
386
|
-
): Promise<verifySourceTransaction.Result> {
|
|
387
|
-
const deployment = resolveDeployment({
|
|
388
|
-
configuration: options.configuration,
|
|
389
|
-
destinationChainId,
|
|
390
|
-
destinationTokenAddress: options.destinationTokenAddress,
|
|
391
|
-
sourceChainId: options.sourceChain.id,
|
|
392
|
-
sourceTokenAddress: options.sourceTokenAddress,
|
|
393
|
-
})
|
|
394
|
-
if (
|
|
395
|
-
!deployment ||
|
|
396
|
-
options.sourceChain.kind !== 'evm' ||
|
|
397
|
-
!Hash.validate(options.transactionHash) ||
|
|
398
|
-
!Address.validate(options.recipient, { strict: false }) ||
|
|
399
|
-
!Address.validate(options.sender, { strict: false })
|
|
400
|
-
)
|
|
401
|
-
return { type: 'invalid' }
|
|
402
|
-
|
|
403
|
-
const rpc = rpcClient({
|
|
404
|
-
fetch: options.fetch ?? defaultFetch,
|
|
405
|
-
signal: options.signal,
|
|
406
|
-
urls: options.sourceChain.rpcUrls,
|
|
407
|
-
})
|
|
408
|
-
const hash = options.transactionHash as Hex.Hex
|
|
409
|
-
const [chainId, receipt] = await Promise.all([
|
|
410
|
-
rpc.getChainId(),
|
|
411
|
-
rpc.getTransactionReceipt({ hash }).catch((cause) => {
|
|
412
|
-
if (cause instanceof TransactionReceiptNotFoundError) return undefined
|
|
413
|
-
throw cause
|
|
414
|
-
}),
|
|
415
|
-
])
|
|
416
|
-
if (chainId !== Number(Chain.eip155Id(options.sourceChain))) return { type: 'invalid' }
|
|
417
|
-
const block =
|
|
418
|
-
!receipt || receipt.blockNumber === null
|
|
419
|
-
? undefined
|
|
420
|
-
: await rpc
|
|
421
|
-
.getBlock({ blockNumber: receipt.blockNumber, includeTransactions: false })
|
|
422
|
-
.catch((cause) => {
|
|
423
|
-
if (cause instanceof BlockNotFoundError) return undefined
|
|
424
|
-
throw cause
|
|
425
|
-
})
|
|
426
|
-
if (
|
|
427
|
-
!receipt ||
|
|
428
|
-
receipt.blockNumber === null ||
|
|
429
|
-
!block ||
|
|
430
|
-
!Hex.isEqual(block.hash, receipt.blockHash)
|
|
431
|
-
) {
|
|
432
|
-
if (!options.sourceBlock) return { type: 'pending' }
|
|
433
|
-
const finalized = await rpc.getBlock({ blockTag: 'finalized', includeTransactions: false })
|
|
434
|
-
if (finalized.number < options.sourceBlock.number) return { type: 'pending' }
|
|
435
|
-
const canonical = await rpc
|
|
436
|
-
.getBlock({ blockNumber: options.sourceBlock.number, includeTransactions: false })
|
|
437
|
-
.catch((cause) => {
|
|
438
|
-
if (cause instanceof BlockNotFoundError) return undefined
|
|
439
|
-
throw cause
|
|
440
|
-
})
|
|
441
|
-
if (!canonical || Hex.isEqual(canonical.hash, options.sourceBlock.hash))
|
|
442
|
-
return { type: 'pending' }
|
|
443
|
-
return { type: 'reorged' }
|
|
444
|
-
}
|
|
445
|
-
if (receipt.status !== 'success') return { type: 'invalid' }
|
|
446
|
-
const validAfter = Math.floor(Date.parse(options.validAfter) / 1_000)
|
|
447
|
-
if (!Number.isSafeInteger(validAfter) || block.timestamp < BigInt(validAfter))
|
|
448
|
-
return { type: 'invalid' }
|
|
449
|
-
|
|
450
|
-
const amount = BigInt(options.sourceAmount)
|
|
451
|
-
const sourceEvents = parseEventLogs({ abi: [oftSent], logs: receipt.logs, strict: true }).filter(
|
|
452
|
-
({ address, args }) =>
|
|
453
|
-
Address.isEqual(address, deployment.pool) &&
|
|
454
|
-
args.dstEid === destinationEid &&
|
|
455
|
-
Address.isEqual(args.fromAddress, options.sender as Address.Address) &&
|
|
456
|
-
args.amountSentLD === amount &&
|
|
457
|
-
args.amountReceivedLD === amount,
|
|
458
|
-
)
|
|
459
|
-
const transfers = parseEventLogs({
|
|
460
|
-
abi: [transferEvent],
|
|
461
|
-
logs: receipt.logs,
|
|
462
|
-
strict: true,
|
|
463
|
-
}).filter(
|
|
464
|
-
({ address, args }) =>
|
|
465
|
-
Address.isEqual(address, deployment.sourceToken) &&
|
|
466
|
-
Address.isEqual(args.from, options.sender as Address.Address) &&
|
|
467
|
-
Address.isEqual(args.to, deployment.pool) &&
|
|
468
|
-
args.value === amount,
|
|
469
|
-
)
|
|
470
|
-
if (sourceEvents.length !== 1 || transfers.length !== 1) return { type: 'invalid' }
|
|
471
|
-
const guid = sourceEvents[0]!.args.guid
|
|
472
|
-
// PacketV1's 113-byte header is followed by Stargate's type, asset id, recipient, and amount.
|
|
473
|
-
const packets = parseEventLogs({ abi: [packetSent], logs: receipt.logs, strict: true }).filter(
|
|
474
|
-
({ address, args }) => {
|
|
475
|
-
const packet = args.encodedPayload
|
|
476
|
-
return (
|
|
477
|
-
Address.isEqual(address, layerZeroEndpoint) &&
|
|
478
|
-
Hex.size(packet) === 156 &&
|
|
479
|
-
Hex.toNumber(Hex.slice(packet, 0, 1)) === 1 &&
|
|
480
|
-
Hex.toNumber(Hex.slice(packet, 9, 13)) === deployment.sourceEid &&
|
|
481
|
-
Hex.toNumber(Hex.slice(packet, 45, 49)) === destinationEid &&
|
|
482
|
-
Hex.isEqual(Hex.slice(packet, 81, 113), guid) &&
|
|
483
|
-
Hex.toNumber(Hex.slice(packet, 113, 114)) === 1 &&
|
|
484
|
-
Hex.isEqual(Hex.slice(packet, 116, 148), recipientBytes32(options.recipient)) &&
|
|
485
|
-
Hex.toBigInt(Hex.slice(packet, 148, 156)) === amount
|
|
486
|
-
)
|
|
487
|
-
},
|
|
488
|
-
)
|
|
489
|
-
if (packets.length !== 1) return { type: 'invalid' }
|
|
490
|
-
return {
|
|
491
|
-
guid,
|
|
492
|
-
sourceBlock: { hash: block.hash, number: block.number },
|
|
493
|
-
sourceEid: deployment.sourceEid,
|
|
494
|
-
type: 'verified',
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
export declare namespace verifySourceTransaction {
|
|
499
|
-
/** Canonical source block that originally contained the transaction. */
|
|
500
|
-
type Block = {
|
|
501
|
-
/** Source block hash. */
|
|
502
|
-
hash: Hex.Hex
|
|
503
|
-
/** Source block number. */
|
|
504
|
-
number: bigint
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/** Stored terms and chain access needed to verify one source transaction. */
|
|
508
|
-
type Options = {
|
|
509
|
-
/** Stargate configuration for the selected route. */
|
|
510
|
-
configuration: unknown
|
|
511
|
-
/** Curated Tempo destination token. */
|
|
512
|
-
destinationTokenAddress: string
|
|
513
|
-
/** Fetch implementation override for chain RPC requests. */
|
|
514
|
-
fetch?: FundingProvider.Fetch | undefined
|
|
515
|
-
/** Tempo beneficiary encoded in the Stargate send. */
|
|
516
|
-
recipient: string
|
|
517
|
-
/** Source account and LayerZero refund recipient. */
|
|
518
|
-
sender: string
|
|
519
|
-
/** Optional request cancellation signal. */
|
|
520
|
-
signal?: AbortSignal | undefined
|
|
521
|
-
/** Exact source amount in base units. */
|
|
522
|
-
sourceAmount: string
|
|
523
|
-
/** Canonical block captured during initial verification. */
|
|
524
|
-
sourceBlock?: Block | undefined
|
|
525
|
-
/** Source chain and RPC endpoints. */
|
|
526
|
-
sourceChain: Chain.Chain
|
|
527
|
-
/** Curated source token. */
|
|
528
|
-
sourceTokenAddress: string
|
|
529
|
-
/** Submitted EVM transaction hash. */
|
|
530
|
-
transactionHash: string
|
|
531
|
-
/** Earliest accepted source block timestamp. */
|
|
532
|
-
validAfter: string
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/** Source transaction verification outcome. */
|
|
536
|
-
type Result =
|
|
537
|
-
| { type: 'invalid' }
|
|
538
|
-
| { type: 'pending' }
|
|
539
|
-
| { type: 'reorged' }
|
|
540
|
-
| { guid: Hex.Hex; sourceBlock: Block; sourceEid: number; type: 'verified' }
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/** Finds and verifies the finalized Stargate delivery directly on Tempo. */
|
|
544
|
-
export async function verifyDestinationDelivery(
|
|
545
|
-
options: verifyDestinationDelivery.Options,
|
|
546
|
-
): Promise<verifyDestinationDelivery.Result> {
|
|
547
|
-
const deployment = resolveDeployment({
|
|
548
|
-
configuration: options.configuration,
|
|
549
|
-
destinationChainId: options.destinationChain.id,
|
|
550
|
-
destinationTokenAddress: options.destinationTokenAddress,
|
|
551
|
-
sourceChainId: options.sourceChainId,
|
|
552
|
-
sourceTokenAddress: options.sourceTokenAddress,
|
|
553
|
-
})
|
|
554
|
-
if (
|
|
555
|
-
!deployment ||
|
|
556
|
-
options.destinationChain.kind !== 'evm' ||
|
|
557
|
-
!/^\d+$/.test(options.destinationBlockNumber) ||
|
|
558
|
-
!Hash.validate(options.guid) ||
|
|
559
|
-
!Address.validate(options.recipient, { strict: false })
|
|
560
|
-
)
|
|
561
|
-
return { type: 'invalid' }
|
|
562
|
-
|
|
563
|
-
const rpc = rpcClient({
|
|
564
|
-
fetch: options.fetch ?? defaultFetch,
|
|
565
|
-
urls: options.destinationChain.rpcUrls,
|
|
566
|
-
})
|
|
567
|
-
const [chainId, finalized] = await Promise.all([
|
|
568
|
-
rpc.getChainId(),
|
|
569
|
-
rpc.getBlock({ blockTag: 'finalized', includeTransactions: false }),
|
|
570
|
-
])
|
|
571
|
-
if (chainId !== Number(Chain.eip155Id(options.destinationChain))) return { type: 'invalid' }
|
|
572
|
-
const amount = BigInt(options.destinationAmount)
|
|
573
|
-
const discovered = await (async () => {
|
|
574
|
-
for (
|
|
575
|
-
let fromBlock = BigInt(options.destinationBlockNumber);
|
|
576
|
-
fromBlock <= finalized.number;
|
|
577
|
-
fromBlock += maximumLogBlockRange
|
|
578
|
-
) {
|
|
579
|
-
const toBlock = fromBlock + maximumLogBlockRange - 1n
|
|
580
|
-
const logs = await rpc.getLogs({
|
|
581
|
-
address: deployment.destinationPool,
|
|
582
|
-
args: { guid: options.guid, toAddress: options.recipient as Address.Address },
|
|
583
|
-
event: oftReceived,
|
|
584
|
-
fromBlock,
|
|
585
|
-
strict: true,
|
|
586
|
-
toBlock: toBlock > finalized.number ? finalized.number : toBlock,
|
|
587
|
-
})
|
|
588
|
-
const matches = logs.filter(
|
|
589
|
-
({ args, transactionHash }) =>
|
|
590
|
-
transactionHash &&
|
|
591
|
-
args.srcEid === deployment.sourceEid &&
|
|
592
|
-
args.amountReceivedLD === amount,
|
|
593
|
-
)
|
|
594
|
-
if (logs.length !== matches.length || matches.length > 1) return { type: 'invalid' as const }
|
|
595
|
-
if (matches[0]?.transactionHash)
|
|
596
|
-
return { transactionHash: matches[0].transactionHash, type: 'found' as const }
|
|
597
|
-
}
|
|
598
|
-
return { type: 'pending' as const }
|
|
599
|
-
})()
|
|
600
|
-
if (discovered.type !== 'found') return discovered
|
|
601
|
-
const { transactionHash } = discovered
|
|
602
|
-
const receipt = await rpc.getTransactionReceipt({ hash: transactionHash }).catch((cause) => {
|
|
603
|
-
if (cause instanceof TransactionReceiptNotFoundError) return undefined
|
|
604
|
-
throw cause
|
|
605
|
-
})
|
|
606
|
-
if (!receipt || receipt.blockNumber === null) return { type: 'pending' }
|
|
607
|
-
if (receipt.status !== 'success' || receipt.blockNumber > finalized.number)
|
|
608
|
-
return { type: 'invalid' }
|
|
609
|
-
|
|
610
|
-
const transfers = parseEventLogs({
|
|
611
|
-
abi: [transferEvent],
|
|
612
|
-
logs: receipt.logs,
|
|
613
|
-
strict: true,
|
|
614
|
-
}).filter(
|
|
615
|
-
({ address, args }) =>
|
|
616
|
-
Address.isEqual(address, destinationToken as Address.Address) &&
|
|
617
|
-
Address.isEqual(args.from, zeroAddress) &&
|
|
618
|
-
Address.isEqual(args.to, options.recipient as Address.Address) &&
|
|
619
|
-
args.value === amount,
|
|
620
|
-
)
|
|
621
|
-
if (transfers.length !== 1) return { type: 'invalid' }
|
|
622
|
-
return { transactionHash, type: 'verified' }
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
export declare namespace verifyDestinationDelivery {
|
|
626
|
-
/** Stored terms and chain access needed to discover and verify one delivery. */
|
|
627
|
-
type Options = {
|
|
628
|
-
/** Stargate configuration for the selected route. */
|
|
629
|
-
configuration: unknown
|
|
630
|
-
/** Exact destination amount in base units. */
|
|
631
|
-
destinationAmount: string
|
|
632
|
-
/** Tempo block captured before the source transaction was broadcast. */
|
|
633
|
-
destinationBlockNumber: string
|
|
634
|
-
/** Tempo chain and RPC endpoints. */
|
|
635
|
-
destinationChain: Chain.Chain
|
|
636
|
-
/** Curated Tempo destination token. */
|
|
637
|
-
destinationTokenAddress: string
|
|
638
|
-
/** Fetch implementation override for Tempo RPC requests. */
|
|
639
|
-
fetch?: FundingProvider.Fetch | undefined
|
|
640
|
-
/** GUID emitted by the verified source Stargate pool. */
|
|
641
|
-
guid: Hex.Hex
|
|
642
|
-
/** Tempo beneficiary. */
|
|
643
|
-
recipient: string
|
|
644
|
-
/** Source chain CAIP-2 id. */
|
|
645
|
-
sourceChainId: string
|
|
646
|
-
/** Curated source token. */
|
|
647
|
-
sourceTokenAddress: string
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
/** Destination delivery verification outcome. */
|
|
651
|
-
type Result =
|
|
652
|
-
| { type: 'invalid' }
|
|
653
|
-
| { type: 'pending' }
|
|
654
|
-
| { transactionHash: Hex.Hex; type: 'verified' }
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
function rpcClient(options: rpcClient.Options) {
|
|
658
|
-
if (options.urls.length === 0) throw new FundingProvider.ProviderConfigurationError()
|
|
659
|
-
return Viem.createEvmClient(options).extend(publicActions)
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
declare namespace rpcClient {
|
|
663
|
-
type Options = {
|
|
664
|
-
fetch: FundingProvider.Fetch
|
|
665
|
-
signal?: AbortSignal | undefined
|
|
666
|
-
urls: readonly string[]
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
async function blockNumberBefore(options: blockNumberBefore.Options) {
|
|
671
|
-
if (options.chain.kind !== 'evm') throw new FundingProvider.ProviderConfigurationError()
|
|
672
|
-
const timestamp = Date.parse(options.timestamp)
|
|
673
|
-
if (!Number.isFinite(timestamp)) throw new FundingProvider.ProviderPayloadError()
|
|
674
|
-
const rpc = rpcClient({
|
|
675
|
-
fetch: options.fetch,
|
|
676
|
-
signal: options.signal,
|
|
677
|
-
urls: options.chain.rpcUrls,
|
|
678
|
-
})
|
|
679
|
-
const [chainId, finalized] = await Promise.all([
|
|
680
|
-
rpc.getChainId(),
|
|
681
|
-
rpc.getBlock({ blockTag: 'finalized', includeTransactions: false }),
|
|
682
|
-
])
|
|
683
|
-
if (chainId !== Number(Chain.eip155Id(options.chain)))
|
|
684
|
-
throw new FundingProvider.ProviderConfigurationError()
|
|
685
|
-
|
|
686
|
-
const target = BigInt(Math.floor(timestamp / 1_000) - 1)
|
|
687
|
-
let lower = 0n
|
|
688
|
-
let upper = finalized.number
|
|
689
|
-
while (lower < upper) {
|
|
690
|
-
const middle = (lower + upper + 1n) / 2n
|
|
691
|
-
const block = await rpc.getBlock({ blockNumber: middle, includeTransactions: false })
|
|
692
|
-
if (block.timestamp <= target) lower = middle
|
|
693
|
-
else upper = middle - 1n
|
|
694
|
-
}
|
|
695
|
-
return lower.toString()
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
declare namespace blockNumberBefore {
|
|
699
|
-
type Options = {
|
|
700
|
-
/** Destination chain whose block history is searched. */
|
|
701
|
-
chain: Chain.Chain
|
|
702
|
-
/** Fetch implementation used for RPC requests. */
|
|
703
|
-
fetch: FundingProvider.Fetch
|
|
704
|
-
/** Optional request cancellation signal. */
|
|
705
|
-
signal?: AbortSignal | undefined
|
|
706
|
-
/** Exclusive ISO 8601 timestamp upper bound. */
|
|
707
|
-
timestamp: string
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
function createSendParam(options: createSendParam.Options): SendParam {
|
|
712
|
-
const amount = BigInt(options.amount)
|
|
713
|
-
return {
|
|
714
|
-
amountLD: amount,
|
|
715
|
-
composeMsg: '0x',
|
|
716
|
-
dstEid: destinationEid,
|
|
717
|
-
extraOptions: '0x',
|
|
718
|
-
minAmountLD: amount,
|
|
719
|
-
oftCmd: '0x',
|
|
720
|
-
to: recipientBytes32(options.recipient),
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
declare namespace createSendParam {
|
|
725
|
-
type Options = {
|
|
726
|
-
amount: string
|
|
727
|
-
recipient: string
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
function isExactQuote(options: isExactQuote.Options) {
|
|
732
|
-
const amount = BigInt(options.amount)
|
|
733
|
-
return (
|
|
734
|
-
amount >= options.limit.minAmountLD &&
|
|
735
|
-
amount <= options.limit.maxAmountLD &&
|
|
736
|
-
options.feeDetails.every((fee) => fee.feeAmountLD >= 0n) &&
|
|
737
|
-
options.receipt.amountSentLD === amount &&
|
|
738
|
-
options.receipt.amountReceivedLD === amount
|
|
739
|
-
)
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
declare namespace isExactQuote {
|
|
743
|
-
type Options = {
|
|
744
|
-
amount: string
|
|
745
|
-
feeDetails: readonly { feeAmountLD: bigint }[]
|
|
746
|
-
limit: { maxAmountLD: bigint; minAmountLD: bigint }
|
|
747
|
-
receipt: { amountReceivedLD: bigint; amountSentLD: bigint }
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
function nativeToken(sourceChainId: string) {
|
|
752
|
-
return {
|
|
753
|
-
address: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
|
|
754
|
-
currency: 'ETH',
|
|
755
|
-
decimals: 18,
|
|
756
|
-
name: 'Ether',
|
|
757
|
-
standard: 'native',
|
|
758
|
-
symbol: 'ETH',
|
|
759
|
-
tokenKey: `${sourceChainId}/slip44:60`,
|
|
760
|
-
verified: true,
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
function quality() {
|
|
765
|
-
return {
|
|
766
|
-
liquiditySource: 'onchain',
|
|
767
|
-
sourceDetail: 'stargate:oft-v2:taxi',
|
|
768
|
-
tier: 'liquid' as const,
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
function recipientBytes32(recipient: string) {
|
|
773
|
-
if (!Address.validate(recipient, { strict: false }))
|
|
774
|
-
throw new FundingProvider.ProviderConfigurationError()
|
|
775
|
-
return Hex.padLeft(recipient as Hex.Hex, 32)
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
function validateSend(options: validateSend.Options) {
|
|
779
|
-
const [sendParam, messagingFee, refundAddress] = AbiFunction.decodeData(sendToken, options.data)
|
|
780
|
-
const amount = BigInt(options.sourceAmount)
|
|
781
|
-
if (
|
|
782
|
-
!Address.isEqual(options.to, options.pool) ||
|
|
783
|
-
sendParam.amountLD !== amount ||
|
|
784
|
-
sendParam.composeMsg !== '0x' ||
|
|
785
|
-
sendParam.dstEid !== destinationEid ||
|
|
786
|
-
sendParam.extraOptions !== '0x' ||
|
|
787
|
-
sendParam.minAmountLD !== amount ||
|
|
788
|
-
sendParam.oftCmd !== '0x' ||
|
|
789
|
-
!Hex.isEqual(sendParam.to, recipientBytes32(options.recipient)) ||
|
|
790
|
-
messagingFee.lzTokenFee !== 0n ||
|
|
791
|
-
messagingFee.nativeFee !== options.nativeValue ||
|
|
792
|
-
!Address.isEqual(refundAddress, options.sender as Address.Address)
|
|
793
|
-
)
|
|
794
|
-
throw new FundingProvider.ProviderPayloadError()
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
declare namespace validateSend {
|
|
798
|
-
type Options = {
|
|
799
|
-
data: Hex.Hex
|
|
800
|
-
nativeValue: bigint
|
|
801
|
-
pool: Address.Address
|
|
802
|
-
recipient: string
|
|
803
|
-
sender: string
|
|
804
|
-
sourceAmount: string
|
|
805
|
-
to: Address.Address
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
function resolveDeployment(options: resolveDeployment.Options): Deployment | undefined {
|
|
810
|
-
const parsed = schema.Configuration.safeParse(options.configuration)
|
|
811
|
-
const sourceEid =
|
|
812
|
-
parsed.success &&
|
|
813
|
-
(parsed.data.sourceEid ?? sourceEids[options.sourceChainId as keyof typeof sourceEids])
|
|
814
|
-
if (
|
|
815
|
-
!parsed.success ||
|
|
816
|
-
!sourceEid ||
|
|
817
|
-
options.destinationChainId !== destinationChainId ||
|
|
818
|
-
!options.sourceChainId.startsWith('eip155:') ||
|
|
819
|
-
!Address.validate(options.destinationTokenAddress, { strict: false }) ||
|
|
820
|
-
!Address.validate(options.sourceTokenAddress, { strict: false }) ||
|
|
821
|
-
!Address.isEqual(options.destinationTokenAddress as Address.Address, destinationToken)
|
|
822
|
-
)
|
|
823
|
-
return undefined
|
|
824
|
-
return {
|
|
825
|
-
destinationPool: Address.checksum(parsed.data.destinationPoolAddress ?? destinationPool),
|
|
826
|
-
pool: Address.checksum(parsed.data.poolAddress),
|
|
827
|
-
sourceEid,
|
|
828
|
-
sourceToken: Address.checksum(options.sourceTokenAddress),
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
declare namespace resolveDeployment {
|
|
833
|
-
type Options = {
|
|
834
|
-
configuration: unknown
|
|
835
|
-
destinationChainId: string
|
|
836
|
-
destinationTokenAddress: string
|
|
837
|
-
sourceChainId: string
|
|
838
|
-
sourceTokenAddress: string
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
function unavailable(options: unavailable.Options) {
|
|
843
|
-
return FundingProvider.unavailableResult({
|
|
844
|
-
detail: 'stargate:oft-v2',
|
|
845
|
-
message: options.message,
|
|
846
|
-
now: options.now,
|
|
847
|
-
source: 'onchain',
|
|
848
|
-
})
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
declare namespace unavailable {
|
|
852
|
-
type Options = {
|
|
853
|
-
message: string
|
|
854
|
-
now: Date
|
|
855
|
-
}
|
|
856
|
-
}
|