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

@@ -62,7 +62,8 @@ async def info() -> GetInfoResponse:
supported_dict = dict(supported=True)
mint_features: Dict[int, Dict[str, Any]] = {
supported_dict = dict(supported=True)
mint_features: Dict[int, Any] = {
4: dict(
methods=method_settings[4],
disabled=settings.mint_peg_out_only,
@@ -79,6 +80,21 @@ async def info() -> GetInfoResponse:
12: supported_dict,
}
# signal which method-unit pairs support MPP
for method, unit_dict in ledger.backends.items():
for unit in unit_dict.keys():
logger.trace(
f"method={method.name} unit={unit} supports_mpp={unit_dict[unit].supports_mpp}"
)
if unit_dict[unit].supports_mpp:
mint_features.setdefault(15, []).append(
{
"method": method.name,
"unit": unit.name,
"mpp": True,
}
)
return GetInfoResponse(
name=settings.mint_info_name,
pubkey=ledger.pubkey.serialize().hex() if ledger.pubkey else None,