#base32 #encoding #bitcoin #cryptocurrency

no-std bech32

Encodes and decodes the Bech32 format and implements the bech32 and bech32m checksums

21 releases

0.10.0-beta Oct 9, 2023
0.9.1 Aug 12, 2022
0.9.0 May 13, 2022
0.8.1 Jun 18, 2021
0.2.1 May 17, 2017

#1453 in Magic Beans

Download history 105105/week @ 2023-08-16 104965/week @ 2023-08-23 94365/week @ 2023-08-30 100597/week @ 2023-09-06 104277/week @ 2023-09-13 97231/week @ 2023-09-20 98351/week @ 2023-09-27 94024/week @ 2023-10-04 101541/week @ 2023-10-11 100860/week @ 2023-10-18 103157/week @ 2023-10-25 95683/week @ 2023-11-01 101031/week @ 2023-11-08 100403/week @ 2023-11-15 104082/week @ 2023-11-22 88413/week @ 2023-11-29

411,602 downloads per month
Used in 1,464 crates (141 directly)

MIT license

155KB
3K SLoC

Rust Bech32

Docs.rs badge Continuous Integration

Rust implementation of the Bech32 encoding format described in BIP-0173 and Bech32m encoding format described in BIP-0350.

You can find some usage examples in the documentation.

Bitcoin-specific address encoding is handled by the bitcoin-bech32 crate.

MSRV

This library should always compile with any combination of features on Rust 1.48.0.

Githooks

To assist devs in catching errors before running CI we provide some githooks. If you do not already have locally configured githooks you can use the ones in this repository by running, in the root directory of the repository:

git config --local core.hooksPath githooks/

Alternatively add symlinks in your .git/hooks directory to any of the githooks we provide.

Benchmarks

We use a custom Rust compiler configuration conditional to guard the benchmark code. To run the benchmarks use: RUSTFLAGS='--cfg=bench' cargo +nightly bench.

No runtime deps

Features