key

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: GPL-3.0, LGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	PrivKey *ecdsa.PrivateKey
	Address common.Address
}

func Generate

func Generate() (*Key, error)

Generate creates a new Key and returns it.

func Load

func Load(file string) (*Key, error)

Load attempts to open a Key stored at [file].

func LoadAll

func LoadAll(ctx context.Context, dir string) ([]*Key, error)

LoadAll loads all keys in [dir].

func (*Key) Save

func (k *Key) Save(dir string) error

Save persists a Key to [dir] (where the filename is the hex-encoded address).

Jump to

Keyboard shortcuts

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