From 19df2f888b90ab415d7b2ff7cfa19ce2c36df235 Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Wed, 20 Oct 2021 03:59:24 +0100 Subject: [PATCH] Added decode lnurl and extra payment check --- lnbits/core/templates/core/_api_docs.html | 31 ++++++++++++++++++- lnbits/core/views/api.py | 37 ++++++++++++++++++++++- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/lnbits/core/templates/core/_api_docs.html b/lnbits/core/templates/core/_api_docs.html index 4bb38fad..2acadc76 100644 --- a/lnbits/core/templates/core/_api_docs.html +++ b/lnbits/core/templates/core/_api_docs.html @@ -19,7 +19,7 @@ GET /api/v1/wallet
Headers
- {"X-Api-Key": "{{ wallet.adminkey }}"}
+ {"X-Api-Key": "{{ wallet.inkey }}"}
Returns 200 OK (application/json)
@@ -94,6 +94,35 @@
+ + + + + POST + /api/v1/payments/decode +
Headers
+ {"X-Api-Key": "{{ wallet.inkey }}"}
+
Body (application/json)
+ {"invoice": <string>} +
+ Returns 200 (application/json) +
+
Curl example
+ curl -X POST {{ request.url_root }}api/v1/payments/decode -d + '{"data": <bolt11/lnurl, string>}' -H "X-Api-Key: + {{ wallet.inkey }}" -H "Content-type: application/json" +
+
+