bech32

package module
v0.0.0-...-20f8996 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 7 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

bech32

bech32 implements a bech32 decoder suitable for decoding Cardano CIP-0019 addresses, https://github.com/cardano-foundation/CIPs/blob/master/CIP-0019/CIP-0019.md

hrp, data, err := bech32.Decode("addr1vx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzers66hrl8")
...

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCharacter = errors.New("invalid character")
	ErrInvalidFormat    = errors.New("invalid format")
	ErrInvalidLength    = errors.New("invalid length")
	ErrInvalidData      = errors.New("invalid data")
)

Functions

func Decode

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

Decode bech32 string into its human-readable part (hrp) and its associated data

func Encode

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

Encode a human readable part (hrp) and bytes as a bech32 string

Types

This section is empty.

Directories

Path Synopsis
cmd
bech32 module

Jump to

Keyboard shortcuts

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