feat(token-aggregation): add Chain 138 wallet routing surfaces

Add MetaMask Snap metadata, wallet image helpers, and n-hop planning surfaces so Chain 138 routing and wallet-add flows have consistent API coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-07-07 09:57:09 -07:00
parent 6dcadc86a2
commit c55fab257c
18 changed files with 462 additions and 26 deletions

View File

@@ -8,7 +8,7 @@ import { apiRateLimiter, strictRateLimiter } from './middleware/rate-limit';
import tokenRoutes from './routes/tokens';
import reportRoutes from './routes/report';
import adminRoutes from './routes/admin';
import configRoutes from './routes/config';
import configRoutes, { sendMetamaskConfig } from './routes/config';
import bridgeRoutes from './routes/bridge';
import quoteRoutes from './routes/quote';
import routeTreeRoutes from './routes/routes';
@@ -294,6 +294,10 @@ export class ApiServer {
this.app.get('/api/v1', sendApiV1Catalog);
this.app.get('/api/v1/', sendApiV1Catalog);
// Keep wallet add-chain config on a direct route so it cannot be shadowed by other mounts.
this.app.get('/api/v1/config/metamask', sendMetamaskConfig);
this.app.get('/api/v1/metamask', sendMetamaskConfig);
// API routes
this.app.use('/api/v1', tokenRoutes);
this.app.use('/api/v1', configRoutes);