Skip to content

Commit

Permalink
added aiogrpc
Browse files Browse the repository at this point in the history
  • Loading branch information
valcanobacon committed Apr 12, 2024
1 parent 3383481 commit 883970b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions src/irc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion src/lnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=[
Expand Down

0 comments on commit 883970b

Please sign in to comment.