key

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	ID               peer.ID
	PrivKey          crypto.PrivKey
	MultibasePrivKey string
}

This struct is just a simple way to pack a libp2p node key, in order to reuse it between runs. When nodes change ID they can't connect to each other easily.

func New

func New() (*Key, error)

func NewFromMultibasePrivKey

func NewFromMultibasePrivKey(m string) (*Key, error)

Extracts a libp2p node key from a multibase encoded string. The string is suppose to come as a command line argument.

Jump to

Keyboard shortcuts

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