base58util

package
v0.0.0-...-c0ba9c8 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChecksum = errors.New("checksum error")

ErrChecksum indicates that the checksum of a check-encoded string does not verify against the checksum.

View Source
var ErrInvalidFormat = errors.New("invalid format: version and/or checksum bytes missing")

ErrInvalidFormat indicates that the check-encoded string has an invalid format.

View Source
var ErrVersion = errors.New("moac version error")

Functions

func MoacDecode

func MoacDecode(input string) (result []byte, version byte, err error)

* Decode the input string into byte array * with checksum * REturn is a byte array holding the data * can be converted to string with hex.EncodeToString

func MoacEncode

func MoacEncode(data []byte, prefix byte) string

* Encode the account address, contract address * with checksum * This function should be called after check the * input HEX address. * data - byte array with * prefix - 00 for account address, * or 01 for contract address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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