Skip to main content

LNURL implementation for Python.

Project description

LNURL implementation for Python

travis-badge codecov-badge pypi-badge license-badge

Basic usage

import lnurl


Advanced usage

The Lnurl object wraps a bech32 LNURL to provide some extra utilities.

from lnurl import Lnurl

lnurl.decoded  # ''
lnurl.url.base  # ''
lnurl.url.query_params  # {'p': 'a8dw93x2h39s1f'}

You can also use a LnurlResponse to wrap responses you get from a LNURL.
The different types of responses defined in the LNURL specification have a different response class with different properties (see

import requests

from lnurl import Lnurl, LnurlWithdrawResponse

res = requests.get(lnurl.decoded)
withdraw = LnurlWithdrawResponse(res.json())
withdraw.max_sats  # int
withdraw.callback.base  # str
withdraw.callback.query_params # dict

Project details

Download files

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

Files for lnurl, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size lnurl-0.1.1-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size lnurl-0.1.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page