From 9c3b89f94a55194ebffc2525b55a34c5e6095974 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 15 Nov 2024 08:45:53 -0800 Subject: decode endpoint --- routes/payments.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'routes') diff --git a/routes/payments.ts b/routes/payments.ts index 21720e17..bf3f65c0 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -533,4 +533,9 @@ export default { const recipient = await getUser(username); res.send(await sendInternal({ amount, sender, recipient })); }, + + async decode(req, res) { + const { bolt11 } = req.params; + res.send(await ln.decode(bolt11)); + }, }; -- cgit v1.2.3