2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-17 15:29:30 +00:00
RTL/backend/routes/lnd/index.js
ShahanaFarooqui bea5980c6f
Release 0.12.0 (#916)
Release 0.12.0
2021-12-29 18:08:41 -05:00

38 lines
1.5 KiB
JavaScript

import exprs from 'express';
const { Router } = exprs;
import infoRoutes from './getInfo.js';
import channelsRoutes from './channels.js';
import channelsBackupRoutes from './channelsBackup.js';
import peersRoutes from './peers.js';
import feesRoutes from './fees.js';
import balanceRoutes from './balance.js';
import walletRoutes from './wallet.js';
import graphRoutes from './graph.js';
import newAddressRoutes from './newAddress.js';
import transactionsRoutes from './transactions.js';
import paymentsRoutes from './payments.js';
import invoiceRoutes from './invoices.js';
import switchRoutes from './switch.js';
import messageRoutes from './message.js';
const router = Router();
const lndRoutes = [
{ path: '/getinfo', route: infoRoutes },
{ path: '/channels', route: channelsRoutes },
{ path: '/channels/backup', route: channelsBackupRoutes },
{ path: '/peers', route: peersRoutes },
{ path: '/fees', route: feesRoutes },
{ path: '/balance', route: balanceRoutes },
{ path: '/wallet', route: walletRoutes },
{ path: '/network', route: graphRoutes },
{ path: '/newaddress', route: newAddressRoutes },
{ path: '/transactions', route: transactionsRoutes },
{ path: '/payments', route: paymentsRoutes },
{ path: '/invoices', route: invoiceRoutes },
{ path: '/switch', route: switchRoutes },
{ path: '/message', route: messageRoutes }
];
lndRoutes.forEach((route) => {
router.use(route.path, route.route);
});
export default router;