Skip to main content

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)

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"
)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_lnd_grpc-0.0.5.tar.gz (76.5 kB view hashes)

Uploaded Source

Built Distribution

python_lnd_grpc-0.0.5-py3-none-any.whl (134.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page