aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/index.ts b/index.ts
index ef353486..2c386556 100644
--- a/index.ts
+++ b/index.ts
@@ -91,6 +91,20 @@ app.post("/send/:lnaddress/:amount", auth, payments.lnaddress);
app.post("/send", auth, payments.internal);
app.post("/replace", auth, payments.replace);
app.get("/decode/:bolt11", payments.decode);
+app.post(
+ "/lightning/quote",
+ {
+ ...auth,
+ config: {
+ rateLimit: {
+ max: 20,
+ timeWindow: 10000,
+ keyGenerator: (req) => `lnquote:${(req.headers.authorization || "").slice(0, 50) || (req.headers["cf-connecting-ip"] as string) || req.ip}`,
+ },
+ },
+ },
+ payments.quote,
+);
app.get("/offer", auth, payments.offer);
app.post("/fetchinvoice", payments.fetchinvoice);