2022-01-15 22:19:29 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
package meowlib;
|
|
|
|
option go_package = "forge.redroom.link/yves/meowlib";
|
|
|
|
|
2022-09-02 12:07:21 +02:00
|
|
|
// structure for sending a message intended for server use in protobuf format
|
2022-01-15 22:19:29 +01:00
|
|
|
message PackedServerMessage {
|
|
|
|
string From = 1;
|
|
|
|
bytes Payload = 2;
|
2022-09-02 12:07:21 +02:00
|
|
|
bytes Signature = 3;
|
2022-01-15 22:19:29 +01:00
|
|
|
}
|
|
|
|
|
2022-09-02 12:07:21 +02:00
|
|
|
// structure for sending a message to be forwarded to another user in protobuf format
|
2022-01-15 22:19:29 +01:00
|
|
|
message PackedUserMessage {
|
|
|
|
string From = 1;
|
|
|
|
string Destination=2;
|
|
|
|
bytes Payload=3;
|
|
|
|
bytes Signature=4;
|
|
|
|
}
|
|
|
|
|
2022-09-05 14:09:39 +02:00
|
|
|
// structure defining a message 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
|
2022-01-15 22:19:29 +01:00
|
|
|
|
2022-09-05 14:09:39 +02:00
|
|
|
message ConversationRequest { // Structure for requestion incoming messages
|
|
|
|
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 lookupSignature = 4; // prove that I own the private key by signing that block
|
2022-01-15 22:19:29 +01:00
|
|
|
}
|
|
|
|
|
2022-09-05 14:09:39 +02:00
|
|
|
repeated ConversationRequest PullRequest = 7;
|
|
|
|
|
|
|
|
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
|
|
|
|
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 ;
|
|
|
|
|
2022-01-15 22:19:29 +01:00
|
|
|
message ConversationResponse {
|
|
|
|
repeated string MessageUuids = 1;
|
|
|
|
}
|
|
|
|
|
2022-09-05 14:09:39 +02:00
|
|
|
map<string,ConversationResponse> PullResponse = 8;
|
2022-01-15 22:19:29 +01:00
|
|
|
|
|
|
|
message PostedMessage{
|
2022-09-05 14:09:39 +02:00
|
|
|
string lookupKey= 1;
|
2022-01-15 22:19:29 +01:00
|
|
|
repeated PackedUserMessage Messages = 2;
|
|
|
|
}
|
|
|
|
repeated PostedMessage Messages = 9;
|
|
|
|
string NextServerKey = 10;
|
|
|
|
string Url = 11;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Server {
|
|
|
|
string Name = 1;
|
|
|
|
string Description=2;
|
|
|
|
string PublicKey = 3;
|
|
|
|
string Url = 4;
|
|
|
|
int32 ConfidenceLevel = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MinimalContact {
|
|
|
|
string name=1;
|
|
|
|
string publicKey=2;
|
|
|
|
repeated Server TrustedServers = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserMessage {
|
|
|
|
|
|
|
|
string Destination = 1;
|
|
|
|
string From = 2;
|
|
|
|
string Type = 3;
|
|
|
|
bytes Data = 4;
|
|
|
|
message ConversationStatus {
|
|
|
|
string LocalUuid = 1;
|
|
|
|
uint64 LocalSequence = 2 ;
|
|
|
|
uint64 Sent = 3 ;
|
|
|
|
uint64 Received = 4;
|
|
|
|
uint64 Processed = 5;
|
2022-09-02 12:07:21 +02:00
|
|
|
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
|
2022-01-15 22:19:29 +01:00
|
|
|
}
|
|
|
|
ConversationStatus Status = 5;
|
|
|
|
|
|
|
|
|
|
|
|
MinimalContact contact = 6;
|
|
|
|
|
|
|
|
message Group{
|
|
|
|
string name=1;
|
|
|
|
repeated MinimalContact members = 2;
|
|
|
|
}
|
|
|
|
Group group = 7;
|
|
|
|
}
|