Documentation ¶
Overview ¶
Package base58 implements a human-friendly base58 encoding.
As opposed to base64 and friends, base58 is typically used to convert integers. You can use big.Int.SetBytes to convert arbitrary bytes to an integer first, and big.Int.Bytes the other way around.
Index ¶
- Variables
- func AddressToBytes(address string) ([]byte, error)
- func Byte2Hex(data byte) string
- func Decode(value string) ([]byte, error)
- func DecodeToBig(src []byte) (*big.Int, error)
- func Encode(encoded []byte) string
- func EncodeBig(dst []byte, src *big.Int) []byte
- func Hex2Byte(data []byte) string
- func ValidateAddress(address string) (bool, error)
- type CorruptInputError
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultStruct = &Verifier{} CoinName = "sgu" )
for register
Functions ¶
func AddressToBytes ¶
func DecodeToBig ¶
DecodeToBig a big integer from the bytes. Returns an error on corrupt input.
func EncodeBig ¶
EncodeBig encodes src, appending to dst. Be sure to use the returned new value of dst.
func ValidateAddress ¶
Types ¶
type CorruptInputError ¶
type CorruptInputError int64
CorruptInputError representds input is corrupted.
func (CorruptInputError) Error ¶
func (e CorruptInputError) Error() string
Error is to implement Error interface.
Click to show internal directories.
Click to hide internal directories.