Documentation ¶
Index ¶
- Variables
- func Format(chainIDAlias string, hrp string, addr []byte) (string, error)
- func FormatBech32(hrp string, payload []byte) (string, error)
- func Parse(addrStr string) (string, string, []byte, error)
- func ParseBech32(addrStr string) (string, []byte, error)
- func ParseToID(addrStr string) (ids.ShortID, error)
- func ParseToIDs(addrStrs []string) ([]ids.ShortID, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSeparator = errors.New("no separator found in address")
)
Functions ¶
func Format ¶
Format takes in a chain prefix, HRP, and byte slice to produce a string for an address.
func FormatBech32 ¶
FormatBech32 takes an address's bytes as input and returns a bech32 address
func Parse ¶
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 ¶
ParseBech32 takes a bech32 address as input and returns the HRP and data section of a bech32 address
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.