address

package
v1.11.12-rc.13 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: BSD-3-Clause Imports: 5 Imported by: 49

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSeparator = errors.New("no separator found in address")
)

Functions

func Format

func Format(chainIDAlias string, hrp string, addr []byte) (string, error)

Format takes in a chain prefix, HRP, and byte slice to produce a string for an address.

func FormatBech32

func FormatBech32(hrp string, payload []byte) (string, error)

FormatBech32 takes an address's bytes as input and returns a bech32 address

func Parse

func Parse(addrStr string) (string, string, []byte, error)

Parse takes in an address string and splits returns the corresponding parts. This returns the chain ID alias, bech32 HRP, address bytes, and an error if it occurs.

func ParseBech32

func ParseBech32(addrStr string) (string, []byte, error)

ParseBech32 takes a bech32 address as input and returns the HRP and data section of a bech32 address

func ParseToID

func ParseToID(addrStr string) (ids.ShortID, error)

func ParseToIDs

func ParseToIDs(addrStrs []string) ([]ids.ShortID, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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