Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address0xHex ¶
type Address0xHex [20]byte
Address0xHex formats with an 0x prefix, but no checksum (lower case)
func MustNewAddress ¶
func MustNewAddress(s string) *Address0xHex
func NewAddress ¶
func NewAddress(s string) (*Address0xHex, error)
func (Address0xHex) MarshalJSON ¶
func (a Address0xHex) MarshalJSON() ([]byte, error)
func (*Address0xHex) SetString ¶
func (a *Address0xHex) SetString(s string) error
func (Address0xHex) String ¶
func (a Address0xHex) String() string
func (*Address0xHex) UnmarshalJSON ¶
func (a *Address0xHex) UnmarshalJSON(b []byte) error
type AddressPlainHex ¶
type AddressPlainHex AddressWithChecksum
AddressPlainHex can parse the same, but formats as just flat hex (no prefix)
func (AddressPlainHex) MarshalJSON ¶
func (a AddressPlainHex) MarshalJSON() ([]byte, error)
func (AddressPlainHex) String ¶
func (a AddressPlainHex) String() string
func (*AddressPlainHex) UnmarshalJSON ¶
func (a *AddressPlainHex) UnmarshalJSON(b []byte) error
type AddressWithChecksum ¶
type AddressWithChecksum Address0xHex
AddressWithChecksum uses full 0x prefixed checksum address format
func NewAddressWithChecksum ¶
func NewAddressWithChecksum(s string) (*AddressWithChecksum, error)
func (AddressWithChecksum) MarshalJSON ¶
func (a AddressWithChecksum) MarshalJSON() ([]byte, error)
func (AddressWithChecksum) String ¶
func (a AddressWithChecksum) String() string
func (*AddressWithChecksum) UnmarshalJSON ¶
func (a *AddressWithChecksum) UnmarshalJSON(b []byte) error
type HexBytes0xPrefix ¶
type HexBytes0xPrefix []byte
HexBytes0xPrefix are serialized to JSON as hex with an `0x` prefix
func MustNewHexBytes0xPrefix ¶
func MustNewHexBytes0xPrefix(s string) HexBytes0xPrefix
func NewHexBytes0xPrefix ¶
func NewHexBytes0xPrefix(s string) (HexBytes0xPrefix, error)
func (HexBytes0xPrefix) MarshalJSON ¶
func (h HexBytes0xPrefix) MarshalJSON() ([]byte, error)
func (HexBytes0xPrefix) String ¶
func (h HexBytes0xPrefix) String() string
func (*HexBytes0xPrefix) UnmarshalJSON ¶
func (h *HexBytes0xPrefix) UnmarshalJSON(b []byte) error
type HexBytesPlain ¶
type HexBytesPlain []byte
HexBytesPlain is simple bytes that are JSON stored/retrieved as hex
func (HexBytesPlain) MarshalJSON ¶
func (h HexBytesPlain) MarshalJSON() ([]byte, error)
func (HexBytesPlain) String ¶
func (h HexBytesPlain) String() string
func (*HexBytesPlain) UnmarshalJSON ¶
func (h *HexBytesPlain) UnmarshalJSON(b []byte) error
type HexInteger ¶
HexInteger is a positive integer - serializes to JSON as an 0x hex string (no leading zeros), and parses flexibly depending on the prefix (so 0x for hex, or base 10 for plain string / float64)
func NewHexInteger ¶
func NewHexInteger(i *big.Int) *HexInteger
func NewHexInteger64 ¶
func NewHexInteger64(i int64) *HexInteger
func (*HexInteger) BigInt ¶
func (h *HexInteger) BigInt() *big.Int
func (HexInteger) MarshalJSON ¶
func (h HexInteger) MarshalJSON() ([]byte, error)
func (*HexInteger) String ¶
func (h *HexInteger) String() string
func (*HexInteger) UnmarshalJSON ¶
func (h *HexInteger) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.