diff --git a/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator.pb.go b/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator.pb.go index 3f9cb698..3dd3eeec 100644 --- a/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator.pb.go +++ b/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.36.10 // protoc v6.33.1 -// source: api/proto/session_coordinator.proto +// source: session_coordinator.proto package coordinator @@ -44,7 +44,7 @@ type CreateSessionRequest struct { func (x *CreateSessionRequest) Reset() { *x = CreateSessionRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[0] + mi := &file_session_coordinator_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +56,7 @@ func (x *CreateSessionRequest) String() string { func (*CreateSessionRequest) ProtoMessage() {} func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[0] + mi := &file_session_coordinator_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,7 +69,7 @@ func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead. func (*CreateSessionRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{0} + return file_session_coordinator_proto_rawDescGZIP(), []int{0} } func (x *CreateSessionRequest) GetSessionType() string { @@ -161,7 +161,7 @@ type DelegateUserShare struct { func (x *DelegateUserShare) Reset() { *x = DelegateUserShare{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[1] + mi := &file_session_coordinator_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -173,7 +173,7 @@ func (x *DelegateUserShare) String() string { func (*DelegateUserShare) ProtoMessage() {} func (x *DelegateUserShare) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[1] + mi := &file_session_coordinator_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -186,7 +186,7 @@ func (x *DelegateUserShare) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegateUserShare.ProtoReflect.Descriptor instead. func (*DelegateUserShare) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{1} + return file_session_coordinator_proto_rawDescGZIP(), []int{1} } func (x *DelegateUserShare) GetDelegatePartyId() string { @@ -222,7 +222,7 @@ type PartyComposition struct { func (x *PartyComposition) Reset() { *x = PartyComposition{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[2] + mi := &file_session_coordinator_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -234,7 +234,7 @@ func (x *PartyComposition) String() string { func (*PartyComposition) ProtoMessage() {} func (x *PartyComposition) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[2] + mi := &file_session_coordinator_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -247,7 +247,7 @@ func (x *PartyComposition) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyComposition.ProtoReflect.Descriptor instead. func (*PartyComposition) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{2} + return file_session_coordinator_proto_rawDescGZIP(), []int{2} } func (x *PartyComposition) GetPersistentCount() int32 { @@ -283,7 +283,7 @@ type ParticipantInfo struct { func (x *ParticipantInfo) Reset() { *x = ParticipantInfo{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[3] + mi := &file_session_coordinator_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -295,7 +295,7 @@ func (x *ParticipantInfo) String() string { func (*ParticipantInfo) ProtoMessage() {} func (x *ParticipantInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[3] + mi := &file_session_coordinator_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -308,7 +308,7 @@ func (x *ParticipantInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ParticipantInfo.ProtoReflect.Descriptor instead. func (*ParticipantInfo) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{3} + return file_session_coordinator_proto_rawDescGZIP(), []int{3} } func (x *ParticipantInfo) GetPartyId() string { @@ -345,7 +345,7 @@ type DeviceInfo struct { func (x *DeviceInfo) Reset() { *x = DeviceInfo{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[4] + mi := &file_session_coordinator_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -357,7 +357,7 @@ func (x *DeviceInfo) String() string { func (*DeviceInfo) ProtoMessage() {} func (x *DeviceInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[4] + mi := &file_session_coordinator_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -370,7 +370,7 @@ func (x *DeviceInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceInfo.ProtoReflect.Descriptor instead. func (*DeviceInfo) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{4} + return file_session_coordinator_proto_rawDescGZIP(), []int{4} } func (x *DeviceInfo) GetDeviceType() string { @@ -415,7 +415,7 @@ type CreateSessionResponse struct { func (x *CreateSessionResponse) Reset() { *x = CreateSessionResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[5] + mi := &file_session_coordinator_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -427,7 +427,7 @@ func (x *CreateSessionResponse) String() string { func (*CreateSessionResponse) ProtoMessage() {} func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[5] + mi := &file_session_coordinator_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -440,7 +440,7 @@ func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead. func (*CreateSessionResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{5} + return file_session_coordinator_proto_rawDescGZIP(), []int{5} } func (x *CreateSessionResponse) GetSessionId() string { @@ -491,7 +491,7 @@ type JoinSessionRequest struct { func (x *JoinSessionRequest) Reset() { *x = JoinSessionRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[6] + mi := &file_session_coordinator_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -503,7 +503,7 @@ func (x *JoinSessionRequest) String() string { func (*JoinSessionRequest) ProtoMessage() {} func (x *JoinSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[6] + mi := &file_session_coordinator_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -516,7 +516,7 @@ func (x *JoinSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinSessionRequest.ProtoReflect.Descriptor instead. func (*JoinSessionRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{6} + return file_session_coordinator_proto_rawDescGZIP(), []int{6} } func (x *JoinSessionRequest) GetSessionId() string { @@ -560,7 +560,7 @@ type JoinSessionResponse struct { func (x *JoinSessionResponse) Reset() { *x = JoinSessionResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[7] + mi := &file_session_coordinator_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -572,7 +572,7 @@ func (x *JoinSessionResponse) String() string { func (*JoinSessionResponse) ProtoMessage() {} func (x *JoinSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[7] + mi := &file_session_coordinator_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -585,7 +585,7 @@ func (x *JoinSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinSessionResponse.ProtoReflect.Descriptor instead. func (*JoinSessionResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{7} + return file_session_coordinator_proto_rawDescGZIP(), []int{7} } func (x *JoinSessionResponse) GetSuccess() bool { @@ -636,7 +636,7 @@ type SessionInfo struct { func (x *SessionInfo) Reset() { *x = SessionInfo{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[8] + mi := &file_session_coordinator_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -648,7 +648,7 @@ func (x *SessionInfo) String() string { func (*SessionInfo) ProtoMessage() {} func (x *SessionInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[8] + mi := &file_session_coordinator_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -661,7 +661,7 @@ func (x *SessionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use SessionInfo.ProtoReflect.Descriptor instead. func (*SessionInfo) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{8} + return file_session_coordinator_proto_rawDescGZIP(), []int{8} } func (x *SessionInfo) GetSessionId() string { @@ -739,7 +739,7 @@ type PartyInfo struct { func (x *PartyInfo) Reset() { *x = PartyInfo{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[9] + mi := &file_session_coordinator_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -751,7 +751,7 @@ func (x *PartyInfo) String() string { func (*PartyInfo) ProtoMessage() {} func (x *PartyInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[9] + mi := &file_session_coordinator_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -764,7 +764,7 @@ func (x *PartyInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyInfo.ProtoReflect.Descriptor instead. func (*PartyInfo) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{9} + return file_session_coordinator_proto_rawDescGZIP(), []int{9} } func (x *PartyInfo) GetPartyId() string { @@ -798,7 +798,7 @@ type GetSessionStatusRequest struct { func (x *GetSessionStatusRequest) Reset() { *x = GetSessionStatusRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[10] + mi := &file_session_coordinator_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -810,7 +810,7 @@ func (x *GetSessionStatusRequest) String() string { func (*GetSessionStatusRequest) ProtoMessage() {} func (x *GetSessionStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[10] + mi := &file_session_coordinator_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -823,7 +823,7 @@ func (x *GetSessionStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSessionStatusRequest.ProtoReflect.Descriptor instead. func (*GetSessionStatusRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{10} + return file_session_coordinator_proto_rawDescGZIP(), []int{10} } func (x *GetSessionStatusRequest) GetSessionId() string { @@ -848,13 +848,16 @@ type GetSessionStatusResponse struct { // Delegate share info (returned when keygen session completed and delegate party submitted share) // Only populated if session_type="keygen" AND has_delegate=true AND session is completed DelegateShare *DelegateShareInfo `protobuf:"bytes,8,opt,name=delegate_share,json=delegateShare,proto3" json:"delegate_share,omitempty"` + // participants contains detailed participant information including party_index + // Used by service-party-app for co_managed_keygen sessions + Participants []*ParticipantStatus `protobuf:"bytes,9,rep,name=participants,proto3" json:"participants,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetSessionStatusResponse) Reset() { *x = GetSessionStatusResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[11] + mi := &file_session_coordinator_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -866,7 +869,7 @@ func (x *GetSessionStatusResponse) String() string { func (*GetSessionStatusResponse) ProtoMessage() {} func (x *GetSessionStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[11] + mi := &file_session_coordinator_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -879,7 +882,7 @@ func (x *GetSessionStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSessionStatusResponse.ProtoReflect.Descriptor instead. func (*GetSessionStatusResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{11} + return file_session_coordinator_proto_rawDescGZIP(), []int{11} } func (x *GetSessionStatusResponse) GetStatus() string { @@ -938,6 +941,74 @@ func (x *GetSessionStatusResponse) GetDelegateShare() *DelegateShareInfo { return nil } +func (x *GetSessionStatusResponse) GetParticipants() []*ParticipantStatus { + if x != nil { + return x.Participants + } + return nil +} + +// ParticipantStatus contains participant status information +type ParticipantStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + PartyIndex int32 `protobuf:"varint,2,opt,name=party_index,json=partyIndex,proto3" json:"party_index,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // pending, joined, ready, completed + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParticipantStatus) Reset() { + *x = ParticipantStatus{} + mi := &file_session_coordinator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParticipantStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParticipantStatus) ProtoMessage() {} + +func (x *ParticipantStatus) ProtoReflect() protoreflect.Message { + mi := &file_session_coordinator_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParticipantStatus.ProtoReflect.Descriptor instead. +func (*ParticipantStatus) Descriptor() ([]byte, []int) { + return file_session_coordinator_proto_rawDescGZIP(), []int{12} +} + +func (x *ParticipantStatus) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *ParticipantStatus) GetPartyIndex() int32 { + if x != nil { + return x.PartyIndex + } + return 0 +} + +func (x *ParticipantStatus) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + // DelegateShareInfo contains the delegate party's share for user type DelegateShareInfo struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -950,7 +1021,7 @@ type DelegateShareInfo struct { func (x *DelegateShareInfo) Reset() { *x = DelegateShareInfo{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[12] + mi := &file_session_coordinator_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -962,7 +1033,7 @@ func (x *DelegateShareInfo) String() string { func (*DelegateShareInfo) ProtoMessage() {} func (x *DelegateShareInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[12] + mi := &file_session_coordinator_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -975,7 +1046,7 @@ func (x *DelegateShareInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegateShareInfo.ProtoReflect.Descriptor instead. func (*DelegateShareInfo) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{12} + return file_session_coordinator_proto_rawDescGZIP(), []int{13} } func (x *DelegateShareInfo) GetEncryptedShare() []byte { @@ -1012,7 +1083,7 @@ type ReportCompletionRequest struct { func (x *ReportCompletionRequest) Reset() { *x = ReportCompletionRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[13] + mi := &file_session_coordinator_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1024,7 +1095,7 @@ func (x *ReportCompletionRequest) String() string { func (*ReportCompletionRequest) ProtoMessage() {} func (x *ReportCompletionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[13] + mi := &file_session_coordinator_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1037,7 +1108,7 @@ func (x *ReportCompletionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReportCompletionRequest.ProtoReflect.Descriptor instead. func (*ReportCompletionRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{13} + return file_session_coordinator_proto_rawDescGZIP(), []int{14} } func (x *ReportCompletionRequest) GetSessionId() string { @@ -1079,7 +1150,7 @@ type ReportCompletionResponse struct { func (x *ReportCompletionResponse) Reset() { *x = ReportCompletionResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[14] + mi := &file_session_coordinator_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1091,7 +1162,7 @@ func (x *ReportCompletionResponse) String() string { func (*ReportCompletionResponse) ProtoMessage() {} func (x *ReportCompletionResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[14] + mi := &file_session_coordinator_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1104,7 +1175,7 @@ func (x *ReportCompletionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReportCompletionResponse.ProtoReflect.Descriptor instead. func (*ReportCompletionResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{14} + return file_session_coordinator_proto_rawDescGZIP(), []int{15} } func (x *ReportCompletionResponse) GetSuccess() bool { @@ -1131,7 +1202,7 @@ type CloseSessionRequest struct { func (x *CloseSessionRequest) Reset() { *x = CloseSessionRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[15] + mi := &file_session_coordinator_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1143,7 +1214,7 @@ func (x *CloseSessionRequest) String() string { func (*CloseSessionRequest) ProtoMessage() {} func (x *CloseSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[15] + mi := &file_session_coordinator_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1156,7 +1227,7 @@ func (x *CloseSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CloseSessionRequest.ProtoReflect.Descriptor instead. func (*CloseSessionRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{15} + return file_session_coordinator_proto_rawDescGZIP(), []int{16} } func (x *CloseSessionRequest) GetSessionId() string { @@ -1176,7 +1247,7 @@ type CloseSessionResponse struct { func (x *CloseSessionResponse) Reset() { *x = CloseSessionResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[16] + mi := &file_session_coordinator_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1188,7 +1259,7 @@ func (x *CloseSessionResponse) String() string { func (*CloseSessionResponse) ProtoMessage() {} func (x *CloseSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[16] + mi := &file_session_coordinator_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1201,7 +1272,7 @@ func (x *CloseSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CloseSessionResponse.ProtoReflect.Descriptor instead. func (*CloseSessionResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{16} + return file_session_coordinator_proto_rawDescGZIP(), []int{17} } func (x *CloseSessionResponse) GetSuccess() bool { @@ -1222,7 +1293,7 @@ type MarkPartyReadyRequest struct { func (x *MarkPartyReadyRequest) Reset() { *x = MarkPartyReadyRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[17] + mi := &file_session_coordinator_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1234,7 +1305,7 @@ func (x *MarkPartyReadyRequest) String() string { func (*MarkPartyReadyRequest) ProtoMessage() {} func (x *MarkPartyReadyRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[17] + mi := &file_session_coordinator_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1247,7 +1318,7 @@ func (x *MarkPartyReadyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkPartyReadyRequest.ProtoReflect.Descriptor instead. func (*MarkPartyReadyRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{17} + return file_session_coordinator_proto_rawDescGZIP(), []int{18} } func (x *MarkPartyReadyRequest) GetSessionId() string { @@ -1277,7 +1348,7 @@ type MarkPartyReadyResponse struct { func (x *MarkPartyReadyResponse) Reset() { *x = MarkPartyReadyResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[18] + mi := &file_session_coordinator_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1289,7 +1360,7 @@ func (x *MarkPartyReadyResponse) String() string { func (*MarkPartyReadyResponse) ProtoMessage() {} func (x *MarkPartyReadyResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[18] + mi := &file_session_coordinator_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1302,7 +1373,7 @@ func (x *MarkPartyReadyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkPartyReadyResponse.ProtoReflect.Descriptor instead. func (*MarkPartyReadyResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{18} + return file_session_coordinator_proto_rawDescGZIP(), []int{19} } func (x *MarkPartyReadyResponse) GetSuccess() bool { @@ -1343,7 +1414,7 @@ type StartSessionRequest struct { func (x *StartSessionRequest) Reset() { *x = StartSessionRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[19] + mi := &file_session_coordinator_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1355,7 +1426,7 @@ func (x *StartSessionRequest) String() string { func (*StartSessionRequest) ProtoMessage() {} func (x *StartSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[19] + mi := &file_session_coordinator_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1368,7 +1439,7 @@ func (x *StartSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StartSessionRequest.ProtoReflect.Descriptor instead. func (*StartSessionRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{19} + return file_session_coordinator_proto_rawDescGZIP(), []int{20} } func (x *StartSessionRequest) GetSessionId() string { @@ -1389,7 +1460,7 @@ type StartSessionResponse struct { func (x *StartSessionResponse) Reset() { *x = StartSessionResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[20] + mi := &file_session_coordinator_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1401,7 +1472,7 @@ func (x *StartSessionResponse) String() string { func (*StartSessionResponse) ProtoMessage() {} func (x *StartSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[20] + mi := &file_session_coordinator_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1414,7 +1485,7 @@ func (x *StartSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StartSessionResponse.ProtoReflect.Descriptor instead. func (*StartSessionResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{20} + return file_session_coordinator_proto_rawDescGZIP(), []int{21} } func (x *StartSessionResponse) GetSuccess() bool { @@ -1445,7 +1516,7 @@ type SubmitDelegateShareRequest struct { func (x *SubmitDelegateShareRequest) Reset() { *x = SubmitDelegateShareRequest{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[21] + mi := &file_session_coordinator_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1457,7 +1528,7 @@ func (x *SubmitDelegateShareRequest) String() string { func (*SubmitDelegateShareRequest) ProtoMessage() {} func (x *SubmitDelegateShareRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[21] + mi := &file_session_coordinator_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1470,7 +1541,7 @@ func (x *SubmitDelegateShareRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitDelegateShareRequest.ProtoReflect.Descriptor instead. func (*SubmitDelegateShareRequest) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{21} + return file_session_coordinator_proto_rawDescGZIP(), []int{22} } func (x *SubmitDelegateShareRequest) GetSessionId() string { @@ -1518,7 +1589,7 @@ type SubmitDelegateShareResponse struct { func (x *SubmitDelegateShareResponse) Reset() { *x = SubmitDelegateShareResponse{} - mi := &file_api_proto_session_coordinator_proto_msgTypes[22] + mi := &file_session_coordinator_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1530,7 +1601,7 @@ func (x *SubmitDelegateShareResponse) String() string { func (*SubmitDelegateShareResponse) ProtoMessage() {} func (x *SubmitDelegateShareResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_session_coordinator_proto_msgTypes[22] + mi := &file_session_coordinator_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1543,7 +1614,7 @@ func (x *SubmitDelegateShareResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitDelegateShareResponse.ProtoReflect.Descriptor instead. func (*SubmitDelegateShareResponse) Descriptor() ([]byte, []int) { - return file_api_proto_session_coordinator_proto_rawDescGZIP(), []int{22} + return file_session_coordinator_proto_rawDescGZIP(), []int{23} } func (x *SubmitDelegateShareResponse) GetSuccess() bool { @@ -1553,11 +1624,11 @@ func (x *SubmitDelegateShareResponse) GetSuccess() bool { return false } -var File_api_proto_session_coordinator_proto protoreflect.FileDescriptor +var File_session_coordinator_proto protoreflect.FileDescriptor -const file_api_proto_session_coordinator_proto_rawDesc = "" + +const file_session_coordinator_proto_rawDesc = "" + "\n" + - "#api/proto/session_coordinator.proto\x12\x12mpc.coordinator.v1\"\xad\x04\n" + + "\x19session_coordinator.proto\x12\x12mpc.coordinator.v1\"\xad\x04\n" + "\x14CreateSessionRequest\x12!\n" + "\fsession_type\x18\x01 \x01(\tR\vsessionType\x12\x1f\n" + "\vthreshold_n\x18\x02 \x01(\x05R\n" + @@ -1647,7 +1718,7 @@ const file_api_proto_session_coordinator_proto_rawDesc = "" + "deviceInfo\"8\n" + "\x17GetSessionStatusRequest\x12\x1d\n" + "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\"\xd5\x02\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\"\xa0\x03\n" + "\x18GetSessionStatusResponse\x12\x16\n" + "\x06status\x18\x01 \x01(\tR\x06status\x12+\n" + "\x11completed_parties\x18\x02 \x01(\x05R\x10completedParties\x12#\n" + @@ -1657,7 +1728,13 @@ const file_api_proto_session_coordinator_proto_rawDesc = "" + "public_key\x18\x05 \x01(\fR\tpublicKey\x12\x1c\n" + "\tsignature\x18\x06 \x01(\fR\tsignature\x12!\n" + "\fhas_delegate\x18\a \x01(\bR\vhasDelegate\x12L\n" + - "\x0edelegate_share\x18\b \x01(\v2%.mpc.coordinator.v1.DelegateShareInfoR\rdelegateShare\"x\n" + + "\x0edelegate_share\x18\b \x01(\v2%.mpc.coordinator.v1.DelegateShareInfoR\rdelegateShare\x12I\n" + + "\fparticipants\x18\t \x03(\v2%.mpc.coordinator.v1.ParticipantStatusR\fparticipants\"g\n" + + "\x11ParticipantStatus\x12\x19\n" + + "\bparty_id\x18\x01 \x01(\tR\apartyId\x12\x1f\n" + + "\vparty_index\x18\x02 \x01(\x05R\n" + + "partyIndex\x12\x16\n" + + "\x06status\x18\x03 \x01(\tR\x06status\"x\n" + "\x11DelegateShareInfo\x12'\n" + "\x0fencrypted_share\x18\x01 \x01(\fR\x0eencryptedShare\x12\x1f\n" + "\vparty_index\x18\x02 \x01(\x05R\n" + @@ -1716,19 +1793,19 @@ const file_api_proto_session_coordinator_proto_rawDesc = "" + "\x13SubmitDelegateShare\x12..mpc.coordinator.v1.SubmitDelegateShareRequest\x1a/.mpc.coordinator.v1.SubmitDelegateShareResponseBEZCgithub.com/rwadurian/mpc-system/api/grpc/coordinator/v1;coordinatorb\x06proto3" var ( - file_api_proto_session_coordinator_proto_rawDescOnce sync.Once - file_api_proto_session_coordinator_proto_rawDescData []byte + file_session_coordinator_proto_rawDescOnce sync.Once + file_session_coordinator_proto_rawDescData []byte ) -func file_api_proto_session_coordinator_proto_rawDescGZIP() []byte { - file_api_proto_session_coordinator_proto_rawDescOnce.Do(func() { - file_api_proto_session_coordinator_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_session_coordinator_proto_rawDesc), len(file_api_proto_session_coordinator_proto_rawDesc))) +func file_session_coordinator_proto_rawDescGZIP() []byte { + file_session_coordinator_proto_rawDescOnce.Do(func() { + file_session_coordinator_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_session_coordinator_proto_rawDesc), len(file_session_coordinator_proto_rawDesc))) }) - return file_api_proto_session_coordinator_proto_rawDescData + return file_session_coordinator_proto_rawDescData } -var file_api_proto_session_coordinator_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_api_proto_session_coordinator_proto_goTypes = []any{ +var file_session_coordinator_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_session_coordinator_proto_goTypes = []any{ (*CreateSessionRequest)(nil), // 0: mpc.coordinator.v1.CreateSessionRequest (*DelegateUserShare)(nil), // 1: mpc.coordinator.v1.DelegateUserShare (*PartyComposition)(nil), // 2: mpc.coordinator.v1.PartyComposition @@ -1741,73 +1818,75 @@ var file_api_proto_session_coordinator_proto_goTypes = []any{ (*PartyInfo)(nil), // 9: mpc.coordinator.v1.PartyInfo (*GetSessionStatusRequest)(nil), // 10: mpc.coordinator.v1.GetSessionStatusRequest (*GetSessionStatusResponse)(nil), // 11: mpc.coordinator.v1.GetSessionStatusResponse - (*DelegateShareInfo)(nil), // 12: mpc.coordinator.v1.DelegateShareInfo - (*ReportCompletionRequest)(nil), // 13: mpc.coordinator.v1.ReportCompletionRequest - (*ReportCompletionResponse)(nil), // 14: mpc.coordinator.v1.ReportCompletionResponse - (*CloseSessionRequest)(nil), // 15: mpc.coordinator.v1.CloseSessionRequest - (*CloseSessionResponse)(nil), // 16: mpc.coordinator.v1.CloseSessionResponse - (*MarkPartyReadyRequest)(nil), // 17: mpc.coordinator.v1.MarkPartyReadyRequest - (*MarkPartyReadyResponse)(nil), // 18: mpc.coordinator.v1.MarkPartyReadyResponse - (*StartSessionRequest)(nil), // 19: mpc.coordinator.v1.StartSessionRequest - (*StartSessionResponse)(nil), // 20: mpc.coordinator.v1.StartSessionResponse - (*SubmitDelegateShareRequest)(nil), // 21: mpc.coordinator.v1.SubmitDelegateShareRequest - (*SubmitDelegateShareResponse)(nil), // 22: mpc.coordinator.v1.SubmitDelegateShareResponse - nil, // 23: mpc.coordinator.v1.CreateSessionResponse.JoinTokensEntry + (*ParticipantStatus)(nil), // 12: mpc.coordinator.v1.ParticipantStatus + (*DelegateShareInfo)(nil), // 13: mpc.coordinator.v1.DelegateShareInfo + (*ReportCompletionRequest)(nil), // 14: mpc.coordinator.v1.ReportCompletionRequest + (*ReportCompletionResponse)(nil), // 15: mpc.coordinator.v1.ReportCompletionResponse + (*CloseSessionRequest)(nil), // 16: mpc.coordinator.v1.CloseSessionRequest + (*CloseSessionResponse)(nil), // 17: mpc.coordinator.v1.CloseSessionResponse + (*MarkPartyReadyRequest)(nil), // 18: mpc.coordinator.v1.MarkPartyReadyRequest + (*MarkPartyReadyResponse)(nil), // 19: mpc.coordinator.v1.MarkPartyReadyResponse + (*StartSessionRequest)(nil), // 20: mpc.coordinator.v1.StartSessionRequest + (*StartSessionResponse)(nil), // 21: mpc.coordinator.v1.StartSessionResponse + (*SubmitDelegateShareRequest)(nil), // 22: mpc.coordinator.v1.SubmitDelegateShareRequest + (*SubmitDelegateShareResponse)(nil), // 23: mpc.coordinator.v1.SubmitDelegateShareResponse + nil, // 24: mpc.coordinator.v1.CreateSessionResponse.JoinTokensEntry } -var file_api_proto_session_coordinator_proto_depIdxs = []int32{ +var file_session_coordinator_proto_depIdxs = []int32{ 3, // 0: mpc.coordinator.v1.CreateSessionRequest.participants:type_name -> mpc.coordinator.v1.ParticipantInfo 2, // 1: mpc.coordinator.v1.CreateSessionRequest.party_composition:type_name -> mpc.coordinator.v1.PartyComposition 1, // 2: mpc.coordinator.v1.CreateSessionRequest.delegate_user_share:type_name -> mpc.coordinator.v1.DelegateUserShare 4, // 3: mpc.coordinator.v1.ParticipantInfo.device_info:type_name -> mpc.coordinator.v1.DeviceInfo - 23, // 4: mpc.coordinator.v1.CreateSessionResponse.join_tokens:type_name -> mpc.coordinator.v1.CreateSessionResponse.JoinTokensEntry + 24, // 4: mpc.coordinator.v1.CreateSessionResponse.join_tokens:type_name -> mpc.coordinator.v1.CreateSessionResponse.JoinTokensEntry 4, // 5: mpc.coordinator.v1.JoinSessionRequest.device_info:type_name -> mpc.coordinator.v1.DeviceInfo 8, // 6: mpc.coordinator.v1.JoinSessionResponse.session_info:type_name -> mpc.coordinator.v1.SessionInfo 9, // 7: mpc.coordinator.v1.JoinSessionResponse.other_parties:type_name -> mpc.coordinator.v1.PartyInfo 4, // 8: mpc.coordinator.v1.PartyInfo.device_info:type_name -> mpc.coordinator.v1.DeviceInfo - 12, // 9: mpc.coordinator.v1.GetSessionStatusResponse.delegate_share:type_name -> mpc.coordinator.v1.DelegateShareInfo - 0, // 10: mpc.coordinator.v1.SessionCoordinator.CreateSession:input_type -> mpc.coordinator.v1.CreateSessionRequest - 6, // 11: mpc.coordinator.v1.SessionCoordinator.JoinSession:input_type -> mpc.coordinator.v1.JoinSessionRequest - 10, // 12: mpc.coordinator.v1.SessionCoordinator.GetSessionStatus:input_type -> mpc.coordinator.v1.GetSessionStatusRequest - 17, // 13: mpc.coordinator.v1.SessionCoordinator.MarkPartyReady:input_type -> mpc.coordinator.v1.MarkPartyReadyRequest - 19, // 14: mpc.coordinator.v1.SessionCoordinator.StartSession:input_type -> mpc.coordinator.v1.StartSessionRequest - 13, // 15: mpc.coordinator.v1.SessionCoordinator.ReportCompletion:input_type -> mpc.coordinator.v1.ReportCompletionRequest - 15, // 16: mpc.coordinator.v1.SessionCoordinator.CloseSession:input_type -> mpc.coordinator.v1.CloseSessionRequest - 21, // 17: mpc.coordinator.v1.SessionCoordinator.SubmitDelegateShare:input_type -> mpc.coordinator.v1.SubmitDelegateShareRequest - 5, // 18: mpc.coordinator.v1.SessionCoordinator.CreateSession:output_type -> mpc.coordinator.v1.CreateSessionResponse - 7, // 19: mpc.coordinator.v1.SessionCoordinator.JoinSession:output_type -> mpc.coordinator.v1.JoinSessionResponse - 11, // 20: mpc.coordinator.v1.SessionCoordinator.GetSessionStatus:output_type -> mpc.coordinator.v1.GetSessionStatusResponse - 18, // 21: mpc.coordinator.v1.SessionCoordinator.MarkPartyReady:output_type -> mpc.coordinator.v1.MarkPartyReadyResponse - 20, // 22: mpc.coordinator.v1.SessionCoordinator.StartSession:output_type -> mpc.coordinator.v1.StartSessionResponse - 14, // 23: mpc.coordinator.v1.SessionCoordinator.ReportCompletion:output_type -> mpc.coordinator.v1.ReportCompletionResponse - 16, // 24: mpc.coordinator.v1.SessionCoordinator.CloseSession:output_type -> mpc.coordinator.v1.CloseSessionResponse - 22, // 25: mpc.coordinator.v1.SessionCoordinator.SubmitDelegateShare:output_type -> mpc.coordinator.v1.SubmitDelegateShareResponse - 18, // [18:26] is the sub-list for method output_type - 10, // [10:18] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 13, // 9: mpc.coordinator.v1.GetSessionStatusResponse.delegate_share:type_name -> mpc.coordinator.v1.DelegateShareInfo + 12, // 10: mpc.coordinator.v1.GetSessionStatusResponse.participants:type_name -> mpc.coordinator.v1.ParticipantStatus + 0, // 11: mpc.coordinator.v1.SessionCoordinator.CreateSession:input_type -> mpc.coordinator.v1.CreateSessionRequest + 6, // 12: mpc.coordinator.v1.SessionCoordinator.JoinSession:input_type -> mpc.coordinator.v1.JoinSessionRequest + 10, // 13: mpc.coordinator.v1.SessionCoordinator.GetSessionStatus:input_type -> mpc.coordinator.v1.GetSessionStatusRequest + 18, // 14: mpc.coordinator.v1.SessionCoordinator.MarkPartyReady:input_type -> mpc.coordinator.v1.MarkPartyReadyRequest + 20, // 15: mpc.coordinator.v1.SessionCoordinator.StartSession:input_type -> mpc.coordinator.v1.StartSessionRequest + 14, // 16: mpc.coordinator.v1.SessionCoordinator.ReportCompletion:input_type -> mpc.coordinator.v1.ReportCompletionRequest + 16, // 17: mpc.coordinator.v1.SessionCoordinator.CloseSession:input_type -> mpc.coordinator.v1.CloseSessionRequest + 22, // 18: mpc.coordinator.v1.SessionCoordinator.SubmitDelegateShare:input_type -> mpc.coordinator.v1.SubmitDelegateShareRequest + 5, // 19: mpc.coordinator.v1.SessionCoordinator.CreateSession:output_type -> mpc.coordinator.v1.CreateSessionResponse + 7, // 20: mpc.coordinator.v1.SessionCoordinator.JoinSession:output_type -> mpc.coordinator.v1.JoinSessionResponse + 11, // 21: mpc.coordinator.v1.SessionCoordinator.GetSessionStatus:output_type -> mpc.coordinator.v1.GetSessionStatusResponse + 19, // 22: mpc.coordinator.v1.SessionCoordinator.MarkPartyReady:output_type -> mpc.coordinator.v1.MarkPartyReadyResponse + 21, // 23: mpc.coordinator.v1.SessionCoordinator.StartSession:output_type -> mpc.coordinator.v1.StartSessionResponse + 15, // 24: mpc.coordinator.v1.SessionCoordinator.ReportCompletion:output_type -> mpc.coordinator.v1.ReportCompletionResponse + 17, // 25: mpc.coordinator.v1.SessionCoordinator.CloseSession:output_type -> mpc.coordinator.v1.CloseSessionResponse + 23, // 26: mpc.coordinator.v1.SessionCoordinator.SubmitDelegateShare:output_type -> mpc.coordinator.v1.SubmitDelegateShareResponse + 19, // [19:27] is the sub-list for method output_type + 11, // [11:19] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } -func init() { file_api_proto_session_coordinator_proto_init() } -func file_api_proto_session_coordinator_proto_init() { - if File_api_proto_session_coordinator_proto != nil { +func init() { file_session_coordinator_proto_init() } +func file_session_coordinator_proto_init() { + if File_session_coordinator_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_session_coordinator_proto_rawDesc), len(file_api_proto_session_coordinator_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_session_coordinator_proto_rawDesc), len(file_session_coordinator_proto_rawDesc)), NumEnums: 0, - NumMessages: 24, + NumMessages: 25, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_api_proto_session_coordinator_proto_goTypes, - DependencyIndexes: file_api_proto_session_coordinator_proto_depIdxs, - MessageInfos: file_api_proto_session_coordinator_proto_msgTypes, + GoTypes: file_session_coordinator_proto_goTypes, + DependencyIndexes: file_session_coordinator_proto_depIdxs, + MessageInfos: file_session_coordinator_proto_msgTypes, }.Build() - File_api_proto_session_coordinator_proto = out.File - file_api_proto_session_coordinator_proto_goTypes = nil - file_api_proto_session_coordinator_proto_depIdxs = nil + File_session_coordinator_proto = out.File + file_session_coordinator_proto_goTypes = nil + file_session_coordinator_proto_depIdxs = nil } diff --git a/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator_grpc.pb.go b/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator_grpc.pb.go index ec50e1d7..408904fc 100644 --- a/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator_grpc.pb.go +++ b/backend/mpc-system/api/grpc/coordinator/v1/session_coordinator_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.6.0 // - protoc v6.33.1 -// source: api/proto/session_coordinator.proto +// source: session_coordinator.proto package coordinator @@ -391,5 +391,5 @@ var SessionCoordinator_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "api/proto/session_coordinator.proto", + Metadata: "session_coordinator.proto", } diff --git a/backend/mpc-system/api/proto/session_coordinator.proto b/backend/mpc-system/api/proto/session_coordinator.proto index 72a5560c..f0ab1cac 100644 --- a/backend/mpc-system/api/proto/session_coordinator.proto +++ b/backend/mpc-system/api/proto/session_coordinator.proto @@ -132,6 +132,16 @@ message GetSessionStatusResponse { // Delegate share info (returned when keygen session completed and delegate party submitted share) // Only populated if session_type="keygen" AND has_delegate=true AND session is completed DelegateShareInfo delegate_share = 8; + // participants contains detailed participant information including party_index + // Used by service-party-app for co_managed_keygen sessions + repeated ParticipantStatus participants = 9; +} + +// ParticipantStatus contains participant status information +message ParticipantStatus { + string party_id = 1; + int32 party_index = 2; + string status = 3; // pending, joined, ready, completed } // DelegateShareInfo contains the delegate party's share for user diff --git a/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go b/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go index 1a1b3ed7..6be97f2b 100644 --- a/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go +++ b/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go @@ -159,17 +159,18 @@ func (h *CoManagedHTTPHandler) CreateSession(c *gin.Context) { zap.Int("num_server_parties", len(resp.SelectedServerParties))) c.JSON(http.StatusCreated, gin.H{ - "session_id": resp.SessionID, - "wallet_name": req.WalletName, - "invite_code": inviteCode, - "join_token": wildcardToken, // Token for external participants - "threshold_n": req.ThresholdN, - "threshold_t": req.ThresholdT, + "session_id": resp.SessionID, + "wallet_name": req.WalletName, + "invite_code": inviteCode, + "join_token": wildcardToken, // Token for external participants (backward compatible) + "join_tokens": resp.JoinTokens, // Full join tokens map for service-party-app + "threshold_n": req.ThresholdN, + "threshold_t": req.ThresholdT, "selected_server_parties": resp.SelectedServerParties, - "status": "waiting_for_participants", - "current_participants": len(resp.SelectedServerParties), // Server parties auto-joined - "required_participants": req.ThresholdN, - "expires_at": resp.ExpiresAt, + "status": "waiting_for_participants", + "current_participants": len(resp.SelectedServerParties), // Server parties auto-joined + "required_participants": req.ThresholdN, + "expires_at": resp.ExpiresAt, }) } @@ -322,6 +323,19 @@ func (h *CoManagedHTTPHandler) GetSessionStatus(c *gin.Context) { result["public_key"] = hex.EncodeToString(resp.PublicKey) } + // Include participants with party_index (for service-party-app to build correct participant list) + if len(resp.Participants) > 0 { + participants := make([]gin.H, len(resp.Participants)) + for i, p := range resp.Participants { + participants[i] = gin.H{ + "party_id": p.PartyID, + "party_index": p.PartyIndex, + "status": p.Status, + } + } + result["participants"] = participants + } + c.JSON(http.StatusOK, result) } diff --git a/backend/mpc-system/services/account/adapters/output/grpc/session_coordinator_client.go b/backend/mpc-system/services/account/adapters/output/grpc/session_coordinator_client.go index 17081338..1ce2a2e2 100644 --- a/backend/mpc-system/services/account/adapters/output/grpc/session_coordinator_client.go +++ b/backend/mpc-system/services/account/adapters/output/grpc/session_coordinator_client.go @@ -240,6 +240,18 @@ func (c *SessionCoordinatorClient) GetSessionStatus( } } + // Include participants if present (for co_managed_keygen sessions) + if len(resp.Participants) > 0 { + result.Participants = make([]ParticipantStatusInfo, len(resp.Participants)) + for i, p := range resp.Participants { + result.Participants[i] = ParticipantStatusInfo{ + PartyID: p.PartyId, + PartyIndex: p.PartyIndex, + Status: p.Status, + } + } + } + return result, nil } @@ -290,6 +302,16 @@ type SessionStatusResponse struct { // DelegateShare is non-nil when session_type="keygen" AND has_delegate=true AND session is completed // nil with has_delegate=true means share was already retrieved (one-time retrieval) DelegateShare *DelegateShareInfo + // Participants contains detailed participant information including party_index + // Used by service-party-app for co_managed_keygen sessions + Participants []ParticipantStatusInfo +} + +// ParticipantStatusInfo contains participant status information +type ParticipantStatusInfo struct { + PartyID string + PartyIndex int32 + Status string } // DelegateShareInfo contains the delegate party's share for user diff --git a/backend/mpc-system/services/service-party-app/electron/main.ts b/backend/mpc-system/services/service-party-app/electron/main.ts index 52c24219..affff2fb 100644 --- a/backend/mpc-system/services/service-party-app/electron/main.ts +++ b/backend/mpc-system/services/service-party-app/electron/main.ts @@ -154,7 +154,37 @@ async function checkAndTriggerKeygen(sessionId: string) { debugLog.info('main', 'Session ready, triggering keygen...'); - // 使用 activeKeygenSession 中已有的参与者信息 + // 使用后端返回的 participants 信息(包含正确的 party_index) + // 这解决了 co_managed_keygen 中 server-party 和 service-party-app 混合的问题 + if (status.participants && status.participants.length > 0) { + const myPartyId = grpcClient?.getPartyId(); + const updatedParticipants: Array<{ partyId: string; partyIndex: number; name: string }> = []; + + for (const p of status.participants) { + // 查找已有的参与者名称 + const existing = activeKeygenSession.participants.find(ep => ep.partyId === p.party_id); + updatedParticipants.push({ + partyId: p.party_id, + partyIndex: p.party_index, + name: existing?.name || (p.party_id === myPartyId ? '我' : `参与方 ${p.party_index + 1}`), + }); + } + + // 更新参与者列表 + activeKeygenSession.participants = updatedParticipants; + + // 更新自己的 partyIndex + const myInfo = updatedParticipants.find(p => p.partyId === myPartyId); + if (myInfo) { + activeKeygenSession.partyIndex = myInfo.partyIndex; + } + + debugLog.info('main', `Updated participants from server: ${JSON.stringify(updatedParticipants.map(p => ({ + partyId: p.partyId.substring(0, 8) + '...', + partyIndex: p.partyIndex, + })))}`); + } + const selectedParties = activeKeygenSession.participants.map(p => p.partyId); await handleSessionStart({ @@ -676,7 +706,8 @@ function setupIpcHandlers() { } // 发起方自动加入会话 - const joinToken = result.join_tokens?.[partyId]; + // 优先使用 join_tokens map,如果没有则使用 wildcard token (join_token) + const joinToken = result.join_tokens?.[partyId] || result.join_tokens?.['*'] || result.join_token; if (joinToken) { console.log('Initiator auto-joining session...'); const joinResult = await grpcClient?.joinSession(result.session_id, partyId, joinToken); diff --git a/backend/mpc-system/services/service-party-app/electron/modules/account-client.ts b/backend/mpc-system/services/service-party-app/electron/modules/account-client.ts index 26e35867..ab77c4e6 100644 --- a/backend/mpc-system/services/service-party-app/electron/modules/account-client.ts +++ b/backend/mpc-system/services/service-party-app/electron/modules/account-client.ts @@ -29,6 +29,7 @@ export interface CreateKeygenSessionResponse { threshold_t: number; selected_server_parties: string[]; join_tokens: Record; + join_token?: string; // Wildcard token for backward compatibility expires_at: number; } @@ -62,6 +63,13 @@ export interface JoinSessionResponse { other_parties: PartyInfo[]; } +// Participant status information with party_index +export interface ParticipantStatusInfo { + party_id: string; + party_index: number; + status: string; +} + export interface GetSessionStatusResponse { session_id: string; status: string; @@ -71,6 +79,9 @@ export interface GetSessionStatusResponse { public_key?: string; signature?: string; has_delegate: boolean; + // participants contains detailed participant information including party_index + // Used for co_managed_keygen sessions to build correct participant list + participants?: ParticipantStatusInfo[]; } export interface GetSessionByInviteCodeResponse { diff --git a/backend/mpc-system/services/session-coordinator/adapters/input/grpc/session_grpc_handler.go b/backend/mpc-system/services/session-coordinator/adapters/input/grpc/session_grpc_handler.go index 95c9fbd0..0e1df4d4 100644 --- a/backend/mpc-system/services/session-coordinator/adapters/input/grpc/session_grpc_handler.go +++ b/backend/mpc-system/services/session-coordinator/adapters/input/grpc/session_grpc_handler.go @@ -341,6 +341,16 @@ func (s *SessionCoordinatorServer) GetSessionStatus( } } + // Convert participants to proto format + protoParticipants := make([]*pb.ParticipantStatus, len(output.Participants)) + for i, p := range output.Participants { + protoParticipants[i] = &pb.ParticipantStatus{ + PartyId: p.PartyID, + PartyIndex: int32(p.PartyIndex), + Status: p.Status, + } + } + resp := &pb.GetSessionStatusResponse{ Status: output.Status, CompletedParties: int32(completedParties), @@ -349,6 +359,7 @@ func (s *SessionCoordinatorServer) GetSessionStatus( PublicKey: output.PublicKey, Signature: output.Signature, HasDelegate: output.HasDelegate, // Only meaningful for keygen sessions + Participants: protoParticipants, // Include participant details with party_index } // Try to get delegate share from cache