38c25ef9cd
The bech32 format is used to encode base32 data in a string format specified in BIP 173. This is among other things used to encode native segwit addresses, also specified in the same BIP. This commit adds the package bech32, which contains the necessary utility methods to create bech32 encoded strings from arbitrary data.
1.1 KiB
1.1 KiB
bech32
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.
Test vectors from BIP 173 are added to ensure compatibility with the BIP.
Installation and Updating
$ go get -u github.com/btcsuite/btcutil/bech32
Examples
- Bech32 decode Example Demonstrates how to decode a bech32 encoded string.
- Bech32 encode Example Demonstrates how to encode data into a bech32 string.
License
Package bech32 is licensed under the copyfree ISC License.