Documentation
¶
Index ¶
- func CreatePartyID(peerID string) *tss.PartyID
- func ExcludePeers(peers peer.IDSlice, excludedPeers peer.IDSlice) peer.IDSlice
- func PartiesFromPeers(peers peer.IDSlice) tss.SortedPartyIDs
- func PeersFromIDS(peerIDS []string) ([]peer.ID, error)
- func PeersFromParties(parties []*tss.PartyID) ([]peer.ID, error)
- func PeersIntersection(oldPeers peer.IDSlice, newPeers peer.IDSlice) peer.IDSlice
- type BaseTss
- func (b *BaseTss) BroadcastPeers(msg tss.Message) ([]peer.ID, error)
- func (b *BaseTss) PopulatePartyStore(parties tss.SortedPartyIDs)
- func (b *BaseTss) ProcessInboundMessages(ctx context.Context, msgChan chan *comm.WrappedMessage) (err error)
- func (b *BaseTss) ProcessOutboundMessages(ctx context.Context, outChn chan tss.Message, messageType comm.MessageType) error
- func (b *BaseTss) SessionID() string
- type Party
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePartyID ¶
func PartiesFromPeers ¶
func PartiesFromPeers(peers peer.IDSlice) tss.SortedPartyIDs
Types ¶
type BaseTss ¶
type BaseTss struct {
Host host.Host
SID string
Party Party
PartyStore map[string]*tss.PartyID
Communication comm.Communication
Peers []peer.ID
Log zerolog.Logger
Cancel context.CancelFunc
}
BaseTss contains common variables and methods to all tss processes.
func (*BaseTss) BroadcastPeers ¶
BroccastPeers returns peers that should receive the tss message
func (*BaseTss) PopulatePartyStore ¶
func (b *BaseTss) PopulatePartyStore(parties tss.SortedPartyIDs)
PopulatePartyStore populates party store map with sorted parties for mapping message senders to parties
func (*BaseTss) ProcessInboundMessages ¶
func (b *BaseTss) ProcessInboundMessages(ctx context.Context, msgChan chan *comm.WrappedMessage) (err error)
ProcessInboundMessages processes messages from tss parties and updates local party accordingly.
func (*BaseTss) ProcessOutboundMessages ¶
func (b *BaseTss) ProcessOutboundMessages(ctx context.Context, outChn chan tss.Message, messageType comm.MessageType) error
ProcessOutboundMessages sends messages received from tss out channel to target peers. On context cancel stops listening to channel and exits.
Click to show internal directories.
Click to hide internal directories.