addressutils

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bech32ToAddr

func Bech32ToAddr[T sdk.AccAddress | sdk.ValAddress](addr string) (T, error)

Bech32ToAddr casts an arbitrary-prefixed bech32 string to either sdk.AccAddress or sdk.ValAddress.

func DeriveAddress

func DeriveAddress(addressType AddressType, moduleName, name string) sdk.AccAddress

DeriveAddress derives an address with the given address length type, module name, and address derivation name

Types

type AddressType

type AddressType int32
const (
	// AddressType32Bytes is the 32 bytes length address type of ADR 028.
	AddressType32Bytes AddressType = 0
	// AddressType20Bytes is the default 20 bytes length address type.
	AddressType20Bytes AddressType = 1
)

Jump to

Keyboard shortcuts

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