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)

## 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


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.8.5.tar.gz (76.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_lnd_grpc-0.0.8.5-py3-none-any.whl (135.9 kB view details)

Uploaded Python 3

File details

Details for the file python_lnd_grpc-0.0.8.5.tar.gz.

File metadata

  • Download URL: python_lnd_grpc-0.0.8.5.tar.gz
  • Upload date:
  • Size: 76.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.5

File hashes

Hashes for python_lnd_grpc-0.0.8.5.tar.gz
Algorithm Hash digest
SHA256 b43ed3ce400a430c21739deaaa0b8e0657ffb6bce821088ee583cb20d5cd81ea
MD5 edc0e8a8b44f6769f11f3eaaa9e2d961
BLAKE2b-256 ac3fdd1eeaa48227a689b9aac7f562b549d2604f4d01ecfbc6af0bdf2420494c

See more details on using hashes here.

File details

Details for the file python_lnd_grpc-0.0.8.5-py3-none-any.whl.

File metadata

  • Download URL: python_lnd_grpc-0.0.8.5-py3-none-any.whl
  • Upload date:
  • Size: 135.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.5

File hashes

Hashes for python_lnd_grpc-0.0.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 16cf94cb0c0bd4983d603af904f2a567b9e1031cfa5db093507113a5ccb1fa33
MD5 c5e21d1bd8c1f5919109665d2fd13ac0
BLAKE2b-256 c021ceee66e800cca4cf13cc3bc34e324cd7a3a528e37348d674681b78b699a8

See more details on using hashes here.

Supported by

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