tapimo 0.0.0 → 0.0.2
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/LICENSE +21 -0
- package/README.md +119 -0
- package/dist/ApiKey.d.ts +65 -0
- package/dist/ApiKey.d.ts.map +1 -0
- package/dist/ApiKey.js +105 -0
- package/dist/ApiKey.js.map +1 -0
- package/dist/ApiKeySource.d.ts +166 -0
- package/dist/ApiKeySource.d.ts.map +1 -0
- package/dist/ApiKeySource.js +234 -0
- package/dist/ApiKeySource.js.map +1 -0
- package/dist/App.d.ts +19317 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +612 -0
- package/dist/App.js.map +1 -0
- package/dist/Assets.d.ts +44 -0
- package/dist/Assets.d.ts.map +1 -0
- package/dist/Assets.js +23 -0
- package/dist/Assets.js.map +1 -0
- package/dist/Auth.d.ts +2 -0
- package/dist/Auth.d.ts.map +1 -0
- package/dist/Auth.js +2 -0
- package/dist/Auth.js.map +1 -0
- package/dist/Cli.d.ts +21 -0
- package/dist/Cli.d.ts.map +1 -0
- package/dist/Cli.js +13 -0
- package/dist/Cli.js.map +1 -0
- package/dist/Client.d.ts +20 -0
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +24 -0
- package/dist/Client.js.map +1 -0
- package/dist/Metrics.d.ts +70 -0
- package/dist/Metrics.d.ts.map +1 -0
- package/dist/Metrics.js +91 -0
- package/dist/Metrics.js.map +1 -0
- package/dist/Scope.d.ts +35 -0
- package/dist/Scope.d.ts.map +1 -0
- package/dist/Scope.js +38 -0
- package/dist/Scope.js.map +1 -0
- package/dist/Webhooks.d.ts +79 -0
- package/dist/Webhooks.d.ts.map +1 -0
- package/dist/Webhooks.js +107 -0
- package/dist/Webhooks.js.map +1 -0
- package/dist/admin/Access.d.ts +41 -0
- package/dist/admin/Access.d.ts.map +1 -0
- package/dist/admin/Access.js +75 -0
- package/dist/admin/Access.js.map +1 -0
- package/dist/admin/App.d.ts +1221 -0
- package/dist/admin/App.d.ts.map +1 -0
- package/dist/admin/App.js +113 -0
- package/dist/admin/App.js.map +1 -0
- package/dist/admin/apps/api-keys.d.ts +209 -0
- package/dist/admin/apps/api-keys.d.ts.map +1 -0
- package/dist/admin/apps/api-keys.js +129 -0
- package/dist/admin/apps/api-keys.js.map +1 -0
- package/dist/admin/apps/scopes.d.ts +46 -0
- package/dist/admin/apps/scopes.d.ts.map +1 -0
- package/dist/admin/apps/scopes.js +41 -0
- package/dist/admin/apps/scopes.js.map +1 -0
- package/dist/admin/apps/verified-tokens.d.ts +1206 -0
- package/dist/admin/apps/verified-tokens.d.ts.map +1 -0
- package/dist/admin/apps/verified-tokens.js +485 -0
- package/dist/admin/apps/verified-tokens.js.map +1 -0
- package/dist/admin/index.d.ts +3 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +3 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/ui.generated.d.ts +11 -0
- package/dist/admin/ui.generated.d.ts.map +1 -0
- package/dist/admin/ui.generated.js +43 -0
- package/dist/admin/ui.generated.js.map +1 -0
- package/dist/apps/activities.d.ts +18725 -0
- package/dist/apps/activities.d.ts.map +1 -0
- package/dist/apps/activities.js +3138 -0
- package/dist/apps/activities.js.map +1 -0
- package/dist/apps/addresses.d.ts +3662 -0
- package/dist/apps/addresses.d.ts.map +1 -0
- package/dist/apps/addresses.js +22 -0
- package/dist/apps/addresses.js.map +1 -0
- package/dist/apps/balances.d.ts +342 -0
- package/dist/apps/balances.d.ts.map +1 -0
- package/dist/apps/balances.js +393 -0
- package/dist/apps/balances.js.map +1 -0
- package/dist/apps/blocks.d.ts +931 -0
- package/dist/apps/blocks.d.ts.map +1 -0
- package/dist/apps/blocks.js +689 -0
- package/dist/apps/blocks.js.map +1 -0
- package/dist/apps/coingecko.d.ts +1053 -0
- package/dist/apps/coingecko.d.ts.map +1 -0
- package/dist/apps/coingecko.js +1015 -0
- package/dist/apps/coingecko.js.map +1 -0
- package/dist/apps/exchanges.d.ts +3000 -0
- package/dist/apps/exchanges.d.ts.map +1 -0
- package/dist/apps/exchanges.js +3570 -0
- package/dist/apps/exchanges.js.map +1 -0
- package/dist/apps/fee-amm.d.ts +640 -0
- package/dist/apps/fee-amm.d.ts.map +1 -0
- package/dist/apps/fee-amm.js +815 -0
- package/dist/apps/fee-amm.js.map +1 -0
- package/dist/apps/indexer.d.ts +116 -0
- package/dist/apps/indexer.d.ts.map +1 -0
- package/dist/apps/indexer.js +270 -0
- package/dist/apps/indexer.js.map +1 -0
- package/dist/apps/receipts.d.ts +1438 -0
- package/dist/apps/receipts.d.ts.map +1 -0
- package/dist/apps/receipts.js +874 -0
- package/dist/apps/receipts.js.map +1 -0
- package/dist/apps/rpc.d.ts +173 -0
- package/dist/apps/rpc.d.ts.map +1 -0
- package/dist/apps/rpc.js +191 -0
- package/dist/apps/rpc.js.map +1 -0
- package/dist/apps/tokenlist.d.ts +192 -0
- package/dist/apps/tokenlist.d.ts.map +1 -0
- package/dist/apps/tokenlist.js +153 -0
- package/dist/apps/tokenlist.js.map +1 -0
- package/dist/apps/tokens.d.ts +2246 -0
- package/dist/apps/tokens.d.ts.map +1 -0
- package/dist/apps/tokens.js +1789 -0
- package/dist/apps/tokens.js.map +1 -0
- package/dist/apps/transactions.d.ts +2327 -0
- package/dist/apps/transactions.d.ts.map +1 -0
- package/dist/apps/transactions.js +975 -0
- package/dist/apps/transactions.js.map +1 -0
- package/dist/apps/transfers.d.ts +589 -0
- package/dist/apps/transfers.d.ts.map +1 -0
- package/dist/apps/transfers.js +769 -0
- package/dist/apps/transfers.js.map +1 -0
- package/dist/apps/verified-tokens.d.ts +544 -0
- package/dist/apps/verified-tokens.d.ts.map +1 -0
- package/dist/apps/verified-tokens.js +234 -0
- package/dist/apps/verified-tokens.js.map +1 -0
- package/dist/apps/webhooks.d.ts +7684 -0
- package/dist/apps/webhooks.d.ts.map +1 -0
- package/dist/apps/webhooks.js +2112 -0
- package/dist/apps/webhooks.js.map +1 -0
- package/dist/cloudflare.d.ts +32 -0
- package/dist/cloudflare.d.ts.map +1 -0
- package/dist/cloudflare.js +45 -0
- package/dist/cloudflare.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/Auth.d.ts +298 -0
- package/dist/internal/Auth.d.ts.map +1 -0
- package/dist/internal/Auth.js +618 -0
- package/dist/internal/Auth.js.map +1 -0
- package/dist/internal/Cache.d.ts +74 -0
- package/dist/internal/Cache.d.ts.map +1 -0
- package/dist/internal/Cache.js +215 -0
- package/dist/internal/Cache.js.map +1 -0
- package/dist/internal/Cursor.d.ts +79 -0
- package/dist/internal/Cursor.d.ts.map +1 -0
- package/dist/internal/Cursor.js +116 -0
- package/dist/internal/Cursor.js.map +1 -0
- package/dist/internal/EdgeCache.d.ts +59 -0
- package/dist/internal/EdgeCache.d.ts.map +1 -0
- package/dist/internal/EdgeCache.js +174 -0
- package/dist/internal/EdgeCache.js.map +1 -0
- package/dist/internal/Log.d.ts +104 -0
- package/dist/internal/Log.d.ts.map +1 -0
- package/dist/internal/Log.js +118 -0
- package/dist/internal/Log.js.map +1 -0
- package/dist/internal/MetricSink.d.ts +65 -0
- package/dist/internal/MetricSink.d.ts.map +1 -0
- package/dist/internal/MetricSink.js +146 -0
- package/dist/internal/MetricSink.js.map +1 -0
- package/dist/internal/Mpp.d.ts +71 -0
- package/dist/internal/Mpp.d.ts.map +1 -0
- package/dist/internal/Mpp.js +105 -0
- package/dist/internal/Mpp.js.map +1 -0
- package/dist/internal/OpenApi.d.ts +313 -0
- package/dist/internal/OpenApi.d.ts.map +1 -0
- package/dist/internal/OpenApi.fonts.d.ts +2 -0
- package/dist/internal/OpenApi.fonts.d.ts.map +1 -0
- package/dist/internal/OpenApi.fonts.js +39 -0
- package/dist/internal/OpenApi.fonts.js.map +1 -0
- package/dist/internal/OpenApi.js +335 -0
- package/dist/internal/OpenApi.js.map +1 -0
- package/dist/internal/OpenApi.logo.d.ts +6 -0
- package/dist/internal/OpenApi.logo.d.ts.map +1 -0
- package/dist/internal/OpenApi.logo.js +19 -0
- package/dist/internal/OpenApi.logo.js.map +1 -0
- package/dist/internal/Path.d.ts +5 -0
- package/dist/internal/Path.d.ts.map +1 -0
- package/dist/internal/Path.js +16 -0
- package/dist/internal/Path.js.map +1 -0
- package/dist/internal/RateLimit.d.ts +60 -0
- package/dist/internal/RateLimit.d.ts.map +1 -0
- package/dist/internal/RateLimit.js +48 -0
- package/dist/internal/RateLimit.js.map +1 -0
- package/dist/internal/Response.d.ts +132 -0
- package/dist/internal/Response.d.ts.map +1 -0
- package/dist/internal/Response.js +72 -0
- package/dist/internal/Response.js.map +1 -0
- package/dist/internal/Schema.d.ts +257 -0
- package/dist/internal/Schema.d.ts.map +1 -0
- package/dist/internal/Schema.js +360 -0
- package/dist/internal/Schema.js.map +1 -0
- package/dist/internal/Store.d.ts +204 -0
- package/dist/internal/Store.d.ts.map +1 -0
- package/dist/internal/Store.js +291 -0
- package/dist/internal/Store.js.map +1 -0
- package/dist/internal/Tidx.d.ts +120 -0
- package/dist/internal/Tidx.d.ts.map +1 -0
- package/dist/internal/Tidx.js +156 -0
- package/dist/internal/Tidx.js.map +1 -0
- package/dist/internal/Timing.d.ts +22 -0
- package/dist/internal/Timing.d.ts.map +1 -0
- package/dist/internal/Timing.js +32 -0
- package/dist/internal/Timing.js.map +1 -0
- package/dist/internal/Ttl.d.ts +25 -0
- package/dist/internal/Ttl.d.ts.map +1 -0
- package/dist/internal/Ttl.js +49 -0
- package/dist/internal/Ttl.js.map +1 -0
- package/dist/internal/Value.d.ts +47 -0
- package/dist/internal/Value.d.ts.map +1 -0
- package/dist/internal/Value.js +122 -0
- package/dist/internal/Value.js.map +1 -0
- package/dist/internal/VerifiedTokens.d.ts +228 -0
- package/dist/internal/VerifiedTokens.d.ts.map +1 -0
- package/dist/internal/VerifiedTokens.js +450 -0
- package/dist/internal/VerifiedTokens.js.map +1 -0
- package/dist/internal/Viem.d.ts +2082 -0
- package/dist/internal/Viem.d.ts.map +1 -0
- package/dist/internal/Viem.js +63 -0
- package/dist/internal/Viem.js.map +1 -0
- package/dist/internal/WebhookDestination.d.ts +198 -0
- package/dist/internal/WebhookDestination.d.ts.map +1 -0
- package/dist/internal/WebhookDestination.js +170 -0
- package/dist/internal/WebhookDestination.js.map +1 -0
- package/dist/internal/Webhooks.d.ts +433 -0
- package/dist/internal/Webhooks.d.ts.map +1 -0
- package/dist/internal/Webhooks.js +489 -0
- package/dist/internal/Webhooks.js.map +1 -0
- package/dist/internal/webhookDestinations/betterStack.d.ts +26 -0
- package/dist/internal/webhookDestinations/betterStack.d.ts.map +1 -0
- package/dist/internal/webhookDestinations/betterStack.js +76 -0
- package/dist/internal/webhookDestinations/betterStack.js.map +1 -0
- package/dist/internal/webhookDestinations/slack.d.ts +59 -0
- package/dist/internal/webhookDestinations/slack.d.ts.map +1 -0
- package/dist/internal/webhookDestinations/slack.js +422 -0
- package/dist/internal/webhookDestinations/slack.js.map +1 -0
- package/dist/internal/webhookDestinations/url.d.ts +17 -0
- package/dist/internal/webhookDestinations/url.d.ts.map +1 -0
- package/dist/internal/webhookDestinations/url.js +130 -0
- package/dist/internal/webhookDestinations/url.js.map +1 -0
- package/dist/openrpc.json +5302 -0
- package/package.json +46 -4
- package/seeds/31318/icons/0x20c0000000000000000000000000000000000000.svg +1 -0
- package/seeds/31318/icons/0x20c0000000000000000000000000000000000001.svg +1 -0
- package/seeds/31318/icons/0x20c0000000000000000000000000000000000002.svg +1 -0
- package/seeds/31318/icons/0x20c0000000000000000000000000000000000003.svg +1 -0
- package/seeds/31318/verified-tokens.json +30 -0
- package/seeds/4217/icons/0x20c0000000000000000000000000000000000000.svg +25 -0
- package/seeds/4217/icons/0x20c000000000000000000000048c8f36df1c9a4a.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000000520792dcccccccc.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000000a6da882d075a4c3.svg +4 -0
- package/seeds/4217/icons/0x20c000000000000000000000111111111e910f0f.svg +30 -0
- package/seeds/4217/icons/0x20c00000000000000000000014f22ca97301eb73.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000001621e21f71cf12fb.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000002f52d5cc21a3207b.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000003158081efd85bfc2.svg +11 -0
- package/seeds/4217/icons/0x20c0000000000000000000003554d28269e0f3c2.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000383a23bacb546ab9.svg +1 -0
- package/seeds/4217/icons/0x20c00000000000000000000042109aef2f8b28e1.png +0 -0
- package/seeds/4217/icons/0x20c0000000000000000000005c0bac7cef389a11.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000006fd9a167923ba194.png +0 -0
- package/seeds/4217/icons/0x20c0000000000000000000007f7ba549dd0251b9.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000008191667423f70e67.svg +5 -0
- package/seeds/4217/icons/0x20c0000000000000000000008ee4fcff88888888.svg +1 -0
- package/seeds/4217/icons/0x20c0000000000000000000009a4a4b17e0dc6651.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000ab02d39df30bd17e.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000ae247a1130450f09.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000aeed2ec36a54d0e5.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000b9537d11c60e8b50.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000bd95bfb69fbe6ce3.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000c412ec89d0c08be5.svg +1 -0
- package/seeds/4217/icons/0x20c000000000000000000000f047dd7018e50367.png +0 -0
- package/seeds/4217/verified-tokens.json +177 -0
- package/seeds/42431/icons/0x20c0000000000000000000000000000000000000.svg +25 -0
- package/seeds/42431/icons/0x20c0000000000000000000000000000000000001.svg +1 -0
- package/seeds/42431/icons/0x20c0000000000000000000000000000000000002.svg +1 -0
- package/seeds/42431/icons/0x20c0000000000000000000000000000000000003.svg +1 -0
- package/seeds/42431/icons/0x20c0000000000000000000009e8d7eb59b783726.svg +1 -0
- package/seeds/42431/icons/0x20c000000000000000000000d72572838bbee59c.svg +1 -0
- package/seeds/42431/verified-tokens.json +44 -0
- package/seeds/openrpc/README.md +27 -0
- package/seeds/openrpc/execution-apis.json +8989 -0
- package/src/ApiKey.test.ts +91 -0
- package/src/ApiKey.ts +122 -0
- package/src/ApiKeySource.test-d.ts +11 -0
- package/src/ApiKeySource.test.ts +295 -0
- package/src/ApiKeySource.ts +303 -0
- package/src/App.test-d.ts +38 -0
- package/src/App.test.ts +65927 -0
- package/src/App.ts +855 -0
- package/src/Assets.ts +58 -0
- package/src/Auth.ts +1 -0
- package/src/Cli.test.ts +81 -0
- package/src/Cli.ts +38 -0
- package/src/Client.test-d.ts +1438 -0
- package/src/Client.test.ts +134 -0
- package/src/Client.ts +45 -0
- package/src/Metrics.ts +154 -0
- package/src/Scope.ts +50 -0
- package/src/Webhooks.test.ts +49 -0
- package/src/Webhooks.ts +172 -0
- package/src/admin/Access.test.ts +130 -0
- package/src/admin/Access.ts +87 -0
- package/src/admin/App.test.ts +225 -0
- package/src/admin/App.ts +216 -0
- package/src/admin/apps/api-keys.test.ts +156 -0
- package/src/admin/apps/api-keys.ts +157 -0
- package/src/admin/apps/scopes.test.ts +52 -0
- package/src/admin/apps/scopes.ts +47 -0
- package/src/admin/apps/verified-tokens.test.ts +415 -0
- package/src/admin/apps/verified-tokens.ts +566 -0
- package/src/admin/index.ts +2 -0
- package/src/admin/ui/plugin.ts +135 -0
- package/src/admin/ui/src/components/Checkbox.tsx +22 -0
- package/src/admin/ui/src/components/Dialog.tsx +32 -0
- package/src/admin/ui/src/components/MobileProfile.tsx +31 -0
- package/src/admin/ui/src/components/Page.tsx +53 -0
- package/src/admin/ui/src/components/TempoLogo.tsx +37 -0
- package/src/admin/ui/src/fonts/Pilat-Demi.woff2 +0 -0
- package/src/admin/ui/src/fonts/Pilat-Regular.woff2 +0 -0
- package/src/admin/ui/src/lib/api-keys.ts +63 -0
- package/src/admin/ui/src/lib/client.ts +15 -0
- package/src/admin/ui/src/lib/config.ts +57 -0
- package/src/admin/ui/src/lib/query-client.ts +26 -0
- package/src/admin/ui/src/lib/scopes.ts +25 -0
- package/src/admin/ui/src/lib/verified-tokens.ts +89 -0
- package/src/admin/ui/src/lib/wagmi.ts +18 -0
- package/src/admin/ui/src/routeTree.gen.ts +104 -0
- package/src/admin/ui/src/router.tsx +25 -0
- package/src/admin/ui/src/routes/__root.tsx +219 -0
- package/src/admin/ui/src/routes/api-keys.tsx +329 -0
- package/src/admin/ui/src/routes/index.tsx +7 -0
- package/src/admin/ui/src/routes/verified-tokens.tsx +331 -0
- package/src/admin/ui/src/styles.css +20 -0
- package/src/admin/ui/tsconfig.json +16 -0
- package/src/admin/ui/vite.config.ts +29 -0
- package/src/admin/ui.generated.ts +60 -0
- package/src/apps/activities.test.ts +1020 -0
- package/src/apps/activities.ts +3934 -0
- package/src/apps/addresses.ts +24 -0
- package/src/apps/balances.test.ts +274 -0
- package/src/apps/balances.ts +533 -0
- package/src/apps/blocks.test.ts +385 -0
- package/src/apps/blocks.ts +896 -0
- package/src/apps/coingecko.test.ts +218 -0
- package/src/apps/coingecko.ts +1383 -0
- package/src/apps/exchanges.test.ts +958 -0
- package/src/apps/exchanges.ts +4773 -0
- package/src/apps/fee-amm.test.ts +321 -0
- package/src/apps/fee-amm.ts +1121 -0
- package/src/apps/indexer.test.ts +153 -0
- package/src/apps/indexer.ts +330 -0
- package/src/apps/receipts.test.ts +285 -0
- package/src/apps/receipts.ts +1193 -0
- package/src/apps/rpc.test.ts +302 -0
- package/src/apps/rpc.ts +222 -0
- package/src/apps/tokenlist.test.ts +80 -0
- package/src/apps/tokenlist.ts +207 -0
- package/src/apps/tokens.test.ts +1062 -0
- package/src/apps/tokens.ts +2292 -0
- package/src/apps/transactions.test.ts +408 -0
- package/src/apps/transactions.ts +1363 -0
- package/src/apps/transfers.test.ts +371 -0
- package/src/apps/transfers.ts +1116 -0
- package/src/apps/verified-tokens.test.ts +114 -0
- package/src/apps/verified-tokens.ts +295 -0
- package/src/apps/webhooks.test.ts +1937 -0
- package/src/apps/webhooks.ts +2926 -0
- package/src/cloudflare.ts +55 -0
- package/src/index.ts +15 -0
- package/src/internal/Auth.test.ts +980 -0
- package/src/internal/Auth.ts +1012 -0
- package/src/internal/Cache.test.ts +240 -0
- package/src/internal/Cache.ts +262 -0
- package/src/internal/Cursor.test.ts +100 -0
- package/src/internal/Cursor.ts +149 -0
- package/src/internal/EdgeCache.test.ts +234 -0
- package/src/internal/EdgeCache.ts +224 -0
- package/src/internal/Errors.ts +14 -0
- package/src/internal/Log.test.ts +244 -0
- package/src/internal/Log.ts +216 -0
- package/src/internal/MetricSink.ts +220 -0
- package/src/internal/Mpp.test.ts +64 -0
- package/src/internal/Mpp.ts +141 -0
- package/src/internal/OpenApi.fonts.ts +38 -0
- package/src/internal/OpenApi.logo.ts +18 -0
- package/src/internal/OpenApi.ts +488 -0
- package/src/internal/Path.test.ts +14 -0
- package/src/internal/Path.ts +15 -0
- package/src/internal/RateLimit.test.ts +93 -0
- package/src/internal/RateLimit.ts +93 -0
- package/src/internal/Response.ts +131 -0
- package/src/internal/Schema.test.ts +34 -0
- package/src/internal/Schema.ts +523 -0
- package/src/internal/Store.test.ts +545 -0
- package/src/internal/Store.ts +526 -0
- package/src/internal/Tidx.local.test.ts +33 -0
- package/src/internal/Tidx.test.ts +294 -0
- package/src/internal/Tidx.ts +238 -0
- package/src/internal/Timing.test.ts +22 -0
- package/src/internal/Timing.ts +62 -0
- package/src/internal/Ttl.test.ts +18 -0
- package/src/internal/Ttl.ts +59 -0
- package/src/internal/Value.ts +114 -0
- package/src/internal/VerifiedTokens.test.ts +333 -0
- package/src/internal/VerifiedTokens.ts +645 -0
- package/src/internal/Viem.test.ts +115 -0
- package/src/internal/Viem.ts +165 -0
- package/src/internal/WebhookDestination.test.ts +648 -0
- package/src/internal/WebhookDestination.ts +331 -0
- package/src/internal/Webhooks.test.ts +668 -0
- package/src/internal/Webhooks.ts +940 -0
- package/src/internal/webhookDestinations/betterStack.ts +91 -0
- package/src/internal/webhookDestinations/slack.ts +496 -0
- package/src/internal/webhookDestinations/url.ts +128 -0
- package/src/openrpc.json +5302 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Hono } from 'hono'
|
|
2
|
+
|
|
3
|
+
import type * as App from '../App.js'
|
|
4
|
+
import * as Activities from './activities.js'
|
|
5
|
+
import * as Balances from './balances.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Composes the `/addresses/:address/*` route surface from the address-scoped
|
|
9
|
+
* sub-routers exported by each resource module. The handlers and schemas live
|
|
10
|
+
* with the resource they describe (activities, balances); this composer only
|
|
11
|
+
* owns the `/addresses` mount path so docs grouping stays by tag while URLs
|
|
12
|
+
* stay nested under the parent resource.
|
|
13
|
+
*
|
|
14
|
+
* Only subject-relative resources live here — rows that cannot be interpreted
|
|
15
|
+
* without the path address (activity classification, held-token balances).
|
|
16
|
+
* Plain filtered views of canonical collections are reached via search params
|
|
17
|
+
* instead (`GET /transactions?address=…`, `GET /transfers?address=…`,
|
|
18
|
+
* `GET /transactions/receipts?address=…`).
|
|
19
|
+
*/
|
|
20
|
+
export function addresses() {
|
|
21
|
+
return new Hono<App.Environment>()
|
|
22
|
+
.route('/', Activities.addresses())
|
|
23
|
+
.route('/', Balances.addresses())
|
|
24
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Schema } from 'cadent'
|
|
2
|
+
import { Value as core_Value } from 'ox'
|
|
3
|
+
|
|
4
|
+
import * as TestApp from '../../test/App.js'
|
|
5
|
+
import * as Runtime from '../../test/runtime.js'
|
|
6
|
+
import * as Balances from './balances.js'
|
|
7
|
+
import * as Tokens from './tokens.js'
|
|
8
|
+
|
|
9
|
+
// Verified enrichment is store-backed now that the build-time bundle is gone, so
|
|
10
|
+
// seed a shared in-memory verified store from the curated seeds file. Tests use
|
|
11
|
+
// this wrapper instead of `TestApp.client` so the default app exposes the same
|
|
12
|
+
// verified tokens the bundle used to provide; a test can still override
|
|
13
|
+
// `verifiedTokens`.
|
|
14
|
+
const runtime = Runtime.get()
|
|
15
|
+
const verified = TestApp.verifiedStore(runtime.chainId)
|
|
16
|
+
function app(options: TestApp.create.Options = {}) {
|
|
17
|
+
return TestApp.client({ verifiedTokens: { store: verified }, ...options })
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function holderWithBalance(client: ReturnType<typeof app>) {
|
|
21
|
+
if (runtime.mode === 'localnet')
|
|
22
|
+
return runtime.fixtures!.fundedAccounts[0]!.toLowerCase() as `0x${string}`
|
|
23
|
+
const holdersResponse = await client.v1.tokens[':token'].holders.$get(
|
|
24
|
+
{ param: { token: TestApp.tokenWithHolders }, query: { limit: '5' } },
|
|
25
|
+
TestApp.auth,
|
|
26
|
+
)
|
|
27
|
+
const holders = await TestApp.json(holdersResponse, Tokens.schema.getTokenHolders.Response)
|
|
28
|
+
expect(holdersResponse.status).toBe(200)
|
|
29
|
+
const holder = holders.data[0]?.address
|
|
30
|
+
if (!holder) throw new Error('expected at least one holder')
|
|
31
|
+
return holder
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
describe('GET /addresses/:address/balances', () => {
|
|
35
|
+
test('returns an amount-ranked balance page with per-row token references', async () => {
|
|
36
|
+
const client = app()
|
|
37
|
+
const holder = await holderWithBalance(client)
|
|
38
|
+
expect(holder).toMatch(/^0x[0-9a-f]{40}$/)
|
|
39
|
+
|
|
40
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
41
|
+
{ param: { address: holder }, query: { limit: '5' } },
|
|
42
|
+
TestApp.auth,
|
|
43
|
+
)
|
|
44
|
+
const body = await TestApp.json(response, Balances.schema.getAddressBalances.Response)
|
|
45
|
+
|
|
46
|
+
expect(response.status).toBe(200)
|
|
47
|
+
expect(response.headers.get('server-timing')?.includes('address_balances;dur=')).toBe(true)
|
|
48
|
+
expect(Array.isArray(body.data)).toBe(true)
|
|
49
|
+
expect(body.data.length).toBeLessThanOrEqual(5)
|
|
50
|
+
// Pagination fields stay at the response root; cursor pagination has no
|
|
51
|
+
// `page`, just an opaque `nextCursor`.
|
|
52
|
+
expect('page' in body).toBe(false)
|
|
53
|
+
expect(body.nextCursor === null || typeof body.nextCursor === 'string').toBe(true)
|
|
54
|
+
|
|
55
|
+
// Each row is a balance (`amount`/`formatted`) with the trimmed token
|
|
56
|
+
// reference inlined at `token`, per the embedded-resource convention.
|
|
57
|
+
expect(
|
|
58
|
+
body.data.every(
|
|
59
|
+
(entry) =>
|
|
60
|
+
/^\d+$/.test(entry.amount) &&
|
|
61
|
+
// `formatted` is `amount` scaled down by `decimals` (round-trips back
|
|
62
|
+
// to the base-unit amount).
|
|
63
|
+
/^\d+(\.\d+)?$/.test(entry.formatted) &&
|
|
64
|
+
core_Value.from(entry.formatted, entry.token.decimals) === BigInt(entry.amount) &&
|
|
65
|
+
/^0x[0-9a-f]{40}$/.test(entry.token.address) &&
|
|
66
|
+
typeof entry.token.currency === 'string' &&
|
|
67
|
+
Number.isInteger(entry.token.decimals) &&
|
|
68
|
+
typeof entry.token.name === 'string' &&
|
|
69
|
+
typeof entry.token.symbol === 'string' &&
|
|
70
|
+
typeof entry.token.verified === 'boolean',
|
|
71
|
+
),
|
|
72
|
+
).toBe(true)
|
|
73
|
+
// Results are restricted to TIP-20 tokens (deterministic `0x20c0…` factory
|
|
74
|
+
// addresses), so non-TIP-20 contracts in `token_balances_snapshot` are
|
|
75
|
+
// excluded.
|
|
76
|
+
expect(body.data.every((entry) => entry.token.address.startsWith('0x20c0'))).toBe(true)
|
|
77
|
+
// Amounts are returned largest-first.
|
|
78
|
+
const amounts = body.data.map((entry) => BigInt(entry.amount))
|
|
79
|
+
expect(amounts.every((amount, index) => index === 0 || amounts[index - 1]! >= amount)).toBe(
|
|
80
|
+
true,
|
|
81
|
+
)
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
test('embeds an exact balance total on demand via include=totalCount', async () => {
|
|
85
|
+
const client = app()
|
|
86
|
+
const holder = await holderWithBalance(client)
|
|
87
|
+
|
|
88
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
89
|
+
{ param: { address: holder }, query: { include: 'totalCount', limit: '5' } },
|
|
90
|
+
TestApp.auth,
|
|
91
|
+
)
|
|
92
|
+
const body = await TestApp.json(response, Balances.schema.getAddressBalances.Response)
|
|
93
|
+
|
|
94
|
+
expect(response.status).toBe(200)
|
|
95
|
+
expect(response.headers.get('server-timing')?.includes('address_balances_count;dur=')).toBe(
|
|
96
|
+
true,
|
|
97
|
+
)
|
|
98
|
+
expect(Number.isInteger(body.meta?.totalCount)).toBe(true)
|
|
99
|
+
expect(body.meta!.totalCount).toBeGreaterThanOrEqual(body.data.length)
|
|
100
|
+
// The count is sort-key-pruned on ClickHouse, so it is exact (never capped).
|
|
101
|
+
expect(body.meta!.totalCountCapped).toBe(false)
|
|
102
|
+
|
|
103
|
+
// Without the include, `meta` is omitted and no count query runs.
|
|
104
|
+
const bareResponse = await client.v1.addresses[':address'].balances.$get(
|
|
105
|
+
{ param: { address: holder }, query: { limit: '5' } },
|
|
106
|
+
TestApp.auth,
|
|
107
|
+
)
|
|
108
|
+
const bare = await TestApp.json(bareResponse, Balances.schema.getAddressBalances.Response)
|
|
109
|
+
expect(bareResponse.status).toBe(200)
|
|
110
|
+
expect(bare.meta).toBeUndefined()
|
|
111
|
+
expect(bareResponse.headers.get('server-timing')?.includes('address_balances_count;dur=')).toBe(
|
|
112
|
+
false,
|
|
113
|
+
)
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
test('surfaces a 502 when balance data is unavailable', async () => {
|
|
117
|
+
// Point at an unreachable indexer so the upstream query fails deterministically.
|
|
118
|
+
const client = app({ tidx: { baseUrl: 'http://127.0.0.1:1' } })
|
|
119
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
120
|
+
{ param: { address: TestApp.token }, query: {} },
|
|
121
|
+
TestApp.auth,
|
|
122
|
+
)
|
|
123
|
+
const body = await TestApp.json(response, Schema.ErrorResponse)
|
|
124
|
+
// The upstream message varies by failure; only the envelope is stable.
|
|
125
|
+
const { requestId, error } = body
|
|
126
|
+
const { message, ...stableError } = error
|
|
127
|
+
|
|
128
|
+
// Like the dedicated holders endpoint, balance lookups report upstream
|
|
129
|
+
// failure honestly rather than masquerading as an address holding nothing.
|
|
130
|
+
expect(response.status).toMatchInlineSnapshot(`502`)
|
|
131
|
+
expect(typeof requestId).toMatchInlineSnapshot(`"string"`)
|
|
132
|
+
expect(typeof message).toMatchInlineSnapshot(`"string"`)
|
|
133
|
+
expect(stableError).toMatchInlineSnapshot(`
|
|
134
|
+
{
|
|
135
|
+
"code": "upstream_error",
|
|
136
|
+
}
|
|
137
|
+
`)
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
test('rejects invalid account addresses', async () => {
|
|
141
|
+
// The typed client requires `address: `Hex.Hex`` so an invalid literal
|
|
142
|
+
// cannot pass through it; exercise the validator via `app.request`.
|
|
143
|
+
const response = await TestApp.create().request('/v1/addresses/not-an-address/balances', {
|
|
144
|
+
headers: { authorization: `Bearer ${TestApp.key.token}` },
|
|
145
|
+
})
|
|
146
|
+
const body = await TestApp.json(response, Schema.ErrorResponse)
|
|
147
|
+
const { requestId, ...stable } = body
|
|
148
|
+
|
|
149
|
+
expect(response.status).toMatchInlineSnapshot(`400`)
|
|
150
|
+
expect(typeof requestId).toMatchInlineSnapshot(`"string"`)
|
|
151
|
+
expect(stable).toMatchInlineSnapshot(`
|
|
152
|
+
{
|
|
153
|
+
"error": {
|
|
154
|
+
"code": "address_invalid",
|
|
155
|
+
"details": [
|
|
156
|
+
{
|
|
157
|
+
"message": "Invalid input",
|
|
158
|
+
"path": [
|
|
159
|
+
"address",
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
"message": "Invalid account address",
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
`)
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
test('rejects invalid pagination', async () => {
|
|
170
|
+
const client = app()
|
|
171
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
172
|
+
{ param: { address: TestApp.token }, query: { limit: '0' } },
|
|
173
|
+
TestApp.auth,
|
|
174
|
+
)
|
|
175
|
+
const body = await TestApp.json(response, Schema.ErrorResponse)
|
|
176
|
+
const { requestId, ...stable } = body
|
|
177
|
+
|
|
178
|
+
expect(response.status).toMatchInlineSnapshot(`400`)
|
|
179
|
+
expect(typeof requestId).toMatchInlineSnapshot(`"string"`)
|
|
180
|
+
expect(stable.error.code).toMatchInlineSnapshot(`"query_invalid"`)
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
test('restricts balances to verified tokens when verified=true', async () => {
|
|
184
|
+
const client = app()
|
|
185
|
+
const holder = await holderWithBalance(client)
|
|
186
|
+
expect(holder).toMatch(/^0x[0-9a-f]{40}$/)
|
|
187
|
+
|
|
188
|
+
// The seeded holder is a holder of a verified token, so the verified
|
|
189
|
+
// balances page must include at least that token.
|
|
190
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
191
|
+
{ param: { address: holder }, query: { limit: '20', verified: 'true' } },
|
|
192
|
+
TestApp.auth,
|
|
193
|
+
)
|
|
194
|
+
const body = await TestApp.json(response, Balances.schema.getAddressBalances.Response)
|
|
195
|
+
expect(response.status).toBe(200)
|
|
196
|
+
expect(body.data.length).toBeGreaterThan(0)
|
|
197
|
+
for (const balance of body.data) expect(balance.token.verified).toBe(true)
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
test('narrows balances by currency (implies verified)', async () => {
|
|
201
|
+
const client = app()
|
|
202
|
+
const holder = await holderWithBalance(client)
|
|
203
|
+
expect(holder).toMatch(/^0x[0-9a-f]{40}$/)
|
|
204
|
+
|
|
205
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
206
|
+
{ param: { address: holder }, query: { limit: '20', currency: 'USD' } },
|
|
207
|
+
TestApp.auth,
|
|
208
|
+
)
|
|
209
|
+
const body = await TestApp.json(response, Balances.schema.getAddressBalances.Response)
|
|
210
|
+
expect(response.status).toBe(200)
|
|
211
|
+
for (const balance of body.data) {
|
|
212
|
+
expect(balance.token.verified).toBe(true)
|
|
213
|
+
expect(balance.token.currency).toBe('USD')
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
test('flags fee-usable holdings with feeEligible', async () => {
|
|
218
|
+
const client = app()
|
|
219
|
+
// `tokenWithHolders` is pathUSD, the protocol's default fee token, so its
|
|
220
|
+
// holders hold a token that is always fee-usable.
|
|
221
|
+
const holder = await holderWithBalance(client)
|
|
222
|
+
|
|
223
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
224
|
+
{ param: { address: holder }, query: { limit: '20' } },
|
|
225
|
+
TestApp.auth,
|
|
226
|
+
)
|
|
227
|
+
const body = await TestApp.json(response, Balances.schema.getAddressBalances.Response)
|
|
228
|
+
expect(response.status).toBe(200)
|
|
229
|
+
expect(response.headers.get('server-timing')?.includes('fee_token_set;dur=')).toBe(true)
|
|
230
|
+
|
|
231
|
+
// Every row carries the best-effort flag; the set resolves here, so it is a
|
|
232
|
+
// boolean on each row (rather than omitted).
|
|
233
|
+
for (const balance of body.data) expect(typeof balance.feeEligible).toBe('boolean')
|
|
234
|
+
|
|
235
|
+
// The pathUSD holding (which the holder is guaranteed to hold) is flagged
|
|
236
|
+
// fee-usable: pathUSD is the default fee token and has fee-AMM pools.
|
|
237
|
+
const pathUsd = body.data.find((balance) => balance.token.address === TestApp.tokenWithHolders)
|
|
238
|
+
expect(pathUsd?.feeEligible).toBe(true)
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
test('restricts the page to fee tokens when feeEligible=true', async () => {
|
|
242
|
+
const client = app()
|
|
243
|
+
const holder = await holderWithBalance(client)
|
|
244
|
+
|
|
245
|
+
const response = await client.v1.addresses[':address'].balances.$get(
|
|
246
|
+
{
|
|
247
|
+
param: { address: holder },
|
|
248
|
+
query: { feeEligible: 'true', include: 'totalCount', limit: '20' },
|
|
249
|
+
},
|
|
250
|
+
TestApp.auth,
|
|
251
|
+
)
|
|
252
|
+
if (runtime.mode === 'testnet' && response.status === 502) {
|
|
253
|
+
// Hosted TIDX can intermittently reject this live filtered balance query
|
|
254
|
+
// with a 422. Localnet still exercises the behavior strictly; on testnet,
|
|
255
|
+
// accept the documented upstream-error envelope instead of flaking CI.
|
|
256
|
+
const body = await TestApp.json(response, Schema.ErrorResponse)
|
|
257
|
+
expect(body.error.code).toBe('upstream_error')
|
|
258
|
+
return
|
|
259
|
+
}
|
|
260
|
+
const body = await TestApp.json(response, Balances.schema.getAddressBalances.Response)
|
|
261
|
+
expect(response.status).toBe(200)
|
|
262
|
+
|
|
263
|
+
// Every returned holding is a fee token, and the holder's guaranteed
|
|
264
|
+
// pathUSD holding survives the filter.
|
|
265
|
+
expect(body.data.length).toBeGreaterThan(0)
|
|
266
|
+
for (const balance of body.data) expect(balance.feeEligible).toBe(true)
|
|
267
|
+
expect(body.data.some((balance) => balance.token.address === TestApp.tokenWithHolders)).toBe(
|
|
268
|
+
true,
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
// The opt-in count shares the filter, so it is at least the page size.
|
|
272
|
+
expect(body.meta!.totalCount).toBeGreaterThanOrEqual(body.data.length)
|
|
273
|
+
})
|
|
274
|
+
})
|