A BIP350 compatible Bech32m encoding/decoding library for chia.
Project description
bech32m_chia for python
A BIP350 compatible Bech32m encoding/decoding library for chia.
install
pip install bech32m-chia
Use
import
from bech32m_chia import bech32m
Example
print(bech32m.encode("7382e99e0679b68b6e8211c48224c99fc941a5f035bd85f9f32c4a8f48d3bb29","xch"))
print(bech32m.encode("0x7382e99e0679b68b6e8211c48224c99fc941a5f035bd85f9f32c4a8f48d3bb29","xch"))
print(bech32m.encode("7382e99e0679b68b6e8211c48224c99fc941a5f035bd85f9f32c4a8f48d3bb29",""))
print(bech32m.encode("7382e99e0679b68b6e8211c48224c99fc941a5f035bd85f9f32c4a8f48d3bb29","nft"))
# xch1wwpwn8sx0xmgkm5zz8zgyfxfnly5rf0sxk7ct70n939g7jxnhv5smryxmv
# xch1wwpwn8sx0xmgkm5zz8zgyfxfnly5rf0sxk7ct70n939g7jxnhv5smryxmv
# xch1wwpwn8sx0xmgkm5zz8zgyfxfnly5rf0sxk7ct70n939g7jxnhv5smryxmv
# nft1wwpwn8sx0xmgkm5zz8zgyfxfnly5rf0sxk7ct70n939g7jxnhv5sam5p80
print(bech32m.decode("xch1wwpwn8sx0xmgkm5zz8zgyfxfnly5rf0sxk7ct70n939g7jxnhv5smryxmv"))
# 7382e99e0679b68b6e8211c48224c99fc941a5f035bd85f9f32c4a8f48d3bb29
Support
XCH: xch1crwg0ryz5rf90a6xmmspza2jmhc437sllnen8m7nu2dlx7ugjs9qaxgyjw
pawket: hezuoshe.xch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bech32m_chia-1.0.3.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for bech32m_chia-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff6ec635ba5b28cef38e9dd4df8e2796eb2557d64f79ea2d217d370c99b7e97 |
|
MD5 | 4cacac6764adfaa81e4fc9aeba085e1f |
|
BLAKE2b-256 | f9f2ae8c985de8e9c251d667907a5309ed0ffe38964d22d27aecc6028459576d |