addressutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressCodec

type AddressCodec interface {
	// StringToBytes decodes text to bytes
	StringToBytes(text string) ([]byte, error)
	// BytesToString encodes bytes to text
	BytesToString(bz []byte) (string, error)
}

type HexAddressCodec

type HexAddressCodec struct{}

HexAddressCodec is a basic address codec that encodes and decodes addresses as hex strings. It is intended to be used as a fallback codec when no other codec is provided.

func (HexAddressCodec) BytesToString

func (h HexAddressCodec) BytesToString(bz []byte) (string, error)

func (HexAddressCodec) StringToBytes

func (h HexAddressCodec) StringToBytes(text string) ([]byte, error)

Jump to

Keyboard shortcuts

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