Multinut LND (#492)

* amount in melt request

* apply fee limit

* more error handling

* wip: signal flag in /info

* clean up multinut

* decode mypy error lndrest

* fix test

* fix tests

* signal feature and blindmessages_deprecated

* setting

* fix blindedsignature method

* fix tests

* mint info file

* test mpp with lnd regtest

* nuts optionsl mint
 info

* try to enable mpp with lnd

* test mpp with third payment
This commit is contained in:
callebtc
2024-05-22 22:52:26 +02:00
committed by GitHub
parent 71b4051373
commit 61cf7def24
27 changed files with 502 additions and 110 deletions

View File

@@ -6,7 +6,7 @@ from bolt11 import (
decode,
)
from ..core.base import Amount, MeltQuote, Unit
from ..core.base import Amount, MeltQuote, PostMeltQuoteRequest, Unit
from ..core.helpers import fee_reserve
from ..core.settings import settings
from .base import (
@@ -167,8 +167,10 @@ class LNbitsWallet(LightningBackend):
preimage=data["preimage"],
)
async def get_payment_quote(self, bolt11: str) -> PaymentQuoteResponse:
invoice_obj = decode(bolt11)
async def get_payment_quote(
self, melt_quote: PostMeltQuoteRequest
) -> PaymentQuoteResponse:
invoice_obj = decode(melt_quote.request)
assert invoice_obj.amount_msat, "invoice has no amount."
amount_msat = int(invoice_obj.amount_msat)
fees_msat = fee_reserve(amount_msat)