18 releases

0.9.0 May 13, 2022
0.8.1 Jun 18, 2021
0.8.0 Feb 14, 2021
0.7.2 Jan 3, 2020
0.2.1 May 17, 2017

#65 in Encoding

Download history 24321/week @ 2022-01-29 24822/week @ 2022-02-05 28989/week @ 2022-02-12 26943/week @ 2022-02-19 32759/week @ 2022-02-26 37193/week @ 2022-03-05 30515/week @ 2022-03-12 29833/week @ 2022-03-19 29253/week @ 2022-03-26 32661/week @ 2022-04-02 25039/week @ 2022-04-09 29431/week @ 2022-04-16 26864/week @ 2022-04-23 34889/week @ 2022-04-30 32268/week @ 2022-05-07 32071/week @ 2022-05-14

132,059 downloads per month
Used in 396 crates (75 directly)

MIT license

33KB
700 lines

Bech32 Rust

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

The minimum supported Rust version with the standard library is 1.41.1.


lib.rs:

Encoding and decoding of the Bech32 format

Bech32 is an encoding scheme that is easy to use for humans and efficient to encode in QR codes.

A Bech32 string consists of a human-readable part (HRP), a separator (the character '1'), and a data part. A checksum at the end of the string provides error detection to prevent mistakes when the string is written off or read out loud.

The original description in BIP-0173 has more details.

No runtime deps

Features

  • std
  • strict