NUT-04/05: add amount, unit, request to melt and mint quote responses (#719)

* add amount, unit, request to melt and mint responses

* make new fields optional to not break compat with old mints

* make new flags optional for backwards compat
This commit is contained in:
callebtc
2025-03-08 18:23:34 +00:00
committed by GitHub
parent 3ab1e1dfb2
commit bae4855915
6 changed files with 41 additions and 2 deletions

View File

@@ -469,6 +469,8 @@ class LedgerAPI(LedgerAPIDeprecated, SupportsAuth):
return PostMeltQuoteResponse(
quote=quote_id,
amount=amount_sat,
unit=unit.name,
request=payment_request,
fee_reserve=ret.fee or 0,
paid=False,
state=MeltQuoteState.unpaid.value,
@@ -550,6 +552,8 @@ class LedgerAPI(LedgerAPIDeprecated, SupportsAuth):
return PostMeltQuoteResponse(
quote=quote,
amount=0,
unit="sat",
request="lnbc0",
fee_reserve=0,
paid=ret.paid or False,
state=(