utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrECDSAPubKeyUnavailable = errors.New("ecdsa public key is unavailable")

Functions

func BuildParams

func BuildParams(
	parties []string,
	localPartyID string,
	threshold int,
	curve string,
	algorithm string,
) (*tsslib.Parameters, map[string]*tsslib.PartyID, *tsslib.PartyID, error)

func ClassifyErr

func ClassifyErr(err error) (kind string, level slog.Level, isTerminal bool)

func DeadlineRemaining

func DeadlineRemaining(ctx context.Context) time.Duration

func ECDSAAddressFromShare

func ECDSAAddressFromShare(share ecdsakeygen.LocalPartySaveData) (string, error)

func RecvLoop

func RecvLoop(
	ctx context.Context,
	recv RecvFrameFunc,
	inboundCh chan<- protocol.Frame,
	recvErrCh chan<- error,
	maxFrameBytes int,
	errFrameTooLarge error,
	errQueueFull error,
)

func ToTSSLibThreshold

func ToTSSLibThreshold(requiredThreshold, partiesCount int) (int, error)

Types

type RecvFrameFunc

type RecvFrameFunc func(context.Context) (protocol.Frame, error)

type RunnerConfig

type RunnerConfig struct {
	StallWarn       time.Duration
	StallFail       time.Duration
	StallWarnEvery  time.Duration
	WatchdogTick    time.Duration
	MaxFrameBytes   int
	InboundQueueCap int
	DedupTTL        time.Duration
	DedupMaxEntries int
}

func DefaultRunnerConfig

func DefaultRunnerConfig() RunnerConfig

func LoadRunnerConfigFromEnv

func LoadRunnerConfigFromEnv() RunnerConfig

Jump to

Keyboard shortcuts

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