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,321 @@
|
|
|
1
|
+
import { Abis, Addresses } from 'viem/tempo'
|
|
2
|
+
|
|
3
|
+
import * as TestApp from '../../test/App.js'
|
|
4
|
+
import * as Runtime from '../../test/runtime.js'
|
|
5
|
+
import * as TestViem from '../../test/Viem.js'
|
|
6
|
+
import * as FeeAmm from './fee-amm.js'
|
|
7
|
+
|
|
8
|
+
/** Validator-side token with live fee-AMM activity on Tempo Moderato. */
|
|
9
|
+
const validatorToken =
|
|
10
|
+
Runtime.get().mode === 'localnet'
|
|
11
|
+
? Addresses.pathUsd.toLowerCase()
|
|
12
|
+
: '0x20c0000000000000000000000000000000000001'
|
|
13
|
+
|
|
14
|
+
// Skipped: the pools listing runs a ClickHouse `GROUP BY` over every FeeManager
|
|
15
|
+
// `Mint` log, which exceeds the live indexer's 5s execution cap on high-volume
|
|
16
|
+
// chains (testnet) and returns `502`. Re-enable once the aggregate fits the
|
|
17
|
+
// timeout (a cheaper query, or a per-query timeout in the `tidx.ts` client).
|
|
18
|
+
describe.skip('GET /fee-amm/pools', () => {
|
|
19
|
+
test('lists pools with on-chain poolId parity and consistent timestamps', async () => {
|
|
20
|
+
const client = TestApp.client()
|
|
21
|
+
const response = await client.v1['fee-amm'].pools.$get({ query: {} }, TestApp.auth)
|
|
22
|
+
const body = await TestApp.json(response, FeeAmm.schema.getFeeAmmPools.Response)
|
|
23
|
+
|
|
24
|
+
expect(response.status).toBe(200)
|
|
25
|
+
expect(response.headers.get('server-timing')?.includes('fee_amm_pools;dur=')).toBe(true)
|
|
26
|
+
expect(body.data.length).toBeGreaterThan(0)
|
|
27
|
+
// Paginated: the page carries `nextCursor` (null when no further page).
|
|
28
|
+
expect('nextCursor' in body).toBe(true)
|
|
29
|
+
expect('meta' in body).toBe(false)
|
|
30
|
+
|
|
31
|
+
// Stable item shape (sorted keys of the first pool).
|
|
32
|
+
expect(Object.keys(body.data[0]!).sort()).toMatchInlineSnapshot(`
|
|
33
|
+
[
|
|
34
|
+
"createdAt",
|
|
35
|
+
"lastMintAt",
|
|
36
|
+
"mintCount",
|
|
37
|
+
"poolId",
|
|
38
|
+
"userToken",
|
|
39
|
+
"validatorToken",
|
|
40
|
+
]
|
|
41
|
+
`)
|
|
42
|
+
|
|
43
|
+
// Every pool: valid ISO timestamps with first mint at or before the most
|
|
44
|
+
// recent one, and each side's reserve riding on its token reference —
|
|
45
|
+
// either absent (failed read) or a base-unit decimal `amount` with a
|
|
46
|
+
// `formatted` decimal form.
|
|
47
|
+
const validReserve = (token: { amount?: string | undefined; formatted?: string | undefined }) =>
|
|
48
|
+
(token.amount === undefined && token.formatted === undefined) ||
|
|
49
|
+
(/^\d+$/.test(token.amount ?? '') && /^\d+(\.\d+)?$/.test(token.formatted ?? ''))
|
|
50
|
+
expect(
|
|
51
|
+
body.data.every(
|
|
52
|
+
(pool) =>
|
|
53
|
+
!Number.isNaN(Date.parse(pool.createdAt)) &&
|
|
54
|
+
!Number.isNaN(Date.parse(pool.lastMintAt)) &&
|
|
55
|
+
Date.parse(pool.createdAt) <= Date.parse(pool.lastMintAt) &&
|
|
56
|
+
pool.mintCount > 0 &&
|
|
57
|
+
validReserve(pool.userToken) &&
|
|
58
|
+
validReserve(pool.validatorToken),
|
|
59
|
+
),
|
|
60
|
+
).toBe(true)
|
|
61
|
+
// Presentation order: most active first (by mint count).
|
|
62
|
+
const mintCounts = body.data.map((pool) => pool.mintCount)
|
|
63
|
+
expect(mintCounts.every((count, index) => index === 0 || mintCounts[index - 1]! >= count)).toBe(
|
|
64
|
+
true,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
// Parity check: the locally computed poolId of the first pool matches the
|
|
68
|
+
// on-chain `FeeManager.getPoolId`.
|
|
69
|
+
const pool = body.data[0]!
|
|
70
|
+
const chainPoolId = await TestViem.getClient().readContract({
|
|
71
|
+
abi: Abis.feeAmm,
|
|
72
|
+
address: Addresses.feeManager,
|
|
73
|
+
args: [pool.userToken.address, pool.validatorToken.address],
|
|
74
|
+
functionName: 'getPoolId',
|
|
75
|
+
})
|
|
76
|
+
expect(pool.poolId).toBe(chainPoolId.toLowerCase())
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
test('walks the cursor to a disjoint page, continuing mint-count order', async () => {
|
|
80
|
+
const client = TestApp.client()
|
|
81
|
+
const firstResponse = await client.v1['fee-amm'].pools.$get(
|
|
82
|
+
{ query: { limit: '5' } },
|
|
83
|
+
TestApp.auth,
|
|
84
|
+
)
|
|
85
|
+
const first = await TestApp.json(firstResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
86
|
+
|
|
87
|
+
expect(firstResponse.status).toBe(200)
|
|
88
|
+
expect(first.data.length).toBeGreaterThan(0)
|
|
89
|
+
expect(first.data.length).toBeLessThanOrEqual(5)
|
|
90
|
+
expect(first.nextCursor).toBeTypeOf('string')
|
|
91
|
+
|
|
92
|
+
const secondResponse = await client.v1['fee-amm'].pools.$get(
|
|
93
|
+
{ query: { cursor: first.nextCursor!, limit: '5' } },
|
|
94
|
+
TestApp.auth,
|
|
95
|
+
)
|
|
96
|
+
const second = await TestApp.json(secondResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
97
|
+
|
|
98
|
+
expect(secondResponse.status).toBe(200)
|
|
99
|
+
expect(second.data.length).toBeGreaterThan(0)
|
|
100
|
+
// No pool repeats across the page boundary (keyed by poolId).
|
|
101
|
+
const firstIds = new Set(first.data.map((pool) => pool.poolId))
|
|
102
|
+
expect(second.data.every((pool) => !firstIds.has(pool.poolId))).toBe(true)
|
|
103
|
+
// Mint-count order continues descending across the boundary.
|
|
104
|
+
expect(second.data[0]!.mintCount).toBeLessThanOrEqual(first.data.at(-1)!.mintCount)
|
|
105
|
+
expect(
|
|
106
|
+
second.data.every(
|
|
107
|
+
(pool, index) => index === 0 || second.data[index - 1]!.mintCount >= pool.mintCount,
|
|
108
|
+
),
|
|
109
|
+
).toBe(true)
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
test('paginates positionally via page, disjoint from page 1', async () => {
|
|
113
|
+
const client = TestApp.client()
|
|
114
|
+
const pageOneResponse = await client.v1['fee-amm'].pools.$get(
|
|
115
|
+
{ query: { limit: '5' } },
|
|
116
|
+
TestApp.auth,
|
|
117
|
+
)
|
|
118
|
+
const pageOne = await TestApp.json(pageOneResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
119
|
+
const pageTwoResponse = await client.v1['fee-amm'].pools.$get(
|
|
120
|
+
{ query: { limit: '5', page: '2' } },
|
|
121
|
+
TestApp.auth,
|
|
122
|
+
)
|
|
123
|
+
const pageTwo = await TestApp.json(pageTwoResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
124
|
+
|
|
125
|
+
expect(pageTwoResponse.status).toBe(200)
|
|
126
|
+
expect(pageTwo.data.length).toBeGreaterThan(0)
|
|
127
|
+
// page=2 doesn't repeat page=1 and continues the mint-count ordering.
|
|
128
|
+
const pageOneIds = new Set(pageOne.data.map((pool) => pool.poolId))
|
|
129
|
+
expect(pageTwo.data.every((pool) => !pageOneIds.has(pool.poolId))).toBe(true)
|
|
130
|
+
expect(pageTwo.data[0]!.mintCount).toBeLessThanOrEqual(pageOne.data.at(-1)!.mintCount)
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
test('omits token metadata by default and embeds it via include=token', async () => {
|
|
134
|
+
const client = TestApp.client()
|
|
135
|
+
const baseResponse = await client.v1['fee-amm'].pools.$get(
|
|
136
|
+
{ query: { limit: '5' } },
|
|
137
|
+
TestApp.auth,
|
|
138
|
+
)
|
|
139
|
+
const base = await TestApp.json(baseResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
140
|
+
|
|
141
|
+
expect(baseResponse.status).toBe(200)
|
|
142
|
+
expect(base.data.length).toBeGreaterThan(0)
|
|
143
|
+
// The base page resolves no token metadata: each side carries just its
|
|
144
|
+
// `address` plus its (best-effort) reserve, never `symbol`/`decimals`/etc.
|
|
145
|
+
expect(
|
|
146
|
+
base.data.every(
|
|
147
|
+
(pool) =>
|
|
148
|
+
pool.userToken.symbol === undefined &&
|
|
149
|
+
pool.userToken.decimals === undefined &&
|
|
150
|
+
pool.validatorToken.symbol === undefined &&
|
|
151
|
+
pool.validatorToken.decimals === undefined,
|
|
152
|
+
),
|
|
153
|
+
).toBe(true)
|
|
154
|
+
|
|
155
|
+
const includeResponse = await client.v1['fee-amm'].pools.$get(
|
|
156
|
+
{ query: { include: 'token', limit: '5' } },
|
|
157
|
+
TestApp.auth,
|
|
158
|
+
)
|
|
159
|
+
const included = await TestApp.json(includeResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
160
|
+
|
|
161
|
+
expect(includeResponse.status).toBe(200)
|
|
162
|
+
// The same pages line up, and `include=token` resolves metadata for at
|
|
163
|
+
// least one side (verified tokens always carry `symbol`/`decimals`).
|
|
164
|
+
expect(included.data.map((pool) => pool.poolId)).toEqual(base.data.map((pool) => pool.poolId))
|
|
165
|
+
expect(
|
|
166
|
+
included.data.some(
|
|
167
|
+
(pool) => pool.userToken.symbol !== undefined || pool.validatorToken.symbol !== undefined,
|
|
168
|
+
),
|
|
169
|
+
).toBe(true)
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
test('falls back to the head page on a malformed cursor', async () => {
|
|
173
|
+
const client = TestApp.client()
|
|
174
|
+
const headResponse = await client.v1['fee-amm'].pools.$get(
|
|
175
|
+
{ query: { limit: '5' } },
|
|
176
|
+
TestApp.auth,
|
|
177
|
+
)
|
|
178
|
+
const head = await TestApp.json(headResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
179
|
+
const malformedResponse = await client.v1['fee-amm'].pools.$get(
|
|
180
|
+
{ query: { cursor: 'not-a-real-cursor', limit: '5' } },
|
|
181
|
+
TestApp.auth,
|
|
182
|
+
)
|
|
183
|
+
const malformed = await TestApp.json(malformedResponse, FeeAmm.schema.getFeeAmmPools.Response)
|
|
184
|
+
|
|
185
|
+
expect(malformedResponse.status).toBe(200)
|
|
186
|
+
expect(malformed.data.map((pool) => pool.poolId)).toEqual(head.data.map((pool) => pool.poolId))
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
describe('GET /fee-amm/mints', () => {
|
|
191
|
+
test('returns a decoded head page and walks the cursor to a disjoint page', async () => {
|
|
192
|
+
const client = TestApp.client()
|
|
193
|
+
const firstResponse = await client.v1['fee-amm'].mints.$get(
|
|
194
|
+
{ query: { limit: '5' } },
|
|
195
|
+
TestApp.auth,
|
|
196
|
+
)
|
|
197
|
+
const first = await TestApp.json(firstResponse, FeeAmm.schema.getFeeAmmMints.Response)
|
|
198
|
+
|
|
199
|
+
expect(firstResponse.status).toBe(200)
|
|
200
|
+
expect(firstResponse.headers.get('server-timing')?.includes('fee_amm_mints;dur=')).toBe(true)
|
|
201
|
+
expect(first.data.length).toBeGreaterThan(0)
|
|
202
|
+
expect(first.data.length).toBeLessThanOrEqual(5)
|
|
203
|
+
expect(
|
|
204
|
+
first.data.every(
|
|
205
|
+
(mint) =>
|
|
206
|
+
/^0x[0-9a-f]{40}$/.test(mint.minter) &&
|
|
207
|
+
/^0x[0-9a-f]{40}$/.test(mint.userToken.address) &&
|
|
208
|
+
/^0x[0-9a-f]{40}$/.test(mint.validatorToken.address) &&
|
|
209
|
+
/^\d+$/.test(mint.amountValidatorToken) &&
|
|
210
|
+
/^\d+$/.test(mint.liquidity) &&
|
|
211
|
+
Number.isInteger(mint.blockNumber) &&
|
|
212
|
+
/^0x[0-9a-f]{64}$/.test(mint.transactionHash) &&
|
|
213
|
+
!Number.isNaN(Date.parse(mint.timestamp)),
|
|
214
|
+
),
|
|
215
|
+
).toBe(true)
|
|
216
|
+
// Newest-first by default.
|
|
217
|
+
const blocks = first.data.map((mint) => mint.blockNumber)
|
|
218
|
+
expect(blocks.every((block, index) => index === 0 || blocks[index - 1]! >= block)).toBe(true)
|
|
219
|
+
|
|
220
|
+
// Timestamp parity: the head row's timestamp must match the block's
|
|
221
|
+
// RPC timestamp exactly (guards the ClickHouse UTC normalization).
|
|
222
|
+
const head = first.data[0]!
|
|
223
|
+
const block = await TestViem.getClient().getBlock({
|
|
224
|
+
blockNumber: BigInt(head.blockNumber),
|
|
225
|
+
})
|
|
226
|
+
expect(Date.parse(head.timestamp)).toBe(Number(block.timestamp) * 1000)
|
|
227
|
+
|
|
228
|
+
expect(first.nextCursor).toBeTypeOf('string')
|
|
229
|
+
const secondResponse = await client.v1['fee-amm'].mints.$get(
|
|
230
|
+
{ query: { cursor: first.nextCursor!, limit: '5' } },
|
|
231
|
+
TestApp.auth,
|
|
232
|
+
)
|
|
233
|
+
const second = await TestApp.json(secondResponse, FeeAmm.schema.getFeeAmmMints.Response)
|
|
234
|
+
|
|
235
|
+
expect(secondResponse.status).toBe(200)
|
|
236
|
+
expect(second.data.length).toBeGreaterThan(0)
|
|
237
|
+
// No overlap across the page boundary, and ordering continues descending.
|
|
238
|
+
const firstKeys = new Set(
|
|
239
|
+
first.data.map((mint) => `${mint.blockNumber}:${mint.transactionHash}`),
|
|
240
|
+
)
|
|
241
|
+
expect(
|
|
242
|
+
second.data.every((mint) => !firstKeys.has(`${mint.blockNumber}:${mint.transactionHash}`)),
|
|
243
|
+
).toBe(true)
|
|
244
|
+
expect(second.data[0]!.blockNumber).toBeLessThanOrEqual(first.data.at(-1)!.blockNumber)
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
test('narrows mints to a single validator token', async () => {
|
|
248
|
+
const client = TestApp.client()
|
|
249
|
+
const response = await client.v1['fee-amm'].mints.$get(
|
|
250
|
+
{ query: { limit: '5', validatorToken } },
|
|
251
|
+
TestApp.auth,
|
|
252
|
+
)
|
|
253
|
+
const body = await TestApp.json(response, FeeAmm.schema.getFeeAmmMints.Response)
|
|
254
|
+
|
|
255
|
+
expect(response.status).toBe(200)
|
|
256
|
+
expect(body.data.length).toBeGreaterThan(0)
|
|
257
|
+
expect(body.data.every((mint) => mint.validatorToken.address === validatorToken)).toBe(true)
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
test('orders ascending and decodes whichever signature appears', async () => {
|
|
261
|
+
const client = TestApp.client()
|
|
262
|
+
const response = await client.v1['fee-amm'].mints.$get(
|
|
263
|
+
{ query: { limit: '5', order: 'asc' } },
|
|
264
|
+
TestApp.auth,
|
|
265
|
+
)
|
|
266
|
+
const body = await TestApp.json(response, FeeAmm.schema.getFeeAmmMints.Response)
|
|
267
|
+
|
|
268
|
+
expect(response.status).toBe(200)
|
|
269
|
+
expect(body.data.length).toBeGreaterThan(0)
|
|
270
|
+
expect(body.data[0]!.blockNumber).toBeLessThanOrEqual(body.data.at(-1)!.blockNumber)
|
|
271
|
+
// Both signatures decode to a complete row; the shapes differ only in
|
|
272
|
+
// their signature-specific optional fields (legacy: `amountUserToken`;
|
|
273
|
+
// current: `recipient`).
|
|
274
|
+
expect(
|
|
275
|
+
body.data.every(
|
|
276
|
+
(mint) =>
|
|
277
|
+
/^0x[0-9a-f]{40}$/.test(mint.minter) &&
|
|
278
|
+
/^\d+$/.test(mint.amountValidatorToken) &&
|
|
279
|
+
/^\d+$/.test(mint.liquidity) &&
|
|
280
|
+
(mint.amountUserToken === undefined || /^\d+$/.test(mint.amountUserToken)) &&
|
|
281
|
+
(mint.recipient === undefined || /^0x[0-9a-f]{40}$/.test(mint.recipient)) &&
|
|
282
|
+
(mint.amountUserToken !== undefined || mint.recipient !== undefined),
|
|
283
|
+
),
|
|
284
|
+
).toBe(true)
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
test('falls back to the head page on a malformed cursor', async () => {
|
|
288
|
+
const client = TestApp.client()
|
|
289
|
+
const response = await client.v1['fee-amm'].mints.$get(
|
|
290
|
+
{ query: { cursor: 'not-a-cursor', limit: '5' } },
|
|
291
|
+
TestApp.auth,
|
|
292
|
+
)
|
|
293
|
+
const body = await TestApp.json(response, FeeAmm.schema.getFeeAmmMints.Response)
|
|
294
|
+
|
|
295
|
+
expect(response.status).toBe(200)
|
|
296
|
+
expect(body.data.length).toBeGreaterThan(0)
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
test('embeds an exact total count on demand via include=totalCount', async () => {
|
|
300
|
+
const client = TestApp.client()
|
|
301
|
+
const response = await client.v1['fee-amm'].mints.$get(
|
|
302
|
+
{ query: { include: 'totalCount', limit: '5' } },
|
|
303
|
+
TestApp.auth,
|
|
304
|
+
)
|
|
305
|
+
const body = await TestApp.json(response, FeeAmm.schema.getFeeAmmMints.Response)
|
|
306
|
+
|
|
307
|
+
expect(response.status).toBe(200)
|
|
308
|
+
expect(response.headers.get('server-timing')?.includes('fee_amm_mints_count;dur=')).toBe(true)
|
|
309
|
+
expect(body.meta).toBeDefined()
|
|
310
|
+
expect(Number.isInteger(body.meta?.totalCount)).toBe(true)
|
|
311
|
+
expect(body.meta!.totalCount).toBeGreaterThanOrEqual(body.data.length)
|
|
312
|
+
// The count is sort-key-pruned on ClickHouse, so it is exact (never capped).
|
|
313
|
+
expect(body.meta!.totalCountCapped).toBe(false)
|
|
314
|
+
|
|
315
|
+
// Without `include=totalCount`, the same page omits `meta` and the count.
|
|
316
|
+
const bare = await client.v1['fee-amm'].mints.$get({ query: { limit: '5' } }, TestApp.auth)
|
|
317
|
+
const bareBody = await TestApp.json(bare, FeeAmm.schema.getFeeAmmMints.Response)
|
|
318
|
+
expect(bare.status).toBe(200)
|
|
319
|
+
expect(bareBody.meta).toBeUndefined()
|
|
320
|
+
})
|
|
321
|
+
})
|