Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidFormat = errors.New("invalid signature format") )
Functions ¶
func EnoughThresholdShares ¶ added in v0.20.4
func NewThresholdProvider ¶ added in v0.20.4
func NewThresholdProvider(_ string, _ crypto.PrivateKey) module.ThresholdSigner
Types ¶
type Combiner ¶
type Combiner struct {
// contains filtered or unexported fields
}
Combiner creates a simple implementation for joining and splitting 2 signatures on a level above the cryptographic implementation. It simply concatenates signatures together and uses the stored information about signature lengths to split the concatenated bytes into its signature parts again.
func NewCombiner ¶
NewCombiner creates a new combiner to join and split signatures.
type EpochAwareSignerStore ¶ added in v0.20.0
type EpochAwareSignerStore struct {
// contains filtered or unexported fields
}
EpochAwareSignerStore implements the SignerStore interface. It is epoch aware, and provides the appropriate threshold signers on a per-view basis, using the database to retrieve the relevant DKG keys.
func NewEpochAwareSignerStore ¶ added in v0.20.0
func NewEpochAwareSignerStore(epochLookup module.EpochLookup, keys storage.DKGKeys) *EpochAwareSignerStore
NewEpochAwareSignerStore instantiates a new EpochAwareSignerStore
func (*EpochAwareSignerStore) GetThresholdSigner ¶ added in v0.20.0
func (s *EpochAwareSignerStore) GetThresholdSigner(view uint64) (module.ThresholdSigner, error)
GetThresholdSigner returns the threshold-signer for signing objects at a given view. The view determines the epoch, which determines the DKG private key underlying the signer.
type SingleSignerStore ¶ added in v0.20.0
type SingleSignerStore struct {
// contains filtered or unexported fields
}
SingleSignerStore implements the ThresholdSignerStore interface. It only keeps one signer and is not epoch-aware. It is used only for the bootstrapping process.
func NewSingleSignerStore ¶ added in v0.20.0
func NewSingleSignerStore(signer module.ThresholdSigner) *SingleSignerStore
NewSingleSignerStore instantiates a new SingleSignerStore.
func (*SingleSignerStore) GetThresholdSigner ¶ added in v0.20.0
func (s *SingleSignerStore) GetThresholdSigner(view uint64) (module.ThresholdSigner, error)
GetThresholdSigner returns the signer.