This project tells a story that will help developers and enthusiasts understand how the lightning network funcitons. It uses a python gRPC server to consume a group of LN nodes.
- Download Polar
-
If you are having trouble opening the polar app:
-
Install Docker
- If Polar is not recognizing your docker, try this out
-
Install Docker-Compose
- (IOs) To have Docker Compose install a Docker Desktop version before July 2023.
-
Test that Polar UI works
-
- Clone the repo:
git clone
- In the polar UI click on import network:
- Drag the LNBTCGuide.polar.zip file to recreate the network.
- It should look like this:
- Now you can press the start button.
- It should look like this:
- In case it didnt work, try building the network by yourself.
Go to /menu.py
and modify the following variables:
- wallet
- coffee_shop
- providor
Each one of this variables will contain this fields:
"pubkey": '020fe45e80bf106640697d8ae6c7c548f4daebd2281c8e126c81b9f1a95eeb1f98',
"cert": '~/.polar/networks/4/volumes/lnd/alice/tls.cert',
"admin_macaroon": '~/.polar/networks/4/volumes/lnd/alice/data/chain/bitcoin/regtest/admin.macaroon',
"channel": '127.0.0.1:10001'
Update them by replacing each field mentioned before like the following video:
pip3 install grpcio grpcio-tools googleapis-common-protos
python3 menu.py
- First you need to think of a node network provider, it can be done with testing or real nodes, Polar is a testing local network.
- Now depending on the node type you will need to find an API node manager, in this case I used LND api with proto files.
- Here is a sample project to understand better the requirements.
- Create the necessary endpoints to consume the node and feel free to build whatever you would like to do with Lightning Network.