keystore

package
v0.1.1-devnet Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrorNotInitialized is returned when a bucket is not properly initialized
	ErrorNotInitialized = errors.New("the keystore is not initialized")

	// ErrorAlreadyOpen returned when user tries to open a keystore already open.
	ErrorAlreadyOpen = errors.New("keystore is already open")

	// ErrorNoOpen returned when the keystore is not open.
	ErrorNoOpen = errors.New("open the keystore to start using it")

	// ErrorKeystoreExists returned when a user creates a new keystore over an existing keystore.
	ErrorKeystoreExists = errors.New("cannot create new keystore, it already exists")
)

Functions

This section is empty.

Types

type Keystore

type Keystore interface {
	CreateKeystore() error
	OpenKeystore() error
	Close() error
	GetValidatorKey(pubkey [48]byte) (*bls.SecretKey, bool)
	GetValidatorKeys() ([]*bls.SecretKey, error)
	GenerateNewValidatorKey(amount uint64) ([]*bls.SecretKey, error)
	HasKeysToParticipate() bool
	AddKey(priv []byte) error
}

func NewKeystore

func NewKeystore() Keystore

NewKeystore creates a new keystore instance.

Jump to

Keyboard shortcuts

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