Discover Packages
github.com/incognito-core-libs/btcutil
bech32
package
Version:
v0.0.0-...-77eaaf7
Opens a new window with list of versions in this module.
Published: Jun 22, 2020
License: ISC
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
README
¶
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
License
Package bech32 is licensed under the copyfree ISC
License.
Expand ▾
Collapse ▴
Documentation
¶
Package bech32 provides a Go implementation of the bech32 format specified in
BIP 173.
Bech32 strings consist of a human-readable part (hrp), followed by the
separator 1, then a checksummed data part encoded using the 32 characters
"qpzry9x8gf2tvdw0s3jn54khce6mua7l".
More info: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
ConvertBits converts a byte slice where each byte is encoding fromBits bits,
to a byte slice where each byte is encoding toBits bits.
Decode decodes a bech32 encoded string, returning the human-readable
part and the data part excluding the checksum.
Encode encodes a byte slice into a bech32 string with the
human-readable part hrb. Note that the bytes must each encode 5 bits
(base32).
Source Files
¶
Click to show internal directories.
Click to hide internal directories.