hexutil

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

type Bytes []byte

Bytes is a byte slice that marshals/unmarshals from a hex-encoded string.

func (Bytes) MarshalText

func (b Bytes) MarshalText() ([]byte, error)

MarshalText encodes Bytes into a hex string with a 0x prefix.

func (*Bytes) UnmarshalText

func (b *Bytes) UnmarshalText(data []byte) error

UnmarshalText decodes a hex string (with or without 0x prefix) into Bytes.

type Hash

type Hash common.Hash

Hash is a wrapper type for common.Hash that marshals and unmarshals hex strings. It can decode hex strings with or without the 0x prefix and with or without leading zeros and encodes hashes without leading zeros.

func (Hash) MarshalText

func (h Hash) MarshalText() ([]byte, error)

func (*Hash) UnmarshalText

func (h *Hash) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL