Documentation ¶
Index ¶
- Constants
- func Contains(s []*btss.PartyID, e *btss.PartyID) bool
- func GenerateSignature(msg []byte, msgID string, privKey tcrypto.PrivKey) ([]byte, error)
- func GetMsgRound(wireMsg *messages.WireMessage, partyID *btss.PartyID, isMonero bool) (blame.RoundInfo, error)
- func InitLog(level string, pretty bool, serviceValue string)
- func MsgToHashInt(msg []byte) (*big.Int, error)
- func MsgToHashString(msg []byte) (string, error)
- func VerifySignature(pubKey tcrypto.PubKey, message, sig []byte, msgID string) bool
- type LocalCacheItem
- type MoneroShare
- type PartyInfo
- type Status
- type TssCommon
- func (t *TssCommon) GetBlameMgr() *blame.Manager
- func (t *TssCommon) GetConf() TssConfig
- func (t *TssCommon) GetLocalPeerID() string
- func (t *TssCommon) GetMsgID() string
- func (t *TssCommon) GetNodePrivKey() string
- func (t *TssCommon) GetTaskDone() chan struct{}
- func (t *TssCommon) NotifyTaskDone() error
- func (t *TssCommon) ProcessInboundmessages(finishChan chan struct{}, wg *sync.WaitGroup, ...)
- func (t *TssCommon) ProcessOneMessage(wrappedMsg *messages.WrappedMessage, peerID string, ...) error
- func (t *TssCommon) ProcessOutCh(msg []byte, r *btss.MessageRouting, roundInfo string, ...) error
- func (t *TssCommon) SetLocalPeerID(peerID string)
- func (t *TssCommon) SetPartyInfo(partyInfo *PartyInfo)
- func (t *TssCommon) TryGetAllLocalCached() []*LocalCacheItem
- func (t *TssCommon) TryGetLocalCacheItem(key string) *LocalCacheItem
- type TssConfig
Constants ¶
View Source
const ( MoneroExportedSignMsg = "moneroExportedSignMsg" MoneroInitTransfer = "moneroInitTrnasfer" )
Variables ¶
This section is empty.
Functions ¶
func GenerateSignature ¶
func GetMsgRound ¶
func MsgToHashString ¶
Types ¶
type LocalCacheItem ¶
type LocalCacheItem struct { Msg *messages.WireMessage Hash string ConfirmedList map[string]string // contains filtered or unexported fields }
LocalCacheItem used to cache the unconfirmed broadcast message
func NewLocalCacheItem ¶
func NewLocalCacheItem(msg *messages.WireMessage, hash string) *LocalCacheItem
func (*LocalCacheItem) GetPeers ¶
func (l *LocalCacheItem) GetPeers() []string
func (*LocalCacheItem) TotalConfirmParty ¶
func (l *LocalCacheItem) TotalConfirmParty() int
TotalConfirmParty number of parties that already confirmed their hash
func (*LocalCacheItem) UpdateConfirmList ¶
func (l *LocalCacheItem) UpdateConfirmList(P2PID, hash string)
UpdateConfirmList add the given party's hash into the confirm list
type MoneroShare ¶
type MoneroShare struct { string `json:"message_sender"` }Sender
func (*MoneroShare) Equal ¶
func (s *MoneroShare) Equal(in *MoneroShare) bool
type TssCommon ¶
type TssCommon struct { PartyIDtoP2PID map[string]peer.ID TssMsg chan *p2p.Message P2PPeers []peer.ID // most of tss message are broadcast, we store the peers ID to avoid iterating // contains filtered or unexported fields }
func NewTssCommon ¶
func (*TssCommon) GetBlameMgr ¶
func (*TssCommon) GetLocalPeerID ¶
func (*TssCommon) GetNodePrivKey ¶
func (*TssCommon) GetTaskDone ¶
func (t *TssCommon) GetTaskDone() chan struct{}
func (*TssCommon) NotifyTaskDone ¶
func (*TssCommon) ProcessInboundmessages ¶
func (t *TssCommon) ProcessInboundmessages(finishChan chan struct{}, wg *sync.WaitGroup, moneroShareChan chan *MoneroShare)
func (*TssCommon) ProcessOneMessage ¶
func (t *TssCommon) ProcessOneMessage(wrappedMsg *messages.WrappedMessage, peerID string, moneroShareChan chan *MoneroShare) error
func (*TssCommon) ProcessOutCh ¶
func (t *TssCommon) ProcessOutCh(msg []byte, r *btss.MessageRouting, roundInfo string, msgType messages.THORChainTSSMessageType) error
func (*TssCommon) SetLocalPeerID ¶
func (*TssCommon) SetPartyInfo ¶
func (*TssCommon) TryGetAllLocalCached ¶
func (t *TssCommon) TryGetAllLocalCached() []*LocalCacheItem
func (*TssCommon) TryGetLocalCacheItem ¶
func (t *TssCommon) TryGetLocalCacheItem(key string) *LocalCacheItem
type TssConfig ¶
type TssConfig struct { // Party Timeout defines how long do we wait for the party to form PartyTimeout time.Duration // KeyGenTimeoutSeconds defines how long do we wait the keygen parties to pass messages along KeyGenTimeout time.Duration // KeySignTimeoutSeconds defines how long do we wait keysign KeySignTimeout time.Duration // Pre-parameter define the pre-parameter generations timeout PreParamTimeout time.Duration // enable the tss monitor EnableMonitor bool }
Click to show internal directories.
Click to hide internal directories.