bech32

Implementation of the Bech32 cryptocurrency address format (BIP 0173).

https://github.com/input-output-hk/bech32

Version on this page:1.1.0
LTS Haskell 22.17:1.1.5
Stackage Nightly 2024-04-14:1.1.5
Latest on Hackage:1.1.5

See all snapshots bech32 appears in

Apache-2.0 licensed by IOHK Engineering Team
This version can be pinned in stack with:bech32-1.1.0@sha256:33234b3ae405198b0f4af484753c6a06b4edb107dc256eafa6ef6d0ffe1d74c5,2551

Module documentation for 1.1.0

Implementation of the Bech32 cryptocurrency address format documented in the BIP (Bitcoin Improvement Proposal) 0173.

Changes

Changelog

[1.1.0] - 2020-07-08

Added

  • Added bech32 command-line for easy conversions in the console.

    Usage: bech32 [PREFIX]
      Convert to and from bech32 strings. Data are read from standard input.
    
    Available options:
      -h,--help                Show this help text
      PREFIX                   An optional human-readable prefix (e.g. 'addr').
                                 - When provided, the input text is decoded from various encoding formats and re-encoded to bech32 using the given prefix.
                                 - When omitted, the input text is decoded from bech32 to base16.
    
    Supported encoding formats: Base16, Bech32 & Base58.
    
    Examples:
      To Bech32:
        $ bech32 base16_ <<< 706174617465
        base16_1wpshgct5v5r5mxh0
    
        $ bech32 base58_ <<< Ae2tdPwUPEYy
        base58_1p58rejhd9592uusa8pzj2
    
        $ bech32 new_prefix <<< old_prefix1wpshgcg2s33x3
        new_prefix1wpshgcgeak9mv
    
      From Bech32:
        $ bech32 <<< base16_1wpshgct5v5r5mxh0
        706174617465
    

[1.0.2] - 2020-02-19

Added

  • Added support for the bech32-th extension library.

[1.0.1] - 2020-02-13

Added

  • Exposed functions dataPartFromWords and dataPartToWords within public interface.

  • Exposed the Word5 type within the public interface.

  • Exposed the CharPosition type within the public interface.

Changed

  • Improved module documentation, adding basic examples to help beginner users quickly get up to speed.

[1.0.0] - 2019-09-27

Added