From 883970b609cac1883e86f5115640b9e6812c6b95 Mon Sep 17 00:00:00 2001 From: Valcano Bacon Date: Thu, 11 Apr 2024 21:50:00 -0700 Subject: [PATCH] added aiogrpc --- pyproject.toml | 1 + src/irc/__init__.py | 1 + src/lnd.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7efb8ae..33d7189 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ requires-python = ">=3.7" dependencies = [ "click<9,>=8.0.3", "grpcio<2,>=1.62", + "aiogrpc<2,>=1.8", ] [project.optional-dependencies] diff --git a/src/irc/__init__.py b/src/irc/__init__.py index 44f6466..e063ae8 100644 --- a/src/irc/__init__.py +++ b/src/irc/__init__.py @@ -158,6 +158,7 @@ def keepalive(message, **kwargs): async def subscribe_invoices(): invoices = lnd_client.subscribe_invoices() + print(invoices) async for invoice in invoices: for tlv in invoice.htlcs: try: diff --git a/src/lnd.py b/src/lnd.py index b655968..f500af5 100644 --- a/src/lnd.py +++ b/src/lnd.py @@ -2,6 +2,7 @@ from functools import wraps import grpc +import aiogrpc from . import lightning_pb2 as ln from . import lightning_pb2_grpc as lnrpc @@ -74,7 +75,7 @@ def metadata_callback(_, callback): auth_creds = grpc.metadata_call_credentials(metadata_callback) combined_creds = grpc.composite_channel_credentials(cert_creds, auth_creds) - channel = grpc.secure_channel( + channel = aiogrpc.secure_channel( f"{host}:{port}", combined_creds, # options=[