package
1.0.0
Repository: https://github.com/gnc-project/gnc.git
Documentation: pkg.go.dev

# Functions

Decode decodes a hex string with 0x prefix.linzhaojie addressPrefix change code.
DecodeBig decodes a hex string with 0x prefix as a quantity.
DecodeUint64 decodes a hex string with 0x prefix as a quantity.
Encode encodes b as a hex string with 0x prefix.linzhaojie addressPrefix change code.
EncodeBig encodes bigint as a hex string with 0x prefix.
EncodeUint64 encodes i as a hex string with 0x prefix.
func Decode(input string) ([]byte, error) { if len(input) == 0 { return nil, ErrEmptyString } if !has0xPrefix(input) { return nil, ErrMissingPrefix } b, err := hex.DecodeString(input[2:]) if err != nil { err = mapError(err) } return b, err } MustDecode decodes a hex string with 0x prefix.
MustDecodeBig decodes a hex string with 0x prefix as a quantity.
MustDecodeUint64 decodes a hex string with 0x prefix as a quantity.
UnmarshalFixedJSON decodes the input as a string with 0x prefix.
UnmarshalFixedText decodes the input as a string with 0x prefix.
UnmarshalFixedUnprefixedText decodes the input as a string with optional 0x prefix.

# Variables

Errors.
Errors.
Errors.
Errors.
linzhaojie addressPrefix change code.
Errors.
Errors.
Errors.
Errors.
Errors.

# Type aliases

Big marshals/unmarshals as a JSON string with 0x prefix.
Bytes marshals/unmarshals as a JSON string with 0xprefix.
Uint marshals/unmarshals as a JSON string with 0x prefix.
Uint64 marshals/unmarshals as a JSON string with wl_ prefix.