tss

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ValidatorAddress string
	P2PPrivateKeyHex string
	LibP2PListen     string
	HomeDir          string
	Password         string
	Database         *db.DB
	PushCore         *pushcore.Client
	Logger           zerolog.Logger

	// Optional configuration
	PollInterval     time.Duration
	CoordinatorRange uint64
	ProtocolID       string
	DialTimeout      time.Duration
	IOTimeout        time.Duration

	// Chains manager (required for sign operations to get txBuilders)
	Chains *chains.Chains

	// Session expiry checker configuration
	SessionExpiryTime          time.Duration // How long a session can be inactive before expiring (default: 5m)
	SessionExpiryCheckInterval time.Duration // How often to check for expired sessions (default: 30s)
	SessionExpiryBlockDelay    uint64        // How many blocks to delay retry after expiry (default: 10)

	// Voting configuration
	PushSigner *pushsigner.Signer // Optional - nil if voting disabled
}

Config holds configuration for initializing a TSS node.

type Node

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

Node represents a TSS node that can participate in TSS operations.

func NewNode

func NewNode(ctx context.Context, cfg Config) (*Node, error)

NewNode initializes a new TSS node.

func (*Node) ListenAddrs

func (n *Node) ListenAddrs() []string

ListenAddrs returns the libp2p listen addresses (helper function).

func (*Node) PeerID

func (n *Node) PeerID() string

PeerID returns the libp2p peer ID (helper function).

func (*Node) Send

func (n *Node) Send(ctx context.Context, peerID string, data []byte) error

Send sends a message to a peer. If peerID is the node's own peerID, it calls onReceive directly instead of sending over network. If the peer is not registered, it will automatically register it from validators before sending.

func (*Node) Start

func (n *Node) Start(ctx context.Context) error

Start starts the TSS node and begins processing events.

func (*Node) Stop

func (n *Node) Stop() error

Stop stops the TSS node.

Directories

Path Synopsis
Package txflow holds the shared types and helpers used by both the transaction broadcaster and the resolver.
Package txflow holds the shared types and helpers used by both the transaction broadcaster and the resolver.

Jump to

Keyboard shortcuts

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