package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Aug 4, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
bech32m
Implementation of bech32m format for segwit addrs
Documentation
¶
- Constants
- Variables
-
func Decode(bechString string) (string, []byte, int, error)
-
func Encode(hrp string, data []byte, spec int) string
-
func SegwitAddrDecode(hrp, addr string) (byte, []byte, error)
-
func SegwitAddrEncode(hrp string, witver byte, witprog []byte) (string, error)
View Source
const (
Bech32 = 1
Bech32m = 2
Failed = -1
)
View Source
var (
ErrMaxLengthExceeded = errors.New("bech32m: overall max length exceeded")
ErrMixedCase = errors.New("bech32m: mixed case found in address")
ErrInvalidChecksum = errors.New("bech32m: invalid checksum")
ErrCorruptInput = errors.New("bech32m: corrupt base32 data")
)
Decode validate a Bech32/Bech32m string, and determine HRP and data.
Encode compute a Bech32 string given HRP and data values.
SegwitAddrDecode decode a segwit address.
SegwitAddrEncode encode a segwit address.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.