-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Elaine Ou edited this page Feb 15, 2018
·
29 revisions
Install bitcoind
and lnd
: https://github.com/lightningnetwork/lnd
Or, Install bitcoind
and c-Lightning
: https://github.com/ElementsProject/lightning
git clone https://github.com/elaineo/LightningBuddy
cd LightningBuddy
If using c-Lightning, install pylightning
and skip to Config.py.
pip install pylightning
If using LND, set up a Python gRPC client for the Lightning Network Daemon. (Instructions here, or just copy the stuff below)
pip install grpcio grpcio-tools googleapis-common-protos TwitterAPI
git clone https://github.com/googleapis/googleapis.git
curl -o rpc.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/rpc.proto
Compile the proto file:
python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. rpc.proto
Fill in config.py
. Create a new Twitter account to serve as your LightningBuddy. Go to https://apps.twitter.com/ to get your API keys. Don't forget to fill in your screen name as the bot owner.
#!/usr/bin/env python
# Twitter API keys
twitter = { 'consumer_key': '',
'consumer_secret': '',
'access_token': '',
'access_token_secret': '' }
# Replace with your own name
twitter_owner = 'eiaine'
## Default Channel creation parameters
CHANNEL_AMOUNT = 100000 # in satoshis
DB_PATH = 'sqlite.db'
"""
Required for c-Lightning
"""
LN_PATH = '/root/.lightning'
"""
Required for LND
"""
# Lnd cert is at ~/.lnd/tls.cert on Linux and
# ~/Library/Application Support/Lnd/tls.cert on Mac
LND_CERT_PATH = '~/.lnd/tls.cert'
LND_HOST = 'localhost:1000X'
NODE_ADDRESS = '<external_ip_addr>'
NODE_PORT = 9735
Ready? Now run LightningBuddy (use the --clightning
flag for c-Lightning, else it defaults to LND):
python main.py [--clightning]
- Create a payment channel to @FaucetBot
- Explore LightningBuddy commands