conv

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAddress     = errors.New("invalid address format, expected [protocol://][<NODE_ID>@]<IPv4>:<PORT>")
	ErrNilKey             = errors.New("key cannot be nil")
	ErrUnsupportedKeyType = errors.New("unsupported key type")
)

Functions

func GetMultiAddr

func GetMultiAddr(addr string) (multiaddr.Multiaddr, error)

GetMultiAddr converts single Cosmos-style network address into Multiaddr. Input format: [protocol://][<NODE_ID>@]<IPv4>:<PORT>

func GetNodeConfig

func GetNodeConfig(nodeConf *config.NodeConfig, tmConf *tmcfg.Config) error

GetNodeConfig translates Tendermint's configuration into Dymint configuration.

This method only translates configuration, and doesn't verify it. If some option is missing in Tendermint's config, it's skipped during translation.

func GetNodeKey

func GetNodeKey(nodeKey *p2p.NodeKey) (crypto.PrivKey, error)

GetNodeKey creates libp2p private key from Tendermints NodeKey.

func TranslateAddresses

func TranslateAddresses(conf *config.NodeConfig) error

TranslateAddresses updates conf by changing Cosmos-style addresses to Multiaddr format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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