fix(token-aggregation): resolve TypeScript build errors
- token-mapping: use createRequire(proxmox package.json) and process.cwd(), drop import.meta to allow commonjs build - Add routes/bridge.ts stub (status + metrics) so server.ts import resolves - Add config/cross-chain-bridges.ts with BridgeConfig/BridgeLane and CHAIN_138_BRIDGES from env - cross-chain-indexer: import BridgeLane, add explicit types for .find/.map callbacks, bridgeType fallback to b.type Made-with: Cursor
This commit is contained in:
26
services/token-aggregation/src/api/routes/bridge.ts
Normal file
26
services/token-aggregation/src/api/routes/bridge.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Bridge API: cross-chain bridge status and metrics.
|
||||
* GET /api/v1/bridge/status, /api/v1/bridge/metrics — stubbed or delegated to cross-chain report.
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from 'express';
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get('/status', (_req: Request, res: Response) => {
|
||||
res.json({
|
||||
ok: true,
|
||||
bridges: [],
|
||||
message: 'Bridge status: use /api/v1/report/cross-chain for volume/lanes.',
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/metrics', (_req: Request, res: Response) => {
|
||||
res.json({
|
||||
ok: true,
|
||||
lanes: [],
|
||||
message: 'Bridge metrics: use /api/v1/report/cross-chain for aggregated data.',
|
||||
});
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user