Skip to content

joseblock/LNBitcoinGuide

Repository files navigation

LNBitcoinGuide

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.

Requirements

  • Download Polar
    • If you are having trouble opening the polar app:

      • Go to your Privacy and Security settings on (IOs) and click on Open Anyway. image
    • Install Docker

    • Install Docker-Compose

      • (IOs) To have Docker Compose install a Docker Desktop version before July 2023.
    • Test that Polar UI works

Import network

  • Clone the repo: git clone
  • In the polar UI click on import network: image
  • Drag the LNBTCGuide.polar.zip file to recreate the network.
  • It should look like this: image
  • Now you can press the start button.
  • It should look like this: image
  • In case it didnt work, try building the network by yourself.

Change source

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: Watch the video

Run the code:

  • pip3 install grpcio grpcio-tools googleapis-common-protos
  • python3 menu.py

If you're keen to continue a similar project, here's a guide to help you get started:

  1. 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.
  2. 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.
  3. Here is a sample project to understand better the requirements.
  4. Create the necessary endpoints to consume the node and feel free to build whatever you would like to do with Lightning Network.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages