Documentation ¶
Index ¶
Constants ¶
const ( // TypeHex encoding value. TypeHex = "hex/plain" // TypeHex0XPrefix encoding value. TypeHex0XPrefix = "hex/0x-prefix" // TypeBase58 encoding value. TypeBase58 = "base58/plain" // TypeBase58SubstrateAddress encoding value. TypeBase58SubstrateAddress = "base58/ss58-address" )
Variables ¶
This section is empty.
Functions ¶
func DecodeBase58 ¶ added in v0.0.38
DecodeBase58 returns the bytes represented by the base58 string src.
DecodeBase58 expects that src contains only base58 characters. If the input is malformed, DecodeBase58 returns an error.
func DecodeHex ¶ added in v0.0.38
DecodeHex returns the bytes represented by the hexadecimal string s.
DecodeHex expects that src contains only hexadecimal characters and that src has even length. If the input is malformed, DecodeString returns the bytes decoded before the error.
func DecodeHexZeroX ¶ added in v0.0.38
DecodeHexZeroX returns the bytes represented by the hexadecimal string src.
DecodeHexZeroX expects that src contains only hex characters and must contain a `0x` prefix. If the input is malformed, DecodeHexZeroX returns an error.
func EncodeBase58 ¶ added in v0.0.38
EncodeBase58 returns the string represented by the base58 byte src.
EncodeBase58 expects that src contains only base58 byte. If the input is malformed, EncodeBase58 returns an error.
func EncodeHexZeroX ¶ added in v0.0.38
EncodeHexZeroX encodes src into "0x"+hex.Encode. As a convenience, it returns the encoding type used, but this value is always TypeHex0XPrefix. EncodeHexZeroX uses hexadecimal encoding prefixed with "0x".
Types ¶
This section is empty.