Documentation ¶
Index ¶
- Constants
- Variables
- type BroadcastConfirmMessage
- type BroadcastMsgChan
- type JoinPartyLeaderComm
- func (*JoinPartyLeaderComm) Descriptor() ([]byte, []int)deprecated
- func (x *JoinPartyLeaderComm) GetID() string
- func (x *JoinPartyLeaderComm) GetMsgType() string
- func (x *JoinPartyLeaderComm) GetPeerIDs() []string
- func (x *JoinPartyLeaderComm) GetType() JoinPartyLeaderComm_ResponseType
- func (*JoinPartyLeaderComm) ProtoMessage()
- func (x *JoinPartyLeaderComm) ProtoReflect() protoreflect.Message
- func (x *JoinPartyLeaderComm) Reset()
- func (x *JoinPartyLeaderComm) String() string
- type JoinPartyLeaderComm_ResponseType
- func (JoinPartyLeaderComm_ResponseType) Descriptor() protoreflect.EnumDescriptor
- func (x JoinPartyLeaderComm_ResponseType) Enum() *JoinPartyLeaderComm_ResponseType
- func (JoinPartyLeaderComm_ResponseType) EnumDescriptor() ([]byte, []int)deprecated
- func (x JoinPartyLeaderComm_ResponseType) Number() protoreflect.EnumNumber
- func (x JoinPartyLeaderComm_ResponseType) String() string
- func (JoinPartyLeaderComm_ResponseType) Type() protoreflect.EnumType
- type JoinPartyRequest
- type KeysignSignature
- func (*KeysignSignature) Descriptor() ([]byte, []int)deprecated
- func (x *KeysignSignature) GetID() string
- func (x *KeysignSignature) GetKeysignStatus() KeysignSignature_Status
- func (x *KeysignSignature) GetSignatures() [][]byte
- func (*KeysignSignature) ProtoMessage()
- func (x *KeysignSignature) ProtoReflect() protoreflect.Message
- func (x *KeysignSignature) Reset()
- func (x *KeysignSignature) String() string
- type KeysignSignature_Status
- func (KeysignSignature_Status) Descriptor() protoreflect.EnumDescriptor
- func (x KeysignSignature_Status) Enum() *KeysignSignature_Status
- func (KeysignSignature_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x KeysignSignature_Status) Number() protoreflect.EnumNumber
- func (x KeysignSignature_Status) String() string
- func (KeysignSignature_Status) Type() protoreflect.EnumType
- type THORChainTSSMessageType
- type TssControl
- type TssTaskNotifier
- type WireMessage
- type WrappedMessage
Constants ¶
const ( KEYGEN1 = "KGRound1Message" KEYGEN2aUnicast = "KGRound2Message1" KEYGEN2b = "KGRound2Message2" KEYGEN3 = "KGRound3Message" KEYSIGN1aUnicast = "SignRound1Message1" KEYSIGN1b = "SignRound1Message2" KEYSIGN2Unicast = "SignRound2Message" KEYSIGN3 = "SignRound3Message" KEYSIGN4 = "SignRound4Message" KEYSIGN5 = "SignRound5Message" KEYSIGN6 = "SignRound6Message" KEYSIGN7 = "SignRound7Message" TSSKEYGENROUNDS = 4 TSSKEYSIGNROUNDS = 8 )
const (
NEWJOINPARTYVERSION = "0.14.0"
)
Variables ¶
var ( JoinPartyLeaderComm_ResponseType_name = map[int32]string{ 0: "Unknown", 1: "Success", 2: "Timeout", 3: "LeaderNotReady", 4: "UnknownPeer", } JoinPartyLeaderComm_ResponseType_value = map[string]int32{ "Unknown": 0, "Success": 1, "Timeout": 2, "LeaderNotReady": 3, "UnknownPeer": 4, } )
Enum value maps for JoinPartyLeaderComm_ResponseType.
var ( KeysignSignature_Status_name = map[int32]string{ 0: "Unknown", 1: "Success", 2: "Failed", } KeysignSignature_Status_value = map[string]int32{ "Unknown": 0, "Success": 1, "Failed": 2, } )
Enum value maps for KeysignSignature_Status.
var File_join_party_proto protoreflect.FileDescriptor
var File_signature_notifier_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BroadcastConfirmMessage ¶
type BroadcastConfirmMessage struct { P2PID string `json:"P2PID"` Key string `json:"key"` Hash string `json:"hash"` }
BroadcastConfirmMessage is used to broadcast to all parties what message they receive
type BroadcastMsgChan ¶
type BroadcastMsgChan struct { WrappedMessage WrappedMessage PeersID []peer.ID }
BroadcastMsgChan is the channel structure for keygen/keysign submit message to p2p network
type JoinPartyLeaderComm ¶
type JoinPartyLeaderComm struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // unique hash id MsgType string `protobuf:"bytes,2,opt,name=MsgType,proto3" json:"MsgType,omitempty"` // unique hash id Type JoinPartyLeaderComm_ResponseType `protobuf:"varint,3,opt,name=type,proto3,enum=messages.JoinPartyLeaderComm_ResponseType" json:"type,omitempty"` // result PeerIDs []string `protobuf:"bytes,4,rep,name=PeerIDs,proto3" json:"PeerIDs,omitempty"` // if Success , this will be the list of peers to form the ceremony, if fail , this will be the peers that are available // contains filtered or unexported fields }
func (*JoinPartyLeaderComm) Descriptor
deprecated
func (*JoinPartyLeaderComm) Descriptor() ([]byte, []int)
Deprecated: Use JoinPartyLeaderComm.ProtoReflect.Descriptor instead.
func (*JoinPartyLeaderComm) GetID ¶
func (x *JoinPartyLeaderComm) GetID() string
func (*JoinPartyLeaderComm) GetMsgType ¶
func (x *JoinPartyLeaderComm) GetMsgType() string
func (*JoinPartyLeaderComm) GetPeerIDs ¶
func (x *JoinPartyLeaderComm) GetPeerIDs() []string
func (*JoinPartyLeaderComm) GetType ¶
func (x *JoinPartyLeaderComm) GetType() JoinPartyLeaderComm_ResponseType
func (*JoinPartyLeaderComm) ProtoMessage ¶
func (*JoinPartyLeaderComm) ProtoMessage()
func (*JoinPartyLeaderComm) ProtoReflect ¶
func (x *JoinPartyLeaderComm) ProtoReflect() protoreflect.Message
func (*JoinPartyLeaderComm) Reset ¶
func (x *JoinPartyLeaderComm) Reset()
func (*JoinPartyLeaderComm) String ¶
func (x *JoinPartyLeaderComm) String() string
type JoinPartyLeaderComm_ResponseType ¶
type JoinPartyLeaderComm_ResponseType int32
const ( JoinPartyLeaderComm_Unknown JoinPartyLeaderComm_ResponseType = 0 JoinPartyLeaderComm_Success JoinPartyLeaderComm_ResponseType = 1 JoinPartyLeaderComm_Timeout JoinPartyLeaderComm_ResponseType = 2 JoinPartyLeaderComm_LeaderNotReady JoinPartyLeaderComm_ResponseType = 3 JoinPartyLeaderComm_UnknownPeer JoinPartyLeaderComm_ResponseType = 4 )
func (JoinPartyLeaderComm_ResponseType) Descriptor ¶
func (JoinPartyLeaderComm_ResponseType) Descriptor() protoreflect.EnumDescriptor
func (JoinPartyLeaderComm_ResponseType) Enum ¶
func (x JoinPartyLeaderComm_ResponseType) Enum() *JoinPartyLeaderComm_ResponseType
func (JoinPartyLeaderComm_ResponseType) EnumDescriptor
deprecated
func (JoinPartyLeaderComm_ResponseType) EnumDescriptor() ([]byte, []int)
Deprecated: Use JoinPartyLeaderComm_ResponseType.Descriptor instead.
func (JoinPartyLeaderComm_ResponseType) Number ¶
func (x JoinPartyLeaderComm_ResponseType) Number() protoreflect.EnumNumber
func (JoinPartyLeaderComm_ResponseType) String ¶
func (x JoinPartyLeaderComm_ResponseType) String() string
func (JoinPartyLeaderComm_ResponseType) Type ¶
func (JoinPartyLeaderComm_ResponseType) Type() protoreflect.EnumType
type JoinPartyRequest ¶
type JoinPartyRequest struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // the unique hash id // contains filtered or unexported fields }
func (*JoinPartyRequest) Descriptor
deprecated
func (*JoinPartyRequest) Descriptor() ([]byte, []int)
Deprecated: Use JoinPartyRequest.ProtoReflect.Descriptor instead.
func (*JoinPartyRequest) GetID ¶
func (x *JoinPartyRequest) GetID() string
func (*JoinPartyRequest) ProtoMessage ¶
func (*JoinPartyRequest) ProtoMessage()
func (*JoinPartyRequest) ProtoReflect ¶
func (x *JoinPartyRequest) ProtoReflect() protoreflect.Message
func (*JoinPartyRequest) Reset ¶
func (x *JoinPartyRequest) Reset()
func (*JoinPartyRequest) String ¶
func (x *JoinPartyRequest) String() string
type KeysignSignature ¶
type KeysignSignature struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // the unique message id Signatures [][]byte `protobuf:"bytes,2,rep,name=Signatures,proto3" json:"Signatures,omitempty"` KeysignStatus KeysignSignature_Status `protobuf:"varint,3,opt,name=KeysignStatus,proto3,enum=messages.KeysignSignature_Status" json:"KeysignStatus,omitempty"` // contains filtered or unexported fields }
func (*KeysignSignature) Descriptor
deprecated
func (*KeysignSignature) Descriptor() ([]byte, []int)
Deprecated: Use KeysignSignature.ProtoReflect.Descriptor instead.
func (*KeysignSignature) GetID ¶
func (x *KeysignSignature) GetID() string
func (*KeysignSignature) GetKeysignStatus ¶
func (x *KeysignSignature) GetKeysignStatus() KeysignSignature_Status
func (*KeysignSignature) GetSignatures ¶
func (x *KeysignSignature) GetSignatures() [][]byte
func (*KeysignSignature) ProtoMessage ¶
func (*KeysignSignature) ProtoMessage()
func (*KeysignSignature) ProtoReflect ¶
func (x *KeysignSignature) ProtoReflect() protoreflect.Message
func (*KeysignSignature) Reset ¶
func (x *KeysignSignature) Reset()
func (*KeysignSignature) String ¶
func (x *KeysignSignature) String() string
type KeysignSignature_Status ¶
type KeysignSignature_Status int32
const ( KeysignSignature_Unknown KeysignSignature_Status = 0 KeysignSignature_Success KeysignSignature_Status = 1 KeysignSignature_Failed KeysignSignature_Status = 2 )
func (KeysignSignature_Status) Descriptor ¶
func (KeysignSignature_Status) Descriptor() protoreflect.EnumDescriptor
func (KeysignSignature_Status) Enum ¶
func (x KeysignSignature_Status) Enum() *KeysignSignature_Status
func (KeysignSignature_Status) EnumDescriptor
deprecated
func (KeysignSignature_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use KeysignSignature_Status.Descriptor instead.
func (KeysignSignature_Status) Number ¶
func (x KeysignSignature_Status) Number() protoreflect.EnumNumber
func (KeysignSignature_Status) String ¶
func (x KeysignSignature_Status) String() string
func (KeysignSignature_Status) Type ¶
func (KeysignSignature_Status) Type() protoreflect.EnumType
type THORChainTSSMessageType ¶
type THORChainTSSMessageType uint8
THORChainTSSMessageType represent the messgae type used in THORChain TSS
const ( // TSSKeyGenMsg is the message directly generated by tss-lib package TSSKeyGenMsg THORChainTSSMessageType = iota // TSSKeySignMsg is the message directly generated by tss lib for sign TSSKeySignMsg // TSSKeyGenVerMsg is the message we create on top to make sure everyone received the same message TSSKeyGenVerMsg // TSSKeySignVerMsg is the message we create to make sure every party receive the same broadcast message TSSKeySignVerMsg // TSSControlMsg is the message we create to exchange Tss share TSSControlMsg // TSSTaskDone is the message of Tss process notification TSSTaskDone // Unknown is the message indicates the undefined message type Unknown )
func (THORChainTSSMessageType) String ¶
func (msgType THORChainTSSMessageType) String() string
String implement fmt.Stringer
type TssControl ¶
type TssControl struct { ReqHash string `json:"reqest_hash"` ReqKey string `json:"request_key"` RequestType THORChainTSSMessageType `json:"request_type"` Msg *WireMessage `json:"message_body"` }
type TssTaskNotifier ¶
type TssTaskNotifier struct {
TaskDone bool `json:"task_done"`
}
type WireMessage ¶
type WireMessage struct { Routing *btss.MessageRouting `json:"routing"` RoundInfo string `json:"round_info"` Message []byte `json:"message"` Sig []byte `json:"signature"` }
WireMessage the message that produced by tss-lib package
func (*WireMessage) GetCacheKey ¶
func (m *WireMessage) GetCacheKey() string
GetCacheKey return the key we used to cache it locally
type WrappedMessage ¶
type WrappedMessage struct { MessageType THORChainTSSMessageType `json:"message_type"` MsgID string `json:"message_id"` Payload []byte `json:"payload"` }
WrappedMessage is a message with type in it