2021-12-29 23:08:41 +00:00
|
|
|
import exprs from 'express';
|
|
|
|
const { Router } = exprs;
|
|
|
|
import infoCLRoutes from './getInfo.js';
|
|
|
|
import feesCLRoutes from './fees.js';
|
|
|
|
import balanceCLRoutes from './balance.js';
|
|
|
|
import channelsCLRoutes from './channels.js';
|
|
|
|
import invoicesCLRoutes from './invoices.js';
|
|
|
|
import onChainCLRoutes from './onchain.js';
|
|
|
|
import paymentsCLRoutes from './payments.js';
|
|
|
|
import peersCLRoutes from './peers.js';
|
|
|
|
import networkCLRoutes from './network.js';
|
|
|
|
import offersCLRoutes from './offers.js';
|
2022-05-16 18:45:41 +00:00
|
|
|
import utilityCLRoutes from './utility.js';
|
2021-12-29 23:08:41 +00:00
|
|
|
|
|
|
|
const router = Router();
|
|
|
|
|
|
|
|
const clRoutes = [
|
|
|
|
{ path: '/getinfo', route: infoCLRoutes },
|
|
|
|
{ path: '/fees', route: feesCLRoutes },
|
|
|
|
{ path: '/balance', route: balanceCLRoutes },
|
|
|
|
{ path: '/channels', route: channelsCLRoutes },
|
|
|
|
{ path: '/invoices', route: invoicesCLRoutes },
|
|
|
|
{ path: '/onchain', route: onChainCLRoutes },
|
|
|
|
{ path: '/payments', route: paymentsCLRoutes },
|
|
|
|
{ path: '/peers', route: peersCLRoutes },
|
|
|
|
{ path: '/network', route: networkCLRoutes },
|
2022-05-16 18:45:41 +00:00
|
|
|
{ path: '/offers', route: offersCLRoutes },
|
|
|
|
{ path: '/utility', route: utilityCLRoutes }
|
2021-12-29 23:08:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
clRoutes.forEach((route) => {
|
|
|
|
router.use(route.path, route.route);
|
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|