diff --git a/proto/umbra/base.proto b/proto/umbra/base.proto deleted file mode 100644 index 61fdf35..0000000 --- a/proto/umbra/base.proto +++ /dev/null @@ -1,68 +0,0 @@ -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; - 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; -} \ No newline at end of file diff --git a/proto/umbra/encryption.proto b/proto/umbra/encryption.proto index 52a20b7..f4a3c8c 100644 --- a/proto/umbra/encryption.proto +++ b/proto/umbra/encryption.proto @@ -3,6 +3,16 @@ syntax = "proto3"; package umbra.encryption; +// TODO: This also encompasses plaintexts, is there a better name? +// Alternatives: ??? +message EncryptedPayload { + + oneof encryption { + encryption.Plaintext plaintext = 1; + encryption.Ecies ecies = 2; + } +} + message Plaintext { bytes payload=1; } diff --git a/proto/umbra/envelope.proto b/proto/umbra/envelope.proto new file mode 100644 index 0000000..9bc8a6e --- /dev/null +++ b/proto/umbra/envelope.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package umbra.envelope; + + +/////////////////////////////////////////////////////////////////////////////// +// Payload Framing Messages +/////////////////////////////////////////////////////////////////////////////// + +message UmbraEnvelopeV1 { + + string conversation_hint = 1; + uint64 salt = 2; + + bytes payload = 5; +} \ No newline at end of file diff --git a/proto/umbra/inbox.proto b/proto/umbra/inbox.proto new file mode 100644 index 0000000..1707189 --- /dev/null +++ b/proto/umbra/inbox.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package umbra.inbox; + +import "invite.proto"; + +message InboxV1Frame { + string recipient = 1; + oneof frame_type { + invite.InvitePrivateV1 invite_private_v1 = 10; + } +} \ No newline at end of file diff --git a/proto/umbra/reliability.proto b/proto/umbra/reliability.proto new file mode 100644 index 0000000..3c433c3 --- /dev/null +++ b/proto/umbra/reliability.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package umbra.reliability; + +/////////////////////////////////////////////////////////////////////////////// +// 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 ReliablePayload { + string message_id = 2; + string channel_id = 3; + int32 lamport_timestamp = 10; + repeated HistoryEntry causal_history = 11; + bytes bloom_filter = 12; + // Optional field causes errors in nim protobuf generation. Removing for now as optional is implied anways. + bytes content = 20; + }