haskell-bitcoin / bitcoin

Bitcoin Library for Haskell
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Expose structured result types for bech32 encoding and decoding #39

Closed tochicool closed 1 year ago

tochicool commented 1 year ago

Currently, the Bitcoin.Address.Bech32 module does not allow the caller to inspect and handle bech32m encoding and decoding failure conditions. This may be useful for applications that use bech32 encoding with relaxed requirements, like lightning network payment requests or taro addresses, as well as applications that want to report more meaningful error messages.