signature

package
v0.0.0-...-ee95d54 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignaturesKeyPrefix = "signatures"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSignatureRepo

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

func NewSignatureRepo

func NewSignatureRepo(state state.State) *BaseSignatureRepo

func (*BaseSignatureRepo) GetBatches

func (r *BaseSignatureRepo) GetBatches(dkgID string) ([]string, error)

func (*BaseSignatureRepo) GetSignatureByID

func (r *BaseSignatureRepo) GetSignatureByID(dkgID, signatureID string) ([]types.ReconstructedSignature, error)

func (*BaseSignatureRepo) GetSignatures

func (r *BaseSignatureRepo) GetSignatures(dkgID string) (signatures SignaturesStorage, err error)

func (*BaseSignatureRepo) GetSignaturesByBatchID

func (r *BaseSignatureRepo) GetSignaturesByBatchID(dkgID, batchID string) (map[string][]types.ReconstructedSignature, error)

func (*BaseSignatureRepo) SaveSignatures

func (r *BaseSignatureRepo) SaveSignatures(signaturesToSave []types.ReconstructedSignature) error

type SignatureRepo

type SignatureRepo interface {
	SaveSignatures(signature []types.ReconstructedSignature) error
	GetSignatureByID(dkgID, signatureID string) ([]types.ReconstructedSignature, error)
	GetSignaturesByBatchID(dkgID, batchID string) (map[string][]types.ReconstructedSignature, error)
	GetSignatures(dkgID string) (SignaturesStorage, error)
	GetBatches(dkgID string) ([]string, error)
}

type SignaturesStorage

type SignaturesStorage map[string]map[string][]types.ReconstructedSignature

func (*SignaturesStorage) AddReconstructedSignature

func (s *SignaturesStorage) AddReconstructedSignature(reconstructedSignature types.ReconstructedSignature)

Jump to

Keyboard shortcuts

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