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,360 @@
|
|
|
1
|
+
import { Hex as core_Hex } from 'ox';
|
|
2
|
+
import { Addresses } from 'viem/tempo';
|
|
3
|
+
import * as z from 'zod/mini';
|
|
4
|
+
/**
|
|
5
|
+
* Attaches an OpenAPI description to an object/array schema that is later
|
|
6
|
+
* derived from via `z.partial`/`z.extend`. `zod/mini` exposes descriptions only
|
|
7
|
+
* through `.check(z.describe(...))`, but that adds a refinement which those
|
|
8
|
+
* derivations reject. Cloning and registering the description directly (as
|
|
9
|
+
* classic zod's `.describe()` does) keeps the schema refinement-free. Plain
|
|
10
|
+
* fields use `.check(z.describe(...))` directly.
|
|
11
|
+
*/
|
|
12
|
+
export function describe(schema, description) {
|
|
13
|
+
const cloned = schema.clone();
|
|
14
|
+
z.globalRegistry.add(cloned, { ...z.globalRegistry.get(schema), description });
|
|
15
|
+
return cloned;
|
|
16
|
+
}
|
|
17
|
+
/** Representative account (EOA) address used as the default OpenAPI example. */
|
|
18
|
+
const accountExample = '0xbe058e1c4df8a4366a387bf595b284246a93039e';
|
|
19
|
+
// Pre-transform input for a 0x-prefixed 20-byte address. The OpenAPI example is
|
|
20
|
+
// attached here (pre-transform) via `z.meta` so it surfaces on path/query
|
|
21
|
+
// params; the lowercasing transform is applied after.
|
|
22
|
+
const address = z.templateLiteral(['0x', z.string().check(z.regex(/^[0-9a-fA-F]{40}$/))]);
|
|
23
|
+
// TODO(ox/zod): replace with ox's `Address` zod schema once ox ships a `zod`
|
|
24
|
+
// entrypoint, so the wire format stays in lockstep with ox/viem.
|
|
25
|
+
/** Lowercase 0x-prefixed 20-byte account address. */
|
|
26
|
+
export const Address = z
|
|
27
|
+
.pipe(address.check(z.meta({ examples: [accountExample] })),
|
|
28
|
+
// `String.prototype.toLowerCase` widens its receiver from `Hex.Hex` to
|
|
29
|
+
// `string`. Cast the result back so the schema's inferred output keeps the
|
|
30
|
+
// hex-literal type — this is sound because lowercasing preserves both the
|
|
31
|
+
// `0x` prefix and the upstream regex constraint.
|
|
32
|
+
z.transform((value) => value.toLowerCase()))
|
|
33
|
+
.check(z.describe('An account address — the `0x`-prefixed 20-byte identifier for a wallet or contract, returned in lowercase.'));
|
|
34
|
+
/**
|
|
35
|
+
* Lowercase 0x-prefixed 20-byte TIP-20 token contract address. The OpenAPI
|
|
36
|
+
* example must be attached to the inner pre-transform schema (path/query
|
|
37
|
+
* params read examples from the pipe input), so callers that need a different
|
|
38
|
+
* example per field build a fresh `TokenAddress` via `tokenAddress(example)`
|
|
39
|
+
* instead of overriding via an outer `.check(z.meta(...))`.
|
|
40
|
+
*/
|
|
41
|
+
export const TokenAddress = tokenAddress(Addresses.pathUsd);
|
|
42
|
+
/**
|
|
43
|
+
* Builds a `TokenAddress`-shaped schema with the given OpenAPI example. Use
|
|
44
|
+
* when a path/query param wants a different example than the shared
|
|
45
|
+
* `TokenAddress` default (e.g. the two sides of a trading pair).
|
|
46
|
+
*
|
|
47
|
+
* The example must be a TIP-20 token address (`0x20c` prefix); a non-TIP-20
|
|
48
|
+
* example in the docs would be misleading because the route validates the
|
|
49
|
+
* value as a TIP-20 token contract at runtime.
|
|
50
|
+
*/
|
|
51
|
+
export function tokenAddress(example) {
|
|
52
|
+
if (!example.toLowerCase().startsWith('0x20c'))
|
|
53
|
+
throw new Error(`tokenAddress example ${example} is not a TIP-20 token (must start with 0x20c).`);
|
|
54
|
+
return z
|
|
55
|
+
.pipe(address.check(z.meta({ examples: [example] })), z.transform((value) => value.toLowerCase()))
|
|
56
|
+
.check(z.describe('A TIP-20 token contract address — the `0x`-prefixed 20-byte identifier for the token, returned in lowercase.'));
|
|
57
|
+
}
|
|
58
|
+
/** Maps human-readable chain aliases to their Tempo chain id. */
|
|
59
|
+
export const chainIdAlias = {
|
|
60
|
+
mainnet: 4217,
|
|
61
|
+
testnet: 42431,
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Tempo chain id. Accepts a chain alias (`mainnet`/`testnet`) or any positive
|
|
65
|
+
* integer chain id (a number or numeric string), normalizing all forms to a
|
|
66
|
+
* numeric chain id. Arbitrary ids are allowed so a self-hosted deployment can
|
|
67
|
+
* serve a localnet (e.g. `31337`); the deployment must configure an `rpc`/`tidx`
|
|
68
|
+
* upstream for any chain beyond the built-in public defaults.
|
|
69
|
+
*/
|
|
70
|
+
export const ChainId = z
|
|
71
|
+
.pipe(z.union([
|
|
72
|
+
z.pipe(z.enum(['mainnet', 'testnet']), z.transform((alias) => chainIdAlias[alias])),
|
|
73
|
+
z.coerce.number(),
|
|
74
|
+
]), z.number().check(z.int(), z.positive()))
|
|
75
|
+
.check(z.describe('Which Tempo network to query. Use the alias `mainnet` or `testnet`, or a numeric chain id (mainnet is `4217`).'), z.meta({ examples: [4217] }));
|
|
76
|
+
/**
|
|
77
|
+
* Optional `chainId` query parameter shared across endpoints. Accepts a chain
|
|
78
|
+
* alias (`mainnet`/`testnet`) or a numeric chain id, normalizing both to a
|
|
79
|
+
* numeric {@link ChainId}.
|
|
80
|
+
*/
|
|
81
|
+
export const ChainIdQuery = z
|
|
82
|
+
// The default is documented in the description, not the JSON Schema `default`
|
|
83
|
+
// keyword: zod drops `default`/`examples` from the `anyOf` this pipe produces
|
|
84
|
+
// in input mode, and only `description` survives onto the generated query
|
|
85
|
+
// parameter. The runtime fallback for an omitted `chainId` is the app's
|
|
86
|
+
// configured `defaultChainId` (mainnet unless overridden), not a schema value.
|
|
87
|
+
.optional(ChainId)
|
|
88
|
+
.check(z.describe('Which Tempo network to query. Use the alias `mainnet` or `testnet`, or a numeric chain id. Defaults to `mainnet` when omitted.'), z.meta({ examples: [4217] }));
|
|
89
|
+
const booleanQueryBase = z.pipe(z.enum(['true', 'false']), z.transform((value) => value === 'true'));
|
|
90
|
+
/**
|
|
91
|
+
* Boolean query parameter. Query values arrive as the literal strings
|
|
92
|
+
* `"true"`/`"false"`, validated strictly and transformed to a real boolean.
|
|
93
|
+
* `z.boolean()` would reject the incoming string outright and
|
|
94
|
+
* `z.coerce.boolean()` is unsafe (`Boolean("false") === true`).
|
|
95
|
+
*
|
|
96
|
+
* The generated JSON Schema is overridden to a plain `boolean` so the parameter
|
|
97
|
+
* renders as a boolean — not a string — in the OpenAPI docs (and the generated
|
|
98
|
+
* CLI coerces it), while the wire format and strict `"true"`/`"false"`
|
|
99
|
+
* validation stay unchanged. The string `enum` that `z.enum` would emit is
|
|
100
|
+
* dropped (`enum: undefined`): left in place it makes consumers — e.g. the
|
|
101
|
+
* generated CLI — build a literal-`boolean` enum that then rejects the incoming
|
|
102
|
+
* string. Wrap with `z.optional(...)` / `z._default(..., value)` and describe
|
|
103
|
+
* with `.check(z.describe('…'))` at the call site — the override survives both.
|
|
104
|
+
* Returns a fresh clone per call so each call site is a distinct schema.
|
|
105
|
+
*/
|
|
106
|
+
export function booleanQuery() {
|
|
107
|
+
const cloned = booleanQueryBase.clone();
|
|
108
|
+
z.globalRegistry.add(cloned, {
|
|
109
|
+
...z.globalRegistry.get(booleanQueryBase),
|
|
110
|
+
enum: undefined,
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
});
|
|
113
|
+
return cloned;
|
|
114
|
+
}
|
|
115
|
+
/** One public API error detail. */
|
|
116
|
+
export const ErrorDetail = z
|
|
117
|
+
.object({
|
|
118
|
+
message: z
|
|
119
|
+
.string()
|
|
120
|
+
.check(z.describe('A specific thing that went wrong, in plain language (e.g. why a field failed validation).')),
|
|
121
|
+
path: z
|
|
122
|
+
.optional(z.array(z.union([z.string(), z.number()])))
|
|
123
|
+
.check(z.describe('Where the problem is, as a path into your request (e.g. `["query", "limit"]`). Present for validation errors.')),
|
|
124
|
+
})
|
|
125
|
+
.check(z.describe('A single problem with the request.'));
|
|
126
|
+
/**
|
|
127
|
+
* Builds the global error envelope, optionally enumerating `error.code` to a
|
|
128
|
+
* fixed set of machine-readable codes. Pass the codes a given status can return
|
|
129
|
+
* (e.g. `['token_not_found']` for a 404) so the reference and generated clients
|
|
130
|
+
* narrow the code to a literal union instead of an open `string`. Omit `codes`
|
|
131
|
+
* for the open-coded envelope.
|
|
132
|
+
*/
|
|
133
|
+
export function errorResponse(codes) {
|
|
134
|
+
const code = (codes ? z.enum(codes) : z.string()).check(z.describe('A short, stable code you can branch on in your code (e.g. `token_not_found`).'));
|
|
135
|
+
return z
|
|
136
|
+
.object({
|
|
137
|
+
error: z
|
|
138
|
+
.object({
|
|
139
|
+
code,
|
|
140
|
+
details: z
|
|
141
|
+
.optional(z.array(ErrorDetail))
|
|
142
|
+
.check(z.describe('A list of specific problems, when the error is about your request (e.g. invalid fields).')),
|
|
143
|
+
message: z.string().check(z.describe('A human-readable explanation of what went wrong.')),
|
|
144
|
+
})
|
|
145
|
+
.check(z.describe('What went wrong.')),
|
|
146
|
+
requestId: z
|
|
147
|
+
.string()
|
|
148
|
+
.check(z.describe('The id of this request — include it when contacting support.')),
|
|
149
|
+
})
|
|
150
|
+
.check(z.describe('The standard shape returned for every error response.'));
|
|
151
|
+
}
|
|
152
|
+
/** Global error envelope with an open-coded `error.code`. */
|
|
153
|
+
export const ErrorResponse = errorResponse();
|
|
154
|
+
/** Representative 32-byte hash used as the default OpenAPI example. */
|
|
155
|
+
const hashExample = '0x515801d7f9a5ac705e793e85904c9c69b3f1694b465cc8fb6ba3f0298dc82665';
|
|
156
|
+
// TODO(ox/zod): replace with ox's `Hash` zod schema once ox ships a `zod`
|
|
157
|
+
// entrypoint, so the wire format stays in lockstep with ox/viem.
|
|
158
|
+
/**
|
|
159
|
+
* Lowercase 0x-prefixed 32-byte hash. The OpenAPI example is attached to the
|
|
160
|
+
* inner pre-transform schema (path/query params read examples from the pipe
|
|
161
|
+
* input), so every hash path param surfaces one without per-route overrides.
|
|
162
|
+
* Callers that need a different example per field build a fresh schema via
|
|
163
|
+
* `hash(example)` instead of overriding through an outer `.check(z.meta(...))`.
|
|
164
|
+
*/
|
|
165
|
+
export const Hash = hash(hashExample);
|
|
166
|
+
/**
|
|
167
|
+
* Builds a {@link Hash}-shaped schema with the given OpenAPI example. Use when
|
|
168
|
+
* a path/query param wants a different example than the shared {@link Hash}
|
|
169
|
+
* default (e.g. a route that documents a specific real transaction).
|
|
170
|
+
*
|
|
171
|
+
* The example must be attached to the inner pre-transform schema because
|
|
172
|
+
* path/query params read examples from the pipe input.
|
|
173
|
+
*/
|
|
174
|
+
export function hash(example) {
|
|
175
|
+
return z
|
|
176
|
+
.pipe(z
|
|
177
|
+
.templateLiteral(['0x', z.string().check(z.regex(/^[0-9a-fA-F]{64}$/))])
|
|
178
|
+
.check(z.meta({ examples: [example] })), z.transform((value) => value.toLowerCase()))
|
|
179
|
+
.check(z.describe('A 32-byte hash, `0x`-prefixed and returned in lowercase — for example a transaction or block hash.'));
|
|
180
|
+
}
|
|
181
|
+
// TODO(ox/zod): replace with ox's `Hex` zod schema once ox ships a `zod`
|
|
182
|
+
// entrypoint, so the wire format stays in lockstep with ox/viem.
|
|
183
|
+
/** Lowercase 0x-prefixed hex byte data (may be empty, `0x`). */
|
|
184
|
+
export const Hex = z
|
|
185
|
+
.pipe(z.string().check(z.regex(/^0x[0-9a-fA-F]*$/)), z.transform((value) => value.toLowerCase()))
|
|
186
|
+
.check(z.describe('Raw binary data as a `0x`-prefixed lowercase hex string (may be empty, just `0x`).'), z.meta({ examples: ['0xdeadbeef'] }));
|
|
187
|
+
// TODO(ox/zod): replace with ox's `Quantity` zod schema once ox ships a `zod`
|
|
188
|
+
// entrypoint, so the wire format stays in lockstep with ox/viem.
|
|
189
|
+
/** Hex-encoded integer quantity (a `0x`-prefixed integer, e.g. `0x1a`). */
|
|
190
|
+
export const Quantity = z
|
|
191
|
+
.templateLiteral(['0x', z.string().check(z.regex(/^[0-9a-fA-F]+$/))])
|
|
192
|
+
.check(z.describe('A whole number encoded as a `0x`-prefixed hexadecimal string (e.g. `0x1a` is 26).'), z.meta({ examples: ['0x1a'] }));
|
|
193
|
+
/** Non-negative integer as a decimal string (preserves uint256 precision). */
|
|
194
|
+
export const DecimalString = z
|
|
195
|
+
.string()
|
|
196
|
+
.check(z.regex(/^\d+$/), z.describe('A non-negative whole number, given as a decimal string so very large token amounts keep full precision. Expressed in the smallest unit of the token (e.g. `1000000` is 1.00 of a 6-decimal stablecoin).'), z.meta({ examples: ['1000000'] }));
|
|
197
|
+
/**
|
|
198
|
+
* Minimum page size accepted across list endpoints. Floored at 5 because the
|
|
199
|
+
* indexer rejects signature-decoded `Transfer` queries with `LIMIT < 5`
|
|
200
|
+
* (HTTP 422); applying it globally keeps pagination uniform and removes the need
|
|
201
|
+
* for per-endpoint clamping.
|
|
202
|
+
*/
|
|
203
|
+
export const minLimit = 5;
|
|
204
|
+
/** Page-size query parameter shared across list endpoints. */
|
|
205
|
+
export const Limit = z
|
|
206
|
+
._default(z.coerce.number().check(z.int(), z.gte(minLimit), z.lte(200)), 10)
|
|
207
|
+
.check(z.describe('How many items to return per page (5\u2013200, default 10).'), z.meta({ examples: [10] }));
|
|
208
|
+
/** Opaque keyset-pagination cursor query parameter shared across list endpoints. */
|
|
209
|
+
export const Cursor = z
|
|
210
|
+
.optional(z.string())
|
|
211
|
+
.check(z.describe('Opaque keyset cursor from a previous response (`nextCursor`); pass it back verbatim to fetch the next page. Omit for the first (head) page.'), z.meta({ examples: ['WzIzNDU2Nzg5LDBd'] }));
|
|
212
|
+
/**
|
|
213
|
+
* Maximum page window (`page × limit` rows) accepted by positional pagination.
|
|
214
|
+
* Mirrors the indexer's own 10k row ceiling, and the bounded-window convention
|
|
215
|
+
* of comparable APIs (Elasticsearch `max_result_window`, Zendesk's 100-page
|
|
216
|
+
* cap): shallow page-numbered access is served positionally, deep traversal
|
|
217
|
+
* must use cursors.
|
|
218
|
+
*/
|
|
219
|
+
export const maxPageWindow = 10_000;
|
|
220
|
+
/**
|
|
221
|
+
* Page-number query parameter (1-indexed) shared by list endpoints that
|
|
222
|
+
* support shallow positional pagination alongside keyset cursors. Cursors
|
|
223
|
+
* remain the canonical deep-traversal mode; the page lane exists for
|
|
224
|
+
* page-numbered UIs that need random access into the head of a feed.
|
|
225
|
+
*/
|
|
226
|
+
export const Page = z
|
|
227
|
+
.optional(z.coerce.number().check(z.int(), z.gte(1)))
|
|
228
|
+
.check(z.describe('Page number, 1-indexed (positional pagination for page-numbered access; `page=1` is ' +
|
|
229
|
+
'the head page). Mutually exclusive with `cursor`, and `page × limit` must be at most ' +
|
|
230
|
+
`${maxPageWindow} rows — use cursor pagination for deeper traversal. Pages are ` +
|
|
231
|
+
'positional, so rows arriving at the head of a live feed can shift page contents.'), z.meta({ examples: [1] }));
|
|
232
|
+
/**
|
|
233
|
+
* Cross-field checks for list query schemas that accept both `cursor` and
|
|
234
|
+
* `page`: the two are mutually exclusive, and the page window is bounded by
|
|
235
|
+
* {@link maxPageWindow}. Spread into the query object's `.check(...)`.
|
|
236
|
+
*/
|
|
237
|
+
export function pageChecks() {
|
|
238
|
+
return [
|
|
239
|
+
z.refine((query) => query.cursor === undefined || query.page === undefined, {
|
|
240
|
+
error: '`cursor` and `page` are mutually exclusive; pass one or the other.',
|
|
241
|
+
path: ['page'],
|
|
242
|
+
}),
|
|
243
|
+
z.refine((query) => (query.page ?? 1) * query.limit <= maxPageWindow, {
|
|
244
|
+
error: `\`page × limit\` must be at most ${maxPageWindow} rows; use cursor pagination for deeper traversal.`,
|
|
245
|
+
path: ['page'],
|
|
246
|
+
}),
|
|
247
|
+
];
|
|
248
|
+
}
|
|
249
|
+
/** Opaque next-page cursor response field shared across list endpoints. */
|
|
250
|
+
export const NextCursor = z
|
|
251
|
+
.nullable(z.string())
|
|
252
|
+
.check(z.describe('Pass this back as the `cursor` query parameter to fetch the next page. `null` once you have reached the end of the list.'), z.meta({ examples: ['WzIzNDU2Nzg5LDBd'] }));
|
|
253
|
+
/**
|
|
254
|
+
* Upper bound on the matched-row count surfaced by `include=totalCount`. The
|
|
255
|
+
* count is computed by a capped subquery (`… LIMIT countCap`) so it can't blow
|
|
256
|
+
* the indexer's execution budget on the 10⁹-plus row tables; when the bound is
|
|
257
|
+
* hit the count is a lower bound, signalled by `Meta.totalCountCapped`. Mirrors the
|
|
258
|
+
* indexer's own 10k row ceiling (see {@link maxPageWindow}) and the capped-count
|
|
259
|
+
* conventions of comparable APIs (Stripe Search's 10k `total_count`,
|
|
260
|
+
* Elasticsearch `track_total_hits`, Shopify's `Count.precision`).
|
|
261
|
+
*/
|
|
262
|
+
export const countCap = 10_000;
|
|
263
|
+
/**
|
|
264
|
+
* Total matched-row count response field for list endpoints that support
|
|
265
|
+
* `include=totalCount`. Exact when {@link TotalCountCapped} is `false`; a lower
|
|
266
|
+
* bound ("at least this many") when `true`. Independent of pagination —
|
|
267
|
+
* `nextCursor` remains the only end-of-list signal.
|
|
268
|
+
*/
|
|
269
|
+
export const TotalCount = z
|
|
270
|
+
.number()
|
|
271
|
+
.check(z.int(), z.nonnegative(), z.describe('Number of rows matching the query, exact when `totalCountCapped` is false and a lower ' +
|
|
272
|
+
`bound (at least this many, computed up to ${countCap}) when \`totalCountCapped\` is ` +
|
|
273
|
+
'true. Independent of pagination: use `nextCursor` to page, not this count.'), z.meta({ examples: [42] }));
|
|
274
|
+
/**
|
|
275
|
+
* Whether {@link TotalCount} hit the {@link countCap} bound. `true` means the
|
|
276
|
+
* count is a lower bound ("at least `totalCount` rows match"); `false` means it
|
|
277
|
+
* is exact.
|
|
278
|
+
*/
|
|
279
|
+
export const TotalCountCapped = z
|
|
280
|
+
.boolean()
|
|
281
|
+
.check(z.describe('Whether `totalCount` hit the count cap. When true, `totalCount` is a lower bound rather ' +
|
|
282
|
+
'than an exact total.'), z.meta({ examples: [false] }));
|
|
283
|
+
/** Sort-direction (`asc`/`desc`) query parameter shared across list endpoints. */
|
|
284
|
+
export const Order = z
|
|
285
|
+
._default(z.enum(['asc', 'desc']), 'desc')
|
|
286
|
+
.check(z.describe('Sort order: `desc` for descending (the default), or `asc` for ascending.'), z.meta({ examples: ['desc'] }));
|
|
287
|
+
/**
|
|
288
|
+
* Optional inclusive block-number bound query parameter (`blockNumber.from` /
|
|
289
|
+
* `blockNumber.to`). `noun` is the resource being listed (e.g. `transfers`) so
|
|
290
|
+
* the description reads naturally across endpoints.
|
|
291
|
+
*/
|
|
292
|
+
export function blockNumberBound(noun, bound) {
|
|
293
|
+
const direction = bound === 'from' ? 'at or after' : 'at or before';
|
|
294
|
+
return z
|
|
295
|
+
.optional(z.coerce.number().check(z.int(), z.nonnegative()))
|
|
296
|
+
.check(z.describe(`Only include ${noun} ${direction} this block number.`), z.meta({ examples: [bound === 'from' ? 23456789 : 23456999] }));
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Optional inclusive ISO-8601 timestamp bound query parameter (`timestamp.from`
|
|
300
|
+
* / `timestamp.to`). `noun` is the resource being listed (e.g. `transfers`).
|
|
301
|
+
*/
|
|
302
|
+
export function timestampBound(noun, bound) {
|
|
303
|
+
const direction = bound === 'from' ? 'at or after' : 'at or before';
|
|
304
|
+
return z.optional(z.iso.datetime({ offset: true })).check(z.describe(`Only include ${noun} ${direction} this ISO 8601 timestamp.`), z.meta({
|
|
305
|
+
examples: [bound === 'from' ? '2024-01-01T00:00:00Z' : '2024-12-31T23:59:59Z'],
|
|
306
|
+
}));
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Builds the schema for a comma-separated opt-in query parameter (e.g.
|
|
310
|
+
* `?include=token,feeToken`), parsed into a validated array of the given enum's
|
|
311
|
+
* members. Absent or empty values yield `[]`. Centralizes the splitting,
|
|
312
|
+
* trimming, and OpenAPI array-enum metadata that every list endpoint otherwise
|
|
313
|
+
* repeats.
|
|
314
|
+
*
|
|
315
|
+
* A repeated parameter (`?include=token&include=feeToken`) arrives from the
|
|
316
|
+
* validator as a `string[]`, so the input accepts both forms and each entry is
|
|
317
|
+
* still comma-split — the two styles compose freely.
|
|
318
|
+
*
|
|
319
|
+
* Pass the endpoint's `Include` enum — kept local so its members drive both the
|
|
320
|
+
* parsed type and the docs — plus the param description.
|
|
321
|
+
*/
|
|
322
|
+
export function includeQuery(member, description) {
|
|
323
|
+
return z
|
|
324
|
+
.pipe(z.pipe(
|
|
325
|
+
// `optional(unknown)` keeps the parameter optional in object inputs
|
|
326
|
+
// while staying opaque to JSON-schema generation — a structural
|
|
327
|
+
// `string | string[]` union would leak a contradictory `anyOf` next to
|
|
328
|
+
// the explicit `meta` below, which is the documented contract.
|
|
329
|
+
z.optional(z.unknown()), z.transform((value) => {
|
|
330
|
+
const parts = value === undefined ? [] : Array.isArray(value) ? value : [value];
|
|
331
|
+
return parts
|
|
332
|
+
.flatMap((entry) => String(entry).split(','))
|
|
333
|
+
.map((entry) => entry.trim())
|
|
334
|
+
.filter(Boolean);
|
|
335
|
+
})), z.array(member))
|
|
336
|
+
.check(z.meta({
|
|
337
|
+
type: 'array',
|
|
338
|
+
items: { type: 'string', enum: member.options },
|
|
339
|
+
description,
|
|
340
|
+
examples: [member.options],
|
|
341
|
+
}));
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Ready-made `include` query parameter for list endpoints whose only optional
|
|
345
|
+
* resource is the capped total count (`?include=totalCount`). Endpoints that
|
|
346
|
+
* embed additional resources define their own enum that also lists `totalCount`
|
|
347
|
+
* (e.g. transfers' `memo,token,totalCount`).
|
|
348
|
+
*/
|
|
349
|
+
export const totalCountInclude = includeQuery(z.enum(['totalCount']).check(z.describe('Optional resources to embed via `include`.')), 'Comma-separated optional resources to embed, e.g. `totalCount`.');
|
|
350
|
+
/**
|
|
351
|
+
* Response-wide `meta` object for list endpoints whose only embeddable resource
|
|
352
|
+
* is the capped total count. Present only when `include=totalCount` was
|
|
353
|
+
* requested; omitted otherwise. Endpoints that embed additional response-wide
|
|
354
|
+
* resources alongside the count define their own `Meta` that also carries
|
|
355
|
+
* {@link TotalCount}/{@link TotalCountCapped}.
|
|
356
|
+
*/
|
|
357
|
+
export const CountMeta = z
|
|
358
|
+
.object({ totalCountCapped: TotalCountCapped, totalCount: TotalCount })
|
|
359
|
+
.check(z.describe('Response-wide resources embedded on demand via `include`.'));
|
|
360
|
+
//# sourceMappingURL=Schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/internal/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,QAAQ,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,WAAmB;IAEnB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAC7B,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;IAC9E,OAAO,MAAgB,CAAA;AACzB,CAAC;AAED,gFAAgF;AAChF,MAAM,cAAc,GAAG,4CAA4C,CAAA;AAEnE,gFAAgF;AAChF,0EAA0E;AAC1E,sDAAsD;AACtD,MAAM,OAAO,GAAG,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEzF,6EAA6E;AAC7E,iEAAiE;AACjE,qDAAqD;AACrD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC;KACrB,IAAI,CACH,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,I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,CAAC,2DAA2D,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/** Minimal string store contract used by Tempo API internals. */
|
|
2
|
+
export type Store = {
|
|
3
|
+
/** Deletes a key. */
|
|
4
|
+
delete(key: string): Promise<void>;
|
|
5
|
+
/** Gets a string value. Returns `null` for missing or expired keys. */
|
|
6
|
+
get(key: string): Promise<null | string>;
|
|
7
|
+
/**
|
|
8
|
+
* Optional native counter: increments an integer value and returns the new
|
|
9
|
+
* count. A missing or expired key restarts at `1`; `ttl` applies like
|
|
10
|
+
* {@link Store.put}. Implement when the backend can execute the
|
|
11
|
+
* read-modify-write in one place (in-memory, inside a Durable Object);
|
|
12
|
+
* consumers go through the {@link increment} helper, which falls back to a
|
|
13
|
+
* get + put when this is absent.
|
|
14
|
+
*/
|
|
15
|
+
increment?: ((key: string, options?: Store.PutOptions) => Promise<number>) | undefined;
|
|
16
|
+
/** Lists keys. */
|
|
17
|
+
list(options?: {
|
|
18
|
+
/** Restrict results to keys with this prefix. */
|
|
19
|
+
prefix?: string | undefined;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
/** Matching keys. */
|
|
22
|
+
keys: readonly {
|
|
23
|
+
/** Key name. */
|
|
24
|
+
name: string;
|
|
25
|
+
}[];
|
|
26
|
+
}>;
|
|
27
|
+
/** Writes a string value, optionally with a time-to-live. */
|
|
28
|
+
put(key: string, value: string, options?: Store.PutOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Store kind discriminant. `'state'` marks an authoritative, enumerable
|
|
31
|
+
* store ({@link State}); `'cache'` marks a cache (e.g. the Web Cache,
|
|
32
|
+
* which cannot enumerate keys and silently drops entries).
|
|
33
|
+
*/
|
|
34
|
+
type: Store.Type;
|
|
35
|
+
};
|
|
36
|
+
export declare namespace Store {
|
|
37
|
+
/** Store kind: `'state'` (authoritative, enumerable) or `'cache'` (a cache). */
|
|
38
|
+
type Type = 'state' | 'cache';
|
|
39
|
+
/** Options for writing a value to a store. */
|
|
40
|
+
type PutOptions = {
|
|
41
|
+
/**
|
|
42
|
+
* Time-to-live in milliseconds. After this duration the key is treated as
|
|
43
|
+
* absent. Production backends should map this to native expiration
|
|
44
|
+
* (Redis `PEXPIRE`, Cloudflare `expirationTtl`, etc.).
|
|
45
|
+
*/
|
|
46
|
+
ttl?: number | undefined;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* An authoritative, enumerable {@link Store} for stateful features (webhook
|
|
51
|
+
* subscriptions, rate-limit counters, …). Discriminated by `type: 'state'` so
|
|
52
|
+
* stateful features can require it at the type level and reject cache adapters
|
|
53
|
+
* like the Web Cache ({@link cache}, `type: 'cache'`), which cannot enumerate
|
|
54
|
+
* keys and silently drops entries on eviction. `memory`, `cloudflareKv`, and
|
|
55
|
+
* `durableObject` produce it.
|
|
56
|
+
*/
|
|
57
|
+
export type State = Store & {
|
|
58
|
+
type: 'state';
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Wraps store operations into a {@link Store}, defaulting to an authoritative
|
|
62
|
+
* {@link State} store. Omit `type` for the common authoritative case; pass
|
|
63
|
+
* `type: 'cache'` to opt into a cache-kind store (non-enumerable, lossy — e.g.
|
|
64
|
+
* the Web Cache).
|
|
65
|
+
*/
|
|
66
|
+
export declare function from<const store extends from.Input>(store: store): from.Output<store>;
|
|
67
|
+
export declare namespace from {
|
|
68
|
+
/** Store operations with an optional kind discriminant (defaults to `'state'`). */
|
|
69
|
+
type Input = Omit<Store, 'type'> & {
|
|
70
|
+
/** Store kind; defaults to `'state'`. Pass `'cache'` for a cache-kind store. */
|
|
71
|
+
type?: Store.Type | undefined;
|
|
72
|
+
};
|
|
73
|
+
/** Resolved store kind: {@link State} unless `type: 'cache'` is provided. */
|
|
74
|
+
type Output<store extends Input> = store extends {
|
|
75
|
+
type: 'cache';
|
|
76
|
+
} ? Store : State;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Increments an integer counter on a store and returns the new value. A
|
|
80
|
+
* missing or expired key restarts at `1`; `ttl` applies like {@link Store.put}.
|
|
81
|
+
*
|
|
82
|
+
* Uses the store's native {@link Store.increment} when implemented (atomic
|
|
83
|
+
* where the backend executes it in one place — in-memory, inside a Durable
|
|
84
|
+
* Object). Otherwise falls back to a get + put read-modify-write, which
|
|
85
|
+
* costs two round trips on remote stores and can race under concurrency —
|
|
86
|
+
* fine for dev/in-process backends, not for enforced distributed counters.
|
|
87
|
+
*/
|
|
88
|
+
export declare function increment(store: Store, key: string, options?: Store.PutOptions): Promise<number>;
|
|
89
|
+
/** Creates an in-memory store with TTL support. */
|
|
90
|
+
export declare function memory(options?: memory.Options): State;
|
|
91
|
+
export declare namespace memory {
|
|
92
|
+
/** Options for creating an in-memory store. */
|
|
93
|
+
type Options = {
|
|
94
|
+
/** Initial entries. */
|
|
95
|
+
entries?: readonly (readonly [string, string])[] | undefined;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Creates a store backed by a Web Cache API instance (e.g. Cloudflare's
|
|
100
|
+
* colo-local `caches.default`). Values are stored as cache entries keyed by a
|
|
101
|
+
* synthetic URL, with `ttl` mapped to `Cache-Control: max-age`. The Web Cache
|
|
102
|
+
* cannot enumerate keys, so `list` returns no keys — use this for caching
|
|
103
|
+
* (get/put/delete) only, e.g. the origin read cache and edge response cache.
|
|
104
|
+
*/
|
|
105
|
+
export declare function cache(webCache: cache.Cache): Store;
|
|
106
|
+
export declare namespace cache {
|
|
107
|
+
/** Minimal Web Cache API surface used by this adapter. */
|
|
108
|
+
type Cache = {
|
|
109
|
+
/** Deletes a cache entry. */
|
|
110
|
+
delete(request: Request | string): Promise<boolean>;
|
|
111
|
+
/** Looks up a cache entry. */
|
|
112
|
+
match(request: Request | string): Promise<Response | undefined>;
|
|
113
|
+
/** Stores a cache entry. */
|
|
114
|
+
put(request: Request | string, response: Response): Promise<void>;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/** Creates a store backed by a Cloudflare Workers KV namespace. */
|
|
118
|
+
export declare function cloudflareKv(namespace: cloudflareKv.Namespace): State;
|
|
119
|
+
export declare namespace cloudflareKv {
|
|
120
|
+
/** Minimal Cloudflare Workers KV namespace shape used by this adapter. */
|
|
121
|
+
type Namespace = {
|
|
122
|
+
/** Deletes a key. */
|
|
123
|
+
delete(key: string): Promise<void>;
|
|
124
|
+
/** Gets a text value. */
|
|
125
|
+
get(key: string): Promise<null | string>;
|
|
126
|
+
/** Lists keys. */
|
|
127
|
+
list(options?: {
|
|
128
|
+
/** Restrict results to keys with this prefix. */
|
|
129
|
+
prefix?: string | null | undefined;
|
|
130
|
+
}): Promise<{
|
|
131
|
+
/** Matching keys. */
|
|
132
|
+
keys: readonly {
|
|
133
|
+
/** Key name. */
|
|
134
|
+
name: string;
|
|
135
|
+
}[];
|
|
136
|
+
}>;
|
|
137
|
+
/** Writes a text value. */
|
|
138
|
+
put(key: string, value: string, options?: {
|
|
139
|
+
/** Native Cloudflare KV TTL in seconds. */
|
|
140
|
+
expirationTtl?: number | undefined;
|
|
141
|
+
}): Promise<void>;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export declare function durableObject(storage: durableObject.Storage): State;
|
|
145
|
+
export declare function durableObject(namespace: durableObject.Namespace, options: durableObject.Options): State;
|
|
146
|
+
export declare namespace durableObject {
|
|
147
|
+
/** Minimal Durable Object namespace shape used by this adapter. */
|
|
148
|
+
type Namespace = {
|
|
149
|
+
/** Gets the Durable Object stub for a stable object name. */
|
|
150
|
+
getByName(name: string): Stub;
|
|
151
|
+
};
|
|
152
|
+
/** Options for creating a store from a Durable Object namespace. */
|
|
153
|
+
type Options = {
|
|
154
|
+
/**
|
|
155
|
+
* Durable Object name. A static string pins one object holding every key
|
|
156
|
+
* (enumerable via `list`). A resolver function shards keys across objects
|
|
157
|
+
* (`name(key)` per operation) so each key's object is created near the
|
|
158
|
+
* traffic that uses it — sharded stores cannot `list`.
|
|
159
|
+
*/
|
|
160
|
+
name: string | ((key: string) => string);
|
|
161
|
+
};
|
|
162
|
+
/** Minimal Cloudflare Durable Object storage shape used by this adapter. */
|
|
163
|
+
type Storage = {
|
|
164
|
+
/** Deletes a key. */
|
|
165
|
+
delete(key: string): Promise<unknown>;
|
|
166
|
+
/** Gets a stored value. */
|
|
167
|
+
get<value = unknown>(key: string): Promise<undefined | value>;
|
|
168
|
+
/** Lists stored values. */
|
|
169
|
+
list<value = unknown>(options?: {
|
|
170
|
+
/** Restrict results to keys with this prefix. */
|
|
171
|
+
prefix?: string | undefined;
|
|
172
|
+
}): Promise<Map<string, value>>;
|
|
173
|
+
/** Writes a stored value. */
|
|
174
|
+
put<value>(key: string, value: value): Promise<void>;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Minimal Durable Object RPC stub shape used by this adapter — just the store
|
|
178
|
+
* operations (no `type` discriminant, which an RPC stub doesn't carry).
|
|
179
|
+
* `increment` is required: the stub mirrors the `tapimo/cloudflare`
|
|
180
|
+
* `DurableObject` class, whose RPC surface implements it.
|
|
181
|
+
*/
|
|
182
|
+
type Stub = Omit<Store, 'increment' | 'type'> & {
|
|
183
|
+
/** Atomically increments an integer counter inside the object. */
|
|
184
|
+
increment(key: string, options?: Store.PutOptions): Promise<number>;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Wraps an async producer with store-backed caching. Returns the cached value if
|
|
189
|
+
* present and valid; otherwise runs `fetch`, stores the JSON-encoded result
|
|
190
|
+
* under `key` with `ttl` milliseconds, and returns it.
|
|
191
|
+
*/
|
|
192
|
+
export declare function memoize<value>(fetch: () => Promise<value>, options: memoize.Options): Promise<value>;
|
|
193
|
+
export declare namespace memoize {
|
|
194
|
+
/** Options for {@link memoize}. */
|
|
195
|
+
type Options = {
|
|
196
|
+
/** Cache key. Callers are responsible for namespacing/versioning. */
|
|
197
|
+
key: string;
|
|
198
|
+
/** Store used to persist cache entries. */
|
|
199
|
+
store: Store;
|
|
200
|
+
/** Time-to-live in milliseconds. */
|
|
201
|
+
ttl: number;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=Store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/internal/Store.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,KAAK,GAAG;IAClB,qBAAqB;IACrB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,uEAAuE;IACvE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA;IACxC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAA;IACtF,kBAAkB;IAClB,IAAI,CAAC,OAAO,CAAC,EAAE;QACb,iDAAiD;QACjD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC5B,GAAG,OAAO,CAAC;QACV,qBAAqB;QACrB,IAAI,EAAE,SAAS;YACb,gBAAgB;YAChB,IAAI,EAAE,MAAM,CAAA;SACb,EAAE,CAAA;KACJ,CAAC,CAAA;IACF,6DAA6D;IAC7D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E;;;;OAIG;IACH,IAAI,EAAE,KAAK,CAAC,IAAI,CAAA;CACjB,CAAA;AAED,yBAAiB,KAAK,CAAC;IACrB,gFAAgF;IAChF,KAAY,IAAI,GAAG,OAAO,GAAG,OAAO,CAAA;IAEpC,8CAA8C;IAC9C,KAAY,UAAU,GAAG;QACv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