Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDecodeString(input string) (result []byte, err error)
- func CheckEncode(input []byte) []byte
- func CheckEncodePrefixed(input []byte) string
- func CheckEncodeToString(input []byte) string
- func Decode(src []byte) (body []byte, err error)
- func DecodeString(src string) (body []byte, err error)
- func Encode(src []byte) []byte
- func EncodeToString(src []byte) string
Constants ¶
View Source
const Base32Alphabet = "0pzqy9x8bf2tvrwds3jn54khce6mua7l"
Base32Alphabet - Rootchain address encoding alphabet.
Variables ¶
View Source
var Encoding = base32.NewEncoding(Base32Alphabet).WithPadding(base32.NoPadding)
Encoding - Rootchain address encoder.
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: checksum bytes missing")
ErrInvalidFormat indicates that the check-encoded string has an invalid format.
Functions ¶
func CheckDecodeString ¶
CheckDecodeString decodes a string that was encoded with CheckEncode and verifies the checksum.
func CheckEncode ¶
CheckEncode prepends and appends a four byte checksum.
func CheckEncodePrefixed ¶
CheckEncodePrefixed is CheckEncode to string with multibase prefix 'i'.
func CheckEncodeToString ¶
CheckEncodeToString is CheckEncode to string.
func DecodeString ¶
DecodeString - Encodes rootchain address bytes.
func EncodeToString ¶
EncodeToString - Encodes rootchain address bytes to string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.