Skip to content

Commit

Permalink
Fix docs and add channels
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o committed Aug 19, 2024
1 parent 09ea84f commit 6b621c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
10 changes: 3 additions & 7 deletions docs/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Bolt Machine

## Overview
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 and Aperture for enhanced functionality.
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.

## Prerequisites

Expand All @@ -24,7 +24,7 @@ To run this program, you need to have the following prerequisites installed:

3. Install the necessary Python packages:
```bash
pip install ollama aperture
pip install ollama
pip install lnd-grpc
```

Expand All @@ -33,11 +33,7 @@ To run this program, you need to have the following prerequisites installed:
- Obtain an Ollama API key from the Ollama website.
- Replace `"YOUR_OLLAMA_API_KEY"` in the code with your actual API key.

2. Set up Aperture API:
- Obtain an Aperture API token from the Aperture website.
- Replace `"YOUR_APERTURE_API_TOKEN"` in the code with your actual API token.

3. Set up LND:
2. Set up LND:
- Ensure LND is properly installed and running.
- Configure the LND connection details (host, port, TLS certificate) in the code.

Expand Down
14 changes: 13 additions & 1 deletion src/core/channel.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
From
from lndgrpc import Channel
from lndgrpc import RpcError

def main():
channel = Channel("localhost:10009")
try:
channel.getinfo()
except RpcError as e:
print(e.code())
print(e.message())
print(e.details())
print(e.metadata())

0 comments on commit 6b621c3

Please sign in to comment.