diff --git a/go/keystore_api/v1/keystore.pb.go b/go/keystore_api/v1/keystore.pb.go index 943bd8c2..726d0be6 100644 --- a/go/keystore_api/v1/keystore.pb.go +++ b/go/keystore_api/v1/keystore.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: keystore_api/v1/keystore.proto package v1 diff --git a/go/message_api/v1/authn.pb.go b/go/message_api/v1/authn.pb.go index a3126aec..f0a6b961 100644 --- a/go/message_api/v1/authn.pb.go +++ b/go/message_api/v1/authn.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_api/v1/authn.proto package v1 diff --git a/go/message_api/v1/message_api.pb.go b/go/message_api/v1/message_api.pb.go index 88c223d6..36474b5f 100644 --- a/go/message_api/v1/message_api.pb.go +++ b/go/message_api/v1/message_api.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_api/v1/message_api.proto package v1 diff --git a/go/message_api/v1/message_api_grpc.pb.go b/go/message_api/v1/message_api_grpc.pb.go index 554ccd12..4d783e66 100644 --- a/go/message_api/v1/message_api_grpc.pb.go +++ b/go/message_api/v1/message_api_grpc.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.1 +// - protoc v4.25.2 // source: message_api/v1/message_api.proto package v1 diff --git a/go/message_contents/ciphertext.pb.go b/go/message_contents/ciphertext.pb.go index 528f109f..2c743272 100644 --- a/go/message_contents/ciphertext.pb.go +++ b/go/message_contents/ciphertext.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/ciphertext.proto package message_contents diff --git a/go/message_contents/composite.pb.go b/go/message_contents/composite.pb.go index 3395357a..ddaf39fc 100644 --- a/go/message_contents/composite.pb.go +++ b/go/message_contents/composite.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/composite.proto package message_contents diff --git a/go/message_contents/contact.pb.go b/go/message_contents/contact.pb.go index 49bf0b49..c31a32b2 100644 --- a/go/message_contents/contact.pb.go +++ b/go/message_contents/contact.pb.go @@ -7,7 +7,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/contact.proto package message_contents diff --git a/go/message_contents/content.pb.go b/go/message_contents/content.pb.go index 26fa2800..57cc948b 100644 --- a/go/message_contents/content.pb.go +++ b/go/message_contents/content.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/content.proto package message_contents diff --git a/go/message_contents/conversation_reference.pb.go b/go/message_contents/conversation_reference.pb.go index d933282d..560eea2f 100644 --- a/go/message_contents/conversation_reference.pb.go +++ b/go/message_contents/conversation_reference.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/conversation_reference.proto package message_contents diff --git a/go/message_contents/invitation.pb.go b/go/message_contents/invitation.pb.go index 72ac731c..f7a80d30 100644 --- a/go/message_contents/invitation.pb.go +++ b/go/message_contents/invitation.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/invitation.proto package message_contents diff --git a/go/message_contents/message.pb.go b/go/message_contents/message.pb.go index a6b295ec..cedd0294 100644 --- a/go/message_contents/message.pb.go +++ b/go/message_contents/message.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/message.proto package message_contents @@ -93,7 +93,8 @@ type MessageV1 struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates encoded MessageHeaderV1 + // encapsulates encoded MessageHeaderV1 + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // Ciphertext.payload MUST contain encrypted EncodedContent Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` } @@ -211,12 +212,15 @@ type MessageV2 struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates encoded MessageHeaderV2 + // encapsulates encoded MessageHeaderV2 + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // Ciphertext.payload MUST contain encrypted SignedContent Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` - // HMAC of the message ciphertext, with the HMAC key derived from the topic key + // HMAC of the message ciphertext, with the HMAC key derived from the topic + // key SenderHmac []byte `protobuf:"bytes,3,opt,name=sender_hmac,json=senderHmac,proto3,oneof" json:"sender_hmac,omitempty"` - // Flag indicating whether the message should be pushed from a notification server + // Flag indicating whether the message should be pushed from a notification + // server ShouldPush *bool `protobuf:"varint,4,opt,name=should_push,json=shouldPush,proto3,oneof" json:"should_push,omitempty"` } diff --git a/go/message_contents/private_key.pb.go b/go/message_contents/private_key.pb.go index bb257bc7..6f59def5 100644 --- a/go/message_contents/private_key.pb.go +++ b/go/message_contents/private_key.pb.go @@ -6,7 +6,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/private_key.proto package message_contents diff --git a/go/message_contents/public_key.pb.go b/go/message_contents/public_key.pb.go index bfa0c886..f04bb9a1 100644 --- a/go/message_contents/public_key.pb.go +++ b/go/message_contents/public_key.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/public_key.proto package message_contents diff --git a/go/message_contents/signature.pb.go b/go/message_contents/signature.pb.go index e0cb1fb8..19d7cb2e 100644 --- a/go/message_contents/signature.pb.go +++ b/go/message_contents/signature.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: message_contents/signature.proto package message_contents diff --git a/go/mls/api/v1/mls.pb.go b/go/mls/api/v1/mls.pb.go index 9ad438d7..a57788ef 100644 --- a/go/mls/api/v1/mls.pb.go +++ b/go/mls/api/v1/mls.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: mls/api/v1/mls.proto package v1 diff --git a/go/mls/api/v1/mls_grpc.pb.go b/go/mls/api/v1/mls_grpc.pb.go index ae6920a9..2ee9d616 100644 --- a/go/mls/api/v1/mls_grpc.pb.go +++ b/go/mls/api/v1/mls_grpc.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.1 +// - protoc v4.25.2 // source: mls/api/v1/mls.proto package v1 diff --git a/go/mls_validation/v1/service.pb.go b/go/mls_validation/v1/service.pb.go index 913585fb..5ff51120 100644 --- a/go/mls_validation/v1/service.pb.go +++ b/go/mls_validation/v1/service.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.25.1 +// protoc v4.25.2 // source: mls_validation/v1/service.proto package v1 diff --git a/go/mls_validation/v1/service_grpc.pb.go b/go/mls_validation/v1/service_grpc.pb.go index 69af37fd..2aca430b 100644 --- a/go/mls_validation/v1/service_grpc.pb.go +++ b/go/mls_validation/v1/service_grpc.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.1 +// - protoc v4.25.2 // source: mls_validation/v1/service.proto package v1 diff --git a/proto/message_contents/message.proto b/proto/message_contents/message.proto index ec80bada..8f624361 100644 --- a/proto/message_contents/message.proto +++ b/proto/message_contents/message.proto @@ -22,7 +22,8 @@ message MessageHeaderV1 { // Message is the top level protocol element message MessageV1 { - bytes header_bytes = 1; // encapsulates encoded MessageHeaderV1 + // encapsulates encoded MessageHeaderV1 + bytes header_bytes = 1; // Ciphertext.payload MUST contain encrypted EncodedContent Ciphertext ciphertext = 2; } @@ -42,12 +43,15 @@ message MessageHeaderV2 { // Message combines the encoded header with the encrypted payload. message MessageV2 { - bytes header_bytes = 1; // encapsulates encoded MessageHeaderV2 + // encapsulates encoded MessageHeaderV2 + bytes header_bytes = 1; // Ciphertext.payload MUST contain encrypted SignedContent Ciphertext ciphertext = 2; - // HMAC of the message ciphertext, with the HMAC key derived from the topic key + // HMAC of the message ciphertext, with the HMAC key derived from the topic + // key optional bytes sender_hmac = 3; - // Flag indicating whether the message should be pushed from a notification server + // Flag indicating whether the message should be pushed from a notification + // server optional bool should_push = 4; } diff --git a/proto/mls/message_contents/content.proto b/proto/mls/message_contents/content.proto index da141b55..7b138927 100644 --- a/proto/mls/message_contents/content.proto +++ b/proto/mls/message_contents/content.proto @@ -9,8 +9,8 @@ option java_package = "org.xmtp.proto.mls.message.contents"; // ContentTypeId is used to identify the type of content stored in a Message. message ContentTypeId { - string authority_id = 1; // authority governing this content type - string type_id = 2; // type identifier + string authority_id = 1; // authority governing this content type + string type_id = 2; // type identifier uint32 version_major = 3; // major version of the type uint32 version_minor = 4; // minor version of the type } @@ -52,7 +52,35 @@ message PlaintextEnvelope { string idempotency_key = 2; } + // Version 2 of the encrypted envelope + message V2 { + oneof message_type { + // Expected to be EncodedContent + bytes content = 1; + // Initiator sends the request to receive history + MessageHistoryRequest message_history_request = 2; + // Other credentialed party sends response + MessageHistoryResponse message_history_response = 3; + } + } + + // Selector which declares which version of the EncodedContent this + // PlaintextEnvelope is oneof content { V1 v1 = 1; + V2 v2 = 2; } } + +// The initiator or new installation id that is requesting a history will send a +// request +message MessageHistoryRequest { string request_id = 1; } + +// Pre-existing installation id that is capable of supplying a history will send +// this response +message MessageHistoryResponse { + string request_id = 1; + string backup_url = 2; + bytes backup_file_hash = 3; + int64 expiration_time_ns = 4; +}