2021-12-29 23:08:41 +00:00
|
|
|
import exprs from 'express';
|
|
|
|
const { Router } = exprs;
|
|
|
|
import { isAuthenticated } from '../../utils/authCheck.js';
|
2023-12-06 04:32:05 +00:00
|
|
|
import { listPeerChannels, openChannel, setChannelFee, closeChannel, listForwards, funderUpdatePolicy } from '../../controllers/cln/channels.js';
|
2021-12-29 23:08:41 +00:00
|
|
|
|
|
|
|
const router = Router();
|
|
|
|
|
2023-05-17 02:41:50 +00:00
|
|
|
router.get('/listPeerChannels', isAuthenticated, listPeerChannels);
|
2021-12-29 23:08:41 +00:00
|
|
|
router.post('/', isAuthenticated, openChannel);
|
|
|
|
router.post('/setChannelFee', isAuthenticated, setChannelFee);
|
2023-12-06 04:32:05 +00:00
|
|
|
router.post('/close/', isAuthenticated, closeChannel);
|
2021-12-29 23:08:41 +00:00
|
|
|
|
2023-12-06 04:32:05 +00:00
|
|
|
router.post('/listForwards', isAuthenticated, listForwards);
|
2021-12-29 23:08:41 +00:00
|
|
|
|
2022-05-13 21:24:37 +00:00
|
|
|
router.post('/funderUpdate', isAuthenticated, funderUpdatePolicy);
|
|
|
|
|
2021-12-29 23:08:41 +00:00
|
|
|
export default router;
|