mirror of
https://github.com/logos-messaging/chat_proto.git
synced 2026-01-03 05:23:08 +00:00
68 lines
1.9 KiB
Protocol Buffer
68 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package umbra.base;
|
|
|
|
import "encryption.proto";
|
|
import "invite.proto";
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Protocol Frames
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
message InboxV1Frame {
|
|
string recipient = 1;
|
|
// string conversation_type = 2;
|
|
oneof frame_type {
|
|
invite.InvitePrivateV1 invite_private_v1 = 10;
|
|
}
|
|
}
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// SDS Payloads
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
message HistoryEntry {
|
|
string message_id = 1; // Unique identifier of the SDS message, as defined in `Message`
|
|
bytes retrieval_hint = 2; // Optional information to help remote parties retrieve this SDS
|
|
// message; For example, A Waku deterministic message hash or routing payload hash
|
|
}
|
|
|
|
message ReliableBytes {
|
|
string message_id = 2;
|
|
string channel_id = 3;
|
|
int32 lamport_timestamp = 10;
|
|
repeated HistoryEntry causal_history = 11;
|
|
bytes bloom_filter = 12;
|
|
optional bytes content = 20;
|
|
}
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Encryption
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// TODO: This also encompasses plaintexts, is there a better name?
|
|
// Alternatives: ???
|
|
message EncryptedBytes {
|
|
|
|
oneof encryption {
|
|
encryption.Plaintext plaintext = 1;
|
|
encryption.Ecies ecies = 2;
|
|
}
|
|
}
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Payload Framing Messages
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
message UmbraEnvelopeV1 {
|
|
|
|
string conversation_hint = 1;
|
|
uint64 salt = 2;
|
|
|
|
bytes payload = 5;
|
|
} |