keygen

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECDSAKeyshareStorer

type ECDSAKeyshareStorer interface {
	StoreKeyshare(keyshare keyshare.ECDSAKeyshare) error
	LockKeyshare()
	UnlockKeyshare()
	GetKeyshare() (keyshare.ECDSAKeyshare, error)
}

type Keygen

type Keygen struct {
	common.BaseTss
	// contains filtered or unexported fields
}

func NewKeygen

func NewKeygen(
	sessionID string,
	threshold int,
	host host.Host,
	comm comm.Communication,
	storer ECDSAKeyshareStorer,
) *Keygen

func (*Keygen) Ready

func (k *Keygen) Ready(readyPeers []peer.ID, excludedPeers []peer.ID) (bool, error)

Ready returns true if all parties from the peerstore are ready. Error is returned if excluded peers exist as we need all peers to participate in keygen process.

func (*Keygen) Retryable

func (k *Keygen) Retryable() bool

func (*Keygen) Run

func (k *Keygen) Run(
	ctx context.Context,
	coordinator bool,
	resultChn chan interface{},
	params []byte,
) error

Run initializes the keygen party and runs the keygen tss process.

Should be run only after all the participating parties are ready.

func (*Keygen) StartParams

func (k *Keygen) StartParams(readyPeers []peer.ID) []byte

func (*Keygen) Stop

func (k *Keygen) Stop()

Stop ends all subscriptions created when starting the tss process and unlocks keyshare.

func (*Keygen) ValidCoordinators

func (k *Keygen) ValidCoordinators() []peer.ID

ValidCoordinators returns all peers in peerstore

Jump to

Keyboard shortcuts

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