refactor(nwc): dedupe NWC tooling — use Sovran_Bitcoin's sovran-nwc
The Hub vendored a second copy of the NWC stack (app/sovran_systemsos_web/nwc_hub_manager.py, nwc_audit.py, nwc_lnurl_service.py, nwc_wallet_cli.py) and built its own nwc-wallet / nwc-lnurl binaries from it. That copy drifted from the pinned Alby Hub API contract (appId vs toAppId) and duplicated code that Sovran_Bitcoin already ships and fixes. Changes: - Delete the four vendored modules; server.py now imports the canonical implementation directly (from sovran_nwc import nwc_hub_manager) from the sovran-nwc package (pkgs.sovran-bitcoin.nwc). API fixes in Sovran_Bitcoin now propagate to the Hub web app automatically. - sovran-hub-web launcher: add <sovran-nwc>/lib/sovran-nwc to sys.path so the import resolves. - Stop shipping nwc-wallet / nwc-lnurl binaries from sovran-hub-web: the flake already provides them (env-wrapped nwc-wallet with NWC_* vars via albyhub.nix, and nwc-lnurl.service via lnurl.nix). Requires a Sovran_Bitcoin rev containing the toAppId fix (and the LNURL module audit-log fix); bump the flake input afterwards: nix flake update sovran-bitcoin Test: - nixos-rebuild switch - Hub Wallet Connections tab still lists/creates wallets - nwc-wallet list works from the operator shell - journalctl -u nwc-lnurl shows no import/contract errors
This commit is contained in:
@@ -39,7 +39,7 @@ from starlette.middleware.base import BaseHTTPMiddleware
|
||||
|
||||
from .config import load_config, load_versions
|
||||
from . import systemctl as sysctl
|
||||
from . import nwc_hub_manager as _nwc_mgr
|
||||
from sovran_nwc import nwc_hub_manager as _nwc_mgr
|
||||
from . import support_ops as _support_ops
|
||||
from .security_helpers import (
|
||||
_nix_escape,
|
||||
|
||||
Reference in New Issue
Block a user