Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Supported alphabets AlphabetBitcoin = 0 AlphabetRipple = 1 AlphabetFlickr = 2 )
Constants
Variables ¶
View Source
var ( // ErrInvalidFormat is returned when trying to decode a string in invalid format ErrInvalidFormat = errors.New("The specified string is not a valid Base58 format") // ErrInvalidChecksum is returned when trying to decode a string with invalid checksum ErrInvalidChecksum = errors.New("The checksum of the specified string is not valid") )
Variables
View Source
var ( // ErrInvalidAlphabet is returned when trying to get a not-existent alphabet ErrInvalidAlphabet = errors.New("The specified alphabet is not existent") )
Variables
Functions ¶
This section is empty.
Types ¶
type Base58Obj ¶
type Base58Obj struct {
AlphIdx int
}
Base58 structure. It basically holds the alphabet index to be used. The default value (0) is the Bitcoin alphabet.
func (*Base58Obj) CheckDecode ¶
Decode the specified string in Base58 format to bytes, by removing and verifying the checksum.
func (*Base58Obj) CheckEncode ¶
Encode the specified bytes to Base58 format, by adding the checksum.
Click to show internal directories.
Click to hide internal directories.