Skip to content

Commit

Permalink
add more lightning endpoints to backend-mock
Browse files Browse the repository at this point in the history
  • Loading branch information
cstenglein committed Jun 7, 2022
1 parent 5375144 commit 57077d6
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions backend-mock/lightning.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ router.post("/add-invoice", (req, res) => {
});

router.post("/send-coins", (req, res) => {
console.info("call to /api/v1/send-coins");
console.info(`call to ${req.originalUrl}`);
res.status(200).send({
txid: "txid",
address: "11234",
Expand Down Expand Up @@ -83,8 +83,7 @@ router.get("/decode-pay-req", (req, res) => {

router.post("/send-payment", (req, res) => {
console.info(
"call to /api/v1/lightning/send-payment with invoice",
req.query["pay_req"]
`call to ${req.originalUrl} with invoice ${req.query["pay_req"]}`
);

return res.status(200).send(
Expand Down Expand Up @@ -163,7 +162,7 @@ router.post("/send-payment", (req, res) => {
});

router.get("/list-all-tx", (req, res) => {
console.info("call to /api/v1/lightning/list-all-tx");
console.info(`call to ${req.originalUrl}`);
if (WALLET_LOCKED) {
return res.status(423).send();
}
Expand Down Expand Up @@ -191,4 +190,16 @@ router.post("/unlock-wallet", (req, res) => {
}, 1000);
});

router.post("/open-channel", (req, res) => {
console.info(`call to ${req.originalUrl}`);
});

router.get("/list-channel", (req, res) => {
console.info(`call to ${req.originalUrl}`);
});

router.post("/close-channel", (req, res) => {
console.info(`call to ${req.originalUrl}`);
});

module.exports = router;

0 comments on commit 57077d6

Please sign in to comment.