aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-15 08:45:53 -0800
committerAdam Soltys <[email protected]>2024-11-15 08:45:53 -0800
commit9c3b89f94a55194ebffc2525b55a34c5e6095974 (patch)
treed892634d3e0985c3b0c0a7d6aa893b80a6dc3aa7 /routes
parentc16f5d72d9cea86ce0606d98f7112f0421040a8e (diff)
downloadcoinos-server-9c3b89f94a55194ebffc2525b55a34c5e6095974.tar.gz
coinos-server-9c3b89f94a55194ebffc2525b55a34c5e6095974.zip
decode endpoint
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.ts5
1 files changed, 5 insertions, 0 deletions
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));
+ },
};