tapimo 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/App.d.ts +7222 -6316
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/App.js +4 -0
  4. package/dist/App.js.map +1 -1
  5. package/dist/Scope.d.ts +18 -1
  6. package/dist/Scope.d.ts.map +1 -1
  7. package/dist/Scope.js +24 -3
  8. package/dist/Scope.js.map +1 -1
  9. package/dist/admin/apps/verified-tokens.d.ts +116 -116
  10. package/dist/apps/data/App.d.ts +2541 -2607
  11. package/dist/apps/data/App.d.ts.map +1 -1
  12. package/dist/apps/data/App.js +135 -44
  13. package/dist/apps/data/App.js.map +1 -1
  14. package/dist/apps/data/FundingQuoteProviders.d.ts +36 -0
  15. package/dist/apps/data/FundingQuoteProviders.d.ts.map +1 -0
  16. package/dist/apps/data/FundingQuoteProviders.js +190 -0
  17. package/dist/apps/data/FundingQuoteProviders.js.map +1 -0
  18. package/dist/apps/data/index.d.ts +1 -1
  19. package/dist/apps/data/index.js +1 -1
  20. package/dist/apps/data/routes/activities.d.ts +242 -242
  21. package/dist/apps/data/routes/addresses.d.ts +227 -227
  22. package/dist/apps/data/routes/balances.d.ts +12 -12
  23. package/dist/apps/data/routes/balances.d.ts.map +1 -1
  24. package/dist/apps/data/routes/balances.js +67 -149
  25. package/dist/apps/data/routes/balances.js.map +1 -1
  26. package/dist/apps/data/routes/blocks.d.ts +125 -126
  27. package/dist/apps/data/routes/blocks.d.ts.map +1 -1
  28. package/dist/apps/data/routes/blocks.js +3 -5
  29. package/dist/apps/data/routes/blocks.js.map +1 -1
  30. package/dist/apps/data/routes/coingecko.d.ts +55 -54
  31. package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
  32. package/dist/apps/data/routes/coingecko.js +3 -8
  33. package/dist/apps/data/routes/coingecko.js.map +1 -1
  34. package/dist/apps/data/routes/exchanges.d.ts +455 -455
  35. package/dist/apps/data/routes/fee-amm.d.ts +92 -92
  36. package/dist/apps/data/routes/funding.d.ts +91 -864
  37. package/dist/apps/data/routes/funding.d.ts.map +1 -1
  38. package/dist/apps/data/routes/funding.js +138 -450
  39. package/dist/apps/data/routes/funding.js.map +1 -1
  40. package/dist/apps/data/routes/rpc.d.ts.map +1 -1
  41. package/dist/apps/data/routes/rpc.js +86 -16
  42. package/dist/apps/data/routes/rpc.js.map +1 -1
  43. package/dist/apps/data/routes/tokenlist.d.ts +36 -36
  44. package/dist/apps/data/routes/webhooks.d.ts +340 -0
  45. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  46. package/dist/apps/data/routes/webhooks.js +13 -1
  47. package/dist/apps/data/routes/webhooks.js.map +1 -1
  48. package/dist/apps/index.d.ts +1 -1
  49. package/dist/apps/index.js +1 -1
  50. package/dist/apps/management/App.d.ts +1843 -861
  51. package/dist/apps/management/App.d.ts.map +1 -1
  52. package/dist/apps/management/App.js +4 -0
  53. package/dist/apps/management/App.js.map +1 -1
  54. package/dist/apps/management/routes/api-keys.d.ts +121 -121
  55. package/dist/apps/management/routes/api-keys.js +2 -2
  56. package/dist/apps/management/routes/api-keys.js.map +1 -1
  57. package/dist/apps/management/routes/billing.d.ts +2 -2
  58. package/dist/apps/management/routes/invite-links.d.ts +1100 -0
  59. package/dist/apps/management/routes/invite-links.d.ts.map +1 -0
  60. package/dist/apps/management/routes/invite-links.js +411 -0
  61. package/dist/apps/management/routes/invite-links.js.map +1 -0
  62. package/dist/apps/management/routes/me.d.ts +13 -13
  63. package/dist/apps/management/routes/members.d.ts +77 -77
  64. package/dist/apps/management/routes/orgs.d.ts +96 -96
  65. package/dist/apps/management/routes/projects.d.ts +62 -62
  66. package/dist/apps/management/routes/scopes.d.ts +11 -11
  67. package/dist/apps/management/routes/scopes.d.ts.map +1 -1
  68. package/dist/apps/management/routes/scopes.js +2 -2
  69. package/dist/apps/management/routes/scopes.js.map +1 -1
  70. package/dist/apps/management/routes/usage.d.ts +79 -79
  71. package/dist/apps/mcp.d.ts.map +1 -1
  72. package/dist/apps/mcp.js +3 -1
  73. package/dist/apps/mcp.js.map +1 -1
  74. package/dist/apps/relay/App.d.ts.map +1 -1
  75. package/dist/apps/relay/App.js +42 -4
  76. package/dist/apps/relay/App.js.map +1 -1
  77. package/dist/cloudflare.d.ts +2 -0
  78. package/dist/cloudflare.d.ts.map +1 -1
  79. package/dist/cloudflare.js +4 -0
  80. package/dist/cloudflare.js.map +1 -1
  81. package/dist/db/Db.d.ts +3 -0
  82. package/dist/db/Db.d.ts.map +1 -1
  83. package/dist/db/Db.js +57 -0
  84. package/dist/db/Db.js.map +1 -1
  85. package/dist/db/Schema.d.ts +31 -0
  86. package/dist/db/Schema.d.ts.map +1 -1
  87. package/dist/db/Schema.js +31 -0
  88. package/dist/db/Schema.js.map +1 -1
  89. package/dist/db/tables/inviteLinks.d.ts +42 -0
  90. package/dist/db/tables/inviteLinks.d.ts.map +1 -0
  91. package/dist/db/tables/inviteLinks.js +148 -0
  92. package/dist/db/tables/inviteLinks.js.map +1 -0
  93. package/dist/db/tables/organizations.d.ts.map +1 -1
  94. package/dist/db/tables/organizations.js +2 -0
  95. package/dist/db/tables/organizations.js.map +1 -1
  96. package/dist/handlers/relay.d.ts.map +1 -1
  97. package/dist/handlers/relay.js +13 -3
  98. package/dist/handlers/relay.js.map +1 -1
  99. package/dist/internal/Auth.d.ts +42 -23
  100. package/dist/internal/Auth.d.ts.map +1 -1
  101. package/dist/internal/Auth.js +169 -20
  102. package/dist/internal/Auth.js.map +1 -1
  103. package/dist/internal/EdgeCache.d.ts +3 -1
  104. package/dist/internal/EdgeCache.d.ts.map +1 -1
  105. package/dist/internal/EdgeCache.js +17 -2
  106. package/dist/internal/EdgeCache.js.map +1 -1
  107. package/dist/internal/Errors.d.ts +6 -0
  108. package/dist/internal/Errors.d.ts.map +1 -0
  109. package/dist/internal/Errors.js +16 -0
  110. package/dist/internal/Errors.js.map +1 -0
  111. package/dist/internal/FundingQuotes.d.ts +644 -0
  112. package/dist/internal/FundingQuotes.d.ts.map +1 -0
  113. package/dist/internal/{FundingRoutes.js → FundingQuotes.js} +93 -289
  114. package/dist/internal/FundingQuotes.js.map +1 -0
  115. package/dist/internal/Store.d.ts +61 -16
  116. package/dist/internal/Store.d.ts.map +1 -1
  117. package/dist/internal/Store.js +72 -17
  118. package/dist/internal/Store.js.map +1 -1
  119. package/dist/internal/Viem.d.ts +2 -0
  120. package/dist/internal/Viem.d.ts.map +1 -1
  121. package/dist/internal/Viem.js +11 -2
  122. package/dist/internal/Viem.js.map +1 -1
  123. package/dist/internal/index.d.ts +27 -0
  124. package/dist/internal/index.d.ts.map +1 -0
  125. package/dist/internal/index.js +27 -0
  126. package/dist/internal/index.js.map +1 -0
  127. package/package.json +8 -3
  128. package/src/ApiKeys.test.ts +23 -0
  129. package/src/App.test-d.ts +2 -0
  130. package/src/App.test.ts +60 -4
  131. package/src/App.ts +6 -0
  132. package/src/Client.test-d.ts +16 -54
  133. package/src/Scope.test.ts +1 -0
  134. package/src/Scope.ts +30 -4
  135. package/src/apps/data/App.test.ts +354 -0
  136. package/src/apps/data/App.ts +159 -52
  137. package/src/apps/data/FundingQuoteProviders.test.ts +151 -0
  138. package/src/apps/data/FundingQuoteProviders.ts +251 -0
  139. package/src/apps/data/index.ts +1 -1
  140. package/src/apps/data/routes/balances.test.ts +64 -18
  141. package/src/apps/data/routes/balances.ts +76 -177
  142. package/src/apps/data/routes/blocks.ts +3 -5
  143. package/src/apps/data/routes/coingecko.ts +3 -8
  144. package/src/apps/data/routes/funding.test.ts +149 -306
  145. package/src/apps/data/routes/funding.ts +154 -604
  146. package/src/apps/data/routes/indexer.test.ts +99 -3
  147. package/src/apps/data/routes/rpc.test.ts +219 -0
  148. package/src/apps/data/routes/rpc.ts +92 -17
  149. package/src/apps/data/routes/webhooks.test.ts +23 -2
  150. package/src/apps/data/routes/webhooks.ts +13 -1
  151. package/src/apps/index.ts +1 -1
  152. package/src/apps/management/App.ts +4 -0
  153. package/src/apps/management/routes/api-keys.test.ts +47 -3
  154. package/src/apps/management/routes/api-keys.ts +2 -2
  155. package/src/apps/management/routes/invite-links.test.ts +385 -0
  156. package/src/apps/management/routes/invite-links.ts +570 -0
  157. package/src/apps/management/routes/scopes.test.ts +3 -2
  158. package/src/apps/management/routes/scopes.ts +4 -2
  159. package/src/apps/mcp.test.ts +55 -14
  160. package/src/apps/mcp.ts +3 -1
  161. package/src/apps/relay/App.test.ts +324 -4
  162. package/src/apps/relay/App.ts +40 -4
  163. package/src/cloudflare.ts +5 -0
  164. package/src/db/Db.ts +65 -0
  165. package/src/db/Schema.ts +39 -0
  166. package/src/db/tables/inviteLinks.ts +187 -0
  167. package/src/db/tables/organizations.ts +2 -0
  168. package/src/handlers/relay.ts +16 -4
  169. package/src/internal/Auth.test.ts +528 -37
  170. package/src/internal/Auth.ts +246 -45
  171. package/src/internal/EdgeCache.test.ts +24 -3
  172. package/src/internal/EdgeCache.ts +18 -2
  173. package/src/internal/FundingQuotes.test.ts +174 -0
  174. package/src/internal/FundingQuotes.ts +735 -0
  175. package/src/internal/Log.test.ts +4 -4
  176. package/src/internal/Store.test-d.ts +15 -0
  177. package/src/internal/Store.test.ts +153 -2
  178. package/src/internal/Store.ts +157 -41
  179. package/src/internal/Viem.ts +14 -5
  180. package/src/internal/index.test.ts +34 -0
  181. package/src/internal/index.ts +26 -0
  182. package/dist/apps/data/FundingRouteProviders.d.ts +0 -143
  183. package/dist/apps/data/FundingRouteProviders.d.ts.map +0 -1
  184. package/dist/apps/data/FundingRouteProviders.js +0 -546
  185. package/dist/apps/data/FundingRouteProviders.js.map +0 -1
  186. package/dist/internal/FundingRoutes.d.ts +0 -1085
  187. package/dist/internal/FundingRoutes.d.ts.map +0 -1
  188. package/dist/internal/FundingRoutes.js.map +0 -1
  189. package/src/apps/data/FundingRouteProviders.test.ts +0 -485
  190. package/src/apps/data/FundingRouteProviders.ts +0 -744
  191. package/src/internal/FundingRoutes.test.ts +0 -239
  192. package/src/internal/FundingRoutes.ts +0 -1067
