storage

package
v0.0.0-...-f9c6c1d Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyshare

type Keyshare struct {
	Key       keygen.LocalPartySaveData
	Peers     []peer.ID
	Threshold int
}

type SaveDataStorage

type SaveDataStorage struct {
	// contains filtered or unexported fields
}

func NewSaveDataStorage

func NewSaveDataStorage(filename string) *SaveDataStorage

func (*SaveDataStorage) GetSaveData

func (s *SaveDataStorage) GetSaveData() (Keyshare, error)

GetSaveData retrieves keyshare. Will lock execution if a resharing or key generation is in progress.

func (*SaveDataStorage) LockShare

func (s *SaveDataStorage) LockShare()

func (*SaveDataStorage) SetSaveData

func (s *SaveDataStorage) SetSaveData(saveData Keyshare) error

SetSaveData overwrites old keyshare with new one. If no key exists, file will be created. Should be protected in code with a lock.

func (*SaveDataStorage) UnlockShare

func (s *SaveDataStorage) UnlockShare()

Jump to

Keyboard shortcuts

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