bech32

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package bech32 is a modified version of the reference implementation of BIP173.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMixedCase          = errors.New("mixed case")
	ErrInvalideChecksum   = errors.New("invalid checksum")
	ErrIllegalZeroPadding = errors.New("illegal zero padding")
	ErrNonZeroPadding     = errors.New("non-zero padding")
)

Functions

func Decode

func Decode(s string) (hrp string, data []byte, err error)

Decode decodes a Bech32 string. If the string is uppercase, the HRP will be uppercase.

func Encode

func Encode(hrp string, data []byte) (string, error)

Encode encodes the HRP and a bytes slice to Bech32. If the HRP is uppercase, the output will be uppercase.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL