address

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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