Closed roconnor-blockstream closed 4 years ago
Hi @roconnor-blockstream,
Many thanks for reporting this. :+1:
Indeed, there are a few gaps in the public interface of Codec.Binary.Bech32
, and the omission of Word5
is one of these gaps.
I've added this to our internal list of improvement tasks, and will let you know once we've added it.
Thanks again!
Hi @roconnor-blockstream
We've just released a new version (1.0.1) on Hackage which includes a fix to this issue.
Thanks again for raising this issue! Feel free to let us know if you have any further suggestions for improvements.
The segwit address format defined in BIP-173 states that the first character of the
DataPart
encodes the witness version number. However the API given inCodec.Binary.Bech32
doesn't provide any means of either setting or extracting the first character from theDataPart
.I've resorted to using the
dataPartFromWords
anddataPartToWords
from theCodec.Binary.Bech32.Internal
module to gain access to the witness version number.