What is Bech32
This document proposes a checksummed base32 format, “Bech32”, and a standard for native segregated witness output addresses using it.
See Detail BIP173
Why need it
最早是在 Bitcoin 中,为了隔离见证而使用的一种地址编码格式。
Bech32 是一直最长 90 个字符的字符串,其组成如下:
- hrp: human-readable part, 可读前缀
- seperator: which is always “1”. In case “1” is allowed inside the human-readable part, the last one in the string is the separator
- data part: which is at least 6 characters long and only consists of alphanumeric characters excluding “1”, “b”, “i”, and “o”
CheckSum : 在其 data part 的最后 6 位为该字符串的 checkSum,可用于校验该字符串的正确性。
How to use