lnbits-legend/lnbits/wallets/void.py
calle e5d8c500d2
Wallets/unhashed_description (#870)
* new argument: unhashed_description

* accept in api

* set unhashed_description for memo case

* bolt11.py: dont be like CLN, accept the hash

* send hash to lnd in b64

* fix cln

* skip descr_hash for cln

* skip

* format
2022-08-13 14:29:04 +02:00

41 lines
1.1 KiB
Python

from typing import AsyncGenerator, Optional
from loguru import logger
from .base import (
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Unsupported,
Wallet,
)
class VoidWallet(Wallet):
async def create_invoice(
self,
amount: int,
memo: Optional[str] = None,
description_hash: Optional[bytes] = None,
**kwargs,
) -> InvoiceResponse:
raise Unsupported("")
async def status(self) -> StatusResponse:
logger.info(
"This backend does nothing, it is here just as a placeholder, you must configure an actual backend before being able to do anything useful with LNbits."
)
return StatusResponse(None, 0)
async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse:
raise Unsupported("")
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
return PaymentStatus(None)
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
return PaymentStatus(None)
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
yield ""