This Python program demonstrates an algorithm for managing channels in a Lightning Network. It uses various modules to perform actions such as opening, closing, replacing channels, and finding better inbound liquidity. The program incorporates APIs from Ollama for enhanced functionality.
To run this program, you need to have the following prerequisites installed:
- Python 3.9+
- Ollama API key
- LND (Lightning Network Daemon) configured and running the latest version
- CLN soon
-
Clone the repository:
git clone https://github.com/AreaLayer/Bolt-Machine.git
-
Change into the project directory:
cd your-bolt-machine
-
Install the necessary Python packages:
pip install ollama pip install lnd-grpc
-
Set up Ollama API:
- Obtain an Ollama API key from the Ollama website.
- Replace
"YOUR_OLLAMA_API_KEY"
in the code with your actual API key.
-
Set up LND:
- Ensure LND is properly installed and running.
- Configure the LND connection details (host, port, TLS certificate) in the code.
-
Open a terminal and navigate to the project directory.
-
Run the Python program:
python main.py
-
The program will simulate the AI performing actions based on a random selection. The available actions are:
- 0: OpenChannel
- 1: CloseChannel
- 2: ReplaceChannel
- 3: FindBetterInboundLiquidity
This project is licensed under the MIT License.