grpc client for lnd python version 3.6+
Project description
## Install python package locally from pypi:
import python_lnd_grpc
## Initiate the connector class
lightning = python_lnd_grpc.LNDMethods() walletunlocker = python_lnd_grpc.WalletUnlocker()
## Use methods
info = lightning.getinfo() print(info)
## Method naming All methods mentioned in https://api.lightning.community/#lnd-grpc-api-reference are fully lowercase in python_lnd_grpc library. For example AbandonChannel request relates to method abandonchannel()
## Custom connector object
User can modify connector object in cases when connection to remote lnd node is needed (instead of local one), specifying custom parameters, like paths and file names:
- lightning = python_lnd_grpc.LNDMethods(
tls_file_path = “~/.lnd/”, tls_file_name = “remote.cert”, custom_tls_path_full = “~/.lnd/fullpath.cert”, macaroon_filename = “remote.macaroon”, macaroon_path = “~/.lnd/data/chain/bitcoin/”, custom_macaroon_path_full = “~/.lnd/data/chain/bitcoin/mainnet/full_path.macaroon”, grpc_host = “192.168.0.199”, grpc_port = “10009”, network = “mainnet”, output = “json-none-included”, macaroon_bytes = “bytes”, tls_file_bytes = “bytes”)
- Different types of output will result in either:
grpc class output output = None
json string without NOT initialized arguments output = json
dictionary without NOT initialized arguments output = dictionary
json string with NOT initialized arguments output = json-none-included
dictionary with NOT initialized arguments output = dictionary-none-included
In case of connecting to remote lnd node, the grpc setting in lnd.conf has to be set to listening:
rpclisten=0.0.0.0:10009
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_lnd_grpc-0.0.8.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a08113d7db4d23e0bed3afbafc2b4a7e78f3d6ec71776700aee0572de6edd8cc |
|
MD5 | b21da06a7e357d67a1c79bdcd0611a29 |
|
BLAKE2b-256 | f6c240e91ad307c2721ec0e8ede7b5d21cc0c7e9f96087b786d2fd066737352b |