diff --git a/lnurl.py b/lnurl.py index 039e2a6..7f08760 100644 --- a/lnurl.py +++ b/lnurl.py @@ -85,7 +85,12 @@ async def api_lnurl_callback( if lnaddress and link.username and link.domain: extra["lnaddress"] = f"{link.username}@{link.domain}" + print("HASHING THIS") nostr_description = json.dumps(nostr)[1:-1] # remove leading and trailing " + print(nostr_description) + import hashlib + + print(hashlib.sha256(nostr_description.encode()).hexdigest()) payment_hash, payment_request = await create_invoice( wallet_id=link.wallet, amount=int(amount_received / 1000), diff --git a/tasks.py b/tasks.py index 307be12..79385e9 100644 --- a/tasks.py +++ b/tasks.py @@ -98,6 +98,11 @@ async def on_invoice_paid(payment: Payment): def send_event(_): ws.send(zap_receipt.to_message()) + from lnbits.core import bolt11 + + print( + f"Invoice description hash: {bolt11.decode(payment.bolt11).description_hash}" + ) ws = WebSocketApp( f"ws://localhost:{settings.port}/nostrclient/api/v1/relay", on_open=send_event,