Lightning BOLT11 utils
This is an implementation of the Lightning BOLT11 specification, based on previous work by Rusty Russell, the Electrum Wallet team, and the LNbits bolt11 helpers created by @fiatjaf.
resources
installing
$ git clone https://github.com/lnbits/bolt11
$ cd bolt11
$ poetry install
running CLI
$ poetry run bolt11 --help
$ poetry run bolt11 decode
run all checks and tests
$ make
using pre-commit as git hook
$ poetry run pre-commit install
running CLI
$ poetry run bolt11 --help
$ poetry run bolt11 decode lnbc20m1pvjluez.....
{
"currency": "bc",
"amount": 2000000000,
"timestamp": 1496314658,
"signature": "6a6586db4e8f6d40e3a5bb92e4df5110c627e9ce493af237e20a046b4e86ea200178c59564ecf892f33a9558bf041b6ad2cb8292d7a6c351fbb7f2ae2d16b54e",
"description_hash": "3925b6f67e2c340036ed12093dd44e0368df1b6ea26c53dbe4811f58fd5db8c1",
"features": {
"var_onion_optin": "required",
"payment_secret": "required"
},
"fallback": "1RustyRX2oai4EYYDpQGWvEL62BBGqN9T",
"route_hints": [
{
"public_key": "029e03a901b85534ff1e92c43c74431f7ce72046060fcf7a95c37e148f78c77255",
"short_channel_id": "66051x263430x1800",
"base_fee": 1,
"ppm_fee": 20,
"cltv_expiry_delta": 3
},
{
"public_key": "039e03a901b85534ff1e92c43c74431f7ce72046060fcf7a95c37e148f78c77255",
"short_channel_id": "197637x395016x2314",
"base_fee": 2,
"ppm_fee": 30,
"cltv_expiry_delta": 4
}
],
"min_final_cltv_expiry": 9,
"payment_hash": "0001020304050607080900010203040506070809000102030405060708090102",
"payment_secret": "1111111111111111111111111111111111111111111111111111111111111111",
"payee": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad"
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bolt11-1.0.4.tar.gz
(11.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
bolt11-1.0.4-py3-none-any.whl
(13.6 kB
view details)
File details
Details for the file bolt11-1.0.4.tar.gz.
File metadata
- Download URL: bolt11-1.0.4.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1042-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79cdf900a27037337138afa4334f44207f487e6934d66f094b1ed10418a9e9fe
|
|
| MD5 |
7f2a5a756a895ff864be0b0e46d7cd6f
|
|
| BLAKE2b-256 |
6e9fd0c7d7582df4541518c96583ba0a3606193f165214ca6d77f66543530a9a
|
File details
Details for the file bolt11-1.0.4-py3-none-any.whl.
File metadata
- Download URL: bolt11-1.0.4-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1042-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9da33b9a59cdf0a665c93df03a891232f4a6e2773b55edbb54075f965b7bd95b
|
|
| MD5 |
746241ed28efca10dedc77b87810da75
|
|
| BLAKE2b-256 |
c3d4f20232d075ad65fca26af3f1a001675c790b3045e64d279119146f27b4c7
|