resharing

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resharing

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

func NewResharing

func NewResharing(
	sessionID string,
	threshold int,
	host host.Host,
	comm comm.Communication,
	storer SaveDataStorer,
) *Resharing

func (*Resharing) Ready

func (r *Resharing) Ready(readyPeers []peer.ID, excludedPeers []peer.ID) (bool, error)

Ready returns true if all parties from peerstore are ready

func (*Resharing) Retryable

func (r *Resharing) Retryable() bool

func (*Resharing) Run

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

Run initializes the signing party and runs the resharing tss process. Params contains peer subset that leaders sends with start message.

func (*Resharing) StartParams

func (r *Resharing) StartParams(readyPeers []peer.ID) []byte

StartParams returns threshold and peer subset from the old key to share with new parties.

func (*Resharing) Stop

func (r *Resharing) Stop()

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

func (*Resharing) ValidCoordinators

func (r *Resharing) ValidCoordinators() []peer.ID

ValidCoordinators returns only peers that have a valid keyshare from the previous resharing inside host peerstore

type SaveDataStorer

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

Jump to

Keyboard shortcuts

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