@@ -255,9 +255,18 @@ export declare namespace schema {
255
255
  export declare function blocks(): import("hono/hono-base").HonoBase<App.Environment, {
256
256
  "/v1/blocks": {
257
257
  $get: {
258
- output: null;
259
- outputFormat: "body";
260
- status: 402;
258
+ output: {
259
+ data: {
260
+ hash: `0x${string}`;
261
+ id: `0x${string}`;
262
+ number: number;
263
+ timestamp: string;
264
+ transactionCount: number;
265
+ }[];
266
+ nextCursor: string | null;
267
+ };
268
+ outputFormat: "json";
269
+ status: 200;
261
270
  input: {
262
271
  query?: {
263
272
  chainId?: string | string[];
@@ -290,14 +299,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
290
299
  } | {
291
300
  output: {
292
301
  error: {
293
- code: "api_key_invalid" | "api_key_missing";
302
+ code: "query_invalid";
294
303
  details?: readonly Response.error.Detail[] | undefined;
295
304
  message: string;
296
305
  };
297
306
  requestId: string;
298
307
  };
299
308
  outputFormat: "json";
300
- status: 401;
309
+ status: 400;
301
310
  input: {
302
311
  query?: {
303
312
  chainId?: string | string[];
@@ -310,14 +319,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
310
319
  } | {
311
320
  output: {
312
321
  error: {
313
- code: "api_key_forbidden";
322
+ code: "api_key_invalid" | "api_key_missing";
314
323
  details?: readonly Response.error.Detail[] | undefined;
315
324
  message: string;
316
325
  };
317
326
  requestId: string;
318
327
  };
319
328
  outputFormat: "json";
320
- status: 403;
329
+ status: 401;
321
330
  input: {
322
331
  query?: {
323
332
  chainId?: string | string[];
@@ -328,16 +337,9 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
328
337
  } | undefined;
329
338
  };
330
339
  } | {
331
- output: {
332
- error: {
333
- code: "payment_required" | "rate_limit_exceeded";
334
- details?: readonly Response.error.Detail[] | undefined;
335
- message: string;
336
- };
337
- requestId: string;
338
- };
339
- outputFormat: "json";
340
- status: 429;
340
+ output: null;
341
+ outputFormat: "body";
342
+ status: 402;
341
343
  input: {
342
344
  query?: {
343
345
  chainId?: string | string[];
@@ -350,14 +352,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
350
352
  } | {
351
353
  output: {
352
354
  error: {
353
- code: "query_invalid";
355
+ code: "api_key_forbidden";
354
356
  details?: readonly Response.error.Detail[] | undefined;
355
357
  message: string;
356
358
  };
357
359
  requestId: string;
358
360
  };
359
361
  outputFormat: "json";
360
- status: 400;
362
+ status: 403;
361
363
  input: {
362
364
  query?: {
363
365
  chainId?: string | string[];
@@ -370,14 +372,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
370
372
  } | {
371
373
  output: {
372
374
  error: {
373
- code: "upstream_error";
375
+ code: "payment_required" | "rate_limit_exceeded";
374
376
  details?: readonly Response.error.Detail[] | undefined;
375
377
  message: string;
376
378
  };
377
379
  requestId: string;
378
380
  };
379
381
  outputFormat: "json";
380
- status: 502;
382
+ status: 429;
381
383
  input: {
382
384
  query?: {
383
385
  chainId?: string | string[];
@@ -389,17 +391,15 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
389
391
  };
390
392
  } | {
391
393
  output: {
392
- data: {
393
- hash: `0x${string}`;
394
- id: `0x${string}`;
395
- number: number;
396
- timestamp: string;
397
- transactionCount: number;
398
- }[];
399
- nextCursor: string | null;
394
+ error: {
395
+ code: "upstream_error";
396
+ details?: readonly Response.error.Detail[] | undefined;
397
+ message: string;
398
+ };
399
+ requestId: string;
400
400
  };
401
401
  outputFormat: "json";
402
- status: 200;
402
+ status: 502;
403
403
  input: {
404
404
  query?: {
405
405
  chainId?: string | string[];
@@ -414,9 +414,51 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
414
414
  } & {
415
415
  "/v1/blocks/:block": {
416
416
  $get: {
417
- output: null;
418
- outputFormat: "body";
419
- status: 402;
417
+ output: {
418
+ baseFeePerGas: string | null;
419
+ gasLimit: number;
420
+ gasUsed: number;
421
+ hash: `0x${string}`;
422
+ id: `0x${string}`;
423
+ meta: {
424
+ rpc: {
425
+ [x: string]: import("hono/utils/types").JSONValue;
426
+ baseFeePerGas?: `0x${string}` | null | undefined;
427
+ difficulty?: `0x${string}` | undefined;
428
+ extraData?: `0x${string}` | undefined;
429
+ gasLimit: `0x${string}`;
430
+ gasUsed: `0x${string}`;
431
+ hash: `0x${string}` | null;
432
+ logsBloom?: `0x${string}` | null | undefined;
433
+ miner: `0x${string}`;
434
+ mixHash?: `0x${string}` | undefined;
435
+ nonce?: `0x${string}` | null | undefined;
436
+ number: `0x${string}` | null;
437
+ parentHash: `0x${string}`;
438
+ receiptsRoot: `0x${string}`;
439
+ sha3Uncles?: `0x${string}` | undefined;
440
+ size: `0x${string}`;
441
+ stateRoot: `0x${string}`;
442
+ timestamp: `0x${string}`;
443
+ totalDifficulty?: `0x${string}` | undefined;
444
+ transactions: `0x${string}`[];
445
+ transactionsRoot: `0x${string}`;
446
+ uncles?: `0x${string}`[] | undefined;
447
+ withdrawals?: {
448
+ [x: string]: import("hono/utils/types").JSONValue;
449
+ }[] | undefined;
450
+ withdrawalsRoot?: `0x${string}` | undefined;
451
+ };
452
+ };
453
+ miner: `0x${string}`;
454
+ number: number;
455
+ parentHash: `0x${string}`;
456
+ size: number;
457
+ timestamp: string;
458
+ transactionCount: number;
459
+ };
460
+ outputFormat: "json";
461
+ status: 200;
420
462
  input: {
421
463
  param: {
422
464
  block: string;
@@ -449,14 +491,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
449
491
  } | {
450
492
  output: {
451
493
  error: {
452
- code: "api_key_invalid" | "api_key_missing";
494
+ code: "query_invalid";
453
495
  details?: readonly Response.error.Detail[] | undefined;
454
496
  message: string;
455
497
  };
456
498
  requestId: string;
457
499
  };
458
500
  outputFormat: "json";
459
- status: 401;
501
+ status: 400;
460
502
  input: {
461
503
  param: {
462
504
  block: string;
@@ -469,14 +511,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
469
511
  } | {
470
512
  output: {
471
513
  error: {
472
- code: "api_key_forbidden";
514
+ code: "block_invalid";
473
515
  details?: readonly Response.error.Detail[] | undefined;
474
516
  message: string;
475
517
  };
476
518
  requestId: string;
477
519
  };
478
520
  outputFormat: "json";
479
- status: 403;
521
+ status: 400;
480
522
  input: {
481
523
  param: {
482
524
  block: string;
@@ -489,14 +531,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
489
531
  } | {
490
532
  output: {
491
533
  error: {
492
- code: "payment_required" | "rate_limit_exceeded";
534
+ code: "api_key_invalid" | "api_key_missing";
493
535
  details?: readonly Response.error.Detail[] | undefined;
494
536
  message: string;
495
537
  };
496
538
  requestId: string;
497
539
  };
498
540
  outputFormat: "json";
499
- status: 429;
541
+ status: 401;
500
542
  input: {
501
543
  param: {
502
544
  block: string;
@@ -507,16 +549,9 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
507
549
  } | undefined;
508
550
  };
509
551
  } | {
510
- output: {
511
- error: {
512
- code: "query_invalid";
513
- details?: readonly Response.error.Detail[] | undefined;
514
- message: string;
515
- };
516
- requestId: string;
517
- };
518
- outputFormat: "json";
519
- status: 400;
552
+ output: null;
553
+ outputFormat: "body";
554
+ status: 402;
520
555
  input: {
521
556
  param: {
522
557
  block: string;
@@ -529,14 +564,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
529
564
  } | {
530
565
  output: {
531
566
  error: {
532
- code: "upstream_error";
567
+ code: "api_key_forbidden";
533
568
  details?: readonly Response.error.Detail[] | undefined;
534
569
  message: string;
535
570
  };
536
571
  requestId: string;
537
572
  };
538
573
  outputFormat: "json";
539
- status: 502;
574
+ status: 403;
540
575
  input: {
541
576
  param: {
542
577
  block: string;
@@ -549,14 +584,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
549
584
  } | {
550
585
  output: {
551
586
  error: {
552
- code: "block_invalid";
587
+ code: "block_not_found";
553
588
  details?: readonly Response.error.Detail[] | undefined;
554
589
  message: string;
555
590
  };
556
591
  requestId: string;
557
592
  };
558
593
  outputFormat: "json";
559
- status: 400;
594
+ status: 404;
560
595
  input: {
561
596
  param: {
562
597
  block: string;
@@ -569,14 +604,14 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
569
604
  } | {
570
605
  output: {
571
606
  error: {
572
- code: "block_not_found";
607
+ code: "payment_required" | "rate_limit_exceeded";
573
608
  details?: readonly Response.error.Detail[] | undefined;
574
609
  message: string;
575
610
  };
576
611
  requestId: string;
577
612
  };
578
613
  outputFormat: "json";
579
- status: 404;
614
+ status: 429;
580
615
  input: {
581
616
  param: {
582
617
  block: string;
@@ -588,50 +623,15 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
588
623
  };
589
624
  } | {
590
625
  output: {
591
- baseFeePerGas: string | null;
592
- gasLimit: number;
593
- gasUsed: number;
594
- hash: `0x${string}`;
595
- id: `0x${string}`;
596
- meta: {
597
- rpc: {
598
- [x: string]: import("hono/utils/types").JSONValue;
599
- baseFeePerGas?: `0x${string}` | null | undefined;
600
- difficulty?: `0x${string}` | undefined;
601
- extraData?: `0x${string}` | undefined;
602
- gasLimit: `0x${string}`;
603
- gasUsed: `0x${string}`;
604
- hash: `0x${string}` | null;
605
- logsBloom?: `0x${string}` | null | undefined;
606
- miner: `0x${string}`;
607
- mixHash?: `0x${string}` | undefined;
608
- nonce?: `0x${string}` | null | undefined;
609
- number: `0x${string}` | null;
610
- parentHash: `0x${string}`;
611
- receiptsRoot: `0x${string}`;
612
- sha3Uncles?: `0x${string}` | undefined;
613
- size: `0x${string}`;
614
- stateRoot: `0x${string}`;
615
- timestamp: `0x${string}`;
616
- totalDifficulty?: `0x${string}` | undefined;
617
- transactions: `0x${string}`[];
618
- transactionsRoot: `0x${string}`;
619
- uncles?: `0x${string}`[] | undefined;
620
- withdrawals?: {
621
- [x: string]: import("hono/utils/types").JSONValue;
622
- }[] | undefined;
623
- withdrawalsRoot?: `0x${string}` | undefined;
624
- };
626
+ error: {
627
+ code: "upstream_error";
628
+ details?: readonly Response.error.Detail[] | undefined;
629
+ message: string;
625
630
  };
626
- miner: `0x${string}`;
627
- number: number;
628
- parentHash: `0x${string}`;
629
- size: number;
630
- timestamp: string;
631
- transactionCount: number;
631
+ requestId: string;
632
632
  };
633
633
  outputFormat: "json";
634
- status: 200;
634
+ status: 502;
635
635
  input: {
636
636
  param: {
637
637
  block: string;
@@ -653,16 +653,20 @@ export declare function blocks(): import("hono/hono-base").HonoBase<App.Environm
653
653
  * `GET /v1/blocks/:block` with an ISO 8601 selector.
654
654
  *
655
655
  * Like the original it searches a ±{@link byTimestampWindowSeconds}s window and
656
- * returns `404` when no indexed block falls within it. Because the chain id is a
657
- * path parameter (not the `chainId` query the global guard inspects), this
658
- * validates it against the deployment's supported chains itself.
656
+ * returns `404` when no indexed block falls within it. A local supported-chain
657
+ * check keeps standalone composition safe.
659
658
  */
660
659
  export declare function blocksByTimestampCompat(): import("hono/hono-base").HonoBase<App.Environment, {
661
660
  "/chains/:chainId/blocks/by-timestamp": {
662
661
  $get: {
663
- output: null;
664
- outputFormat: "body";
665
- status: 402;
662
+ output: {
663
+ block: {
664
+ blockNumber: number;
665
+ blockTimestamp: number;
666
+ };
667
+ };
668
+ outputFormat: "json";
669
+ status: 200;
666
670
  input: {
667
671
  param: {
668
672
  chainId: string;
@@ -697,14 +701,14 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
697
701
  } | {
698
702
  output: {
699
703
  error: {
700
- code: "api_key_invalid" | "api_key_missing";
704
+ code: "query_invalid";
701
705
  details?: readonly Response.error.Detail[] | undefined;
702
706
  message: string;
703
707
  };
704
708
  requestId: string;
705
709
  };
706
710
  outputFormat: "json";
707
- status: 401;
711
+ status: 400;
708
712
  input: {
709
713
  param: {
710
714
  chainId: string;
@@ -718,14 +722,14 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
718
722
  } | {
719
723
  output: {
720
724
  error: {
721
- code: "api_key_forbidden";
725
+ code: "chain_id_unsupported";
722
726
  details?: readonly Response.error.Detail[] | undefined;
723
727
  message: string;
724
728
  };
725
729
  requestId: string;
726
730
  };
727
731
  outputFormat: "json";
728
- status: 403;
732
+ status: 400;
729
733
  input: {
730
734
  param: {
731
735
  chainId: string;
@@ -739,14 +743,14 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
739
743
  } | {
740
744
  output: {
741
745
  error: {
742
- code: "payment_required" | "rate_limit_exceeded";
746
+ code: "api_key_invalid" | "api_key_missing";
743
747
  details?: readonly Response.error.Detail[] | undefined;
744
748
  message: string;
745
749
  };
746
750
  requestId: string;
747
751
  };
748
752
  outputFormat: "json";
749
- status: 429;
753
+ status: 401;
750
754
  input: {
751
755
  param: {
752
756
  chainId: string;
@@ -758,16 +762,9 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
758
762
  };
759
763
  };
760
764
  } | {
761
- output: {
762
- error: {
763
- code: "query_invalid";
764
- details?: readonly Response.error.Detail[] | undefined;
765
- message: string;
766
- };
767
- requestId: string;
768
- };
769
- outputFormat: "json";
770
- status: 400;
765
+ output: null;
766
+ outputFormat: "body";
767
+ status: 402;
771
768
  input: {
772
769
  param: {
773
770
  chainId: string;
@@ -781,14 +778,14 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
781
778
  } | {
782
779
  output: {
783
780
  error: {
784
- code: "upstream_error";
781
+ code: "api_key_forbidden";
785
782
  details?: readonly Response.error.Detail[] | undefined;
786
783
  message: string;
787
784
  };
788
785
  requestId: string;
789
786
  };
790
787
  outputFormat: "json";
791
- status: 502;
788
+ status: 403;
792
789
  input: {
793
790
  param: {
794
791
  chainId: string;
@@ -823,14 +820,14 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
823
820
  } | {
824
821
  output: {
825
822
  error: {
826
- code: "chain_id_unsupported";
823
+ code: "payment_required" | "rate_limit_exceeded";
827
824
  details?: readonly Response.error.Detail[] | undefined;
828
825
  message: string;
829
826
  };
830
827
  requestId: string;
831
828
  };
832
829
  outputFormat: "json";
833
- status: 400;
830
+ status: 429;
834
831
  input: {
835
832
  param: {
836
833
  chainId: string;
@@ -843,13 +840,15 @@ export declare function blocksByTimestampCompat(): import("hono/hono-base").Hono
843
840
  };
844
841
  } | {
845
842
  output: {
846
- block: {
847
- blockNumber: number;
848
- blockTimestamp: number;
843
+ error: {
844
+ code: "upstream_error";
845
+ details?: readonly Response.error.Detail[] | undefined;
846
+ message: string;
849
847
  };
848
+ requestId: string;
850
849
  };
851
850
  outputFormat: "json";
852
- status: 200;
851
+ status: 502;
853
852
  input: {
854
853
  param: {
855
854
  chainId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../src/apps/data/routes/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,OAAO,EAA0B,MAAM,MAAM,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,KAAK,KAAK,GAAG,MAAM,iBAAiB,CAAA;AAK3C,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAA;AASrD,4DAA4D;AAC5D,QAAA,MAAM,SAAS,YAAI,QAAQ,EAAE,WAAW,CAAU,CAAA;AASlD,+CAA+C;AAC/C,yBAAiB,MAAM,CAAC;IACtB,kFAAkF;IAClF,UAAiB,GAAG,CAAC;QAInB,iDAAiD;QAC1C,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;yBA6EgD,CAAA;KACnE;IAED;;;;OAIG;IACI,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKrB,CAAA;IAED;;;;;OAKG;IACI,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2Ef,CAAA;IAEH;;;;;;OAMG;IACI,MAAM,YAAY;;;;;;qBAiC8C,CAAA;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AC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;QACxC,uEAAuE;QACvE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC3B,KAAK,EAAE,MAAM,CAAA;QACb,8EAA8E;QAC9E,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QACzB,KAAK,EAAE,KAAK,GAAG,MAAM,CAAA;KACtB,CAAA;CACF"}
@@ -438,9 +438,8 @@ export function blocks() {
438
438
  * `GET /v1/blocks/:block` with an ISO 8601 selector.
439
439
  *
440
440
  * Like the original it searches a ±{@link byTimestampWindowSeconds}s window and
441
- * returns `404` when no indexed block falls within it. Because the chain id is a
442
- * path parameter (not the `chainId` query the global guard inspects), this
443
- * validates it against the deployment's supported chains itself.
441
+ * returns `404` when no indexed block falls within it. A local supported-chain
442
+ * check keeps standalone composition safe.
444
443
  */
445
444
  export function blocksByTimestampCompat() {
446
445
  return new Hono().get('/chains/:chainId/blocks/by-timestamp', Auth.policy({ apiKey: { scopes: ['data:read'] }, mpp: true, public: true }), OpenApi.validate('param', schema.getBlockByTimestamp.Params, {
@@ -481,8 +480,7 @@ export function blocksByTimestampCompat() {
481
480
  });
482
481
  const { chainId } = c.req.valid('param');
483
482
  const { closest, timestamp } = c.req.valid('query');
484
- // The global unsupported-chain guard only inspects the `chainId` query, so
485
- // reject an unserved chain here before it reaches the indexer.
483
+ // Keep this route safe when mounted without the shared data app.
486
484
  const supportedChainIds = c.get('supportedChainIds');
487
485
  if (!supportedChainIds.has(chainId))
488
486
  return Response.unsupportedChainId(c, chainId, supportedChainIds);