invoice listeners support on lnd and other fixes around wallets/

This commit is contained in:
fiatjaf
2020-10-04 12:05:01 -03:00
parent 90c640b659
commit b3c69ad49c
12 changed files with 217 additions and 151 deletions
+10 -1
View File
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from typing import NamedTuple, Optional
from typing import NamedTuple, Optional, AsyncGenerator
class InvoiceResponse(NamedTuple):
@@ -43,6 +43,15 @@ class Wallet(ABC):
def get_payment_status(self, checking_id: str) -> PaymentStatus:
pass
@abstractmethod
def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
"""
this is an async function, but here it is noted without the 'async'
prefix because mypy has a bug identifying the signature of abstract
methods.
"""
pass
class Unsupported(Exception):
pass