Documentation ¶
Overview ¶
Package node defines a node executing the TSS protocol.
Index ¶
- type Node
- func (n *Node) AnnounceSignerPresence(ctx context.Context, operatorPublicKey *operator.PublicKey, keepID chain.ID, ...) ([]tss.MemberID, error)
- func (n *Node) CalculateSignature(ctx context.Context, keep chain.BondedECDSAKeepHandle, ...) error
- func (n *Node) GenerateSignerForKeep(ctx context.Context, operatorPublicKey *operator.PublicKey, ...) (*tss.ThresholdSigner, error)
- func (n *Node) InitializeTSSPreParamsPool()
- func (n *Node) TSSPreParamsPoolSize() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node holds interfaces to interact with the blockchain and network messages transport layer.
func NewNode ¶
NewNode initializes node struct with provided chain interface and network provider. It also initializes TSS Pre-Parameters pool. But does not start parameters generation. This should be called separately.
func (*Node) AnnounceSignerPresence ¶
func (n *Node) AnnounceSignerPresence( ctx context.Context, operatorPublicKey *operator.PublicKey, keepID chain.ID, keepMemberIDs []chain.ID, ) ([]tss.MemberID, error)
AnnounceSignerPresence triggers the announce protocol in order to signal signer presence and gather information about other signers.
func (*Node) CalculateSignature ¶
func (n *Node) CalculateSignature( ctx context.Context, keep chain.BondedECDSAKeepHandle, signer *tss.ThresholdSigner, digest [32]byte, ) error
CalculateSignature calculates a signature over a digest with threshold signer and publishes the result to the keep associated with the signer.
The attempt for generating and publishing signature is retried on failure until the provided context is done.
func (*Node) GenerateSignerForKeep ¶
func (n *Node) GenerateSignerForKeep( ctx context.Context, operatorPublicKey *operator.PublicKey, keep chain.BondedECDSAKeepHandle, members []chain.ID, keepsRegistry *registry.Keeps, ) (*tss.ThresholdSigner, error)
GenerateSignerForKeep generates a new threshold signer with ECDSA key pair and submits the public key to the on-chain keep.
The attempt for generating signer is retried on failure until the provided context is done.
func (*Node) InitializeTSSPreParamsPool ¶
func (n *Node) InitializeTSSPreParamsPool()
InitializeTSSPreParamsPool generates TSS pre-parameters and stores them in a pool.
func (*Node) TSSPreParamsPoolSize ¶ added in v1.6.0
TSSPreParamsPoolSize returns the current size of the TSS params pool.