Documentation
¶
Overview ¶
Package identity stores the ECDSA P2P key and the BLS12-381 DV consensus key.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadOrCreatePrivKey ¶ added in v0.1.1
func LoadOrCreatePrivKey(dataDir string) (*ecdsa.PrivateKey, error)
Types ¶
type ConsensusKey ¶
ConsensusKey wraps a BLS12-381 keypair.
type ConsensusStore ¶
ConsensusStore stores a single DVC consensus key using a keystore and password file.
func (ConsensusStore) Create ¶
func (s ConsensusStore) Create() (*ConsensusKey, error)
Create generates a new key and saves the new node identity.
TODO Make sure the created key can't ever be used for validators.
func (ConsensusStore) Get ¶
func (s ConsensusStore) Get() (*ConsensusKey, error)
Get retrieves the existing node identity or creates a new one.
func (ConsensusStore) Load ¶
func (s ConsensusStore) Load() (*ConsensusKey, error)
Load reads the existing node identity.
func (ConsensusStore) Password ¶
func (s ConsensusStore) Password() (password string, err error)
Password reads the node password or creates a new random password if none exists.
Click to show internal directories.
Click to hide internal directories.