-
+
-
-
@ {% raw %} {{domain}} {% endraw %}
+
+
+ @ {% raw %} {{ domain }} {% endraw %}
+
-
-
-
-
-
-
-
-
-
-
+
+
+ LNURL
+
+
+
+
+
+
+
+
+ Nostr
+
+
+
+
ID: {{ qrCodeDialog.data.id }}
Amount: {{ qrCodeDialog.data.amount }}
{{ qrCodeDialog.data.currency }} price: {{
- fiatRates[qrCodeDialog.data.currency] ?
- fiatRates[qrCodeDialog.data.currency] + ' sat' : 'Loading...' }}
{{ qrCodeDialog.data.currency }} price:
+ {{
+ fiatRates[qrCodeDialog.data.currency]
+ ? fiatRates[qrCodeDialog.data.currency] + ' sat'
+ : 'Loading...'
+ }}
- Accepts comments: {{ qrCodeDialog.data.comments }}
+ Accepts comments: {{ qrCodeDialog.data.comments
+ }}
Dispatches webhook to: {{ qrCodeDialog.data.webhook
}}
On success: {{ qrCodeDialog.data.success }}
- Lightning Address: {{ qrCodeDialog.data.username}}@{{domain}}
-
+ Lightning Address:
+ {{ qrCodeDialog.data.username }}@{{ domain }}
+
{% endraw %}
From b2f970fd669116827bdf417192bf1c23c7c1931e Mon Sep 17 00:00:00 2001
From: callebtc <93376500+callebtc@users.noreply.github.com>
Date: Wed, 26 Apr 2023 13:35:09 +0200
Subject: [PATCH 21/22] remove wrong nostrclient include
---
lnurl.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/lnurl.py b/lnurl.py
index 139a9f9..b709036 100644
--- a/lnurl.py
+++ b/lnurl.py
@@ -14,8 +14,6 @@ from urllib.parse import urlparse
import json
from . import nostr_publickey
-from ..nostrclient.nostr.key import PrivateKey, PublicKey
-
@lnurlp_ext.get(
"/api/v1/lnurl/cb/lnaddr/{link_id}",
From d7c05074075bfba621138d6637fb241f2845a297 Mon Sep 17 00:00:00 2001
From: callebtc <93376500+callebtc@users.noreply.github.com>
Date: Thu, 27 Apr 2023 11:56:41 +0200
Subject: [PATCH 22/22] user custom private key
---
__init__.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/__init__.py b/__init__.py
index 0c69f78..4ed6d80 100644
--- a/__init__.py
+++ b/__init__.py
@@ -12,8 +12,21 @@ from loguru import logger
from .nostr.event import Event
from .nostr.key import PrivateKey, PublicKey
+from environs import Env
-nostr_privatekey = PrivateKey()
+
+def generate_keys(private_key: str = ""):
+ if private_key.startswith("nsec"):
+ return PrivateKey.from_nsec(private_key)
+ elif private_key:
+ return PrivateKey(bytes.fromhex(private_key))
+ else:
+ return PrivateKey() # generate random key
+
+
+env = Env()
+env.read_env()
+nostr_privatekey = generate_keys(env.str("LNURLP_ZAP_NOSTR_PRIVATEKEY", default=""))
nostr_publickey: PublicKey = nostr_privatekey.public_key
logger.debug(f"LNURLP Zaps Nostr pubkey: {nostr_publickey.hex()}")