From 737ec21a85a5f8b93c9dc8aa13e10a4beff54f2e Mon Sep 17 00:00:00 2001 From: Santiago Martin Date: Mon, 14 Apr 2025 13:54:30 -0700 Subject: [PATCH] Add payment hash arg to create invoice santi/hold-invoice-a --- lightspark/lightspark_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightspark/lightspark_client.py b/lightspark/lightspark_client.py index 7ac35c5..4b32865 100644 --- a/lightspark/lightspark_client.py +++ b/lightspark/lightspark_client.py @@ -15,6 +15,7 @@ PrivateFormat, PublicFormat, ) + from lightspark.exceptions import LightsparkException from lightspark.objects.Account import Account from lightspark.objects.Account import from_json as Account_from_json @@ -173,6 +174,7 @@ def create_invoice( memo: Optional[str] = None, invoice_type: Optional[InvoiceType] = None, expiry_secs: Optional[int] = None, + payment_hash: Optional[str] = None, ) -> Invoice: logger.info("Creating an invoice for node %s.", node_id) variables = { @@ -180,6 +182,7 @@ def create_invoice( "node_id": node_id, "memo": memo, "invoice_type": invoice_type, + "payment_hash": payment_hash, } if expiry_secs is not None: variables["expiry_secs"] = expiry_secs