Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PeerIdBroadcastMessage = MessageType{MsgType: "peer", MsgStage: 10} DeviceMessage = MessageType{MsgType: "device", MsgStage: 20} // new device to server (=> respond with pubkey) PubkeyMessage = MessageType{MsgType: "pubkey", MsgStage: 20} // server to new device (=> start TSS on new device) PubkeyAckMessage = MessageType{MsgType: "pubkey-ack", MsgStage: 30} // new device to server (=> start TSS msg management on server registerHandler) MetadataMessage = MessageType{MsgType: "metadata", MsgStage: 20} // old device to server (before TSS) ; server to new device (after TSS) MetadataAckMessage = MessageType{MsgType: "metadata-ack", MsgStage: 30} // server to old device (=> start TSS) TssMessage = MessageType{MsgType: "tss", MsgStage: 40} TssDoneMessage = MessageType{MsgType: "tss-done", MsgStage: 50} EverythingStoredClientMessage = MessageType{MsgType: "stored-client", MsgStage: 70} ExistingDeviceDoneMessage = MessageType{MsgType: "existing-device-done", MsgStage: 80} NewDeviceDoneMessage = MessageType{MsgType: "new-device-done", MsgStage: 80} ErrorMessage = MessageType{MsgType: "error", MsgStage: 0} )
Functions ¶
func ProcessErrors ¶
func TssSend ¶
func TssSend(getNextMessageToSend func() (tss.Message, error), serverDone chan struct{}, errs chan error, ctx context.Context, c *websocket.Conn, functionName string)
TssSend loops through TSS messages to be sent through the websocket connection Note : this is the v2 of tss.Send() used for AddDevice and Dkg (for now, Sign still uses tss.Send())
Types ¶
type Message ¶
type Message struct { Type MessageType `json:"type"` Msg string `json:"payload"` }
type MessageType ¶
Click to show internal directories.
Click to hide internal directories.