Documentation
¶
Index ¶
- type Config
- type Node
- func (n *Node) HandleACKMessage(ctx context.Context, senderPeerID string, msg *coordinator.Message) error
- func (n *Node) ListenAddrs() []string
- func (n *Node) PeerID() string
- func (n *Node) Send(ctx context.Context, peerID string, data []byte) error
- func (n *Node) Start(ctx context.Context) error
- func (n *Node) Stop() error
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 (*Node) HandleACKMessage ¶
func (n *Node) HandleACKMessage(ctx context.Context, senderPeerID string, msg *coordinator.Message) error
HandleACKMessage handles ACK messages and forwards them to coordinator. This allows coordinator to track ACKs even when it's not a participant.
func (*Node) ListenAddrs ¶
ListenAddrs returns the libp2p listen addresses (helper function).
func (*Node) Send ¶
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.
Click to show internal directories.
Click to hide internal directories.