diff --git a/.gitignore b/.gitignore index 672abc9..b5a24f4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ doc/protocol.pdf doc/protocol.synctex.gz out/doc/general_deployment/general_deployment.png out/doc/server_deployment/server_deployment.png +*.json +test +id.enc diff --git a/client/identity.go b/client/identity.go index f96a4dd..839636b 100644 --- a/client/identity.go +++ b/client/identity.go @@ -11,12 +11,14 @@ import ( const key = "3pw0c8#6ZG8{75b5;3?fe80$2" type Identity struct { - Nickname string `json:"nickname,omitempty"` - RootKp meowlib.KeyPair `json:"id_kp,omitempty"` - Status string `json:"status,omitempty"` - Peers PeerList `json:"peers,omitempty"` - KnownServers InternalServerList `json:"known_servers,omitempty"` - MessageServers InternalServerList `json:"message_servers,omitempty"` + Nickname string `json:"nickname,omitempty"` + RootKp meowlib.KeyPair `json:"id_kp,omitempty"` + Status string `json:"status,omitempty"` + Peers PeerList `json:"peers,omitempty"` + KnownServers InternalServerList `json:"known_servers,omitempty"` + MessageServers InternalServerList `json:"message_servers,omitempty"` + DefaultDbPassword string `json:"default_db_password,omitempty"` + DbPasswordStore bool `json:"db_password_store,omitempty"` } func CreateIdentity(nickname string) *Identity { diff --git a/client/peer.go b/client/peer.go index c799c16..0bdf142 100644 --- a/client/peer.go +++ b/client/peer.go @@ -24,6 +24,8 @@ type Peer struct { MessageNotification string `json:"message_notification,omitempty"` OnionMode bool `json:"onion_mode,omitempty"` LastMessage time.Time `json:"last_message,omitempty"` + MessageDb string `json:"message_db,omitempty"` // sql url for messages storage + DbPassword string `json:"db_password,omitempty"` } type PeerList []Peer @@ -52,14 +54,14 @@ func (pl *PeerList) GetFromName(name string) *Peer { } // AsymEncryptMessage prepares a message to send to a specific peer contact -func (p *Peer) AsymEncryptMessage(Message []byte) (LookupPublicKey string, EncryptedMessage []byte, Signature []byte, Servers []*meowlib.Server, err error) { +func (p *Peer) AsymEncryptMessage(Message []byte) (EncryptedMessage []byte, Signature []byte, Servers []*meowlib.Server, err error) { EncryptedMessage, Signature, err = meowlib.EncryptAndSign(p.Contact.EncryptionPublicKey, p.Me.Private, Message) if err != nil { fmt.Println(err.Error()) - return "", nil, nil, nil, err + return nil, nil, nil, err } - return p.LookupKp.Public, EncryptedMessage, Signature, p.Contact.PullServers, err + return EncryptedMessage, Signature, p.Contact.PullServers, err } // AsymDecryptMessage reads a message from a specific peer contact @@ -71,3 +73,34 @@ func (p *Peer) AsymDecryptMessage(Message []byte, Signature []byte) (DecryptedMe } return DecryptedMessage, err } + +// Pack will package the previously encrypted message for sending it to the peer in protobuff format +func (p *Peer) Pack(message []byte, signature []byte) meowlib.PackedUserMessage { + var msg meowlib.PackedUserMessage + msg.Destination = p.Contact.LookupPublicKey + msg.From = p.Me.Public + msg.Payload = message + msg.Signature = signature + return msg +} + +func (p *Peer) GetConversationRequest() meowlib.ToServerMessage_ConversationRequest { + var cr meowlib.ToServerMessage_ConversationRequest + return cr +} + +func (p *Peer) StoreMessage(msg []byte) { + +} + +func (p *Peer) LoadMessage(uid string) { + +} + +func (p *Peer) LoadLastMessages(qty int) { + +} + +func (p *Peer) GetLastMessageUid(msg []byte) { + +} diff --git a/client/server.go b/client/server.go index cb5e247..ed945a0 100644 --- a/client/server.go +++ b/client/server.go @@ -5,6 +5,7 @@ import ( "time" "forge.redroom.link/yves/meowlib" + "google.golang.org/protobuf/proto" ) type InternalServer struct { @@ -53,3 +54,29 @@ func (ints *InternalServer) AsymDecryptMessage(Message []byte, Signature []byte) } return DecryptedMessage, err } + +// Creates a basic message to server from a single packed user message and returns it as protobuf serialized byte array +func (ints *InternalServer) CreateMessageSendingMessage(usermsg *meowlib.PackedUserMessage) ([]byte, error) { + var msg meowlib.ToServerMessage + msg.Type = "1" + msg.From = ints.Me.Public + msg.Messages = append(msg.Messages, usermsg) + out, err := proto.Marshal(&msg) + if err != nil { + return nil, err + } + return out, nil +} + +// Creates a basic message to server from a single packed user message and returns it as protobuf serialized byte array +func (ints *InternalServer) CreateMessageRequestMessage(lookupKeys []string) ([]byte, error) { + var msg meowlib.ToServerMessage + msg.Type = "1" + msg.From = ints.Me.Public + + out, err := proto.Marshal(&msg) + if err != nil { + return nil, err + } + return out, nil +} diff --git a/endtoend_test.go b/endtoend_test.go index 68fd5f1..3946647 100644 --- a/endtoend_test.go +++ b/endtoend_test.go @@ -69,11 +69,11 @@ func TestEndToEnd(t *testing.T) { // create message to simulated friend sentmessage := "Hello friend!" - lookupK, EncMsg, Signature, Servers, err := MyFirstFriend.AsymEncryptMessage([]byte(sentmessage)) + EncMsg, Signature, Servers, err := MyFirstFriend.AsymEncryptMessage([]byte(sentmessage)) if err != nil { fmt.Println(err.Error()) } - fmt.Println(lookupK) + fmt.Println(len(Servers)) // simulated friend decoding the message //ReadMessage @@ -85,11 +85,11 @@ func TestEndToEnd(t *testing.T) { if err2 != nil { fmt.Println(err2.Error()) } - + fmt.Println(decMess) // simulates a new server to send a message to var intS1 client.InternalServer - intS1.ServerData.Name = "IntS1" - intS1.ServerData.Description = "Internal Serveur 1" + intS1.ServerData.Name = "My friend's Server 1" + intS1.ServerData.Description = "My friend's Server 1" intS1.Me = meowlib.NewKeyPair() intS1.ServerData.Url = "http://myfriend.org/meow/" KP := meowlib.NewKeyPair() diff --git a/messages.pb.go b/messages.pb.go index 568d3bf..8f53c1c 100644 --- a/messages.pb.go +++ b/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 +// protoc-gen-go v1.26.0 +// protoc v3.6.1 // source: messages.proto package meowlib @@ -20,15 +20,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// structure for sending a message intended for server use in protobuf format +// structure definnig a message as received by a server in protobuf format type PackedServerMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // The client public key for that server to get an answer + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // The ToServerMessage encrypted with the server public key + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // The message signature with the client public key } func (x *PackedServerMessage) Reset() { @@ -84,97 +84,24 @@ func (x *PackedServerMessage) GetSignature() []byte { return nil } -// structure for sending a message to be forwarded to another user in protobuf format -type PackedUserMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - From string `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"` - Destination string `protobuf:"bytes,2,opt,name=Destination,proto3" json:"Destination,omitempty"` - Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=Signature,proto3" json:"Signature,omitempty"` -} - -func (x *PackedUserMessage) Reset() { - *x = PackedUserMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PackedUserMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PackedUserMessage) ProtoMessage() {} - -func (x *PackedUserMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PackedUserMessage.ProtoReflect.Descriptor instead. -func (*PackedUserMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{1} -} - -func (x *PackedUserMessage) GetFrom() string { - if x != nil { - return x.From - } - return "" -} - -func (x *PackedUserMessage) GetDestination() string { - if x != nil { - return x.Destination - } - return "" -} - -func (x *PackedUserMessage) GetPayload() []byte { - if x != nil { - return x.Payload - } - return nil -} - -func (x *PackedUserMessage) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -// structure defining a message encrypted, then sent in a "packedmessage" payload +// structure defining a message for a server, that will be encrypted, then sent in a "packedmessage" payload type ToServerMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` // Type - ServerPublicKey string `protobuf:"bytes,2,opt,name=ServerPublicKey,proto3" json:"ServerPublicKey,omitempty"` // My pub key for the server to send me an encrypter answer - Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` // optional payload for server - PullRequest []*ToServerMessage_ConversationRequest `protobuf:"bytes,7,rep,name=PullRequest,proto3" json:"PullRequest,omitempty"` - Messages []*ToServerMessage_PostedMessage `protobuf:"bytes,9,rep,name=Messages,proto3" json:"Messages,omitempty"` - NextServerKey string `protobuf:"bytes,10,opt,name=NextServerKey,proto3" json:"NextServerKey,omitempty"` - Url string `protobuf:"bytes,11,opt,name=Url,proto3" json:"Url,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Type + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // My pub key for the server to send me an encrypter answer + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // optional payload for server + PullRequest []*ToServerMessage_ConversationRequest `protobuf:"bytes,4,rep,name=pullRequest,proto3" json:"pullRequest,omitempty"` + Messages []*PackedUserMessage `protobuf:"bytes,5,rep,name=messages,proto3" json:"messages,omitempty"` + KnownServers []*Server `protobuf:"bytes,6,rep,name=knownServers,proto3" json:"knownServers,omitempty"` } func (x *ToServerMessage) Reset() { *x = ToServerMessage{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[2] + mi := &file_messages_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -187,7 +114,7 @@ func (x *ToServerMessage) String() string { func (*ToServerMessage) ProtoMessage() {} func (x *ToServerMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[2] + mi := &file_messages_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -200,7 +127,7 @@ func (x *ToServerMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ToServerMessage.ProtoReflect.Descriptor instead. func (*ToServerMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{2} + return file_messages_proto_rawDescGZIP(), []int{1} } func (x *ToServerMessage) GetType() string { @@ -210,9 +137,9 @@ func (x *ToServerMessage) GetType() string { return "" } -func (x *ToServerMessage) GetServerPublicKey() string { +func (x *ToServerMessage) GetFrom() string { if x != nil { - return x.ServerPublicKey + return x.From } return "" } @@ -231,48 +158,39 @@ func (x *ToServerMessage) GetPullRequest() []*ToServerMessage_ConversationReques return nil } -func (x *ToServerMessage) GetMessages() []*ToServerMessage_PostedMessage { +func (x *ToServerMessage) GetMessages() []*PackedUserMessage { if x != nil { return x.Messages } return nil } -func (x *ToServerMessage) GetNextServerKey() string { +func (x *ToServerMessage) GetKnownServers() []*Server { if x != nil { - return x.NextServerKey + return x.KnownServers } - return "" + return nil } -func (x *ToServerMessage) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// structure defining a from serve receiver message decrypted from a "packedmessage" payload +// structure defining a from server receiver message decrypted from a "packedmessage" payload type FromServerMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` // Type - ServerPubKey string `protobuf:"bytes,2,opt,name=ServerPubKey,proto3" json:"ServerPubKey,omitempty"` // My pub key for the server to send me an encrypter answer - Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` // - ServerReceived uint64 `protobuf:"varint,4,opt,name=ServerReceived,proto3" json:"ServerReceived,omitempty"` - ServerUuid string `protobuf:"bytes,5,opt,name=ServerUuid,proto3" json:"ServerUuid,omitempty"` - PullResponse map[string]*FromServerMessage_ConversationResponse `protobuf:"bytes,8,rep,name=PullResponse,proto3" json:"PullResponse,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Messages []*FromServerMessage_PostedMessage `protobuf:"bytes,9,rep,name=Messages,proto3" json:"Messages,omitempty"` - NextServerKey string `protobuf:"bytes,10,opt,name=NextServerKey,proto3" json:"NextServerKey,omitempty"` - Url string `protobuf:"bytes,11,opt,name=Url,proto3" json:"Url,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Type + ServerPubKey string `protobuf:"bytes,2,opt,name=serverPubKey,proto3" json:"serverPubKey,omitempty"` // My pub key for the server to send me an encrypter answer + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // + ServerReceived uint64 `protobuf:"varint,4,opt,name=serverReceived,proto3" json:"serverReceived,omitempty"` + ServerUuid string `protobuf:"bytes,5,opt,name=serverUuid,proto3" json:"serverUuid,omitempty"` + PullResponse map[string]*FromServerMessage_ConversationResponse `protobuf:"bytes,6,rep,name=pullResponse,proto3" json:"pullResponse,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Chat []*FromServerMessage_PostedMessage `protobuf:"bytes,7,rep,name=chat,proto3" json:"chat,omitempty"` } func (x *FromServerMessage) Reset() { *x = FromServerMessage{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[3] + mi := &file_messages_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -285,7 +203,7 @@ func (x *FromServerMessage) String() string { func (*FromServerMessage) ProtoMessage() {} func (x *FromServerMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[3] + mi := &file_messages_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -298,7 +216,7 @@ func (x *FromServerMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use FromServerMessage.ProtoReflect.Descriptor instead. func (*FromServerMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{3} + return file_messages_proto_rawDescGZIP(), []int{2} } func (x *FromServerMessage) GetType() string { @@ -343,43 +261,30 @@ func (x *FromServerMessage) GetPullResponse() map[string]*FromServerMessage_Conv return nil } -func (x *FromServerMessage) GetMessages() []*FromServerMessage_PostedMessage { +func (x *FromServerMessage) GetChat() []*FromServerMessage_PostedMessage { if x != nil { - return x.Messages + return x.Chat } return nil } -func (x *FromServerMessage) GetNextServerKey() string { - if x != nil { - return x.NextServerKey - } - return "" -} - -func (x *FromServerMessage) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - +// structure describing required server attributes type Server struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` - PublicKey string `protobuf:"bytes,3,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - Url string `protobuf:"bytes,4,opt,name=Url,proto3" json:"Url,omitempty"` - ConfidenceLevel int32 `protobuf:"varint,5,opt,name=ConfidenceLevel,proto3" json:"ConfidenceLevel,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + PublicKey string `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` + ConfidenceLevel int32 `protobuf:"varint,5,opt,name=confidenceLevel,proto3" json:"confidenceLevel,omitempty"` } func (x *Server) Reset() { *x = Server{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[4] + mi := &file_messages_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -392,7 +297,7 @@ func (x *Server) String() string { func (*Server) ProtoMessage() {} func (x *Server) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[4] + mi := &file_messages_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -405,7 +310,7 @@ func (x *Server) ProtoReflect() protoreflect.Message { // Deprecated: Use Server.ProtoReflect.Descriptor instead. func (*Server) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{4} + return file_messages_proto_rawDescGZIP(), []int{3} } func (x *Server) GetName() string { @@ -443,22 +348,24 @@ func (x *Server) GetConfidenceLevel() int32 { return 0 } +// structure describing a user contact card ie the minimum set of attributes for exchanging identities type ContactCard struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - ContactPublicKey string `protobuf:"bytes,2,opt,name=ContactPublicKey,proto3" json:"ContactPublicKey,omitempty"` - EncryptionPublicKey string `protobuf:"bytes,3,opt,name=EncryptionPublicKey,proto3" json:"EncryptionPublicKey,omitempty"` - LookupPublicKey string `protobuf:"bytes,4,opt,name=LookupPublicKey,proto3" json:"LookupPublicKey,omitempty"` - PullServers []*Server `protobuf:"bytes,5,rep,name=PullServers,proto3" json:"PullServers,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ContactPublicKey string `protobuf:"bytes,2,opt,name=contactPublicKey,proto3" json:"contactPublicKey,omitempty"` + EncryptionPublicKey string `protobuf:"bytes,3,opt,name=encryptionPublicKey,proto3" json:"encryptionPublicKey,omitempty"` + LookupPublicKey string `protobuf:"bytes,4,opt,name=lookupPublicKey,proto3" json:"lookupPublicKey,omitempty"` + PullServers []*Server `protobuf:"bytes,5,rep,name=pullServers,proto3" json:"pullServers,omitempty"` + Version int32 `protobuf:"varint,6,opt,name=version,proto3" json:"version,omitempty"` } func (x *ContactCard) Reset() { *x = ContactCard{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[5] + mi := &file_messages_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -471,7 +378,7 @@ func (x *ContactCard) String() string { func (*ContactCard) ProtoMessage() {} func (x *ContactCard) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[5] + mi := &file_messages_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -484,7 +391,7 @@ func (x *ContactCard) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactCard.ProtoReflect.Descriptor instead. func (*ContactCard) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{5} + return file_messages_proto_rawDescGZIP(), []int{4} } func (x *ContactCard) GetName() string { @@ -522,33 +429,42 @@ func (x *ContactCard) GetPullServers() []*Server { return nil } -type MinimalContact struct { +func (x *ContactCard) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +// structure for sending a message to be forwarded to another user in protobuf format +type PackedUserMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - TrustedServers []*Server `protobuf:"bytes,3,rep,name=TrustedServers,proto3" json:"TrustedServers,omitempty"` + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // the client identity public key as known by the destination peer + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` // the peer's current conversation lookup public key + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // the message UserMessage encrypted with the destination peer's public key + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` // the payload signature with the client identity private key } -func (x *MinimalContact) Reset() { - *x = MinimalContact{} +func (x *PackedUserMessage) Reset() { + *x = PackedUserMessage{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[6] + mi := &file_messages_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MinimalContact) String() string { +func (x *PackedUserMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MinimalContact) ProtoMessage() {} +func (*PackedUserMessage) ProtoMessage() {} -func (x *MinimalContact) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[6] +func (x *PackedUserMessage) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -559,50 +475,59 @@ func (x *MinimalContact) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MinimalContact.ProtoReflect.Descriptor instead. -func (*MinimalContact) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{6} +// Deprecated: Use PackedUserMessage.ProtoReflect.Descriptor instead. +func (*PackedUserMessage) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{5} } -func (x *MinimalContact) GetName() string { +func (x *PackedUserMessage) GetFrom() string { if x != nil { - return x.Name + return x.From } return "" } -func (x *MinimalContact) GetPublicKey() string { +func (x *PackedUserMessage) GetDestination() string { if x != nil { - return x.PublicKey + return x.Destination } return "" } -func (x *MinimalContact) GetTrustedServers() []*Server { +func (x *PackedUserMessage) GetPayload() []byte { if x != nil { - return x.TrustedServers + return x.Payload } return nil } +func (x *PackedUserMessage) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +// structure defining information that might be exchanged between two peers. type UserMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Destination string `protobuf:"bytes,1,opt,name=Destination,proto3" json:"Destination,omitempty"` - From string `protobuf:"bytes,2,opt,name=From,proto3" json:"From,omitempty"` - Type string `protobuf:"bytes,3,opt,name=Type,proto3" json:"Type,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"` - Status *UserMessage_ConversationStatus `protobuf:"bytes,5,opt,name=Status,proto3" json:"Status,omitempty"` - Contact *MinimalContact `protobuf:"bytes,6,opt,name=Contact,proto3" json:"Contact,omitempty"` - DestinationGroup *UserMessage_Group `protobuf:"bytes,7,opt,name=DestinationGroup,proto3" json:"DestinationGroup,omitempty"` + Destination string `protobuf:"bytes,1,opt,name=Destination,proto3" json:"Destination,omitempty"` + From string `protobuf:"bytes,2,opt,name=From,proto3" json:"From,omitempty"` + Type string `protobuf:"bytes,3,opt,name=Type,proto3" json:"Type,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"` + Status *UserMessage_ConversationStatus `protobuf:"bytes,5,opt,name=Status,proto3" json:"Status,omitempty"` + Contact *ContactCard `protobuf:"bytes,6,opt,name=contact,proto3" json:"contact,omitempty"` + KnownServers *Server `protobuf:"bytes,7,opt,name=knownServers,proto3" json:"knownServers,omitempty"` + Group *UserMessage_Group `protobuf:"bytes,8,opt,name=group,proto3" json:"group,omitempty"` } func (x *UserMessage) Reset() { *x = UserMessage{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[7] + mi := &file_messages_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -615,7 +540,7 @@ func (x *UserMessage) String() string { func (*UserMessage) ProtoMessage() {} func (x *UserMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[7] + mi := &file_messages_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -628,7 +553,7 @@ func (x *UserMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use UserMessage.ProtoReflect.Descriptor instead. func (*UserMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{7} + return file_messages_proto_rawDescGZIP(), []int{6} } func (x *UserMessage) GetDestination() string { @@ -666,35 +591,43 @@ func (x *UserMessage) GetStatus() *UserMessage_ConversationStatus { return nil } -func (x *UserMessage) GetContact() *MinimalContact { +func (x *UserMessage) GetContact() *ContactCard { if x != nil { return x.Contact } return nil } -func (x *UserMessage) GetDestinationGroup() *UserMessage_Group { +func (x *UserMessage) GetKnownServers() *Server { if x != nil { - return x.DestinationGroup + return x.KnownServers } return nil } +func (x *UserMessage) GetGroup() *UserMessage_Group { + if x != nil { + return x.Group + } + return nil +} + +// structure for requesting incoming messages type ToServerMessage_ConversationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LookupKey string `protobuf:"bytes,1,opt,name=LookupKey,proto3" json:"LookupKey,omitempty"` // lookup key for a conversation - LastServerUuidOK string `protobuf:"bytes,2,opt,name=LastServerUuidOK,proto3" json:"LastServerUuidOK,omitempty"` // Last Server message UUID received (send me all after that one) - PublishOnline bool `protobuf:"varint,3,opt,name=PublishOnline,proto3" json:"PublishOnline,omitempty"` // ?? Publish my online status for that contact ? - LookupSignature string `protobuf:"bytes,4,opt,name=LookupSignature,proto3" json:"LookupSignature,omitempty"` // prove that I own the private key by signing that block + LookupKey string `protobuf:"bytes,1,opt,name=lookupKey,proto3" json:"lookupKey,omitempty"` // lookup key for a conversation + LastServerUuidOK string `protobuf:"bytes,2,opt,name=lastServerUuidOK,proto3" json:"lastServerUuidOK,omitempty"` // Last Server message UUID received (send me all after that one) + PublishOnline bool `protobuf:"varint,3,opt,name=publishOnline,proto3" json:"publishOnline,omitempty"` // ?? Publish my online status for that contact ? + LookupSignature string `protobuf:"bytes,4,opt,name=lookupSignature,proto3" json:"lookupSignature,omitempty"` // prove that I own the private key by signing that block } func (x *ToServerMessage_ConversationRequest) Reset() { *x = ToServerMessage_ConversationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[8] + mi := &file_messages_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -707,7 +640,7 @@ func (x *ToServerMessage_ConversationRequest) String() string { func (*ToServerMessage_ConversationRequest) ProtoMessage() {} func (x *ToServerMessage_ConversationRequest) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[8] + mi := &file_messages_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -720,7 +653,7 @@ func (x *ToServerMessage_ConversationRequest) ProtoReflect() protoreflect.Messag // Deprecated: Use ToServerMessage_ConversationRequest.ProtoReflect.Descriptor instead. func (*ToServerMessage_ConversationRequest) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{2, 0} + return file_messages_proto_rawDescGZIP(), []int{1, 0} } func (x *ToServerMessage_ConversationRequest) GetLookupKey() string { @@ -751,73 +684,18 @@ func (x *ToServerMessage_ConversationRequest) GetLookupSignature() string { return "" } -type ToServerMessage_PostedMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LookupKey string `protobuf:"bytes,1,opt,name=LookupKey,proto3" json:"LookupKey,omitempty"` - Messages []*PackedUserMessage `protobuf:"bytes,2,rep,name=Messages,proto3" json:"Messages,omitempty"` -} - -func (x *ToServerMessage_PostedMessage) Reset() { - *x = ToServerMessage_PostedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ToServerMessage_PostedMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ToServerMessage_PostedMessage) ProtoMessage() {} - -func (x *ToServerMessage_PostedMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ToServerMessage_PostedMessage.ProtoReflect.Descriptor instead. -func (*ToServerMessage_PostedMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{2, 1} -} - -func (x *ToServerMessage_PostedMessage) GetLookupKey() string { - if x != nil { - return x.LookupKey - } - return "" -} - -func (x *ToServerMessage_PostedMessage) GetMessages() []*PackedUserMessage { - if x != nil { - return x.Messages - } - return nil -} - type FromServerMessage_ConversationResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MessageUuids []string `protobuf:"bytes,1,rep,name=MessageUuids,proto3" json:"MessageUuids,omitempty"` + MessageUuids []string `protobuf:"bytes,1,rep,name=messageUuids,proto3" json:"messageUuids,omitempty"` } func (x *FromServerMessage_ConversationResponse) Reset() { *x = FromServerMessage_ConversationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[10] + mi := &file_messages_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -830,7 +708,7 @@ func (x *FromServerMessage_ConversationResponse) String() string { func (*FromServerMessage_ConversationResponse) ProtoMessage() {} func (x *FromServerMessage_ConversationResponse) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[10] + mi := &file_messages_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -843,7 +721,7 @@ func (x *FromServerMessage_ConversationResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use FromServerMessage_ConversationResponse.ProtoReflect.Descriptor instead. func (*FromServerMessage_ConversationResponse) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{3, 0} + return file_messages_proto_rawDescGZIP(), []int{2, 0} } func (x *FromServerMessage_ConversationResponse) GetMessageUuids() []string { @@ -858,14 +736,14 @@ type FromServerMessage_PostedMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LookupKey string `protobuf:"bytes,1,opt,name=LookupKey,proto3" json:"LookupKey,omitempty"` - Messages []*PackedUserMessage `protobuf:"bytes,2,rep,name=Messages,proto3" json:"Messages,omitempty"` + LookupKey string `protobuf:"bytes,1,opt,name=lookupKey,proto3" json:"lookupKey,omitempty"` + Messages []*PackedUserMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` } func (x *FromServerMessage_PostedMessage) Reset() { *x = FromServerMessage_PostedMessage{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[12] + mi := &file_messages_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -878,7 +756,7 @@ func (x *FromServerMessage_PostedMessage) String() string { func (*FromServerMessage_PostedMessage) ProtoMessage() {} func (x *FromServerMessage_PostedMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[12] + mi := &file_messages_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -891,7 +769,7 @@ func (x *FromServerMessage_PostedMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use FromServerMessage_PostedMessage.ProtoReflect.Descriptor instead. func (*FromServerMessage_PostedMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{3, 2} + return file_messages_proto_rawDescGZIP(), []int{2, 2} } func (x *FromServerMessage_PostedMessage) GetLookupKey() string { @@ -913,23 +791,19 @@ type UserMessage_ConversationStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LocalUuid string `protobuf:"bytes,1,opt,name=LocalUuid,proto3" json:"LocalUuid,omitempty"` - LocalSequence uint64 `protobuf:"varint,2,opt,name=LocalSequence,proto3" json:"LocalSequence,omitempty"` - Sent uint64 `protobuf:"varint,3,opt,name=Sent,proto3" json:"Sent,omitempty"` - Received uint64 `protobuf:"varint,4,opt,name=Received,proto3" json:"Received,omitempty"` - Processed uint64 `protobuf:"varint,5,opt,name=Processed,proto3" json:"Processed,omitempty"` - NextContactKey string `protobuf:"bytes,6,opt,name=NextContactKey,proto3" json:"NextContactKey,omitempty"` // contact key - NextCcontactKeyAck bool `protobuf:"varint,7,opt,name=NextCcontactKeyAck,proto3" json:"NextCcontactKeyAck,omitempty"` // false when proposing a new id, true for accepting it - NextEncryptionKey string `protobuf:"bytes,8,opt,name=NextEncryptionKey,proto3" json:"NextEncryptionKey,omitempty"` // encryption key - NextKeyEncryptionKeyAck bool `protobuf:"varint,9,opt,name=NextKeyEncryptionKeyAck,proto3" json:"NextKeyEncryptionKeyAck,omitempty"` // false when proposing a new key, true for accpeting it - NextLookupKey string `protobuf:"bytes,10,opt,name=NextLookupKey,proto3" json:"NextLookupKey,omitempty"` // lookup key - NextLookupKeyAck bool `protobuf:"varint,11,opt,name=NextLookupKeyAck,proto3" json:"NextLookupKeyAck,omitempty"` // false when proposing a new id, true for accepting it + LocalUuid string `protobuf:"bytes,1,opt,name=LocalUuid,proto3" json:"LocalUuid,omitempty"` + LocalSequence uint64 `protobuf:"varint,2,opt,name=LocalSequence,proto3" json:"LocalSequence,omitempty"` + Sent uint64 `protobuf:"varint,3,opt,name=Sent,proto3" json:"Sent,omitempty"` + Received uint64 `protobuf:"varint,4,opt,name=Received,proto3" json:"Received,omitempty"` + Processed uint64 `protobuf:"varint,5,opt,name=Processed,proto3" json:"Processed,omitempty"` + MyNextIdentity *ContactCard `protobuf:"bytes,6,opt,name=myNextIdentity,proto3" json:"myNextIdentity,omitempty"` + PeerNextIdentityAck int32 `protobuf:"varint,7,opt,name=peerNextIdentityAck,proto3" json:"peerNextIdentityAck,omitempty"` // version of the new peed accepted id } func (x *UserMessage_ConversationStatus) Reset() { *x = UserMessage_ConversationStatus{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[13] + mi := &file_messages_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -942,7 +816,7 @@ func (x *UserMessage_ConversationStatus) String() string { func (*UserMessage_ConversationStatus) ProtoMessage() {} func (x *UserMessage_ConversationStatus) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[13] + mi := &file_messages_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -955,7 +829,7 @@ func (x *UserMessage_ConversationStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use UserMessage_ConversationStatus.ProtoReflect.Descriptor instead. func (*UserMessage_ConversationStatus) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{7, 0} + return file_messages_proto_rawDescGZIP(), []int{6, 0} } func (x *UserMessage_ConversationStatus) GetLocalUuid() string { @@ -993,46 +867,18 @@ func (x *UserMessage_ConversationStatus) GetProcessed() uint64 { return 0 } -func (x *UserMessage_ConversationStatus) GetNextContactKey() string { +func (x *UserMessage_ConversationStatus) GetMyNextIdentity() *ContactCard { if x != nil { - return x.NextContactKey + return x.MyNextIdentity } - return "" + return nil } -func (x *UserMessage_ConversationStatus) GetNextCcontactKeyAck() bool { +func (x *UserMessage_ConversationStatus) GetPeerNextIdentityAck() int32 { if x != nil { - return x.NextCcontactKeyAck + return x.PeerNextIdentityAck } - return false -} - -func (x *UserMessage_ConversationStatus) GetNextEncryptionKey() string { - if x != nil { - return x.NextEncryptionKey - } - return "" -} - -func (x *UserMessage_ConversationStatus) GetNextKeyEncryptionKeyAck() bool { - if x != nil { - return x.NextKeyEncryptionKeyAck - } - return false -} - -func (x *UserMessage_ConversationStatus) GetNextLookupKey() string { - if x != nil { - return x.NextLookupKey - } - return "" -} - -func (x *UserMessage_ConversationStatus) GetNextLookupKeyAck() bool { - if x != nil { - return x.NextLookupKeyAck - } - return false + return 0 } type UserMessage_Group struct { @@ -1040,14 +886,14 @@ type UserMessage_Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Members []*MinimalContact `protobuf:"bytes,2,rep,name=Members,proto3" json:"Members,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Members []*ContactCard `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` } func (x *UserMessage_Group) Reset() { *x = UserMessage_Group{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[14] + mi := &file_messages_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1060,7 +906,7 @@ func (x *UserMessage_Group) String() string { func (*UserMessage_Group) ProtoMessage() {} func (x *UserMessage_Group) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[14] + mi := &file_messages_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1073,7 +919,7 @@ func (x *UserMessage_Group) ProtoReflect() protoreflect.Message { // Deprecated: Use UserMessage_Group.ProtoReflect.Descriptor instead. func (*UserMessage_Group) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{7, 1} + return file_messages_proto_rawDescGZIP(), []int{6, 1} } func (x *UserMessage_Group) GetName() string { @@ -1083,7 +929,7 @@ func (x *UserMessage_Group) GetName() string { return "" } -func (x *UserMessage_Group) GetMembers() []*MinimalContact { +func (x *UserMessage_Group) GetMembers() []*ContactCard { if x != nil { return x.Members } @@ -1100,80 +946,59 @@ var file_messages_proto_rawDesc = []byte{ 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x81, 0x01, 0x0a, - 0x11, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x22, 0xce, 0x04, 0x0a, 0x0f, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4e, 0x0a, 0x0b, - 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x54, 0x6f, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0b, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x08, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x1a, 0xaf, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x2a, - 0x0a, 0x10, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, - 0x4f, 0x4b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x4f, 0x4b, 0x12, 0x24, 0x0a, 0x0d, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x65, 0x0a, 0x0d, 0x50, 0x6f, - 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x08, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, - 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x22, 0x92, 0x05, 0x0a, 0x11, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x53, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc2, 0x03, 0x0a, + 0x0f, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x4e, 0x0a, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, + 0x62, 0x2e, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x1a, + 0xaf, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x4f, 0x4b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x4f, + 0x4b, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x22, 0xd2, 0x04, 0x0a, 0x11, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x53, 0x65, 0x72, + 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, - 0x64, 0x12, 0x50, 0x0a, 0x0c, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, + 0x04, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x75, 0x69, + 0x64, 0x12, 0x50, 0x0a, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, - 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x65, 0x78, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, - 0x6c, 0x1a, 0x3a, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x46, 0x72, 0x6f, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6f, + 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x63, 0x68, 0x61, + 0x74, 0x1a, 0x3a, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x1a, 0x70, 0x0a, + 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x1a, 0x70, 0x0a, 0x11, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, @@ -1182,97 +1007,91 @@ var file_messages_proto_rawDesc = []byte{ 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x65, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x36, - 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x36, + 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x4d, 0x65, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x22, 0xdc, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x43, 0x61, 0x72, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x22, 0xf6, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x43, 0x61, 0x72, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4c, 0x6f, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, - 0x0b, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x52, 0x0b, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x22, 0x7b, 0x0a, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x0e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, - 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0e, 0x54, - 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, 0xb2, 0x06, - 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x46, - 0x72, 0x6f, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x06, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x65, - 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x07, - 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, - 0x46, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6f, 0x77, - 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0xb8, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x55, 0x75, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, - 0x12, 0x26, 0x0a, 0x0e, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x4b, - 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x61, 0x63, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x4e, 0x65, 0x78, 0x74, - 0x43, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x6b, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x63, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x11, 0x4e, 0x65, 0x78, 0x74, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x17, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, - 0x79, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, - 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x6b, - 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, - 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x4e, 0x65, 0x78, 0x74, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x4e, 0x65, 0x78, 0x74, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x10, 0x4e, 0x65, 0x78, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x41, - 0x63, 0x6b, 0x1a, 0x4e, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x31, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, - 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x42, 0x21, 0x5a, 0x1f, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x64, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, 0x79, 0x76, 0x65, 0x73, 0x2f, 0x6d, 0x65, - 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x65, 0x72, 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xa9, + 0x05, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, + 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x43, 0x61, 0x72, 0x64, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x33, 0x0a, + 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x96, 0x02, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4c, + 0x6f, 0x63, 0x61, 0x6c, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x55, 0x75, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x53, + 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x3c, 0x0a, + 0x0e, 0x6d, 0x79, 0x4e, 0x65, 0x78, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x0e, 0x6d, 0x79, 0x4e, + 0x65, 0x78, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x70, + 0x65, 0x65, 0x72, 0x4e, 0x65, 0x78, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, + 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x65, + 0x78, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x63, 0x6b, 0x1a, 0x4b, 0x0a, + 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, + 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x43, 0x61, 0x72, + 0x64, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x42, 0x21, 0x5a, 0x1f, 0x66, 0x6f, + 0x72, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x64, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, + 0x2f, 0x79, 0x76, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x6f, 0x77, 0x6c, 0x69, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1287,43 +1106,42 @@ func file_messages_proto_rawDescGZIP() []byte { return file_messages_proto_rawDescData } -var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_messages_proto_goTypes = []interface{}{ (*PackedServerMessage)(nil), // 0: meowlib.PackedServerMessage - (*PackedUserMessage)(nil), // 1: meowlib.PackedUserMessage - (*ToServerMessage)(nil), // 2: meowlib.ToServerMessage - (*FromServerMessage)(nil), // 3: meowlib.FromServerMessage - (*Server)(nil), // 4: meowlib.Server - (*ContactCard)(nil), // 5: meowlib.ContactCard - (*MinimalContact)(nil), // 6: meowlib.MinimalContact - (*UserMessage)(nil), // 7: meowlib.UserMessage - (*ToServerMessage_ConversationRequest)(nil), // 8: meowlib.ToServerMessage.ConversationRequest - (*ToServerMessage_PostedMessage)(nil), // 9: meowlib.ToServerMessage.PostedMessage - (*FromServerMessage_ConversationResponse)(nil), // 10: meowlib.FromServerMessage.ConversationResponse - nil, // 11: meowlib.FromServerMessage.PullResponseEntry - (*FromServerMessage_PostedMessage)(nil), // 12: meowlib.FromServerMessage.PostedMessage - (*UserMessage_ConversationStatus)(nil), // 13: meowlib.UserMessage.ConversationStatus - (*UserMessage_Group)(nil), // 14: meowlib.UserMessage.Group + (*ToServerMessage)(nil), // 1: meowlib.ToServerMessage + (*FromServerMessage)(nil), // 2: meowlib.FromServerMessage + (*Server)(nil), // 3: meowlib.Server + (*ContactCard)(nil), // 4: meowlib.ContactCard + (*PackedUserMessage)(nil), // 5: meowlib.PackedUserMessage + (*UserMessage)(nil), // 6: meowlib.UserMessage + (*ToServerMessage_ConversationRequest)(nil), // 7: meowlib.ToServerMessage.ConversationRequest + (*FromServerMessage_ConversationResponse)(nil), // 8: meowlib.FromServerMessage.ConversationResponse + nil, // 9: meowlib.FromServerMessage.PullResponseEntry + (*FromServerMessage_PostedMessage)(nil), // 10: meowlib.FromServerMessage.PostedMessage + (*UserMessage_ConversationStatus)(nil), // 11: meowlib.UserMessage.ConversationStatus + (*UserMessage_Group)(nil), // 12: meowlib.UserMessage.Group } var file_messages_proto_depIdxs = []int32{ - 8, // 0: meowlib.ToServerMessage.PullRequest:type_name -> meowlib.ToServerMessage.ConversationRequest - 9, // 1: meowlib.ToServerMessage.Messages:type_name -> meowlib.ToServerMessage.PostedMessage - 11, // 2: meowlib.FromServerMessage.PullResponse:type_name -> meowlib.FromServerMessage.PullResponseEntry - 12, // 3: meowlib.FromServerMessage.Messages:type_name -> meowlib.FromServerMessage.PostedMessage - 4, // 4: meowlib.ContactCard.PullServers:type_name -> meowlib.Server - 4, // 5: meowlib.MinimalContact.TrustedServers:type_name -> meowlib.Server - 13, // 6: meowlib.UserMessage.Status:type_name -> meowlib.UserMessage.ConversationStatus - 6, // 7: meowlib.UserMessage.Contact:type_name -> meowlib.MinimalContact - 14, // 8: meowlib.UserMessage.DestinationGroup:type_name -> meowlib.UserMessage.Group - 1, // 9: meowlib.ToServerMessage.PostedMessage.Messages:type_name -> meowlib.PackedUserMessage - 10, // 10: meowlib.FromServerMessage.PullResponseEntry.value:type_name -> meowlib.FromServerMessage.ConversationResponse - 1, // 11: meowlib.FromServerMessage.PostedMessage.Messages:type_name -> meowlib.PackedUserMessage - 6, // 12: meowlib.UserMessage.Group.Members:type_name -> meowlib.MinimalContact - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 7, // 0: meowlib.ToServerMessage.pullRequest:type_name -> meowlib.ToServerMessage.ConversationRequest + 5, // 1: meowlib.ToServerMessage.messages:type_name -> meowlib.PackedUserMessage + 3, // 2: meowlib.ToServerMessage.knownServers:type_name -> meowlib.Server + 9, // 3: meowlib.FromServerMessage.pullResponse:type_name -> meowlib.FromServerMessage.PullResponseEntry + 10, // 4: meowlib.FromServerMessage.chat:type_name -> meowlib.FromServerMessage.PostedMessage + 3, // 5: meowlib.ContactCard.pullServers:type_name -> meowlib.Server + 11, // 6: meowlib.UserMessage.Status:type_name -> meowlib.UserMessage.ConversationStatus + 4, // 7: meowlib.UserMessage.contact:type_name -> meowlib.ContactCard + 3, // 8: meowlib.UserMessage.knownServers:type_name -> meowlib.Server + 12, // 9: meowlib.UserMessage.group:type_name -> meowlib.UserMessage.Group + 8, // 10: meowlib.FromServerMessage.PullResponseEntry.value:type_name -> meowlib.FromServerMessage.ConversationResponse + 5, // 11: meowlib.FromServerMessage.PostedMessage.messages:type_name -> meowlib.PackedUserMessage + 4, // 12: meowlib.UserMessage.ConversationStatus.myNextIdentity:type_name -> meowlib.ContactCard + 4, // 13: meowlib.UserMessage.Group.members:type_name -> meowlib.ContactCard + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_messages_proto_init() } @@ -1345,18 +1163,6 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PackedUserMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ToServerMessage); i { case 0: return &v.state @@ -1368,7 +1174,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FromServerMessage); i { case 0: return &v.state @@ -1380,7 +1186,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Server); i { case 0: return &v.state @@ -1392,7 +1198,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContactCard); i { case 0: return &v.state @@ -1404,8 +1210,8 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MinimalContact); i { + file_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackedUserMessage); i { case 0: return &v.state case 1: @@ -1416,7 +1222,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserMessage); i { case 0: return &v.state @@ -1428,7 +1234,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ToServerMessage_ConversationRequest); i { case 0: return &v.state @@ -1440,19 +1246,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ToServerMessage_PostedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FromServerMessage_ConversationResponse); i { case 0: return &v.state @@ -1464,7 +1258,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FromServerMessage_PostedMessage); i { case 0: return &v.state @@ -1476,7 +1270,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserMessage_ConversationStatus); i { case 0: return &v.state @@ -1488,7 +1282,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserMessage_Group); i { case 0: return &v.state @@ -1507,7 +1301,7 @@ func file_messages_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_messages_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/messages.proto b/pb/messages.proto index 0fce660..dc002a7 100644 --- a/pb/messages.proto +++ b/pb/messages.proto @@ -2,93 +2,86 @@ syntax = "proto3"; package meowlib; option go_package = "forge.redroom.link/yves/meowlib"; -// structure for sending a message intended for server use in protobuf format +// structure definnig a message as received by a server in protobuf format message PackedServerMessage { - string From = 1; - bytes Payload = 2; - bytes Signature = 3; + string from = 1; // The client public key for that server to get an answer + bytes payload = 2; // The ToServerMessage encrypted with the server public key + bytes signature = 3; // The message signature with the client public key } -// structure for sending a message to be forwarded to another user in protobuf format -message PackedUserMessage { - string From = 1; - string Destination=2; - bytes Payload=3; - bytes Signature=4; -} - -// structure defining a message encrypted, then sent in a "packedmessage" payload +// structure defining a message for a server, that will be encrypted, then sent in a "packedmessage" payload message ToServerMessage { - string Type = 1; // Type - string ServerPubKey = 2 ; // My pub key for the server to send me an encrypter answer - bytes Payload = 3 ; // optional payload for server + string type = 1; // Type + string from = 2 ; // My pub key for the server to send me an encrypter answer + bytes payload = 3 ; // optional payload for server - message ConversationRequest { // Structure for requestion incoming messages + // structure for requesting incoming messages + message ConversationRequest { string lookupKey = 1; // lookup key for a conversation - string LastServerUuidOK = 2; // Last Server message UUID received (send me all after that one) - bool PublishOnline = 3; // ?? Publish my online status for that contact ? + string lastServerUuidOK = 2; // Last Server message UUID received (send me all after that one) + bool publishOnline = 3; // ?? Publish my online status for that contact ? string lookupSignature = 4; // prove that I own the private key by signing that block } - repeated ConversationRequest PullRequest = 7; + repeated ConversationRequest pullRequest = 4; + + repeated PackedUserMessage messages = 5; + + repeated Server knownServers = 6; - message PostedMessage{ - string lookupKey= 1; - repeated PackedUserMessage Messages = 2; - } - repeated PostedMessage Messages = 9; - string NextServerKey = 10; - string Url = 11; } -// structure defining a from serve receiver message decrypted from a "packedmessage" payload +// structure defining a from server receiver message decrypted from a "packedmessage" payload message FromServerMessage { - string Type = 1; // Type - string ServerPubKey = 2 ; // My pub key for the server to send me an encrypter answer - bytes Payload = 3 ; // - uint64 ServerReceived = 4 ; - string ServerUuid = 5 ; + string type = 1; // Type + string serverPubKey = 2 ; // My pub key for the server to send me an encrypter answer + bytes payload = 3 ; // + uint64 serverReceived = 4 ; + string serverUuid = 5 ; message ConversationResponse { - repeated string MessageUuids = 1; + repeated string messageUuids = 1; } - map PullResponse = 8; + map pullResponse = 6; message PostedMessage{ string lookupKey= 1; - repeated PackedUserMessage Messages = 2; + repeated PackedUserMessage messages = 2; } - repeated PostedMessage Messages = 9; - string NextServerKey = 10; - string Url = 11; + repeated PostedMessage chat = 7; + } +// structure describing required server attributes message Server { - string Name = 1; - string Description=2; - string PublicKey = 3; - string Url = 4; - int32 ConfidenceLevel = 5; + string name = 1; + string description=2; + string publicKey = 3; + string url = 4; + int32 confidenceLevel = 5; } +// structure describing a user contact card ie the minimum set of attributes for exchanging identities message ContactCard { string name=1; string contactPublicKey =2; string encryptionPublicKey= 3; string lookupPublicKey =4; - repeated Server PullServers =5; + repeated Server pullServers =5; + int32 version = 6; } - -message MinimalContact { - string name=1; - string publicKey=2; - repeated Server TrustedServers = 3; +// structure for sending a message to be forwarded to another user in protobuf format +message PackedUserMessage { + string from = 1; // the client identity public key as known by the destination peer + string destination=2; // the peer's current conversation lookup public key + bytes payload=3; // the message UserMessage encrypted with the destination peer's public key + bytes signature=4; // the payload signature with the client identity private key } +// structure defining information that might be exchanged between two peers. message UserMessage { - string Destination = 1; string From = 2; string Type = 3; @@ -99,21 +92,18 @@ message UserMessage { uint64 Sent = 3 ; uint64 Received = 4; uint64 Processed = 5; - string NextCkey = 6; // contact key - bool NextCkeyAck = 7; // false when proposing a new id, true for accepting it - string NextEkey = 8; // encryption key - bool NextKeyEkeyAck = 9; // false when proposing a new key, true for accpeting it - string NextLkey = 10; // lookup key - bool NextLkeyAck = 11; // false when proposing a new id, true for accepting it - } + ContactCard myNextIdentity = 6; + int32 peerNextIdentityAck = 7; // version of the new peed accepted id + } ConversationStatus Status = 5; + ContactCard contact = 6; - MinimalContact contact = 6; + Server knownServers = 7; message Group{ string name=1; - repeated MinimalContact members = 2; + repeated ContactCard members = 2; } - Group group = 7; + Group group = 8; } \ No newline at end of file