GitHub release (release name instead of tag name) GitHub Unit tests Docker image build
NodeGuard is an open-source technology stack developed to simplify treasury operations for lightning nodes, focusing on both Security and UX. It enables the management of lightning treasury funds, adhering to the principles of separation of duties and the principle of least privilege. These principles form the core of NodeGuard's functionality, aiming to eliminate the need for an internal node hot wallet and to separate key management from the actual node operators. At present, NodeGuard supports only LND. For a more detailed understanding, please watch the video below.Current features of NodeGuard are the following:
- Asynchronous channel funding leveraging cold multisig wallets and hot wallets
- Multisig wallet creation and import (BIP39), only segwit for now
- Liquidity automation by settings rules in tandem with NodeGuard liquidator
- Optional remote signing through NodeGuard Remote Signer functions for channel funding transactions, separating the NodeGuard keys from the actual software
- Automatic sweeping of funds in lightning nodes to avoid having funds on the node hot wallets
- Channel management
- Channel creation interception with returning address to multisig wallets to avoid having funds on hot wallets
- Support for hardware wallets to sign the PSBTs for channel funding transactions
- Minimalistic in-browser wallet with NodeGuard Companion to ease signing of transactions and wallet creation
- In-browser notification systems for channel approvals
- Two-factor authentication
- Manual and automated Swap Outs
Check Contributing.md
TODO
Run tilt up to run the whole infrastructure, then just run to run the project.
- VS Code / Visual Studio
- Docker desktop
- Dotnet SDK 6+
- Dotnet-ef global tool
- AWS Lambda function + AWS credentials for the Remote FundsManagerSigner, check this
- Tilt
- Docker
- (Optional) Polar lightning
- (Optional) Go go 1.24.3 or later (for using the interactive commands in the .justfile)
This project uses NPGSQL(postgres) database provider for EfCore (ORM). You need to install dotnet-ef global tool
dotnet tool install -g dotnet-ef
- To update the database (create it & apply migrations) you shall do:
cd src && dotnet ef database update - To create a new migration
cd src && dotnet ef migrations add changeInEntityExampleAddedNewField // This is an example - To remove a non-applied migration (once a migration is applied, you have to drop the database to remove it)
cd src && dotnet ef migrations remove
- Install tilt
- Run
tilt upon your terminal
- If you want to run a lightweight version of the project use
docker compose --profile polar up -don your terminal. Add--profile loopand--profile mempoolif you need to run them too
- You can run the Polar network by importing the
devnetwork.zipinto it. Then you have to rundocker compose up -dfor the rest of the needed containers to start.
- Run
just runto build and run the project orjust watchfor hot reload on your terminal
- Run the Debug NG launch setting on your terminal
- You can run the task
NodeGuard local debugthat is in thelaunchSettings.jsonfrom any other IDE, just make sure you run first./docker/extract-macaroons.shafter starting the infrastructure so NodeGuard can get the latest macaroons
- After completing the previous steps, navigate to
http://localhost:38080to log in
Check Security.md
This project is licensed under AGPLv3.0. Check LICENSE for more information.