Skip to main content

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


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)

Uploaded Source

Built Distribution

bech32m_chia-1.0.3-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

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