Doc update

This commit is contained in:
ycc
2023-11-06 22:44:21 +01:00
parent cd41a59518
commit 08ff9d58b8
12 changed files with 855 additions and 732 deletions

View File

@ -3,7 +3,12 @@
// Lower field number values take less space in the wire format.
// For example, field numbers in the range 1 through 15 take one byte to encode.
// Field numbers in the range 16 through 2047 take two bytes.
/**
* Meow messages
*
* This is the Meow protocol protobuf messages description.
*
*/
syntax = "proto3";
package meowlib;
option go_package = "forge.redroom.link/yves/meowlib";
@ -17,29 +22,31 @@ message PackedServerMessage {
// structure to hold an invitation through a server
message Invitation {
bytes payload = 1;
int32 timeout = 2;
int32 idlen = 3;
string password = 4;
string id = 5;
int64 expiry = 6;
int32 step = 7;
bytes payload = 1; // invitation payload, encrypted after step 2
int32 timeout = 2; // how long do I want the invitation to remain available on the server
int32 idlen = 3; // len of the id you wish for short url transmission
string password = 4; // password tou set for accessin invitation (optional)
string id = 5; // id that the friend shall request to get teh invitation
int64 expiry = 6; // the server allowed expiry date, it may be samller than the requested timeout according to server policy
int32 step = 7; // progress in the inviattion process : 1=invite friend, 2=friend requests invitation, 3=friend's answer, 4=request answer
}
// 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 lookupSignature = 4; // prove that I own the private key by signing that block
}
// structure defining a message for a server, that will be encrypted, then sent in a "packedmessage" payload
message ToServerMessage {
string type = 1; // Type 1 : final destination / 2 : forward
string from = 2 ; // My pub key for the server to send me an encrypter answer
bytes payload = 3 ; // optional payload for server
// 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 lookupSignature = 4; // prove that I own the private key by signing that block
}
repeated ConversationRequest pullRequest = 4;
repeated PackedUserMessage messages = 5;
@ -54,6 +61,10 @@ message ToServerMessage {
}
message ConversationResponse {
repeated string messageUuids = 1;
}
// structure defining a from server receiver message decrypted from a "packedmessage" payload
message FromServerMessage {
string type = 1; // Type
@ -62,10 +73,6 @@ message FromServerMessage {
string uuidAck = 4 ; // Ack for the last received ToServerMessage Uuid
string serverUuid = 5 ; // Provides the server uuid that replaced the client uuid
message ConversationResponse {
repeated string messageUuids = 1;
}
repeated PackedUserMessage chat = 6;
repeated Server knownServers = 7;
@ -90,10 +97,10 @@ message Matriochka {
// structure describing required server attributes
message Server {
string name = 1;
string description=2;
string publicKey = 3;
string url = 4;
string name = 1; // friendly server name
string description=2; // description : owner type (company/private/university...),
string publicKey = 3; // public key you must use to send encrypted messages to that server
string url = 4; // meow server url
bool publish = 5; // publish this server when asked for a list by server
bytes signature = 6; // signature of all previous fields by the server itself
int32 confidenceLevel = 7; // additional info from the user
@ -101,11 +108,11 @@ message Server {
// 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;
string name=1; // contact nickname
string contactPublicKey =2; // contact public key, will be used to authenticate her/his messages
string encryptionPublicKey= 3; // public key you must use to to write encrypted messages to that contact
string lookupPublicKey =4; // public key you will use as "destination identifier" for her/him to lookup for your messages on the servers
repeated Server pullServers =5; // list the servers where the contact will look for messages from you
uint32 version = 6;
string invitationId=7;
}
@ -118,6 +125,20 @@ message PackedUserMessage {
repeated int64 serverTimestamp=4; // server time stamp, might be several in matriochka mode
}
message ConversationStatus {
string localUuid = 1;
uint64 localSequence = 2 ;
uint64 sent = 3 ;
uint64 received = 4;
uint64 processed = 5;
ContactCard myNextIdentity = 6;
int32 peerNextIdentityAck = 7; // version of the new peer accepted id
}
message Group{
string name=1;
repeated ContactCard members = 2;
}
// structure defining information that might be exchanged between two peers.
message UserMessage {
@ -125,25 +146,13 @@ message UserMessage {
string from = 2; // My public key for that contact
string type = 3;
bytes data = 4;
message ConversationStatus {
string localUuid = 1;
uint64 localSequence = 2 ;
uint64 sent = 3 ;
uint64 received = 4;
uint64 processed = 5;
ContactCard myNextIdentity = 6;
int32 peerNextIdentityAck = 7; // version of the new peer accepted id
}
ConversationStatus Status = 5;
ContactCard contact = 6;
Server knownServers = 7;
message Group{
string name=1;
repeated ContactCard members = 2;
}
Group group = 8;
repeated File files = 9;