Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrienemery/lnd-python-sdk
A Python SDK for interacting with the lnd lightning network docker client ⚡⚡⚡
https://github.com/adrienemery/lnd-python-sdk
Last synced: 9 days ago
JSON representation
A Python SDK for interacting with the lnd lightning network docker client ⚡⚡⚡
- Host: GitHub
- URL: https://github.com/adrienemery/lnd-python-sdk
- Owner: adrienemery
- Created: 2018-02-03T21:25:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-20T19:09:54.000Z (almost 7 years ago)
- Last Synced: 2024-11-08T12:44:39.937Z (2 months ago)
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lnd-python-sdk
A Python SDK for interacting with the lnd lightning network client from lightning labs (https://github.com/lightningnetwork/lnd)Follow the instructions here: https://github.com/lightningnetwork/lnd/tree/master/docker
Once you have a docker containers setup for alice and bob and have mined some blocks you can use the python interface provided to simplify the interactions between them.
Example
```python
# assuming your docker containers are named "alice" and "bob"
from nodes import Node, clientalice = Node(client.containers.get('alice'))
bob = Node(client.containers.get('bob'))alice.create_address()
bob.create_address()# connect to bob and fund a payment channel
alice.connect(bob)
alice.open_channel(bob, 500_000)# lets get paid
invoice = bob.add_invoice(200_000, memo='pay me')
alice.pay(invoice)print(bob.wallet_balance)
print(alice.wallet_balance)
```