bech32

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

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

Version on this page:1.1.1
LTS Haskell 22.37:1.1.7
Stackage Nightly 2024-10-10:1.1.7
Latest on Hackage:1.1.7

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.1@sha256:238cb05bd933f6eca9d080186f08b812f1357ef8926af69fec4d9c059af0b975,2560

Module documentation for 1.1.1

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

Changes

Changelog

[1.1.1] - 2021-06-11

Added

  • Added --version switch for the bech32 command.

Changed

  • Upgraded CI to build with Cabal 3.4.0.0 and GHC 8.10.4.
  • Update version constraints for GHC 9.0.1.

[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