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: 1

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