bech32

Reference implementation for Bech32 and segwit addresses.


Keywords
bech32, lightning-network, segwit
License
MIT
Install
pip install bech32==1.2.0

Documentation

bech32 travis-ci build status

Since this implementation wasn't in a place that was easy to use for Python programmers I took it from from https://github.com/rustyrussell/lightning-payencode and published on GitHub and on PyPI.

The original version of this package is probably the one at https://github.com/sipa/bech32/tree/master/ref/python, but apparently Rusty Russel commented out the 90-length limit of bech32-encoded stuff so it could be used for Lightning invoices. Let's keep that change.

Install

pip install bech32